Skip to content
Snippets Groups Projects
Commit f30f5923 authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

Cleanup repo structure for tests and dev env data

See merge request !116
parent 0bb7344d
No related branches found
No related tags found
1 merge request!116Cleanup repo structure for tests and dev env data
Pipeline #194994 passed
Showing
with 56 additions and 72 deletions
......@@ -19,7 +19,7 @@
"program": "${workspaceFolder}/goKMS/main.go",
"env": {},
"args": [
"start", "--log", "debug", "--kms_config", "${workspaceFolder}/debug_configs/config/kms/kms_1.yaml", "--insecure"
"--log", "debug", "--kms_config", "${workspaceFolder}/debug_configs/config/kms/kms_1.yaml"
]
},
{
......@@ -30,7 +30,7 @@
"program": "${workspaceFolder}/goKMS/main.go",
"env": {},
"args": [
"start", "--log", "debug", "--kms_config", "${workspaceFolder}/config/goKMS/example_debug.yaml", "--insecure"
"--log", "debug", "--kms_config", "${workspaceFolder}/dev_env_data/debug_configs/config/kms/kms_1.yaml"
]
},
]
......
......@@ -89,12 +89,14 @@ compose-up: generate-gokms-certs build-images
compose-down:
docker-compose down
debug-kms-up: build-images generate-debug-certs
docker-compose -f docker-compose_debug_kms.yml down
docker-compose -f docker-compose_debug_kms.yml up
debug-kms-up: generate-debug-certs build-images
echo "After running this please start the debugger setup for KMS_1"
docker-compose -f dev_env_data/docker-compose/docker-compose_debug_kms.yml down
docker-compose -f dev_env_data/docker-compose/docker-compose_debug_kms.yml up
echo "Setup available, please start the debug configuration for KMS_1"
debug-kms-down:
docker-compose -f docker-compose_debug_kms.yml down
docker-compose -f dev_env_data/docker-compose/docker-compose_debug_kms.yml down
integration-test-debug-up: generate-integration-test-certs build-images
docker-compose -f integration-tests/docker-compose_integration_test.yml down
......@@ -111,14 +113,14 @@ integration-test: generate-integration-test-certs build-images
go test -p 1 -count=1 -v ./integration-tests/code/*
docker-compose -f integration-tests/docker-compose_integration_test.yml down
playground-start:
sudo containerlab deploy --reconfigure --topo playground.clab.yaml
playground-start: generate-certs build-images
sudo containerlab deploy --reconfigure --topo dev_env_data/containerlab/playground.clab.yaml
playground-stop:
sudo containerlab destroy --topo playground.clab.yaml
sudo containerlab destroy --topo dev_env_data/containerlab/playground.clab.yaml
playground-graph:
sudo containerlab graph --topo playground.clab.yaml
sudo containerlab graph --topo dev_env_data/containerlab/playground.clab.yaml
generate-certs: generate-root-ca generate-gokms-certs generate-debug-certs generate-integration-test-certs
......@@ -134,7 +136,7 @@ generate-gokms-certs: generate-root-ca
./config/goKMS/generate-kms-certs.sh
generate-debug-certs: generate-root-ca
./debug_configs/config/kms/generate-debug-certs.sh
./dev_env_data/debug_configs/config/kms/generate-debug-certs.sh
generate-integration-test-certs: generate-root-ca
./integration-tests/config/kms/generate-certs.sh
......
......@@ -126,6 +126,16 @@ it is possible to manage (GET/SET/subscribe) configuration data of the KMS.
Currently we use the [temp.yang](goKMS/models/danet/temp.yang) file for this and only a part of
it is implemented yet.
### Debug setup
For goKMS there is a debug setup available for VS Code.
1. Set your breakpoints
2. To use it run `make debug-kms-up` and wait for the build to complete.
3. If you see the first log outputs from the running docker setup start the debugger in VS Code named `kms-debug`.
If you are finished stop the debugger and run `make debug-kms-down` to stop the environment.
## Quantumlayer
An implementation of an emulated quantum module. It has two possible operation modes:
......
......@@ -6,12 +6,12 @@ GRPCAddr: 172.100.20.10:50900
AkmsURL: "http://172.100.20.22:4444/api/v1/keys/push_ksa_key"
AkmsCkmsServerPort: "9696"
KmsTLS:
TLS: true
TLS: false
CAFile: "ssl/ca.crt"
CertFile: "ssl/kms/kms1-selfsigned.crt"
KeyFile: "ssl/kms/kms1-selfsigned.key"
QuantumModuleTLS:
TLS: true
TLS: false
CAFile: "ssl/ca.crt"
CertFile: "ssl/kms/kms1-selfsigned.crt"
KeyFile: "ssl/kms/kms1-selfsigned.key"
......
......@@ -4,12 +4,12 @@ InterComAddr: 172.100.20.11:50910
QuantumAddr: 172.100.20.11:50911
GRPCAddr: 172.100.20.11:50900
KmsTLS:
TLS: true
TLS: false
CAFile: "ssl/ca.crt"
CertFile: "ssl/kms/kms2-selfsigned.crt"
KeyFile: "ssl/kms/kms2-selfsigned.key"
QuantumModuleTLS:
TLS: true
TLS: false
CAFile: "ssl/ca.crt"
CertFile: "ssl/kms/kms2-selfsigned.crt"
KeyFile: "ssl/kms/kms2-selfsigned.key"
......
......@@ -4,12 +4,12 @@ InterComAddr: 172.100.20.12:50910
QuantumAddr: 172.100.20.12:50911
GRPCAddr: 172.100.20.12:50900
KmsTLS:
TLS: true
TLS: false
CAFile: "ssl/ca.crt"
CertFile: "ssl/kms/kms3-selfsigned.crt"
KeyFile: "ssl/kms/kms3-selfsigned.key"
QuantumModuleTLS:
TLS: true
TLS: false
CAFile: "ssl/ca.crt"
CertFile: "ssl/kms/kms3-selfsigned.crt"
KeyFile: "ssl/kms/kms3-selfsigned.key"
......
......@@ -6,12 +6,12 @@ GRPCAddr: 172.100.20.13:50900
AkmsURL: "http://172.100.20.23:4444/api/v1/keys/push_ksa_key"
AkmsCkmsServerPort: "9696"
KmsTLS:
TLS: true
TLS: false
CAFile: "ssl/ca.crt"
CertFile: "ssl/kms/kms4-selfsigned.crt"
KeyFile: "ssl/kms/kms4-selfsigned.key"
QuantumModuleTLS:
TLS: true
TLS: false
CAFile: "ssl/ca.crt"
CertFile: "ssl/kms/kms4-selfsigned.crt"
KeyFile: "ssl/kms/kms4-selfsigned.key"
......
KMSAddr: '172.100.20.10:50911'
UDPAddr: '172.100.20.14:50901'
PeerUDPAddr: '172.100.20.15:50901'
GenerateKeys: true
KMSAddr: '172.100.20.11:50911'
UDPAddr: '172.100.20.15:50901'
PeerUDPAddr: '172.100.20.14:50901'
GenerateKeys: false
KMSAddr: '172.100.20.11:50911'
UDPAddr: '172.100.20.16:50901'
PeerUDPAddr: '172.100.20.17:50901'
GenerateKeys: true
KMSAddr: '172.100.20.13:50911'
UDPAddr: '172.100.20.17:50901'
PeerUDPAddr: '172.100.20.16:50901'
GenerateKeys: false
KMSAddr: '172.100.20.10:50911'
UDPAddr: '172.100.20.18:50901'
PeerUDPAddr: '172.100.20.19:50901'
GenerateKeys: true
KMSAddr: '172.100.20.12:50911'
UDPAddr: '172.100.20.19:50901'
PeerUDPAddr: '172.100.20.18:50901'
GenerateKeys: false
KMSAddr: '172.100.20.12:50911'
UDPAddr: '172.100.20.20:50901'
PeerUDPAddr: '172.100.20.21:50901'
GenerateKeys: true
KMSAddr: '172.100.20.13:50911'
UDPAddr: '172.100.20.21:50901'
PeerUDPAddr: '172.100.20.20:50901'
GenerateKeys: false
KMSAddr: 'kms_2:50911'
UDPAddr: '0.0.0.0:50901'
PeerUDPAddr: 'quantumlayer_1:50901'
GenerateKeys: false
......@@ -14,7 +14,7 @@ topology:
- 8080:8080
- 40000:40000
binds:
- ./config/quant-gosdn.toml:/app/configs/quant-gosdn.toml
- ../../config/quant-gosdn.toml:/app/configs/quant-gosdn.toml
cmd: --config ./configs/quant-gosdn.toml
mgmt-ipv4: 172.100.20.2
env:
......@@ -30,13 +30,13 @@ topology:
image: registry.code.fbi.h-da.de/danet/gosdn/gosdnc:latest
mgmt-ipv4: 172.100.20.4
binds:
- ./config/kms01-a.json:/kms01-a.json
- ./config/kms02-a.json:/kms02-a.json
- ./config/kms03-a.json:/kms03-a.json
- ./config/kms01-b.json:/kms01-b.json
- ./config/kms02-b.json:/kms02-b.json
- ./config/kms03-b.json:/kms03-b.json
- ./config/scripts/add_kms_to_controller.sh:/scripts/add_kms_to_controller.sh
- ../../config/kms01-a.json:/kms01-a.json
- ../../config/kms02-a.json:/kms02-a.json
- ../../config/kms03-a.json:/kms03-a.json
- ../../config/kms01-b.json:/kms01-b.json
- ../../config/kms02-b.json:/kms02-b.json
- ../../config/kms03-b.json:/kms03-b.json
- ../../config/scripts/add_kms_to_controller.sh:/scripts/add_kms_to_controller.sh
exec:
- bash /scripts/add_kms_to_controller.sh
......@@ -45,39 +45,39 @@ topology:
image: registry.code.fbi.h-da.de/danet/quant/gokms:latest
mgmt-ipv4: 172.100.20.10
binds:
- ./config/kms/example01.yaml:/tmp/kms/config/kms01.yaml
cmd: --log debug --kms_config /tmp/kms/config/kms01.yaml --insecureGNMI
- ../../config/goKMS/example01.yaml:/tmp/kms/config/kms01.yaml
cmd: --log debug --kms_config /tmp/kms/config/kms01.yaml
kms2:
kind: linux
image: registry.code.fbi.h-da.de/danet/quant/gokms:latest
mgmt-ipv4: 172.100.20.11
binds:
- ./config/kms/example02.yaml:/tmp/kms/config/kms02.yaml
cmd: --log debug --kms_config /tmp/kms/config/kms02.yaml --insecureGNMI
- ../../config/goKMS/example02.yaml:/tmp/kms/config/kms02.yaml
cmd: --log debug --kms_config /tmp/kms/config/kms02.yaml
kms3:
kind: linux
image: registry.code.fbi.h-da.de/danet/quant/gokms:latest
mgmt-ipv4: 172.100.20.12
binds:
- ./config/kms/example03.yaml:/tmp/kms/config/kms03.yaml
cmd: --log debug --kms_config /tmp/kms/config/kms03.yaml --insecureGNMI
- ../../config/goKMS/example03.yaml:/tmp/kms/config/kms03.yaml
cmd: --log debug --kms_config /tmp/kms/config/kms03.yaml
kms4:
kind: linux
image: registry.code.fbi.h-da.de/danet/quant/gokms:latest
mgmt-ipv4: 172.100.20.13
binds:
- ./config/kms/example04.yaml:/tmp/kms/config/kms04.yaml
cmd: --log debug --kms_config /tmp/kms/config/kms04.yaml --insecureGNMI
- ../../config/goKMS/example04.yaml:/tmp/kms/config/kms04.yaml
cmd: --log debug --kms_config /tmp/kms/config/kms04.yaml
qlayer01:
kind: linux
image: registry.code.fbi.h-da.de/danet/quant/quantumlayer:master
mgmt-ipv4: 172.100.20.14
binds:
- ./config/quantumlayer/example01.yaml:/tmp/quantumlayer/config/quantumlayer01.yaml
- ../../config/quantumlayer/example01.yaml:/tmp/quantumlayer/config/quantumlayer01.yaml
cmd: --config /tmp/quantumlayer/config/quantumlayer01.yaml
qlayer02:
......@@ -85,7 +85,7 @@ topology:
image: registry.code.fbi.h-da.de/danet/quant/quantumlayer:master
mgmt-ipv4: 172.100.20.15
binds:
- ./config/quantumlayer/example02.yaml:/tmp/quantumlayer/config/quantumlayer02.yaml
- ../../config/quantumlayer/example02.yaml:/tmp/quantumlayer/config/quantumlayer02.yaml
cmd: --config /tmp/quantumlayer/config/quantumlayer02.yaml
qlayer03:
......@@ -93,7 +93,7 @@ topology:
image: registry.code.fbi.h-da.de/danet/quant/quantumlayer:master
mgmt-ipv4: 172.100.20.16
binds:
- ./config/quantumlayer/example03.yaml:/tmp/quantumlayer/config/quantumlayer03.yaml
- ../../config/quantumlayer/example03.yaml:/tmp/quantumlayer/config/quantumlayer03.yaml
cmd: --config /tmp/quantumlayer/config/quantumlayer03.yaml
qlayer04:
......@@ -101,7 +101,7 @@ topology:
image: registry.code.fbi.h-da.de/danet/quant/quantumlayer:master
mgmt-ipv4: 172.100.20.17
binds:
- ./config/quantumlayer/example04.yaml:/tmp/quantumlayer/config/quantumlayer04.yaml
- ../../config/quantumlayer/example04.yaml:/tmp/quantumlayer/config/quantumlayer04.yaml
cmd: --config /tmp/quantumlayer/config/quantumlayer04.yaml
qlayer05:
......@@ -109,7 +109,7 @@ topology:
image: registry.code.fbi.h-da.de/danet/quant/quantumlayer:master
mgmt-ipv4: 172.100.20.18
binds:
- ./config/quantumlayer/example05.yaml:/tmp/quantumlayer/config/quantumlayer05.yaml
- ../../config/quantumlayer/example05.yaml:/tmp/quantumlayer/config/quantumlayer05.yaml
cmd: --config /tmp/quantumlayer/config/quantumlayer05.yaml
qlayer06:
......@@ -117,7 +117,7 @@ topology:
image: registry.code.fbi.h-da.de/danet/quant/quantumlayer:master
mgmt-ipv4: 172.100.20.19
binds:
- ./config/quantumlayer/example06.yaml:/tmp/quantumlayer/config/quantumlayer06.yaml
- ../../config/quantumlayer/example06.yaml:/tmp/quantumlayer/config/quantumlayer06.yaml
cmd: --config /tmp/quantumlayer/config/quantumlayer06.yaml
qlayer07:
......@@ -125,7 +125,7 @@ topology:
image: registry.code.fbi.h-da.de/danet/quant/quantumlayer:master
mgmt-ipv4: 172.100.20.20
binds:
- ./config/quantumlayer/example07.yaml:/tmp/quantumlayer/config/quantumlayer07.yaml
- ../../config/quantumlayer/example07.yaml:/tmp/quantumlayer/config/quantumlayer07.yaml
cmd: --config /tmp/quantumlayer/config/quantumlayer07.yaml
qlayer08:
......@@ -133,7 +133,7 @@ topology:
image: registry.code.fbi.h-da.de/danet/quant/quantumlayer:master
mgmt-ipv4: 172.100.20.21
binds:
- ./config/quantumlayer/example08.yaml:/tmp/quantumlayer/config/quantumlayer08.yaml
- ../../config/quantumlayer/example08.yaml:/tmp/quantumlayer/config/quantumlayer08.yaml
cmd: --config /tmp/quantumlayer/config/quantumlayer08.yaml
akms-receiver-01:
......
......@@ -4,7 +4,7 @@ dirPath="artifacts/ssl"
if [ ! -d "${dirPath}/debug-kms" ]; then
mkdir $dirPath/debug-kms
counter=1
for FILE in ./debug_configs/config/kms/tlsConfigs/*.txt;
for FILE in dev_env_data/debug_configs/config/kms/tlsConfigs/*.txt;
do openssl req -x509 -nodes -days 365 -newkey rsa:4096 -config $FILE \
-CA $dirPath/ca.crt -CAkey $dirPath/ca.key \
-keyout "$dirPath/debug-kms/kms$counter-selfsigned.key" -out "$dirPath/debug-kms/kms$counter-selfsigned.crt"; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment