You can build a docker image based on this Dockerfile. This image will contain only an Orchestrator instance, exposing port 8084
. This requires that you have docker installed on your machine.
If you just want to have an Orchestrator running as fast as possible jump to section The Fastest Way.
If you want to know what and how we are doing things with the container step by step you can go ahead and read the Build and Run sections.
A Docker Compose file is provided for convenience. You must install Docker Compose for this method to work.
Simply navigate to the docker directory of the orchestrator code (if you have downloaded it) and run
docker-compose up
If you haven't or you don't want to download the whole thing, you can download the file called docker-compose.yaml
in a directory of your choice and run the aforementioned command. It will work just the same.
You can use this or also you can create a docker-compose.yaml file, were you should include an orchestrator section like this:
orchestrator:
image: telefonicaiot/orchestrator:latest
expose:
- "8084"
links:
- keystone
- keypass
- pep-orion
- pep-perseo-fe
- mongo
ports:
- "8084:8084"
command: -keystonehost keystone -keypasshost keypass -orionhost pep-orion -pepperseohost pep-perseo-fe -sthhost sth -perseohost perseo-fe -cygnushost cygnus -mongodburi mongo:27017
As you can see there are several arguments to pass to orchestrator entry point in order to configure some relevant endpoints for orchestrator as keystone, keypass, orion, iota and so on. Make sure all of them are present:
-keystonehost <value>
-keypasshost <value>
-orionhost <value>
-pepperseohost <value>
-sthhost <value>
-perseohost <value>
-cygnushost <value>
-mailerhost <value>
-ldaphost <value>
-keystoneport <value>
-keypassport <value>
-orionport <value>
-pepperseoport <value>
-sthport <value>
-perseoport <value>
-cygnusport <value>
-ldapport <value>
-mailerport <value>
-ldapbasedn <value>
-maileruser <value>
-mailerpasswd <value>
-mailerfrom <value>
-mailerto <value>
-mongodburi <value>
command option | settings configuration | default value |
---|---|---|
-keystonehost | KEYSTONE.host | localhost |
-keypasshost | KEYPASS.host | localhost |
-orionhost | ORION.host | localhost |
-pepperseohost | PEP_ORION.host | localhost |
-sthhost | STH.host | localhost |
-perseohost | PERSEO.host | localhost |
-cygnushost | CYGNUS.host | localhost |
-mailerhost | MAILER.host | localhost |
-ldaphost | LDAP.host | localhost |
-keystoneport | KEYSTONE.port | 5001 |
-keypassport | KEYPASS.port | 7070 |
-orionport | ORION.port | 1026 |
-pepperseoport | PEP_PERSEO.port | 9090 |
-sthport | STH.port | 8666 |
-perseoport | PERSEO.port | 9090 |
-cygnusport | CYGNUS.port | 5050 |
-ldapport | LDAP.port | 389 |
-mailerport | MAILER.port | 587 |
-ldapbasedn | LDAP.basedn | dc=openstack,dc=org |
-maileruser | MAILER.user | [email protected] |
-mailerpasswd | MAILER.password | yourpassword |
-mailerfrom | MAILER.from | smtpuser |
-mailerto | MAILER.to | smtpuser |
-mongodburi | MONGODB.URI | mongodb://localhost:27017 |
Additionally, the following environment variables are available for orchestrator docker
Environment variable | Configuration attribute | Default value |
---|---|---|
PORT | 8084 | |
PROCESSES | 6 | |
THREADS | 8 | |
HARAKIRI | 80 | |
HTTP_TIMEOUT | 200 | |
MAX_REQUESTS | 250 | |
QUEUE_SIZE | 256 | |
UWSGI_BUFFER_SIZE | 4096 | |
KEYSTONE_HOST | KEYSTONE.host | localhost |
KEYSTONE_PORT | KEYSTONE.port | 5001 |
KEYSTONE_PROTOCOL | KEYSTONE.protocol | http |
KEYPASS_HOST | KEYPASS.host | localhost |
KEYPASS_PORT | KEYPASS.port | 17070 |
KEYPASS_PROTOCOL | KEYPASS.protocol | http |
ORION_HOST | ORION.host | localhost |
ORION_PORT | ORION.port | 1026 |
ORION_PROTOCOL | ORION.protocol | http |
PEP_PERSEO_HOST | PEP_ORION.host | localhost |
PEP_PERSEO_PORT | PEP_PERSEO.port | 9090 |
PEP_PERSEO_PROTOCOL | PEP_PERSEO.protocol | http |
STH_HOST | STH.host | localhost |
STH_PORT | STH.port | 18666 |
STH_NOTIFYPATH | STH.notifypath | notify |
STH_PROTOCOL | STH.protocol | http |
PERSEO_HOST | PERSEO.host | localhost |
PERSEO_PORT | PERSEO.port | 19090 |
PERSEO_PROTOCOL | PERSEO.protocol | http |
PERSEO_NOTIFYPATH | PERSEO.notifypath | notices |
CYGNUS_HOST | CYGNUS.host | localhost |
CYGNUS_PORT | CYGNUS.port | 5050 |
CYGNUS_PROTOCOL | CYGNUS.protocol | http |
CYGNUS_NOTIFYPATH | CYGNUS.notifypath | notify |
CYGNUS_MULTISING | CYGNUS.multisink | false |
MAILER_HOST | MAILER.host | localhost |
MAILER_PORT | MAILER.port | 587 |
MAILER_TLS | MAILER.tls | true |
MAILER_USER | MAILER.user | [email protected] |
MAILER_PASSWORD | MAILER.password | yourpassword |
MAILER_FROM | MAILER.from | smtpuser |
MAILER_TO | MAILER.to | smtpuser |
LDAP_HOST | LDAP.host | localhost |
LDAP_PORT | LDAP.port | 389 |
LDAP_BASEDN | LDAP.basedn | dc=openstack,dc=org |
MONGODB_URI | MONGODB.URI | localhost:27017 |
PEP_USER | PEP.user | pep |
PEP_PASSWORD | PEP.password | pep |
IOTAGENT_USER | IOTAGENT.user | iotagent |
IOTAGENT_PASSWORD | IOTAGENT.password | iotagent |
This is an alternative approach than the one presented in section The Fastest Way. You do not need to go through these steps if you have used docker-compose.
You only need to do this once in your system:
docker build -t orchestrator .
The parameter -t orchestrator
gives the image a name. This name could be anything, or even include an organization like -t org/orchestrator
. This name is later used to run the container based on the image.
If you want to know more about images and the building process you can find it in Docker's documentation.
The following line will run the container exposing port 8084
, give it a name -in this case orchestrator1
and present a bash prompt.
docker run -d --name orchestrator1 -p 8084:8084 orchestrator
As a result of this command, there is a orchestrator listening on port 8084 on localhost. Try to see if it works now with
curl localhost:8084/v1.0/version
A few points to consider:
- The name
orchestrator1
can be anything and doesn't have to be related to the name given to the docker image in the previous section. - In
-p 8084:8084
the first value represents the port to listen in on localhost. If you wanted to run a second orchestrator on your machine you should change this value to something else, for example-p 8184:8084
. - Anything after the name of the container image (in this case
orchestrator
) is interpreted as a parameter for the Orchestrator.