Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
flopezag committed Jun 8, 2018
1 parent 5761c26 commit 8e94c42
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 24 deletions.
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
# docker-fiware

[![License badge](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Introduction

Sample docker-compose and configuration files to deploy almost a complete FIWARE architecture example.

## Install

Simple clone the repository in your local folder:
You have two possibilites to deploy this component, locally in your environment or in a virtual machine.

### Install locally

In order to install locally this component you have to keep in mind that you should have installed previously
docker and docker-compose. Please follow the tutorial [Install Docker CE](https://docs.docker.com/install/) in
order to install docker engine and then follow the documentation [Install Docker Compose](https://docs.docker.com/compose/install/).

The next step is simple clone the repository in your local folder:

```bash
git clone https://github.com/flopezag/docker-fiware
```

Once you did it you can go into the IdM Instance and configure your application (in this case the Wirecloud). Remember that in this case you need to put the URL of the application <http://127.0.0.1> and the callback url <http://127.0.0.1/complete/fiware>. Leave the rest of questions without change. Optionally, you can provide some description just to know what is about.
After this step you can launch your services just executing:

Click on Next and Finish the process. It will generage your OAuth2 credentials (Client ID and Client Secret values) of your application. It is needed in order to configure Wirecloud to connect to this IdM instance.
```bash
docker-compose up -d
```

To configure your wirecloud instance just execute the configuration script:
Last but not leasr, to configure your wirecloud instance just execute the configuration script:

```bash
./setup.sh init
```

It will request you the OAuth2 credentials and automatically will change all the parameters in wirecloud in order to use the authentication using your own instance of IdM.

Last but not least, due to internal communication of the Wirecloud it is needed that your /etc/hosts file could include the following line:
It will request you the user name and password of the [IdM](http://127.0.0.1:3000) instance that you have allocated.
Please use the default administration user of the IdM. In order to access the wirecloud just go to the link
[Wirecloud](http://127.0.0.1).

```bash
127.0.0.1 localhost fiware-idm
```
### Install remotelly

## Usage
In order to install and configure the deployment of this dockers, you can take a look to the documentation provided in
deploy folder, [How to deploy it in a specific machine](deploy/README.md)

## License

Apache2.0
These scripts are licensed under Apache License 2.0.
16 changes: 11 additions & 5 deletions deploy/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Setting up a stand-alone FIWARE Lab User Create service
# How to deploy it in a specific machine

This content describes how to deploy this example of FIWARE services using an
[ansible](http://www.ansible.com) playbook. It has been tested on the
Expand All @@ -22,15 +22,21 @@ IdM - Keyrock local instance deployed in the docker-compose.

pip install -r requirements.txt

* One all the variables are in place you should be able to deploy and
configure the service. Just run the following command:
* Go into the vars/main.yml and assign the IP of the virtual machine to the variable
ip_address.

* Execute the ansible playbook to deploy and configure the services:

ansible-playbook -vvvv -i inventory.yml \
--private-key=(Key pair to access to the instance) \
deploy_fiware.yml

* Once that the command finish, the last step is going into the virtual machine and execute the command:
* Once that the command finish, the last step is going into the virtual machine and
execute the command:

sudo ./setup.sh init

Which automatically configure the Wirecloud to connect to the local instance of IdM.
Which automatically configure the Wirecloud to connect to the local instance of IdM.

Keep in mind that the deployment and configuration of all the steps could expend some
time. One of our execution expends arround 13 minutes to finish it.
8 changes: 1 addition & 7 deletions deploy/deploy_fiware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
register: hostname

- debug:
msg: "{{ hostname }}"
msg: "{{ hostname }}"

- name: add myself and fiware-idm to /etc/hosts
lineinfile:
Expand Down Expand Up @@ -175,9 +175,3 @@
become: true
args:
chdir: /home/ubuntu/docker-fiware

- name: Configurte the IdM and Wirecloud to work together
shell: ./setup.sh init
become: true
args:
chdir: /home/ubuntu/docker-fiware

0 comments on commit 8e94c42

Please sign in to comment.