diff --git a/deploy/all.sh b/deploy/all.sh index af16975644e49d3899e9e98c6a680b937f4f2217..06b8ee701530f56381080879d0e2941b664e5197 100755 --- a/deploy/all.sh +++ b/deploy/all.sh @@ -207,24 +207,24 @@ export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"} ######################################################################################################################## # Deploy CockroachDB -#./deploy/crdb.sh +./deploy/crdb.sh # Deploy NATS -#./deploy/nats.sh +./deploy/nats.sh # Deploy QuestDB -#./deploy/qdb.sh +./deploy/qdb.sh # Deploy Apache Kafka -#./deploy/kafka.sh +./deploy/kafka.sh # Expose Dashboard -#./deploy/expose_dashboard.sh +./deploy/expose_dashboard.sh # Deploy TeraFlowSDN ./deploy/tfs.sh # Show deploy summary -#./deploy/show.sh +./deploy/show.sh echo "Done!" diff --git a/deploy/tfs.sh b/deploy/tfs.sh index a28b335d308de099afcac613adea84ca021f06c4..189ae11e16e77196d6728482b7f16443149b60a9 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -141,8 +141,8 @@ TMP_LOGS_FOLDER="${TMP_FOLDER}/${TFS_K8S_NAMESPACE}/logs" mkdir -p $TMP_LOGS_FOLDER echo "Deleting and Creating a new namespace..." -#kubectl delete namespace $TFS_K8S_NAMESPACE --ignore-not-found -#kubectl create namespace $TFS_K8S_NAMESPACE +kubectl delete namespace $TFS_K8S_NAMESPACE --ignore-not-found +kubectl create namespace $TFS_K8S_NAMESPACE sleep 2 printf "\n" @@ -252,7 +252,7 @@ echo "export PYTHONPATH=${PYTHONPATH}" >> $ENV_VARS_SCRIPT echo "Create Redis secret..." # first try to delete an old one if exists -#kubectl delete secret redis-secrets --namespace=$TFS_K8S_NAMESPACE --ignore-not-found +kubectl delete secret redis-secrets --namespace=$TFS_K8S_NAMESPACE --ignore-not-found REDIS_PASSWORD=`uuidgen` kubectl create secret generic redis-secrets --namespace=$TFS_K8S_NAMESPACE \ --from-literal=REDIS_PASSWORD=$REDIS_PASSWORD diff --git a/my_deploy.sh b/my_deploy.sh index 07b200ca10d34a6ca7b59d14d46214788adb5c58..456291b92cd38f535bec7448bcd989291c4e6181 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -20,13 +20,13 @@ 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="analytics" +export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator automation" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" # Uncomment to activate Monitoring Framework (new) -#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics" +export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics" # Uncomment to activate BGP-LS Speaker #export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" @@ -42,10 +42,10 @@ export TFS_COMPONENTS="analytics" #fi # Uncomment to activate ZTP -#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" +export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" # Uncomment to activate Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" +export TFS_COMPONENTS="${TFS_COMPONENTS} policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" @@ -75,7 +75,7 @@ export TFS_COMPONENTS="analytics" # Set the tag you want to use for your images. -export TFS_IMAGE_TAG="panos31" +export TFS_IMAGE_TAG="dev" # Set the name of the Kubernetes namespace to deploy TFS to. export TFS_K8S_NAMESPACE="tfs" @@ -124,7 +124,7 @@ export CRDB_DEPLOY_MODE="single" export CRDB_DROP_DATABASE_IF_EXISTS="" # Disable flag for re-deploying CockroachDB from scratch. -export CRDB_REDEPLOY="YES" +export CRDB_REDEPLOY="" # ----- NATS ------------------------------------------------------------------- @@ -143,7 +143,7 @@ export NATS_EXT_PORT_HTTP="8222" export NATS_DEPLOY_MODE="single" # Disable flag for re-deploying NATS from scratch. -export NATS_REDEPLOY="YES" +export NATS_REDEPLOY="" # ----- QuestDB ---------------------------------------------------------------- @@ -176,7 +176,7 @@ export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" export QDB_DROP_TABLES_IF_EXIST="" # Disable flag for re-deploying QuestDB from scratch. -export QDB_REDEPLOY="YES" +export QDB_REDEPLOY="" # ----- K8s Observability ------------------------------------------------------ diff --git a/src/automation/requirements.in b/src/automation/requirements.in index d81b9ddbeafeff94c830d48ca5594e775b9ce240..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/automation/requirements.in +++ b/src/automation/requirements.in @@ -11,10 +11,3 @@ # 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. - -apscheduler==3.10.4 -confluent-kafka==2.3.* -psycopg2-binary==2.9.* -SQLAlchemy==1.4.* -sqlalchemy-cockroachdb==1.4.* -SQLAlchemy-Utils==0.38.* diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py index 9a6a4f2d7690ada063c9521a0cbb91669f6d104b..9e432d637e70236d192d5248247175ef310d8368 100644 --- a/src/common/tools/kafka/Variables.py +++ b/src/common/tools/kafka/Variables.py @@ -19,8 +19,7 @@ from common.Settings import get_setting LOGGER = logging.getLogger(__name__) -# KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-service.{:s}.svc.cluster.local:{:s}' -KFK_SERVER_ADDRESS_TEMPLATE = '10.152.183.186' +KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-service.{:s}.svc.cluster.local:{:s}' class KafkaConfig(Enum): @@ -30,10 +29,8 @@ class KafkaConfig(Enum): if kafka_server_address is None: KFK_NAMESPACE = get_setting('KFK_NAMESPACE') KFK_PORT = get_setting('KFK_SERVER_PORT') - kafka_server_address = KFK_SERVER_ADDRESS_TEMPLATE+':'+KFK_PORT - #print("XXXXXXXXXXXXXXXXXXXXXXXXX") - print(kafka_server_address) - #kafka_server_address = "1" + kafka_server_address = KFK_SERVER_ADDRESS_TEMPLATE.format(KFK_NAMESPACE, KFK_PORT) + # kafka_server_address = "127.0.0.1:9092" return kafka_server_address @staticmethod