Skip to content
GitLab
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
TFS
controller
Compare revisions
8cd8e0d960c7d0ed2e8e6a1c9aa0faddd397f02c...6c4ef63c949dafdaf42da6b0a121983820e0c3f8
Hide whitespace changes
Inline
Side-by-side
Some changes are not shown.
For a faster browsing experience, only
20 of 1000+
files are shown. Download one of the files below to see all changes.
deploy/mock_blockchain.sh
View file @
6c4ef63c
#!/bin/bash
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -38,28 +38,44 @@ GITLAB_REPO_URL="labs.etsi.org:5050/tfs/controller"
TMP_FOLDER
=
"./tmp"
# Create a tmp folder for files modified during the deployment
TMP_MANIFESTS_FOLDER
=
"
$TMP_FOLDER
/manifests"
TMP_MANIFESTS_FOLDER
=
"
$
{
TMP_FOLDER
}
/
${
K8S_NAMESPACE
}
/manifests"
mkdir
-p
$TMP_MANIFESTS_FOLDER
TMP_LOGS_FOLDER
=
"
$TMP_FOLDER
/logs"
TMP_LOGS_FOLDER
=
"
$
{
TMP_FOLDER
}
/
${
K8S_NAMESPACE
}
/logs"
mkdir
-p
$TMP_LOGS_FOLDER
echo
"Deleting and Creating a new namespace..."
kubectl delete namespace
$K8S_NAMESPACE
kubectl delete namespace
$K8S_NAMESPACE
--ignore-not-found
kubectl create namespace
$K8S_NAMESPACE
printf
"
\n
"
echo
"Deploying components and collecting environment variables..."
ENV_VARS_SCRIPT
=
tfs_bchain_runtime_env_vars.sh
echo
"# Environment variables for TeraFlow Mock-Blockchain deployment"
>
$ENV_VARS_SCRIPT
echo
"# Environment variables for TeraFlow
SDN
Mock-Blockchain deployment"
>
$ENV_VARS_SCRIPT
PYTHONPATH
=
$(
pwd
)
/src
echo
"export PYTHONPATH=
${
PYTHONPATH
}
"
>>
$ENV_VARS_SCRIPT
echo
"Processing '
$COMPONENT
' component..."
IMAGE_NAME
=
"
$COMPONENT
:
$IMAGE_TAG
"
IMAGE_URL
=
$(
echo
"
$REGISTRY_IMAGE
/
$IMAGE_NAME
"
|
sed
's,//,/,g'
|
sed
's,http:/,,g'
)
DOCKER_BUILD
=
"docker build"
DOCKER_MAJOR_VERSION
=
$(
docker
--version
|
grep
-o
-E
"Docker version [0-9]+
\.
"
|
grep
-o
-E
"[0-9]+"
|
cut
-c
1-3
)
if
[[
$DOCKER_MAJOR_VERSION
-ge
23
]]
;
then
# If Docker version >= 23, build command was migrated to docker-buildx
# In Ubuntu, in practice, means to install package docker-buildx together with docker.io
# Check if docker-buildx plugin is installed
docker buildx version 1>/dev/null 2>/dev/null
if
[[
$?
-ne
0
]]
;
then
echo
"Docker buildx command is not installed. Check: https://docs.docker.com/build/architecture/#install-buildx"
echo
"If you installed docker through APT package docker.io, consider installing also package docker-buildx"
exit
1
;
fi
DOCKER_BUILD
=
"docker buildx build"
fi
echo
" Building Docker image..."
BUILD_LOG
=
"
$TMP_LOGS_FOLDER
/build_
${
COMPONENT
}
.log"
docker build
-t
"
$IMAGE_NAME
"
-f
./src/dlt/mock_blockchain/Dockerfile
.
>
"
$BUILD_LOG
"
$DOCKER_BUILD
-t
"
$IMAGE_NAME
"
-f
./src/dlt/mock_blockchain/Dockerfile
.
>
"
$BUILD_LOG
"
if
[
-n
"
$REGISTRY_IMAGE
"
]
;
then
echo
" Pushing Docker image to '
$REGISTRY_IMAGE
'..."
...
...
@@ -77,12 +93,12 @@ cp ./manifests/"${COMPONENT}".yaml "$MANIFEST"
if
[
-n
"
$REGISTRY_IMAGE
"
]
;
then
# Registry is set
VERSION
=
$(
grep
-i
"
${
GITLAB_REPO_URL
}
/
${
COMPONENT
}
:"
"
$MANIFEST
"
|
cut
-d
":"
-f
3
)
VERSION
=
$(
grep
-i
"
${
GITLAB_REPO_URL
}
/
${
COMPONENT
}
:"
"
$MANIFEST
"
|
cut
-d
":"
-f
4
)
sed
-E
-i
"s#image:
$GITLAB_REPO_URL
/
$COMPONENT
:
${
VERSION
}
#image:
$IMAGE_URL
#g"
"
$MANIFEST
"
sed
-E
-i
"s#imagePullPolicy: .*#imagePullPolicy: Always#g"
"
$MANIFEST
"
else
# Registry is not set
VERSION
=
$(
grep
-i
"
${
GITLAB_REPO_URL
}
/
${
COMPONENT
}
:"
"
$MANIFEST
"
|
cut
-d
":"
-f
3
)
VERSION
=
$(
grep
-i
"
${
GITLAB_REPO_URL
}
/
${
COMPONENT
}
:"
"
$MANIFEST
"
|
cut
-d
":"
-f
4
)
sed
-E
-i
"s#image:
$GITLAB_REPO_URL
/
$COMPONENT
:
${
VERSION
}
#image:
$IMAGE_NAME
#g"
"
$MANIFEST
"
sed
-E
-i
"s#imagePullPolicy: .*#imagePullPolicy: Never#g"
"
$MANIFEST
"
fi
...
...
@@ -91,8 +107,8 @@ echo " Deploying '$COMPONENT' component to Kubernetes..."
DEPLOY_LOG
=
"
$TMP_LOGS_FOLDER
/deploy_
${
COMPONENT
}
.log"
kubectl
--namespace
$K8S_NAMESPACE
apply
-f
"
$MANIFEST
"
>
"
$DEPLOY_LOG
"
COMPONENT_OBJNAME
=
$(
echo
"
${
COMPONENT
}
"
|
sed
"s/
\_
/-/"
)
kubectl
--namespace
$K8S_NAMESPACE
scale deployment
--replicas
=
0
${
COMPONENT_OBJNAME
}
>>
"
$DEPLOY_LOG
"
kubectl
--namespace
$K8S_NAMESPACE
scale deployment
--replicas
=
1
${
COMPONENT_OBJNAME
}
>>
"
$DEPLOY_LOG
"
#
kubectl --namespace $K8S_NAMESPACE scale deployment --replicas=0 ${COMPONENT_OBJNAME} >> "$DEPLOY_LOG"
#
kubectl --namespace $K8S_NAMESPACE scale deployment --replicas=1 ${COMPONENT_OBJNAME} >> "$DEPLOY_LOG"
echo
" Collecting env-vars for '
$COMPONENT
' component..."
SERVICE_DATA
=
$(
kubectl get service
${
COMPONENT_OBJNAME
}
--namespace
$K8S_NAMESPACE
-o
json
)
...
...
deploy/nats.sh
View file @
6c4ef63c
#!/bin/bash
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -47,6 +47,10 @@ function nats_deploy_single() {
helm3 repo add nats https://nats-io.github.io/k8s/helm/charts/
echo
echo
"Upgrade NATS Helm Chart"
helm3 repo update nats
echo
echo
"Install NATS (single-node)"
echo
">>> Checking if NATS is deployed..."
if
kubectl get
--namespace
${
NATS_NAMESPACE
}
statefulset/
${
NATS_NAMESPACE
}
&> /dev/null
;
then
...
...
@@ -81,6 +85,10 @@ function nats_deploy_single() {
echo
"NATS Port Mapping"
echo
">>> Expose NATS Client port (4222->
${
NATS_EXT_PORT_CLIENT
}
)"
NATS_PORT_CLIENT
=
$(
kubectl
--namespace
${
NATS_NAMESPACE
}
get service
${
NATS_NAMESPACE
}
-o
'jsonpath={.spec.ports[?(@.name=="client")].port}'
)
if
[
-z
"
$NATS_PORT_CLIENT
"
]
;
then
# NATS charts updated and port name changed from "client" to "nats"; fix to support new name and enable backward compatibility
NATS_PORT_CLIENT
=
$(
kubectl
--namespace
${
NATS_NAMESPACE
}
get service
${
NATS_NAMESPACE
}
-o
'jsonpath={.spec.ports[?(@.name=="nats")].port}'
)
fi
PATCH
=
'{"data": {"'
${
NATS_EXT_PORT_CLIENT
}
'": "'
${
NATS_NAMESPACE
}
'/'
${
NATS_NAMESPACE
}
':'
${
NATS_PORT_CLIENT
}
'"}}'
kubectl patch configmap nginx-ingress-tcp-microk8s-conf
--namespace
ingress
--patch
"
${
PATCH
}
"
...
...
deploy/qdb.sh
View file @
6c4ef63c
#!/bin/bash
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -160,10 +160,17 @@ function qdb_undeploy() {
}
function
qdb_drop_tables
()
{
QDB_HOST
=
$(
kubectl
--namespace
${
QDB_NAMESPACE
}
get service questdb-public
-o
'jsonpath={.spec.clusterIP}'
)
QDB_PORT
=
$(
kubectl
--namespace
${
QDB_NAMESPACE
}
get service questdb-public
-o
'jsonpath={.spec.ports[?(@.name=="http")].port}'
)
echo
"Drop tables, if exist"
if
[[
-z
"
${
GITLAB_CI
}
"
]]
;
then
#kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o yaml
QDB_HOST
=
$(
kubectl
--namespace
${
QDB_NAMESPACE
}
get service questdb-public
-o
'jsonpath={.spec.clusterIP}'
)
QDB_PORT
=
$(
kubectl
--namespace
${
QDB_NAMESPACE
}
get service questdb-public
-o
'jsonpath={.spec.ports[?(@.name=="http")].port}'
)
else
QDB_HOST
=
"127.0.0.1"
QDB_PORT
=
${
QDB_EXT_PORT_HTTP
}
fi
curl
"http://
${
QDB_HOST
}
:
${
QDB_PORT
}
/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+
${
QDB_TABLE_MONITORING_KPIS
}
+;"
echo
curl
"http://
${
QDB_HOST
}
:
${
QDB_PORT
}
/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+
${
QDB_TABLE_SLICE_GROUPS
}
+;"
...
...
deploy/show.sh
View file @
6c4ef63c
#!/bin/bash
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
deploy/tfs.sh
View file @
6c4ef63c
#!/bin/bash
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -27,7 +27,7 @@ export TFS_REGISTRY_IMAGES=${TFS_REGISTRY_IMAGES:-"http://localhost:32000/tfs/"}
# If not already set, set the list of components, separated by spaces, you want to build images for, and deploy.
# By default, only basic components are deployed
export
TFS_COMPONENTS
=
${
TFS_COMPONENTS
:-
"context device
automation
monitoring pathcomp service slice
compute
webui load_generator"
}
export
TFS_COMPONENTS
=
${
TFS_COMPONENTS
:-
"context device
ztp
monitoring pathcomp service slice
nbi
webui load_generator"
}
# If not already set, set the tag you want to use for your images.
export
TFS_IMAGE_TAG
=
${
TFS_IMAGE_TAG
:-
"dev"
}
...
...
@@ -148,6 +148,10 @@ printf "\n"
echo
"Create secret with NATS data"
NATS_CLIENT_PORT
=
$(
kubectl
--namespace
${
NATS_NAMESPACE
}
get service
${
NATS_NAMESPACE
}
-o
'jsonpath={.spec.ports[?(@.name=="client")].port}'
)
if
[
-z
"
$NATS_CLIENT_PORT
"
]
;
then
# NATS charts updated and port name changed from "client" to "nats"; fix to support new name and enable backward compatibility
NATS_CLIENT_PORT
=
$(
kubectl
--namespace
${
NATS_NAMESPACE
}
get service
${
NATS_NAMESPACE
}
-o
'jsonpath={.spec.ports[?(@.name=="nats")].port}'
)
fi
kubectl create secret generic nats-data
--namespace
${
TFS_K8S_NAMESPACE
}
--type
=
'Opaque'
\
--from-literal
=
NATS_NAMESPACE
=
${
NATS_NAMESPACE
}
\
--from-literal
=
NATS_CLIENT_PORT
=
${
NATS_CLIENT_PORT
}
...
...
@@ -183,6 +187,22 @@ REDIS_PASSWORD=`uuidgen`
kubectl create secret generic redis-secrets
--namespace
=
$TFS_K8S_NAMESPACE
\
--from-literal
=
REDIS_PASSWORD
=
$REDIS_PASSWORD
echo
"export REDIS_PASSWORD=
${
REDIS_PASSWORD
}
"
>>
$ENV_VARS_SCRIPT
printf
"
\n
"
DOCKER_BUILD
=
"docker build"
DOCKER_MAJOR_VERSION
=
$(
docker
--version
|
grep
-o
-E
"Docker version [0-9]+
\.
"
|
grep
-o
-E
"[0-9]+"
|
cut
-c
1-3
)
if
[[
$DOCKER_MAJOR_VERSION
-ge
23
]]
;
then
# If Docker version >= 23, build command was migrated to docker-buildx
# In Ubuntu, in practice, means to install package docker-buildx together with docker.io
# Check if docker-buildx plugin is installed
docker buildx version 1>/dev/null 2>/dev/null
if
[[
$?
-ne
0
]]
;
then
echo
"Docker buildx command is not installed. Check: https://docs.docker.com/build/architecture/#install-buildx"
echo
"If you installed docker through APT package docker.io, consider installing also package docker-buildx"
exit
1
;
fi
DOCKER_BUILD
=
"docker buildx build"
fi
for
COMPONENT
in
$TFS_COMPONENTS
;
do
echo
"Processing '
$COMPONENT
' component..."
...
...
@@ -191,25 +211,25 @@ for COMPONENT in $TFS_COMPONENTS; do
echo
" Building Docker image..."
BUILD_LOG
=
"
$TMP_LOGS_FOLDER
/build_
${
COMPONENT
}
.log"
if
[
"
$COMPONENT
"
==
"
automation
"
]
||
[
"
$COMPONENT
"
==
"policy"
]
;
then
docker build
-t
"
$COMPONENT
:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/Dockerfile ./src/
"
$COMPONENT
"
/
>
"
$BUILD_LOG
"
if
[
"
$COMPONENT
"
==
"
ztp
"
]
||
[
"
$COMPONENT
"
==
"policy"
]
;
then
$DOCKER_BUILD
-t
"
$COMPONENT
:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/Dockerfile ./src/
"
$COMPONENT
"
/
>
"
$BUILD_LOG
"
elif
[
"
$COMPONENT
"
==
"pathcomp"
]
;
then
BUILD_LOG
=
"
$TMP_LOGS_FOLDER
/build_
${
COMPONENT
}
-frontend.log"
docker build
-t
"
$COMPONENT
-frontend:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/frontend/Dockerfile
.
>
"
$BUILD_LOG
"
$DOCKER_BUILD
-t
"
$COMPONENT
-frontend:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/frontend/Dockerfile
.
>
"
$BUILD_LOG
"
BUILD_LOG
=
"
$TMP_LOGS_FOLDER
/build_
${
COMPONENT
}
-backend.log"
docker build
-t
"
$COMPONENT
-backend:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/backend/Dockerfile
.
>
"
$BUILD_LOG
"
$DOCKER_BUILD
-t
"
$COMPONENT
-backend:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/backend/Dockerfile
.
>
"
$BUILD_LOG
"
# next command is redundant, but helpful to keep cache updated between rebuilds
IMAGE_NAME
=
"
$COMPONENT
-backend:
$TFS_IMAGE_TAG
-builder"
docker build
-t
"
$IMAGE_NAME
"
--target
builder
-f
./src/
"
$COMPONENT
"
/backend/Dockerfile
.
>>
"
$BUILD_LOG
"
$DOCKER_BUILD
-t
"
$IMAGE_NAME
"
--target
builder
-f
./src/
"
$COMPONENT
"
/backend/Dockerfile
.
>>
"
$BUILD_LOG
"
elif
[
"
$COMPONENT
"
==
"dlt"
]
;
then
BUILD_LOG
=
"
$TMP_LOGS_FOLDER
/build_
${
COMPONENT
}
-connector.log"
docker build
-t
"
$COMPONENT
-connector:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/connector/Dockerfile
.
>
"
$BUILD_LOG
"
$DOCKER_BUILD
-t
"
$COMPONENT
-connector:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/connector/Dockerfile
.
>
"
$BUILD_LOG
"
BUILD_LOG
=
"
$TMP_LOGS_FOLDER
/build_
${
COMPONENT
}
-gateway.log"
docker build
-t
"
$COMPONENT
-gateway:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/gateway/Dockerfile
.
>
"
$BUILD_LOG
"
$DOCKER_BUILD
-t
"
$COMPONENT
-gateway:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/gateway/Dockerfile
.
>
"
$BUILD_LOG
"
else
docker build
-t
"
$COMPONENT
:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/Dockerfile
.
>
"
$BUILD_LOG
"
$DOCKER_BUILD
-t
"
$COMPONENT
:
$TFS_IMAGE_TAG
"
-f
./src/
"
$COMPONENT
"
/Dockerfile
.
>
"
$BUILD_LOG
"
fi
echo
" Pushing Docker image to '
$TFS_REGISTRY_IMAGES
'..."
...
...
@@ -279,8 +299,13 @@ for COMPONENT in $TFS_COMPONENTS; do
VERSION
=
$(
grep
-i
"
${
GITLAB_REPO_URL
}
/
${
COMPONENT
}
-gateway:"
"
$MANIFEST
"
|
cut
-d
":"
-f4
)
sed
-E
-i
"s#image:
$GITLAB_REPO_URL
/
$COMPONENT
-gateway:
${
VERSION
}
#image:
$IMAGE_URL
#g"
"
$MANIFEST
"
else
IMAGE_URL
=
$(
echo
"
$TFS_REGISTRY_IMAGES
/
$COMPONENT
:
$TFS_IMAGE_TAG
"
|
sed
's,//,/,g'
|
sed
's,http:/,,g'
)
VERSION
=
$(
grep
-i
"
${
GITLAB_REPO_URL
}
/
${
COMPONENT
}
:"
"
$MANIFEST
"
|
cut
-d
":"
-f4
)
if
[
"
$TFS_SKIP_BUILD
"
!=
"YES"
]
;
then
IMAGE_URL
=
$(
echo
"
$TFS_REGISTRY_IMAGES
/
$COMPONENT
:
$TFS_IMAGE_TAG
"
|
sed
's,//,/,g'
|
sed
's,http:/,,g'
)
VERSION
=
$(
grep
-i
"
${
GITLAB_REPO_URL
}
/
${
COMPONENT
}
:"
"
$MANIFEST
"
|
cut
-d
":"
-f4
)
else
VERSION
=
$(
grep
-i
"
${
GITLAB_REPO_URL
}
/
${
COMPONENT
}
:"
"
$MANIFEST
"
|
cut
-d
":"
-f4
)
IMAGE_URL
=
$(
echo
"
$TFS_REGISTRY_IMAGES
/
$COMPONENT
:
$VERSION
"
|
sed
's,//,/,g'
|
sed
's,http:/,,g'
)
fi
sed
-E
-i
"s#image:
$GITLAB_REPO_URL
/
$COMPONENT
:
${
VERSION
}
#image:
$IMAGE_URL
#g"
"
$MANIFEST
"
fi
...
...
@@ -344,11 +369,17 @@ for COMPONENT in $TFS_COMPONENTS; do
echo
"Waiting for '
$COMPONENT
' component..."
COMPONENT_OBJNAME
=
$(
echo
"
${
COMPONENT
}
"
|
sed
"s/
\_
/-/"
)
kubectl
wait
--namespace
$TFS_K8S_NAMESPACE
\
--for
=
'condition=available'
--timeout
=
300s deployment/
${
COMPONENT_OBJNAME
}
service
--for
=
'condition=available'
--timeout
=
90s deployment/
${
COMPONENT_OBJNAME
}
service
WAIT_EXIT_CODE
=
$?
if
[[
$WAIT_EXIT_CODE
!=
0
]]
;
then
echo
" Failed to deploy '
${
COMPONENT
}
' component, exit code '
${
WAIT_EXIT_CODE
}
', exiting..."
kubectl logs
--namespace
$TFS_K8S_NAMESPACE
deployment/
${
COMPONENT_OBJNAME
}
service
--all-containers
=
true
exit
$WAIT_EXIT_CODE
fi
printf
"
\n
"
done
if
[[
"
$TFS_COMPONENTS
"
==
*
"webui"
*
]]
;
then
if
[[
"
$TFS_COMPONENTS
"
==
*
"monitoring"
*
]]
&&
[[
"
$TFS_COMPONENTS
"
==
*
"webui"
*
]]
;
then
echo
"Configuring WebUI DataStores and Dashboards..."
sleep
5
...
...
@@ -554,3 +585,9 @@ if [[ "$TFS_COMPONENTS" == *"webui"* ]]; then
printf
"
\n\n
"
fi
if
[
"
$DOCKER_BUILD
"
==
"docker buildx build"
]
;
then
echo
"Pruning Docker Buildx Cache..."
docker buildx prune
--force
printf
"
\n\n
"
fi
hackfest/containerlab/commands.txt
View file @
6c4ef63c
...
...
@@ -60,22 +60,24 @@ docker exec -it clab-tfs-scenario-client2 bash
$ sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)"
## gNMI Capabilities request
$ gnmic -a clab-
srlinux
-srl1 -u admin -p NokiaSrl1! --skip-verify capabilities
$ gnmic -a clab-
tfs-scenario
-srl1 -u admin -p NokiaSrl1! --skip-verify capabilities
## gNMI Get request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /interface[name=mgmt0]
$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/config/hostname
$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /interfaces/interface[name=mgmt0]
## gNMI Set request
$ gnmic -a clab-
srlinux
-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --update-path /system/
name
/host
-
name --update-value s
l
r11
$ gnmic -a clab-
tfs-scenario
-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --update-path /system/
config
/hostname --update-value sr
l
11
(we check the changed value)
$ gnmic -a clab-
srlinux
-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/
name
/host
-
name
(we check the changed value)
$ gnmic -a clab-
tfs-scenario
-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/
config
/hostname
## Subscribe request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf subscribe --path /interface[name=mgmt0]/statistics
$ gnmic -a clab-tfs-scenario-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf subscribe --path /interfaces/interface[name=mgmt0]/state/
(In another terminal, you can generate traffic)
$ssh admin@clab-
srlinux
-srl1
$ssh admin@clab-
tfs-scenario
-srl1
...
...
hackfest/containerlab/tfs-scenario.clab.yml
View file @
6c4ef63c
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/gnmi/srlinux.clab.yml
View file @
6c4ef63c
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connection.proto
View file @
6c4ef63c
// Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
// Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connection/create.py
View file @
6c4ef63c
#! /usr/bin/env python3
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connection/list.py
View file @
6c4ef63c
#! /usr/bin/env python3
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connectionService.proto
View file @
6c4ef63c
// Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
// Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connectionService/connectionService_client.py
View file @
6c4ef63c
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connectionService/connectionService_server.py
View file @
6c4ef63c
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connectionServiceWithNotif.proto
View file @
6c4ef63c
// Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
// Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py
View file @
6c4ef63c
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py
View file @
6c4ef63c
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/grpc/topologyService.proto
View file @
6c4ef63c
// Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
// Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
...
...
hackfest/grpc/topologyService/topologyService_client.py
View file @
6c4ef63c
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
hackfest/grpc/topologyService/topologyService_server.py
View file @
6c4ef63c
# Copyright 2022-202
3
ETSI TeraFlowSDN
-
TFS
OSG
(https://tfs.etsi.org/)
# Copyright 2022-202
4
ETSI
OSG/SDG
TeraFlowSDN
(
TFS
)
(https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
Prev
1
2
3
4
5
6
…
50
Next