TIP OpenWiFi 2.0 SDK
The docker-compose directory within the deploy repository contains all the relevant files for various modes of SDK.
The following two modes are currently supported by docker-compose:
Deployments without a Load Balancer
This model contains single instances of SDK micro-services. Non-Load Balancer is suitable for scenarios where load given number of APs is below 10,000 or design for network availability is not required. A single local docker-compose deployment performance is listed here. Additionally this deployment includes options to use either self-signed certificates or user provided certificates:
Non-LB deployment with self-signed certificates
Deployments with a Load Balancer
This model is suitable for deployments where there is a need to scale performance and/or use Letsencrypt certificates for northbound service interactions. This deployment allows the user to scale up number of instances of micro-services to handle a larger load than listed here. The repository contains the instructions here:
The docker-compose yaml files are related as follows to the modes above:
docker-compose.yml : manages Non-LB deployment with self-signed and own certificates
docker-compose.lb.selfsigned.yml: manages LB deployment with self-signed certificates
docker-compose.lb.letsencrypt.yml: manages LB deployment with Letencrypt certificates
The deployments are managed using different environment files for docker-compose:
.env : used for non LB deployments with either self-signed or own certificate deployments executed by docker-compose. For additional information please read this.
.env.selfsigned: used for LB with self-signed deployments executed by alias docker-compose-lb-selfsigned. For additional information please read this.
.env.letsencrypt: used for LB with letsencrypt deployments executed by alias docker-compose-lb-letsencrypt. For additional information please read this.
The deployment creates local volumes to persist mostly application and database data. In addition to that several bind mounts are created:
docker-compose/certs/
directory used by multiple services
docker-compose/{microservice}_data/
directory used by each service for configuration and data. Where {microservice} is one of: owgw, owsec, owfms and owprov.
Be aware that the deployment uses bind mounts on the host to mount certificate and configuration data for the microservices and therefore these files and directories will be owned by the user in the container. Since the files are under version control, you may have to change the ownership to your user again before pulling changes.
Localizing the installation to the production environment is done through configuration information environment files per microservice. These files are: owgw.env, owgw-ui.env, owsec.env, owfms.env, owprov.env and owprov-ui.env. These env files are used to generate runtime configuration (properties) file when no configuration is found in their respective {microservices}-data directory.
Exposed port dependencies by application are listed below:
127.0.0.1:80/443 tcp
- OpenWiFi-uCentralGW-UI
127.0.0.1:8080/8443 tcp
- OpenWiFi-Provisoning-UI
127.0.0.1:5912/tcp
- rttys dev
127.0.0.1:5913/tcp
- rttys user
0.0.0.0:15002/tcp
- OpenWiFi-uCentralGW websocket
127.0.0.1:16002/tcp
- OpenWiFi-uCentralGW REST API public
0.0.0.0:16003/tcp
- OpenWiFi-uCentralGW fileupload
127.0.0.1:16102/tcp
- OpenWiFi-uCentralGW alivecheck
127.0.0.1:16001/tcp
- OpenWiFi-uCentralSec REST API public
127.0.0.1:16101/tcp
- OpenWiFi-uCentralSec alivecheck
By default only the websocket and fileupload component of the OpenWiFi uCentralGW (Gateway) microservice are exposed on all interfaces. All other exposed services listen on localhost. You can change that according to your needs in the ports
sections ofdocker-compose/docker-compose.yml
.
When cloning the repository, by default the southbound websocket certificate signed by TIP Root CA is provided for the *.wlan.local domain. Additionally a self-signed certificate for the northbound REST API is present. These enable creating a local deployment out of the box. Production deployments will replace both the southbound websocket and northbound API certificates.
The supplied certificates are valid for the *.wlan.local
domain.
First you'll have to install Docker Compose according to your platform specific instructions. After that clone the repository with git clone https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy
.
The Docker Compose uCentral microservice configs use openwifi.wlan.local
as a hostname, so make sure you add an entry in your hosts file (or in your local DNS solution) which points to 127.0.0.1
or the IP of the host running the SDK.
Switch to the Compose project directory with cd docker-compose/
.
Default user is: tip@ucentral.com and password is: openwifi
Service enforces a password change on first login
Initialize the deployment with docker-compose up -d
. If your deployment was successfully created, you should see the following output with docker-compose ps
:
When the certificate for the REST API and other components is self-signed, accepting trust for the self-signed REST API certificate on your local machine is required.
Add certs/restapi-ca.pem
to your trusted browser certificates or add certificate exceptions in your browser by visiting each of the following URLs (one per port) :
https://openwifi.wlan.local:16001 and ports :16002 :16003 :16004 and :16005
Using the browser, accept the self-signed SSL certificate warnings (make sure to visit both and add the exceptions).
Connect to your AP via SSH and add a static hosts entry in /etc/hosts
for openwifi.wlan.local
which points to the address of the host the SDK deployment runs on.
While staying in the SSH session, copy the content of certs/restapi-ca.pem
on your local machine to your clipboard and append it to the file /etc/ssl/cert.pem
on the AP. This way your AP will also trust the self-signed certificate. This step is necessary for rtty features and only required when using self-signed test deployment.
Navigate in a web browser to https://openwifi.wlan.local
to access the UI and login with default username and password. You will now be prompted to change this default password to something more secured.
To use the curl test scripts which are included in the microservice repositories make sure to set the following environment variables before issuing a request:
Stop the running containers with docker-compose down
Check out the new branch by repeating Step 1 from How to above for the given release and docker-compose up -d
.
Don’t forget to re-add the self-signed certificates to the containers with the provided script. Also be aware that you may have to change back some file permissions. To obtain the most recent changes as the files are under version control, you may have to change the ownership to your user again before pulling changes.