my_deploy.sh 7 KB
Newer Older
# Copyright 2022-2024 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.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# ----- TeraFlowSDN ------------------------------------------------------------

# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"

# Set the list of components, separated by spaces, you want to build images for, and deploy.
export TFS_COMPONENTS="context device app pathcomp service slice nbi webui load_generator"
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Uncomment to activate Monitoring (old)
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Uncomment to activate Monitoring Framework (new)
#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api"
# Uncomment to activate BGP-LS Speaker
export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker"
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Uncomment to activate Optical Controller
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
#   To manage optical connections, "service" requires "opticalcontroller" to be deployed
#   before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the
#   "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it.
#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then
#    BEFORE="${TFS_COMPONENTS% service*}"
#    AFTER="${TFS_COMPONENTS#* service}"
#    export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}"
#fi
# Uncomment to activate ZTP
#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp"

# Uncomment to activate Policy Manager
#export TFS_COMPONENTS="${TFS_COMPONENTS} policy"
# Uncomment to activate Optical CyberSecurity
#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager"

# Uncomment to activate L3 CyberSecurity
#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector"
# Uncomment to activate TE
#export TFS_COMPONENTS="${TFS_COMPONENTS} te"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Uncomment to activate Forecaster
#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster"

# Uncomment to activate E2E Orchestrator
#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator"
# Uncomment to activate DLT and Interdomain
#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt"
#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then
#    export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk"
#    export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem"
#    export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt"
#fi
Javier Diaz's avatar
Javier Diaz committed

# Uncomment to activate QKD App
#export TFS_COMPONENTS="${TFS_COMPONENTS} app"


# Set the tag you want to use for your images.
export TFS_IMAGE_TAG="dev"

# Set the name of the Kubernetes namespace to deploy TFS to.
export TFS_K8S_NAMESPACE="tfs"

# Set additional manifest files to be applied after the deployment
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml"
# Uncomment to monitor performance of components
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml"

# Uncomment when deploying Optical CyberSecurity
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml"
# Set the new Grafana admin password
export TFS_GRAFANA_PASSWORD="admin123+"

# Disable skip-build flag to rebuild the Docker images.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export TFS_SKIP_BUILD=""

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# ----- CockroachDB ------------------------------------------------------------

# Set the namespace where CockroackDB will be deployed.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export CRDB_NAMESPACE="crdb"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the external port CockroackDB Postgre SQL interface will be exposed to.
export CRDB_EXT_PORT_SQL="26257"

# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to.
export CRDB_EXT_PORT_HTTP="8081"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the database username to be used by Context.
export CRDB_USERNAME="tfs"

# Set the database user's password to be used by Context.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export CRDB_PASSWORD="tfs123"

# Set the database name to be used by Context.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export CRDB_DATABASE="tfs"
export CRDB_DATABASE_APP="tfs_app"

# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/crdb.sh for additional details
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export CRDB_DEPLOY_MODE="single"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Disable flag for dropping database, if it exists.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export CRDB_DROP_DATABASE_IF_EXISTS=""

# Disable flag for re-deploying CockroachDB from scratch.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export CRDB_REDEPLOY=""

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# ----- NATS -------------------------------------------------------------------

# Set the namespace where NATS will be deployed.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export NATS_NAMESPACE="nats"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the external port NATS Client interface will be exposed to.
export NATS_EXT_PORT_CLIENT="4222"

# Set the external port NATS HTTP Mgmt GUI interface will be exposed to.
export NATS_EXT_PORT_HTTP="8222"

# Set NATS installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/nats.sh for additional details
export NATS_DEPLOY_MODE="single"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Disable flag for re-deploying NATS from scratch.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export NATS_REDEPLOY=""
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# ----- QuestDB ----------------------------------------------------------------

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the namespace where QuestDB will be deployed.
export QDB_NAMESPACE="qdb"
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the external port QuestDB Postgre SQL interface will be exposed to.
export QDB_EXT_PORT_SQL="8812"

# Set the external port QuestDB Influx Line Protocol interface will be exposed to.
export QDB_EXT_PORT_ILP="9009"

# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to.
export QDB_EXT_PORT_HTTP="9000"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the database username to be used for QuestDB.
export QDB_USERNAME="admin"
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the database user's password to be used for QuestDB.
export QDB_PASSWORD="quest"
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the table name to be used by Monitoring for KPIs.
export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis"
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Set the table name to be used by Slice for plotting groups.
export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups"

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Disable flag for dropping tables if they exist.
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
export QDB_DROP_TABLES_IF_EXIST=""
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Disable flag for re-deploying QuestDB from scratch.
delacal's avatar
delacal committed
export QDB_REDEPLOY=""
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed


# ----- K8s Observability ------------------------------------------------------

# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to.
export PROM_EXT_PORT_HTTP="9090"

# Set the external port Grafana HTTP Dashboards will be exposed to.
export GRAF_EXT_PORT_HTTP="3000"


# ----- Apache Kafka -----------------------------------------------------------

# Set the namespace where Apache Kafka will be deployed.
export KFK_NAMESPACE="kafka"

# Set the port Apache Kafka server will be exposed to.
export KFK_SERVER_PORT="9092"

# Set the flag to YES for redeploying of Apache Kafka
export KFK_REDEPLOY=""