Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi 13796 remove haproxy, rrm and kafka brokers #275

Merged
merged 3 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ dependencies:
- name: owsub
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-userportal@helm?ref=main"
version: 0.1.0
- name: owrrm
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-rrm@helm?ref=main"
version: 0.1.0
- name: owls
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owls@helm?ref=main"
version: 0.1.0
Expand Down
6 changes: 1 addition & 5 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ In order to access the UI and other RESTAPI endpoints you should run the followi

```
$ kubectl port-forward deployment/proxy 5912 5913 16001 16002 16003 16004 16005 16006 16009 &
$ kubectl port-forward deployment/owrrm 16789 &
$ kubectl port-forward deployment/owgwui 8080:80 &
$ kubectl port-forward deployment/owprovui 8088:80 &
```
Expand All @@ -47,7 +46,6 @@ In order to access the UI and other RESTAPI endpoints you should run the followi

```
$ kubectl port-forward deployment/proxy 5912 5913 16001 16002 16003 16004 16005 16006 16009 &
$ kubectl port-forward deployment/owrrm 16789 &
$ kubectl port-forward deployment/owgwui 8080:80 &
$ kubectl port-forward deployment/owprovui 8088:80 &
```
Expand Down Expand Up @@ -143,8 +141,6 @@ The following table lists the configurable parameters that overrides microservic
| `owsub.configProperties."openwifi\.kafka\.enable"` | string | Configures OpenWIFI Subscription to use Kafka for communication | `'true'` |
| `owsub.configProperties."openwifi\.kafka\.brokerlist"` | string | Sets up Kafka broker list for OpenWIFI Subscription to the predictable Kubernetes service name (see `kafka.fullnameOverride` option description for details) | `'kafka:9092'` |
| `owsub.certs` | map | Map with multiline string containing TLS certificates and private keys required for REST API | |
| `owrrm.public_env_variables` | map | Map of public environment variables passed to OpenWIFI RRM service | |
| `owrrm.mysql.enabled` | boolean | Flag to enable MySQL database deployment of OpenWIFI RRM service using subchart | `true` |
| `kafka.enabled` | boolean | Enables [kafka](https://github.com/bitnami/charts/blob/master/bitnami/kafka/) deployment | `true` |
| `kafka.fullnameOverride` | string | Overrides Kafka Kubernetes service name so it could be predictable and set in microservices configs | `'kafka'` |
| `kafka.image.registry` | string | Kafka Docker image registry | `'docker.io'` |
Expand Down Expand Up @@ -258,7 +254,7 @@ You may see example values to enable this feature in [values.restapi-disable-tls

### PostgreSQL storage option for services

By default, all microservices except RRM service use SQLite as default storage driver, but it is possible to use PostgreSQL for that purpose. Both [cluster-per-microservice](environment-values/values.openwifi-qa.external-db.yaml) and [cluster per installation](environment-values/values.openwifi-qa.single-external-db.yaml) deployments method may be used.
By default, all microservices use SQLite as default storage driver, but it is possible to use PostgreSQL for that purpose. Both [cluster-per-microservice](environment-values/values.openwifi-qa.external-db.yaml) and [cluster per installation](environment-values/values.openwifi-qa.single-external-db.yaml) deployments method may be used.

## Environment specific values

Expand Down
11 changes: 5 additions & 6 deletions chart/environment-values/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ set -e
function usage()
{
cat <<-EOF >&2

This script is indended for OpenWIFI Cloud SDK deployment to TIP QA/Dev environments using assembly Helm chart (https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/tree/main/chart) with configuration through environment variables
This script is intended for OpenWIFI Cloud SDK deployment to TIP QA/Dev environments using assembly Helm chart (https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/tree/main/chart) with configuration through environment variables

Required environment variables:
- NAMESPACE - namespace suffix that will used added for the Kubernetes environment (i.e. if you pass 'test', kubernetes namespace will be named 'ucentral-test')
Expand All @@ -31,7 +30,6 @@ The following environmnet variables may be passed, but will be ignored if CHART_
- OWPROVUI_VERSION - OpenWIFI Provisioning Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)
- OWANALYTICS_VERSION - OpenWIFI Analytics version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)
- OWSUB_VERSION - OpenWIFI Subscription (Userportal) version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)
- OWRRM_VERSION - OpenWIFI radio resource management service (RRM) version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)

Optional environment variables:
- EXTRA_VALUES - extra values that should be passed to Helm deployment separated by comma (,)
Expand All @@ -42,12 +40,14 @@ Optional environment variables:
- IPTOCOUNTRY_IPINFO_TOKEN - token that should be set for IPInfo support (owgw/owprov iptocountry.ipinfo.token properties), ommited if not passed
- MAILER_USERNAME - SMTP username used for OWSEC mailer
- MAILER_PASSWORD - SMTP password used for OWSEC mailer (only if both MAILER_PASSWORD and MAILER_USERNAME are set, mailer will be enabled)
- CERTIFICATE_ARN - Certificate ARN (will default to ap-south-1 certificate ARN)
EOF
}

# Global variables
VALUES_FILE_LOCATION_SPLITTED=()
EXTRA_VALUES_SPLITTED=()
DEF_CERT_ARN="arn:aws:acm:ap-south-1:289708231103:certificate/2cc8c764-11fd-411d-bf7d-a93f488f3f6c"

# Helper functions
function check_if_chart_version_is_release()
Expand All @@ -72,7 +72,6 @@ if [[ "$DEPLOY_METHOD" != "local" ]] ; then
[ -z ${OWPROVUI_VERSION+x} ] && echo "OWPROVUI_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWANALYTICS_VERSION+x} ] && echo "OWANALYTICS_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWSUB_VERSION+x} ] && echo "OWSUB_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWRRM_VERSION+x} ] && echo "OWRRM_VERSION is unset" >&2 && usage && exit 1
fi
fi
## Environment specifics
Expand All @@ -90,9 +89,11 @@ fi
[ -z ${DEVICE_CERT_LOCATION+x} ] && echo "DEVICE_CERT_LOCATION is unset, setting it to CERT_LOCATION" && export DEVICE_CERT_LOCATION=$CERT_LOCATION
[ -z ${DEVICE_KEY_LOCATION+x} ] && echo "DEVICE_KEY_LOCATION is unset, setting it to KEY_LOCATION" && export DEVICE_KEY_LOCATION=$KEY_LOCATION
[ -z ${INTERNAL_RESTAPI_ENDPOINT_SCHEMA+x} ] && echo "INTERNAL_RESTAPI_ENDPOINT_SCHEMA is unset, setting it to 'https'" && export INTERNAL_RESTAPI_ENDPOINT_SCHEMA=https
[ -z ${USE_SEPARATE_OWGW_LB+x} ] && echo "USE_SEPARATE_OWGW_LB is unset, setting it to true" && export USE_SEPARATE_OWGW_LB=true
export MAILER_ENABLED="false"
[ ! -z ${MAILER_USERNAME+x} ] && [ ! -z ${MAILER_PASSWORD+x} ] && echo "MAILER_USERNAME and MAILER_PASSWORD are set, mailer will be enabled" && export MAILER_ENABLED="true"
[ -z "${DOMAIN}" ] && echo "DOMAIN is unset, using cicd.lab.wlan.tip.build" && export DOMAIN="cicd.lab.wlan.tip.build"
[ -z ${CERTIFICATE_ARN+x} ] && CERTIFICATE_ARN=$DEF_CERT_ARN

# Transform some environment variables
export OWGW_VERSION_TAG=$(echo ${OWGW_VERSION} | tr '/' '-')
Expand All @@ -103,7 +104,6 @@ export OWPROV_VERSION_TAG=$(echo ${OWPROV_VERSION} | tr '/' '-')
export OWPROVUI_VERSION_TAG=$(echo ${OWPROVUI_VERSION} | tr '/' '-')
export OWANALYTICS_VERSION_TAG=$(echo ${OWANALYTICS_VERSION} | tr '/' '-')
export OWSUB_VERSION_TAG=$(echo ${OWSUB_VERSION} | tr '/' '-')
export OWRRM_VERSION_TAG=$(echo ${OWRRM_VERSION} | tr '/' '-')

# Check deployment method that's required for this environment
helm plugin install https://github.com/databus23/helm-diff || true
Expand All @@ -123,7 +123,6 @@ if [[ "$DEPLOY_METHOD" == "git" ]] ; then
sed -i '/wlan-cloud-owprov-ui@/s/ref=.*/ref='${OWPROVUI_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-analytics@/s/ref=.*/ref='${OWANALYTICS_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-userportal@/s/ref=.*/ref='${OWSUB_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-rrm@/s/ref=.*/ref='${OWRRM_VERSION}'\"/g' Chart.yaml
fi
#helm repo add bitnami https://charts.bitnami.com/bitnami && helm repo update
[ -z "$SKIP_DEPS" ] && helm dependency update
Expand Down
3 changes: 1 addition & 2 deletions chart/environment-values/values.aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ haproxy:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "8080"
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:ap-south-1:289708231103:certificate/2cc8c764-11fd-411d-bf7d-a93f488f3f6c
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16004,17004,16002,16003,17002,16005,17005,16001,17001,5912,5913,16009,16007"
service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip
external-dns.alpha.kubernetes.io/hostname: "gw.cicd.lab.wlan.tip.build,sec.cicd.lab.wlan.tip.build,fms.cicd.lab.wlan.tip.build,prov.cicd.lab.wlan.tip.build,rtty.cicd.lab.wlan.tip.build,sub.cicd.lab.wlan.tip.build,analytics.cicd.lab.wlan.tip.build,rrm.cicd.lab.wlan.tip.build" # TODO change FQDNs
external-dns.alpha.kubernetes.io/hostname: "gw.cicd.lab.wlan.tip.build,sec.cicd.lab.wlan.tip.build,fms.cicd.lab.wlan.tip.build,prov.cicd.lab.wlan.tip.build,rtty.cicd.lab.wlan.tip.build,sub.cicd.lab.wlan.tip.build,analytics.cicd.lab.wlan.tip.build" # TODO change FQDNs

20 changes: 3 additions & 17 deletions chart/environment-values/values.base.insecure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,6 @@ owsub:
openwifi.system.uri.private: http://owsub-owsub:17006
openwifi.system.uri.ui: http://localhost

owrrm:
public_env_variables:
SELFSIGNED_CERTS: "true"
KAFKACONFIG_BOOTSTRAPSERVER: kafka:9092
DATABASECONFIG_SERVER: owrrm-mysql:3306
DATABASECONFIG_DBNAME: owrrm
DATABASECONFIG_DATARETENTIONINTERVALDAYS: "1"

secret_env_variables:
DATABASECONFIG_USER: root
DATABASECONFIG_PASSWORD: openwifi

mysql:
enabled: true
fullnameOverride: "owrrm-mysql"

owgwui:
public_env_variables:
REACT_APP_UCENTRALSEC_URL: http://localhost:16001
Expand All @@ -94,6 +78,8 @@ kafka:
replicaCount: 1
extraConfig: |-
maxMessageBytes = 1048588
offsets.topic.replication.factor = 1
transaction.state.log.replication.factor = 1
extraEnvVars:
- name: ALLOW_PLAINTEXT_LISTENER
value: "yes"
Expand All @@ -106,4 +92,4 @@ kafka:
broker:
persistence:
size: 20Gi
replicaCount: 2
replicaCount: 0
carsten989 marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 3 additions & 17 deletions chart/environment-values/values.base.secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,22 +298,6 @@ owsub:
secret:
secretName: {{ include "owsub.fullname" . }}-owsub-restapi-tls

owrrm:
public_env_variables:
SELFSIGNED_CERTS: "true"
KAFKACONFIG_BOOTSTRAPSERVER: kafka:9092
DATABASECONFIG_SERVER: owrrm-mysql:3306
DATABASECONFIG_DBNAME: owrrm
DATABASECONFIG_DATARETENTIONINTERVALDAYS: "1"

secret_env_variables:
DATABASECONFIG_USER: root
DATABASECONFIG_PASSWORD: openwifi

mysql:
enabled: true
fullnameOverride: "owrrm-mysql"

owgwui:
public_env_variables:
REACT_APP_UCENTRALSEC_URL: https://localhost:16001
Expand Down Expand Up @@ -347,6 +331,8 @@ kafka:
replicaCount: 1
extraConfig: |-
maxMessageBytes = 1048588
offsets.topic.replication.factor = 1
transaction.state.log.replication.factor = 1
extraEnvVars:
- name: ALLOW_PLAINTEXT_LISTENER
value: "yes"
Expand All @@ -359,7 +345,7 @@ kafka:
broker:
persistence:
size: 20Gi
replicaCount: 2
replicaCount: 0

restapiCerts:
enabled: true
38 changes: 21 additions & 17 deletions chart/environment-values/values.custom.tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ owgw:
services:
owgw:
annotations:
external-dns.alpha.kubernetes.io/hostname: "$OWGW_SERVICE_DNS_RECORDS"
external-dns.alpha.kubernetes.io/hostname: gw-${NAMESPACE}.${DOMAIN}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
configProperties:
openwifi.fileuploader.host.0.name: gw-${NAMESPACE}.${DOMAIN}
rtty.server: gw-${NAMESPACE}.${DOMAIN}
Expand All @@ -27,6 +28,7 @@ owsec:
owsec:
annotations:
external-dns.alpha.kubernetes.io/hostname: sec-${NAMESPACE}.${DOMAIN}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
owfms:
configProperties:
s3.secret: "${OWFMS_S3_SECRET}"
Expand All @@ -38,43 +40,48 @@ owfms:
owfms:
annotations:
external-dns.alpha.kubernetes.io/hostname: fms-${NAMESPACE}.${DOMAIN}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
public_env_variables:
OWSEC: sec-${NAMESPACE}.${DOMAIN}:16001
owgwui:
ingresses:
default:
hosts:
- webui-${NAMESPACE}.${DOMAIN}
annotations:
external-dns.alpha.kubernetes.io/hostname: webui-${NAMESPACE}.${DOMAIN}
public_env_variables:
REACT_APP_UCENTRALSEC_URL: https://sec-${NAMESPACE}.${DOMAIN}:16001
owprov:
services:
owprov:
annotations:
external-dns.alpha.kubernetes.io/hostname: prov-${NAMESPACE}.${DOMAIN}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
configProperties:
openwifi.system.uri.public: https://prov-${NAMESPACE}.${DOMAIN}:16005
openwifi.system.uri.private: $INTERNAL_RESTAPI_ENDPOINT_SCHEMA://owprov-owprov:17005
openwifi.system.uri.ui: https://provui-${NAMESPACE}.${DOMAIN}
iptocountry.ipinfo.token: "${IPTOCOUNTRY_IPINFO_TOKEN}"
public_env_variables:
OWSEC: sec-${NAMESPACE}.${DOMAIN}:16001
owgwui:
carsten989 marked this conversation as resolved.
Show resolved Hide resolved
ingresses:
default:
hosts:
- webui-${NAMESPACE}.${DOMAIN}
annotations:
external-dns.alpha.kubernetes.io/hostname: webui-${NAMESPACE}.${DOMAIN}
alb.ingress.kubernetes.io/certificate-arn: ${CERTIFICATE_ARN}
public_env_variables:
REACT_APP_UCENTRALSEC_URL: https://sec-${NAMESPACE}.${DOMAIN}:16001
owprovui:
ingresses:
default:
hosts:
- provui-${NAMESPACE}.${DOMAIN}
annotations:
external-dns.alpha.kubernetes.io/hostname: provui-${NAMESPACE}.${DOMAIN}
alb.ingress.kubernetes.io/certificate-arn: ${CERTIFICATE_ARN}
public_env_variables:
REACT_APP_UCENTRALSEC_URL: https://sec-${NAMESPACE}.${DOMAIN}:16001
owanalytics:
services:
owanalytics:
annotations:
external-dns.alpha.kubernetes.io/hostname: analytics-${NAMESPACE}.${DOMAIN}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
configProperties:
openwifi.system.uri.public: https://analytics-${NAMESPACE}.${DOMAIN}:16009
openwifi.system.uri.private: $INTERNAL_RESTAPI_ENDPOINT_SCHEMA://owanalytics-owanalytics:17009
Expand All @@ -86,6 +93,7 @@ owsub:
owsub:
annotations:
external-dns.alpha.kubernetes.io/hostname: sub-${NAMESPACE}.${DOMAIN}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
configProperties:
openwifi.system.uri.public: https://sub-${NAMESPACE}.${DOMAIN}:16006
openwifi.system.uri.private: $INTERNAL_RESTAPI_ENDPOINT_SCHEMA://owsub-owsub:17006
Expand All @@ -102,6 +110,7 @@ owls:
owls:
annotations:
external-dns.alpha.kubernetes.io/hostname: ls-${NAMESPACE}.${DOMAIN}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
configProperties:
openwifi.system.uri.public: https://ls-${NAMESPACE}.${DOMAIN}:16007
openwifi.system.uri.private: $INTERNAL_RESTAPI_ENDPOINT_SCHEMA://owls-owls:17007
Expand All @@ -113,16 +122,11 @@ owlsui:
- lsui-${NAMESPACE}.${DOMAIN}
annotations:
external-dns.alpha.kubernetes.io/hostname: lsui-${NAMESPACE}.${DOMAIN}
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
public_env_variables:
REACT_APP_UCENTRALSEC_URL: https://sec-${NAMESPACE}.${DOMAIN}:16001
owrrm:
public_env_variables:
SERVICECONFIG_PUBLICENDPOINT: https://rrm-${NAMESPACE}.${DOMAIN}:16789
services:
owrrm:
annotations:
external-dns.alpha.kubernetes.io/hostname: rrm-${NAMESPACE}.${DOMAIN}
haproxy:
service:
annotations:
external-dns.alpha.kubernetes.io/hostname: "$HAPROXY_SERVICE_DNS_RECORDS"
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${CERTIFICATE_ARN}
22 changes: 0 additions & 22 deletions chart/environment-values/values.openwifi-dev03.yaml

This file was deleted.

Loading
Loading