This workshop will guide you to the steps of setting up a very minimal CNaaS-NMS environment without any connected network devices. You will be able to use the API and get a feeling for how to work with the git repositories to generate a configuration, but we will not be installing the configuration on any network devices.
This guide will use docker and docker-compose to get the environment up and running quickly. We will also be creating local git repositories on your machine.
Install required tools: docker, docker-compose, git, curl, jq
Create a docker-compose.yaml file:
---
version: '3.7'
services:
cnaas_api:
image: docker.sunet.se/cnaas/api:stable
ports:
- 443:1443
networks:
- cnaas
environment:
- GITREPO_TEMPLATES=/opt/git/cnaas-templates-origin.git
- GITREPO_SETTINGS=/opt/git/cnaas-settings-origin.git
- GITREPO_ETC=/opt/git/cnaas-etc-origin.git
- USERNAME_DHCP_BOOT=admin
- PASSWORD_DHCP_BOOT=abc123abc123
- USERNAME_DISCOVERED=admin
- PASSWORD_DISCOVERED=abc123abc123
- USERNAME_INIT=admin
- PASSWORD_INIT=abc123abc123
- USERNAME_MANAGED=admin
- PASSWORD_MANAGED=abc123abc123
- TEMPLATE_SECRET_ADMIN_HASH
depends_on:
- "cnaas_postgres"
- "cnaas_redis"
volumes:
- type: volume
source: cnaas-templates
target: /opt/cnaas/templates
- type: volume
source: cnaas-settings
target: /opt/cnaas/settings
- type: volume
source: cnaas-jwtcert
target: /opt/cnaas/jwtcert
- type: volume
source: cnaas-cacert
target: /opt/cnaas/cacert
- type: bind
source: ./git
target: /opt/git
cnaas_postgres:
image: docker.sunet.se/cnaas/postgres:latest
volumes:
- cnaas-postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=cnaas
- POSTGRES_PASSWORD=cnaas
- POSTGRES_DB=cnaas
networks:
- cnaas
cnaas_redis:
image: redis:latest
networks:
- cnaas
networks:
cnaas:
driver: bridge
name: cnaas
ipam:
config:
- subnet: 172.30.0.0/24
driver_opts:
com.docker.network.bridge.name: br-cnaas
volumes:
cnaas-templates:
cnaas-settings:
cnaas-postgres-data:
cnaas-jwtcert:
cnaas-cacert:
From the directory where you saved the docker-compose.yaml file run:
docker-compose up -d
This will download the docker images which are several gigabytes of data so it might take a while.