mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy.git
synced 2026-01-27 18:22:58 +00:00
Docker Compose
With the provided Docker Compose file you can instantiate a complete deployment of the uCentral microservices and related components for local development purposes. To spin up a local development environment:
- Switch into the project directory with
cd docker-compose/. - This repository contains a gateway certificate signed by TIP and a self-signed certificate for the REST API and other components which are used by default in the Compose deployment. The certificates are valid for the
*.wlan.localdomain and the Docker Compose uCentral microservice configs useucentral.wlan.localas a hostname, so make sure you add an entry in your hosts file (or in your local DNS solution) which points to127.0.0.1. - If you have your own certificates and want to use the deployment for anything other than local development copy your certs into the
certs/directory and reference them in the appropriate sections of the microservice configuration files. Make sure to also adapt the sections which reference the hostname. For more information on certificates please see the certificates section of this README and/or CERTIFICATES.md. - Docker Compose pulls the microservice images from the JFrog repository. If you want to change the image tag or some of the image versions which are used for the other services, have a look into the
.envfile. You'll also find service specific.envfiles in this directory. Edit them if you want to change database passwords (highly recommended!) or other configuration data. Don't forget to adapt your changes in the application configuration files. - Open
docker-compose/ucentralgw-data/ucentralgw.propertiesto change authentication data for uCentralGW (again highly recommended!). - Spin up the deployment with
docker-compose up -d. - Add the self-signed certificates to the system trust store of the containers with
./add-ca-cert.sh. - Either add the
certs/restapi-ca.pemcertificate to your trusted browser certificates or add a certificate exception in your browser by visitinghttps://ucentral.wlan.local:16001and accepting the SSL certificate warning. - Navigate to the UI which listens to
127.0.0.1orucentral.wlan.localand login with your uCentralGW authentication data. - To use the curl test script to talk to the API set the following environment variables:
export UCENTRALSEC="ucentral.wlan.local:16001"
export FLAGS="-s --cacert <your-wlan-cloud-ucentral-deploy-location>/docker-compose/certs/restapi-ca.pem"
The --cacert option is necessary since the REST API certificates are self-signed. Omit the option if you provide your own signed certificates.
PS: The Docker Compose deployment creates five local volumes to persist mostly database data and data for Zookeeper and Kafka. If you want re-create the deployment and remove all persistent application and database data just delete the volumes with docker volume rm $(docker volume ls -qf name=ucentral) after you stopped the services with docker-compose down.