Automated Resource Management in Your Local Environment¶
This is a step-by-step guide on how to setup the automated resource management lab in your local environment using containers.
To be able to run the scenario you need to start up the following containers:
- NetBox
- use a standard NetBox container based on the Docker image provided by the NetBox development community
- follow the guide in the provided link to setup and run your NetBox container using Docker
- Uptime Kuma + API
- follow the guide on how to Launch Uptime Kuma & Uptime Kuma API with Docker in a production setup
- the guide will help you start up two containers one for Uptime Kuma and another one for the API wrapper for Uptime Kuma
- make sure that instead of the latest version (louislam/uptime-kuma:latest), you use an Uptime Kuma version that is supported by the API (currently we are using v1.22)
Warning
Be careful when you setup the ports for the different containers so that they do not overlap.
- (Optional) Oxidized
- use the standard Docker image provided for Oxidized
- setup Oxidized to read its configuration, model and list of devices from a Git repo of your choice
- Camunda
- this is the only non-standard Docker image that you need to use for this scenario
- the steps regarding how to get and how to configure the Camunda Docker containers are provided below
Setting up the Camunda container¶
The latest image for the Camunda container that contains all processes needed to run the automated resource management is publicly available on GÉANT Artefactory.
All you need to do is docker image pull artifactory.software.geant.org/spa-docker/camunda4gp4l:develop-rev-5a0e11f
Parameters¶
Before you start up the container you need to setup the configuration parameters of the Camunda container. These are presented in the table below together with their description and their default values. The listed parameters can be edited in the .env file.
Note
For the full list of available parameters take a look at the file. The ones listed are just the parameters that you will most probably need to adjust to your requirements for running the scenario.
| Parameter | Default value | Description |
|---|---|---|
| CAMUNDA_USER | admin | name of the Camunda user |
| CAMUNDA_PASSWORD | ENC(ZA57NOnRNE3AxgQgfD4v7FIY8tcDRO4FYxj38nItmgQ=) | password for the Camunda user |
| CAMUNDA_SPRING_MAIL_HOST | smtp.live.com | SMTP email server that will send the email notifications |
| CAMUNDA_SPRING_MAIL_PORT | 587 | SMTP server port |
| CAMUNDA_SPRING_MAIL_USERNAME | user@domain.com | SMTP server account username |
| CAMUNDA_SPRING_MAIL_PASSWORD | ENC(password) | SMTP server account password |
| CAMUNDA_SPRING_MAIL_TO | user@domain.com | who should receive the email notifications, separate multiple email addresses with comma |
| CAMUNDA_SPRING_MAIL_TO_KEYS | user@domain.com | who should receive the ssh keys generated by Camunda when using Oxidized, separate multiple email addresses with comma |
| CAMUNDA_SPRING_MAIL_FROM_LIBRE | user@domain.com | the from email address when sending notifications related to Libre Booking |
| CAMUNDA_SPRING_MAIL_CREATION | True | should email notification be sent on Uptime Kuma monitor creation |
| CAMUNDA_SPRING_MAIL_MODIFY | True | should email notification be sent on Uptime Kuma monitor modification |
| CAMUNDA_SPRING_MAIL_REACTIVATION | True | should email notification be sent on Uptime Kuma monitor reactivation |
| CAMUNDA_SPRING_MAIL_PAUSED | True | should email notification be sent on Uptime Kuma monitor pausing |
| CAMUNDA_SERVER_PORT | 8080 | port for running the Camunda server |
| CAMUNDA_SERVICES_UPTIME_KUMA_IP | http://gp4lab-orch.qalab.geant.net:8000 | Uptime Kuma API URL |
| CAMUNDA_SERVICES_UPTIME_KUMA_USERNAME | admin | Uptime Kuma API username |
| CAMUNDA_SERVICES_UPTIME_KUMA_PASSWORD | ENC(kR0aexylg7CWLqae0OKo2ZkrRW8b092hQ7s4xJift5A=) | Uptime kuma API password |
| CAMUNDA_SERVICES_NETBOX_IP | https://netbox.rare.nmaas.eu/ | NetBox URL |
| CAMUNDA_SERVICES_NETBOX_TOKEN | ENC(tD64Frnu1Jy5ODEeY697HjjNaDuS0NxC) | NetBox token |
| CAMUNDA_SERVICES_OXIDIZED_EXISTS | true | Is Oxidized used? If not used, all related parameters should be left to default values |
| CAMUNDA_SERVICES_OXIDIZED_GIT | ssh://git@gitlab.nmaas.eu/groups-rare/rare-oxidized-1300.git | SSH path to Oxidized git repo |
| CAMUNDA_SERVICES_LIBRE_EXISTS | false | Libre Booking is not used in this scenario, all related parameters should be left to default |
Tip
Use ENC(x) for encrypted passwords based on JASYPT_ENCRYPTOR_PASSWORD (secret key) environmental variable.
Starting the container¶
After setting up the parameters, you are ready to start up the container. You can simply use docker compose up using the provided docker-compose.yml.
Warning
Do not forget to set the port so that there is no clash with other containers you are running.
Danger
You need to start up the Camunda container last, after you have started all of the rest of the components for the scenario, as it will try to connect to each one on start up and fail to initialise if some are not available when you have set True in the parameters.
Once you have all containers running you are ready to go to configuration.