CNaaS NMS docker build on CentOS

CentOS 8

install docker:
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
sudo yum install docker-ce docker-ce-cli
sudo yum install iptables
sudo systemctl start docker
sudo systemctl enable docker
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

install docker-compose:
sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

install cnaas-nms:
docker volume create cnaas-jwtcert
docker volume create cnaas-postgres-data
docker volume create cnaas-settings
docker volume create cnaas-templates
docker volume create cnaas-cacert

git clone
cd cnaas-nms/test/
sed replace POSTGRES_PASSWD -> POSTGRES_PASSWORD in ../docker/docker-compose.yaml
wait until error 500
ctrl-C the

# fix permissions so code coverage running inside the container can save results to host (user 33:33 is www-data in container)
chcon -R -t container_file_t ../docker/coverage/
sudo chown -R 33:33 ../docker/coverage/

curl > ~/public.pem
sudo docker cp ~/public.pem docker_cnaas_api_1:/opt/cnaas/jwtcert/public.pem

docker-compose -f ../docker/docker-compose.yaml down

expected output:
[centos@centos-test test]$ ./
~/cnaas-nms/test ~/cnaas-nms/test
mkdir: cannot create directory ‘coverage/’: File exists
Creating network "cnaas" with driver "bridge"
Creating docker_cnaas_redis_1 ... done
Creating docker_cnaas_postgres_1 ... done
Creating docker_cnaas_auth_1 ... done
Creating docker_cnaas_httpd_1 ... done
Creating docker_cnaas_api_1 ... done
Creating docker_cnaas_dhcpd_1 ... done
Starting integration tests...
/usr/lib/python3.6/site-packages/urllib3/ InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See:
Template refresh status: 200
Settings refresh status: 200

curl -k https://localhost/api/v1.0/system/version
{"status": "success", "data": {"version": "1.2.0dev2", "git_version": "Git commitc1330e87163ef448947367896403387ca0c84950 develop (2020-11-09 15:16:52+01:00)"}}

  • No labels