From fd7288f449025d52ae2c8aaf6fae9714e27f6bf2 Mon Sep 17 00:00:00 2001 From: Carsten Schafer Date: Wed, 10 Jul 2024 16:05:50 -0400 Subject: [PATCH] Remove rrm, wait for kafka and postgres to be available Signed-off-by: Carsten Schafer --- docker-compose/.env | 8 +-- docker-compose/.env.letsencrypt | 3 - docker-compose/.env.selfsigned | 3 - docker-compose/README.md | 19 ------- .../openwifi-cloudsdk-docker-compose.yml | 10 +--- docker-compose/deploy.sh | 9 --- .../docker-compose.lb.letsencrypt.yml | 53 +++++------------- .../docker-compose.lb.selfsigned.yml | 55 +++++-------------- docker-compose/docker-compose.postgresql.yml | 40 +++++++++++--- docker-compose/docker-compose.yml | 55 +++++-------------- docker-compose/kafka.env | 2 +- docker-compose/mysql.env | 5 -- docker-compose/owls/.env | 5 +- docker-compose/owls/docker-compose.yml | 2 - docker-compose/owrrm.env | 8 --- docker-compose/traefik.env | 1 - .../traefik/openwifi_letsencrypt.yaml | 10 ---- .../traefik/openwifi_selfsigned.yaml | 11 ---- 18 files changed, 83 insertions(+), 216 deletions(-) delete mode 100644 docker-compose/mysql.env delete mode 100644 docker-compose/owrrm.env diff --git a/docker-compose/.env b/docker-compose/.env index e0ddb28..07d5337 100644 --- a/docker-compose/.env +++ b/docker-compose/.env @@ -1,5 +1,6 @@ -# Image tags COMPOSE_PROJECT_NAME=openwifi + +# Image tags OWGW_TAG=master OWGWUI_TAG=main OWSEC_TAG=main @@ -8,12 +9,10 @@ OWPROV_TAG=main OWPROVUI_TAG=main OWANALYTICS_TAG=main OWSUB_TAG=main + KAFKA_TAG=2.8.0-debian-10-r43 ZOOKEEPER_TAG=3.8 POSTGRESQL_TAG=15.0 -MYSQL_TAG=latest -# NOTE currently OWRRM is only supported in LB installations -#OWRRM_TAG=main # Microservice root/config directories OWGW_ROOT=/owgw-data @@ -36,4 +35,3 @@ INTERNAL_OWFMS_HOSTNAME=owfms.wlan.local INTERNAL_OWPROV_HOSTNAME=owprov.wlan.local INTERNAL_OWANALYTICS_HOSTNAME=owanalytics.wlan.local INTERNAL_OWSUB_HOSTNAME=owsub.wlan.local -#INTERNAL_OWRRM_HOSTNAME=owrrm.wlan.local diff --git a/docker-compose/.env.letsencrypt b/docker-compose/.env.letsencrypt index 4105b12..573bfa7 100644 --- a/docker-compose/.env.letsencrypt +++ b/docker-compose/.env.letsencrypt @@ -8,12 +8,10 @@ OWPROV_TAG=main OWPROVUI_TAG=main OWANALYTICS_TAG=main OWSUB_TAG=main -OWRRM_TAG=main KAFKA_TAG=2.8.0-debian-10-r43 ZOOKEEPER_TAG=3.8 ACMESH_TAG=latest TRAEFIK_TAG=latest -MYSQL_TAG=latest # Microservice root/config directories OWGW_ROOT=/owgw-data @@ -39,5 +37,4 @@ INTERNAL_OWPROVUI_HOSTNAME=owprov-ui.wlan.local INTERNAL_OWANALYTICS_HOSTNAME=owanalytics.wlan.local INTERNAL_RTTYS_HOSTNAME=rttys.wlan.local INTERNAL_OWSUB_HOSTNAME=owsub.wlan.local -INTERNAL_OWRRM_HOSTNAME=owrrm.wlan.local SDKHOSTNAME= diff --git a/docker-compose/.env.selfsigned b/docker-compose/.env.selfsigned index f8d2e15..c9b52c1 100644 --- a/docker-compose/.env.selfsigned +++ b/docker-compose/.env.selfsigned @@ -8,12 +8,10 @@ OWPROV_TAG=main OWPROVUI_TAG=main OWANALYTICS_TAG=main OWSUB_TAG=main -OWRRM_TAG=main KAFKA_TAG=2.8.0-debian-10-r43 ZOOKEEPER_TAG=3.8 ACMESH_TAG=latest TRAEFIK_TAG=latest -MYSQL_TAG=latest # Microservice root/config directories OWGW_ROOT=/owgw-data @@ -38,4 +36,3 @@ INTERNAL_OWPROV_HOSTNAME=owprov.wlan.local INTERNAL_OWPROVUI_HOSTNAME=owprov-ui.wlan.local INTERNAL_OWANALYTICS_HOSTNAME=owanalytics.wlan.local INTERNAL_OWSUB_HOSTNAME=owsub.wlan.local -INTERNAL_OWRRM_HOSTNAME=owrrm.wlan.local diff --git a/docker-compose/README.md b/docker-compose/README.md index c3b60a3..070b491 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -46,7 +46,6 @@ export FLAGS="-s --cacert /docker-comp | `INTERNAL_OWPROV_HOSTNAME` | Set this to your OWProv hostname, for example `owprov.example.com`. | | `INTERNAL_OWANALYTICS_HOSTNAME` | Set this to your OWAnalytics hostname, for example `owanalytics.example.com`. | | `INTERNAL_OWSUB_HOSTNAME` | Set this to your OWSub hostname, for example `owsub.example.com`. | -| `INTERNAL_OWRRM_HOSTNAME` | Set this to your OWRRM hostname, for example `owrrm.example.com`. | ### owgw.env | Variable | Description | | ---------------------------------------- | ----------------------------------------------------------------------------------- | @@ -83,15 +82,6 @@ export FLAGS="-s --cacert /docker-comp | ---------------------------------------- | -------------------------------------------------------------------------------------- | | `SYSTEM_URI_PRIVATE`,`SYSTEM_URI_PUBLIC` | Set this to your OWAnalytics URL, for example `https://owanalytics.example.com:16009`. | | `SYSTEM_URI_UI` | Set this to your OWProv-UI URL, for example `https://owprov-ui.example.com`. | -### owrrm.env -| Variable | Description | -| ---------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `SERVICECONFIG_PRIVATEENDPOINT`, `SERVICECONFIG_PUBLICENDPOINT` | Set this to your OWRRM URL, for example https://owrrm.example.com:16789. | -| `DATABASECONFIG_PASSWORD` | Set this to a random and safe password. | -### mysql.env -| Variable | Description | -| ---------------- | ------------------------------------------------------------------------ | -| `MYSQL_PASSWORD` | Set this to the same value as `$DATABASECONFIG_PASSWORD` in `owrrm.env`. | 3. Spin up the deployment with `docker-compose up -d`. 4. Check if the containers are up and running with `docker-compose ps`. @@ -218,15 +208,6 @@ For the Let's Encrypt challenge to work you need a public IP address. The hostna | -------------------- | ----------------------------------------------------------------------------- | | `SYSTEM_URI_PUBLIC` | Set this to your OWSub URL, for example `https://openwifi.example.com:16006`. | | `SYSTEM_URI_UI` | Set this to your OWGW-UI URL, for example `https://openwifi.example.com`. | -### owrrm.env -| Variable | Description | -| ---------------------------------------- | ------------------------------- | -| `SERVICECONFIG_PUBLICENDPOINT` | Set this to your OWRRM URL, for example https://openwifi.example.com:16789. | -| `DATABASECONFIG_PASSWORD` | Set this to a random and safe password. | -### mysql.env -| Variable | Description | -| ---------------- | ------------------------------------------------------------------------ | -| `MYSQL_PASSWORD` | Set this to the same value as `$DATABASECONFIG_PASSWORD` in `owrrm.env`. | ### traefik.env | Variable | Description | | --------------------------------------------------- | ----------------------------------------- | diff --git a/docker-compose/cloudformation/openwifi-cloudsdk-docker-compose.yml b/docker-compose/cloudformation/openwifi-cloudsdk-docker-compose.yml index f913a92..4d95001 100644 --- a/docker-compose/cloudformation/openwifi-cloudsdk-docker-compose.yml +++ b/docker-compose/cloudformation/openwifi-cloudsdk-docker-compose.yml @@ -57,7 +57,7 @@ Parameters: ExistingHostedZoneId: Description: | If you want to create the Route53 record in an existing hosted zone, - please specify the according hosted zone ID. + please specify the according hosted zone ID. Type: String # MinLength: 21 # MaxLength: 21 @@ -235,8 +235,6 @@ Resources: OWPROV_SYSTEM_URI_PUBLIC: !Sub "https://${SDKHostname}:16005" OWANALYTICS_SYSTEM_URI_PUBLIC: !Sub "https://${SDKHostname}:16009" OWSUB_SYSTEM_URI_PUBLIC: !Sub "https://${SDKHostname}:16006" - OWRRM_SERVICECONFIG_PRIVATEENDPOINT: !Sub "http://owrrm.wlan.local:17007" - OWRRM_SERVICECONFIG_PUBLICENDPOINT: !Sub "https://${SDKHostname}:16789" TRAEFIK_ACME_EMAIL: !Sub "${TraefikAcmeEmail}" cwd: "~/wlan-cloud-ucentral-deploy/docker-compose" Properties: @@ -293,10 +291,6 @@ Resources: FromPort: "16009" ToPort: "16009" CidrIp: 0.0.0.0/0 - - IpProtocol: tcp - FromPort: "16789" - ToPort: "16789" - CidrIp: 0.0.0.0/0 - IpProtocol: tcp FromPort: "5912" ToPort: "5913" @@ -308,7 +302,7 @@ Resources: CloudSDKHostedZone: Condition: HasHostedZoneName Type: AWS::Route53::HostedZone - Properties: + Properties: Name: !Ref HostedZoneName CloudSDKRoute53RecordExistingHostedZone: Condition: CreateRecordInExistingZone diff --git a/docker-compose/deploy.sh b/docker-compose/deploy.sh index 914ebf8..efb3e27 100755 --- a/docker-compose/deploy.sh +++ b/docker-compose/deploy.sh @@ -39,9 +39,6 @@ usage () { # echo "- OWSUB_SYSTEM_URI_PRIVATE - private URL to be used for OWSub"; echo "- OWSUB_SYSTEM_URI_PUBLIC - public URL to be used for OWSub"; echo; - echo "- OWRRM_SERVICECONFIG_PRIVATEENDPOINT - private URL to be used for OWRRM"; - echo "- OWRRM_SERVICECONFIG_PUBLICENDPOINT - public URL to be used for OWRRM"; - echo; echo "Optional environment variables:" echo "- WEBSOCKET_CERT - Your Digicert-signed websocket certificate" echo "- WEBSOCKET_KEY - The key to your Digicert-signed websocket certificate" @@ -91,9 +88,6 @@ usage () { ## OWSub configuration variables #[ -z ${OWSUB_SYSTEM_URI_PRIVATE+x} ] && echo "OWSUB_SYSTEM_URI_PRIVATE is unset" && usage && exit 1 [ -z ${OWSUB_SYSTEM_URI_PUBLIC+x} ] && echo "OWSUB_SYSTEM_URI_PUBLIC is unset" && usage && exit 1 -## OWRRM configuration variables -[ -z ${OWRRM_SERVICECONFIG_PRIVATEENDPOINT+x} ] && echo "OWRRM_SERVICECONFIG_PRIVATEENDPOINT is unset" && usage && exit 1 -[ -z ${OWRRM_SERVICECONFIG_PUBLICENDPOINT+x} ] && echo "OWRRM_SERVICECONFIG_PUBLICENDPOINT is unset" && usage && exit 1 # Search and replace image version tags if set if [[ ! -z "$OWGW_VERSION" ]]; then @@ -181,9 +175,6 @@ sed -i "s~.*SYSTEM_URI_UI=.*~SYSTEM_URI_UI=$SYSTEM_URI_UI~" owanalytics.env sed -i "s~.*SYSTEM_URI_PUBLIC=.*~SYSTEM_URI_PUBLIC=$OWSUB_SYSTEM_URI_PUBLIC~" owsub.env sed -i "s~.*SYSTEM_URI_UI=.*~SYSTEM_URI_UI=$SYSTEM_URI_UI~" owsub.env -sed -i "s~.*SERVICECONFIG_PRIVATEENDPOINT=.*~SERVICECONFIG_PRIVATEENDPOINT=$OWRRM_SERVICECONFIG_PRIVATEENDPOINT~" owrrm.env -sed -i "s~.*SERVICECONFIG_PUBLICENDPOINT=.*~SERVICECONFIG_PUBLICENDPOINT=$OWRRM_SERVICECONFIG_PUBLICENDPOINT~" owrrm.env - if [[ ! -z "$TRAEFIK_ACME_EMAIL" ]]; then sed -i "s~.*TRAEFIK_CERTIFICATESRESOLVERS_OPENWIFI_ACME_EMAIL=.*~TRAEFIK_CERTIFICATESRESOLVERS_OPENWIFI_ACME_EMAIL=$TRAEFIK_ACME_EMAIL~" traefik.env fi diff --git a/docker-compose/docker-compose.lb.letsencrypt.yml b/docker-compose/docker-compose.lb.letsencrypt.yml index cfcb500..e808a27 100644 --- a/docker-compose/docker-compose.lb.letsencrypt.yml +++ b/docker-compose/docker-compose.lb.letsencrypt.yml @@ -1,5 +1,3 @@ -version: '3' - volumes: owgw_data: driver: local @@ -13,16 +11,12 @@ volumes: driver: local owsub_data: driver: local - owrrm_data: - driver: local zookeeper_data: driver: local zookeeper_datalog: driver: local kafka_data: driver: local - mysql_data: - driver: local letsencrypt_certs: driver: local @@ -40,7 +34,8 @@ services: - .env.letsencrypt - owgw.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owgw_data:${OWGW_ROOT}/persist @@ -75,7 +70,8 @@ services: - .env.letsencrypt - owsec.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owsec_data:${OWSEC_ROOT}/persist @@ -91,7 +87,8 @@ services: - .env.letsencrypt - owfms.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owfms_data:${OWFMS_ROOT}/persist @@ -107,7 +104,8 @@ services: - .env.letsencrypt - owprov.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owprov_data:${OWPROV_ROOT} @@ -138,7 +136,8 @@ services: - .env.letsencrypt - owanalytics.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owanalytics_data:${OWANALYTICS_ROOT} @@ -154,27 +153,13 @@ services: - .env.letsencrypt - owsub.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owsub_data:${OWSUB_ROOT} - ./certs:/${OWSUB_ROOT}/certs - owrrm: - image: "tip-tip-wlan-cloud-ucentral.jfrog.io/owrrm:${OWRRM_TAG}" - networks: - openwifi: - aliases: - - ${INTERNAL_OWRRM_HOSTNAME} - env_file: - - owrrm.env - depends_on: - - mysql - - kafka - restart: unless-stopped - volumes: - - owrrm_data:/owrrm-data - zookeeper: image: "zookeeper:${ZOOKEEPER_TAG}" networks: @@ -208,6 +193,8 @@ services: - /bin/sh - -c - | + echo "Sleeping to allow kafka to start up..." + sleep 20 echo "Creating all required Kafka topics..." for topic in $$TOPICS; do /opt/bitnami/kafka/bin/kafka-topics.sh \ @@ -215,16 +202,6 @@ services: --partitions 1 --bootstrap-server kafka:9092 done && echo "Successfully created Kafka topics, exiting." && exit 0 - mysql: - image: "mysql:${MYSQL_TAG}" - networks: - openwifi: - env_file: - - mysql.env - restart: unless-stopped - volumes: - - mysql_data:/var/lib/mysql - traefik: image: "traefik:${TRAEFIK_TAG}" networks: @@ -241,7 +218,6 @@ services: - owprov-ui - owanalytics - owsub - - owrrm restart: unless-stopped volumes: - "./traefik/openwifi_letsencrypt.yaml:/etc/traefik/openwifi.yaml" @@ -268,7 +244,6 @@ services: - "16006:16006" - "5912:5912" - "5913:5913" - - "16789:16789" - "1812:1812/udp" - "1813:1813/udp" - "3799:3799/udp" diff --git a/docker-compose/docker-compose.lb.selfsigned.yml b/docker-compose/docker-compose.lb.selfsigned.yml index 01e7a33..5eadd44 100644 --- a/docker-compose/docker-compose.lb.selfsigned.yml +++ b/docker-compose/docker-compose.lb.selfsigned.yml @@ -1,5 +1,3 @@ -version: '3' - volumes: owgw_data: driver: local @@ -13,16 +11,12 @@ volumes: driver: local owsub_data: driver: local - owrrm_data: - driver: local zookeeper_data: driver: local zookeeper_datalog: driver: local kafka_data: driver: local - mysql_data: - driver: local networks: openwifi: @@ -38,7 +32,8 @@ services: - .env.selfsigned - owgw.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owgw_data:${OWGW_ROOT}/persist @@ -50,7 +45,7 @@ services: owgw-ui: image: "tip-tip-wlan-cloud-ucentral.jfrog.io/owgw-ui:${OWGWUI_TAG}" - env_file: + env_file: - owgw-ui.env networks: openwifi: @@ -75,7 +70,8 @@ services: - .env.selfsigned - owsec.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owsec_data:${OWSEC_ROOT}/persist @@ -91,7 +87,8 @@ services: - .env.selfsigned - owfms.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owfms_data:${OWFMS_ROOT}/persist @@ -107,7 +104,8 @@ services: - .env.selfsigned - owprov.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owprov_data:${OWPROV_ROOT} @@ -138,7 +136,8 @@ services: - .env.selfsigned - owanalytics.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owanalytics_data:${OWANALYTICS_ROOT} @@ -154,27 +153,13 @@ services: - .env.selfsigned - owsub.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - owsub_data:${OWSUB_ROOT} - ./certs:/${OWSUB_ROOT}/certs - owrrm: - image: "tip-tip-wlan-cloud-ucentral.jfrog.io/owrrm:${OWRRM_TAG}" - networks: - openwifi: - aliases: - - ${INTERNAL_OWRRM_HOSTNAME} - env_file: - - owrrm.env - depends_on: - - mysql - - kafka - restart: unless-stopped - volumes: - - owrrm_data:/owrrm-data - zookeeper: image: "zookeeper:${ZOOKEEPER_TAG}" networks: @@ -208,6 +193,8 @@ services: - /bin/sh - -c - | + echo "Sleeping to allow kafka to start up..." + sleep 20 echo "Creating all required Kafka topics..." for topic in $$TOPICS; do /opt/bitnami/kafka/bin/kafka-topics.sh \ @@ -215,16 +202,6 @@ services: --partitions 1 --bootstrap-server kafka:9092 done && echo "Successfully created Kafka topics, exiting." && exit 0 - mysql: - image: "mysql:${MYSQL_TAG}" - networks: - openwifi: - env_file: - - mysql.env - restart: unless-stopped - volumes: - - mysql_data:/var/lib/mysql - traefik: image: "traefik:${TRAEFIK_TAG}" networks: @@ -240,7 +217,6 @@ services: - owprov-ui - owanalytics - owsub - - owrrm restart: unless-stopped volumes: - "./traefik/openwifi_selfsigned.yaml:/etc/traefik/openwifi.yaml" @@ -262,7 +238,6 @@ services: - "16006:16006" - "5912:5912" - "5913:5913" - - "16789:16789" - "1812:1812/udp" - "1813:1813/udp" - "3799:3799/udp" diff --git a/docker-compose/docker-compose.postgresql.yml b/docker-compose/docker-compose.postgresql.yml index abeb73f..c8865f5 100644 --- a/docker-compose/docker-compose.postgresql.yml +++ b/docker-compose/docker-compose.postgresql.yml @@ -1,5 +1,3 @@ -version: '3' - volumes: postgresql_data: driver: local @@ -7,32 +5,50 @@ volumes: services: owgw: depends_on: - - postgresql + init-kafka: + condition: service_completed_successfully + postgresql: + condition: service_healthy command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owgw"] owsec: depends_on: - - postgresql + init-kafka: + condition: service_completed_successfully + postgresql: + condition: service_healthy command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owsec"] owfms: depends_on: - - postgresql + init-kafka: + condition: service_completed_successfully + postgresql: + condition: service_healthy command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owfms"] owprov: depends_on: - - postgresql + init-kafka: + condition: service_completed_successfully + postgresql: + condition: service_healthy command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owprov"] owanalytics: depends_on: - - postgresql + init-kafka: + condition: service_completed_successfully + postgresql: + condition: service_healthy command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owanalytics"] owsub: depends_on: - - postgresql + init-kafka: + condition: service_completed_successfully + postgresql: + condition: service_healthy command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owsub"] postgresql: @@ -44,10 +60,16 @@ services: - "-c" - "max_connections=400" - "-c" - - "shared_buffers=20MB" + - "shared_buffers=20MB" env_file: - postgresql.env restart: unless-stopped volumes: - postgresql_data:/var/lib/postgresql/data - ./postgresql/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres -d owgw"] + interval: 10s + retries: 5 + start_period: 30s + timeout: 10s diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 9777c3c..5686851 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -1,17 +1,10 @@ -version: '3' - volumes: -# owrrm_data: -# driver: local zookeeper_data: driver: local zookeeper_datalog: driver: local kafka_data: driver: local - mysql_data: - driver: local - networks: openwifi: @@ -26,7 +19,8 @@ services: env_file: - owgw.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - "./owgw_data:${OWGW_ROOT}" @@ -77,7 +71,8 @@ services: env_file: - owsec.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - "./owsec_data:${OWSEC_ROOT}" @@ -95,7 +90,8 @@ services: env_file: - owfms.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - "./owfms_data:${OWFMS_ROOT}" @@ -113,7 +109,8 @@ services: env_file: - owprov.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - "./owprov_data:${OWPROV_ROOT}" @@ -153,7 +150,8 @@ services: env_file: - owanalytics.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - "./owanalytics_data:${OWANALYTICS_ROOT}" @@ -171,7 +169,8 @@ services: env_file: - owsub.env depends_on: - - kafka + init-kafka: + condition: service_completed_successfully restart: unless-stopped volumes: - "./owsub_data:${OWSUB_ROOT}" @@ -180,7 +179,6 @@ services: - "16006:16006" - "16106:16106" - zookeeper: image: "zookeeper:${ZOOKEEPER_TAG}" networks: @@ -214,36 +212,11 @@ services: - /bin/sh - -c - | + echo "Sleeping to allow kafka to start up..." + sleep 20 echo "Creating all required Kafka topics..." for topic in $$TOPICS; do /opt/bitnami/kafka/bin/kafka-topics.sh \ --create --if-not-exists --topic $$topic --replication-factor 1 \ --partitions 1 --bootstrap-server kafka:9092 done && echo "Successfully created Kafka topics, exiting." && exit 0 - -# NOTE currently OWRRM is only supported in LB installations -# owrrm: -# image: "tip-tip-wlan-cloud-ucentral.jfrog.io/owrrm:${OWRRM_TAG}" -# networks: -# openwifi: -# aliases: -# - ${INTERNAL_OWRRM_HOSTNAME} -# env_file: -# - owrrm.env -# depends_on: -# - mysql -# - kafka -# restart: unless-stopped -# volumes: -# - owrrm_data:/owrrm-data -# ports: -# - "16789:16789" -# mysql: -# image: "mysql:${MYSQL_TAG}" -# networks: -# openwifi: -# env_file: -# - mysql.env -# restart: unless-stopped -# volumes: -# - mysql_data:/var/lib/mysql diff --git a/docker-compose/kafka.env b/docker-compose/kafka.env index 04637e1..adfc30a 100644 --- a/docker-compose/kafka.env +++ b/docker-compose/kafka.env @@ -1,3 +1,3 @@ KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 ALLOW_PLAINTEXT_LISTENER=yes -TOPICS=command connection device_event_queue device telemetry healthcheck provisioning_change service_events state wifiscan rrm +TOPICS=command connection device_event_queue device telemetry healthcheck provisioning_change service_events state wifiscan diff --git a/docker-compose/mysql.env b/docker-compose/mysql.env deleted file mode 100644 index 798d703..0000000 --- a/docker-compose/mysql.env +++ /dev/null @@ -1,5 +0,0 @@ -#MYSQL_RANDOM_ROOT_PASSWORD=yes -MYSQL_ROOT_PASSWORD=openwifi -MYSQL_DATABASE=owrrm -#MYSQL_USER=owrrm -#MYSQL_PASSWORD=openwifi diff --git a/docker-compose/owls/.env b/docker-compose/owls/.env index 75ef145..b641d48 100644 --- a/docker-compose/owls/.env +++ b/docker-compose/owls/.env @@ -1,10 +1,11 @@ -# Image tags COMPOSE_PROJECT_NAME=owls + +# Image tags OWSEC_TAG=main OWLS_TAG=main OWLSUI_TAG=master KAFKA_TAG=2.8.0-debian-10-r43 -ZOOKEEPER_TAG=latest +ZOOKEEPER_TAG=3.8 # Microservice root/config directories OWSEC_ROOT=/owsec-data diff --git a/docker-compose/owls/docker-compose.yml b/docker-compose/owls/docker-compose.yml index 3ecbccd..8b7db38 100644 --- a/docker-compose/owls/docker-compose.yml +++ b/docker-compose/owls/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3' - volumes: zookeeper_data: driver: local diff --git a/docker-compose/owrrm.env b/docker-compose/owrrm.env deleted file mode 100644 index 59bda1a..0000000 --- a/docker-compose/owrrm.env +++ /dev/null @@ -1,8 +0,0 @@ -SELFSIGNED_CERTS=true -SERVICECONFIG_PRIVATEENDPOINT=https://owrrm.wlan.local:16789 -SERVICECONFIG_PUBLICENDPOINT=https://openwifi.wlan.local:16789 -KAFKACONFIG_BOOTSTRAPSERVER=kafka:9092 -DATABASECONFIG_SERVER=mysql:3306 -DATABASECONFIG_USER=root -#DATABASECONFIG_PASSWORD=openwifi -DATABASECONFIG_DBNAME=owrrm diff --git a/docker-compose/traefik.env b/docker-compose/traefik.env index fb61b8d..095aa58 100644 --- a/docker-compose/traefik.env +++ b/docker-compose/traefik.env @@ -17,7 +17,6 @@ TRAEFIK_ENTRYPOINTS_OWFMSRESTAPI_ADDRESS=:16004 TRAEFIK_ENTRYPOINTS_OWPROVRESTAPI_ADDRESS=:16005 TRAEFIK_ENTRYPOINTS_OWANALYTICSRESTAPI_ADDRESS=:16009 TRAEFIK_ENTRYPOINTS_OWSUBRESTAPI_ADDRESS=:16006 -TRAEFIK_ENTRYPOINTS_OWRRMOPENAPI_ADDRESS=:16789 TRAEFIK_PROVIDERS_FILE_FILENAME=/etc/traefik/openwifi.yaml TRAEFIK_CERTIFICATESRESOLVERS_OPENWIFI_ACME_EMAIL= TRAEFIK_CERTIFICATESRESOLVERS_OPENWIFI_ACME_HTTPCHALLENGE=true diff --git a/docker-compose/traefik/openwifi_letsencrypt.yaml b/docker-compose/traefik/openwifi_letsencrypt.yaml index e463872..536f53b 100644 --- a/docker-compose/traefik/openwifi_letsencrypt.yaml +++ b/docker-compose/traefik/openwifi_letsencrypt.yaml @@ -40,10 +40,6 @@ http: loadBalancer: servers: - url: "https://owgw.wlan.local:5913/" - owrrm-openapi: - loadBalancer: - servers: - - url: "http://owrrm.wlan.local:16789/" routers: owgw-ui-http: @@ -114,12 +110,6 @@ http: rule: "Host(`{{env "SDKHOSTNAME"}}`)" tls: certResolver: "openwifi" - owrrm-openapi: - entryPoints: "owrrmopenapi" - service: "owrrm-openapi" - rule: "Host(`{{env "SDKHOSTNAME"}}`)" - tls: - certResolver: "openwifi" tcp: services: diff --git a/docker-compose/traefik/openwifi_selfsigned.yaml b/docker-compose/traefik/openwifi_selfsigned.yaml index d3e6c21..5666780 100644 --- a/docker-compose/traefik/openwifi_selfsigned.yaml +++ b/docker-compose/traefik/openwifi_selfsigned.yaml @@ -15,11 +15,6 @@ http: servers: - url: "http://owprov-ui.wlan.local:80/" - owrrm-openapi: - loadBalancer: - servers: - - url: "http://owrrm.wlan.local:16789/" - routers: owgw-ui-http: entryPoints: "owgwuihttp" @@ -43,12 +38,6 @@ http: rule: "PathPrefix(`/`)" tls: {} - owrrm-openapi: - entryPoints: "owrrmopenapi" - service: "owrrm-openapi" - rule: "PathPrefix(`/`)" - tls: {} - tcp: services: owgw-websocket: