Compare commits

..

2 Commits

Author SHA1 Message Date
TIP Automation User
09dd14e0b2 Chg: update image tag in helm values to v3.0.0-RC2 2023-12-15 23:03:44 +00:00
TIP Automation User
0bfa6cd508 Chg: update image tag in helm values to v3.0.0-RC1 2023-11-27 17:38:37 +00:00
16 changed files with 220 additions and 263 deletions

View File

@@ -2,34 +2,34 @@ apiVersion: v2
name: openwifi
appVersion: "1.0"
description: A Helm chart for Kubernetes
version: 0.1.0
version: 3.0.0-RC2
dependencies:
- name: owgw
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw@helm?ref=master"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw@helm?ref=v3.0.0-RC2"
version: 0.1.0
- name: owsec
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralsec@helm?ref=main"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralsec@helm?ref=v3.0.0-RC2"
version: 0.1.0
- name: owfms
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralfms@helm?ref=main"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralfms@helm?ref=v3.0.0-RC2"
version: 0.1.0
- name: owprov
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owprov@helm?ref=main"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owprov@helm?ref=v3.0.0-RC2"
version: 0.1.0
- name: owanalytics
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-analytics@helm?ref=main"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-analytics@helm?ref=v3.0.0-RC2"
version: 0.1.0
- name: owgwui
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui@helm?ref=main"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui@helm?ref=v3.0.0-RC1"
version: 0.1.0
- name: owprovui
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owprov-ui@helm?ref=main"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-owprov-ui@helm?ref=v3.0.0-RC1"
version: 0.1.0
- name: owsub
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-userportal@helm?ref=main"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-userportal@helm?ref=v3.0.0-RC2"
version: 0.1.0
- name: owrrm
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-rrm@helm?ref=main"
repository: "git+https://github.com/Telecominfraproject/wlan-cloud-rrm@helm?ref=v2.8.0"
version: 0.1.0
- name: kafka
repository: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
@@ -44,14 +44,10 @@ dependencies:
version: 0.1.0
condition: owlsui.enabled
- name: haproxy
repository: oci://registry-1.docker.io/bitnamicharts
version: 0.13.3
repository: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
version: 0.2.21
condition: haproxy.enabled
#- name: postgresql-ha
# repository: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
# version: 8.6.13
# condition: postgresql-ha.enabled
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 13.4.3
condition: postgresql.enabled
- name: postgresql-ha
repository: https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/
version: 8.6.13
condition: postgresql-ha.enabled

View File

@@ -1,10 +1,10 @@
# openwifi
This Helm chart helps to deploy OpenWIFI Cloud SDK with all required dependencies to the Kubernetes clusters. The purpose of this chart is to set up the correct connections between other microservices and other dependencies with correct Values and other charts as dependencies in [chart definition](Chart.yaml)
This Helm chart helps to deploy OpenWIFI Cloud SDK with all required dependencies to the Kubernetes clusters. Purpose of this chart is to setup correct connections between other microservices and other dependencies with correct Values and other charts as dependencies in [chart definition](Chart.yaml)
## TL;DR;
[helm-git](https://github.com/aslafy-z/helm-git) is required for remote the installation as it pull charts from other repositories for the deployment, so install it if you don't have it already.
[helm-git](https://github.com/aslafy-z/helm-git) is required for remote the installation as it pull charts from other repositories for the deployment, so intall it if you don't have it already.
Using that you can deploy Cloud SDK with 2 setups - without TLS certificates for RESTAPI endpoints and with them.
@@ -20,7 +20,7 @@ $ kubectl create secret generic openwifi-certs --from-file=../docker-compose/cer
$ helm upgrade --install -f environment-values/values.base.secure.yaml openwifi .
```
In order to access the UI and other RESTAPI endpoints you should run the following commands after the deployment:
In order to acces the UI and other RESTAPI endpoints you should run the following commands after the deployment:
```
$ kubectl port-forward deployment/proxy 5912 5913 16001 16002 16003 16004 16005 16006 16009 &
@@ -43,7 +43,7 @@ $ kubectl create secret generic openwifi-certs --from-file=../docker-compose/cer
$ helm upgrade --install -f environment-values/values.base.insecure.yaml openwifi .
```
In order to access the UI and other RESTAPI endpoints you should run the following commands after the deployment:
In order to acces the UI and other RESTAPI endpoints you should run the following commands after the deployment:
```
$ kubectl port-forward deployment/proxy 5912 5913 16001 16002 16003 16004 16005 16006 16009 &
@@ -167,7 +167,7 @@ The following table lists the configurable parameters that overrides microservic
| `restapiCerts.services` | array | List of services that require certificates generation | |
| `restapiCerts.clusterDomain` | string | Kubernetes cluster domain | `cluster.local` |
If required, further overrides may be passed. They will be merged with default values from this chart and other sub-charts with priority to values you'll pass.
If required, further overrides may be passed. They will be merged with default values from this chart and other subcharts with priority to values you'll pass.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
@@ -200,7 +200,7 @@ By setting `clusterinfo.enabled` to `true` you may enable job on post-install/po
1. Change default security credentials from credentials set in OWSEC configuration file (see 'Required password changing on the first startup' block above)
2. Check if all services started responding correctly after the deployment using systeminfo REST API method
In order to do that, you need to additionally set multiple parameters:
In order to do that, you need to additionaly set multiple parameters:
1. clusterinfo.public_env_variables.OWSEC - OWSEC endpoint to use for CLI tools
2. clusterinfo.secret_env_variables.OWSEC_DEFAULT_USERNAME - username used for CLI requests (see OWSEC configuration file for details)
@@ -221,17 +221,17 @@ You may see example values to enable this feature in [values.enable-owls.yaml](.
In order to use single point of entry for all services (may be used for one cloud Load Balancer per installation) HAproxy is installed by default with other services. HAproxy is working in TCP proxy mode, so every TLS certificate is managed by services themself, while it is possible to pass requests from cloud load balancer to services using same ports (configuration of cloud load balancer may vary from cloud provider to provider).
By default, this option is enabled, but you may disable it and make per-service LoadBalancer using values in [values.disable-haproxy.yaml](./feature-values/values.disable-haproxy.yaml).
By default this option is enabled, but you may disable it and make per-service LoadBalancer using values in [values.disable-haproxy.yaml](./feature-values/values.disable-haproxy.yaml).
### OWGW unsafe sysctls
By default, Linux is using quite adequate sysctl values for TCP keepalive, but OWGW may keep disconnected APs in stuck state preventing it from connecting back. This may be changed by setting some sysctls to lower values:
By default Linux is using quite adeqate sysctl values for TCP keepalive, but OWGW may keep disconnected APs in stuck state preventing it from connecting back. This may be changed by setting some sysctls to lower values:
- net.ipv4.tcp_keepalive_intvl
- net.ipv4.tcp_keepalive_probes - 2
- net.ipv4.tcp_keepalive_time - 45
However, this change is [not considered safe by Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls), and it requires to pass additional argument to your Kubelets services in your Kubernetes cluster:
However this change is [not considered safe by Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls) and it requires to pass additional argument to your Kubelets services in your Kubernetes cluster:
```
--allowed-unsafe-sysctls net.ipv4.tcp_keepalive_intvl,net.ipv4.tcp_keepalive_probes,net.ipv4.tcp_keepalive_time
@@ -258,16 +258,16 @@ 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 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.
## Environment specific values
This repository contains values files that may be used in the same manner as feature values above to deploy to specific runtime environments (including different cloud deployments).
This repository contains values files that may be used in the same manner as feature values above to deploy to specific runtime envionemnts (including different cloud deployments).
Some environments are using [external-dns](https://github.com/kubernetes-sigs/external-dns) service to dynamically set DNS records, but you may manage your records manually
### AWS EKS
EKS based installation assumes that you are using [AWS Load Balancer controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller) so that all required ALBs and NLBs are created automatically. Also, it is assumed that you have Route53 managed DNS zone, and you've issued wildcard certificate for one of your zones that may be used by Load Balancers.
EKS based installation assumes that you are using [AWS Load Balancer controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller) so that all required ALBs and NLBs are created automatically. Also it is assumed that you have Route53 managed DNS zone and you've issued wildcard certificate for one of your zones that may be used by Load Balancers.
You may see example values for this environment in [values.aws.yaml](./environment-values/values.aws.yaml).

View File

@@ -61,7 +61,7 @@ then
echo "Logged in with new credentials:"
fi
else
echo "Credentials check failed with unexpected ErrorCode, please review the response body:"
echo "Credentials check failed with unexpected ErrorCode, please review the responce body:"
jq < ${result_file}
exit 2
fi

View File

@@ -1,6 +1,5 @@
#!/bin/bash
[ -z "$NAMESPACE" ] && echo "No NAMESPACE set" && exit 1
helm -n openwifi-"$NAMESPACE" delete tip-openwifi
helm -n openwifi-$NAMESPACE delete tip-openwifi
sleep 30
kubectl delete ns openwifi-"$NAMESPACE"
exit 0
kubectl delete ns openwifi-$NAMESPACE

View File

@@ -2,47 +2,48 @@
set -e
# Usage function
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
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')
- DEPLOY_METHOD - deployment method for the chart deployment (supported methods - 'git' (will use helm-git from assembly chart), 'bundle' (will use chart stored in the Artifactory) or local
- CHART_VERSION - version of chart to be deployed from assembly chart (for 'git' method git ref may be passed, for 'bundle' method version of chart may be passed)
- VALUES_FILE_LOCATION - path to file with override values that may be used for deployment
- DOMAIN - Domain name. default: cicd.lab.wlan.tip.build
- OWGW_AUTH_USERNAME - username to be used for requests to OpenWIFI Security
- OWGW_AUTH_PASSWORD - hashed password for OpenWIFI Security (details on this may be found in https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/#authenticationdefaultpassword)
- OWFMS_S3_SECRET - secret key that is used for OpenWIFI Firmware access to firmwares S3 bucket
- OWFMS_S3_KEY - access key that is used for OpenWIFI Firmware access to firmwares S3 bucket
- OWSEC_NEW_PASSWORD - password that should be set to default user instead of default password from properties
- CERT_LOCATION - path to certificate in PEM format that will be used for securing all endpoint in all services
- KEY_LOCATION - path to private key in PEM format that will be used for securing all endpoint in all services
The following environmnet variables may be passed, but will be ignored if CHART_VERSION is set to release (i.e. v2.4.0):
- OWGW_VERSION - OpenWIFI Gateway version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)
- OWGWUI_VERSION - OpenWIFI Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)
- OWSEC_VERSION - OpenWIFI Security version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)
- OWFMS_VERSION - OpenWIFI Firmware version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)
- OWPROV_VERSION - OpenWIFI Provisioning version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)
- 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 (,)
- DEVICE_CERT_LOCATION - path to certificate in PEM format that will be used for load simulator
- DEVICE_KEY_LOCATION - path to private key in PEM format that will be used for load simulator
- USE_SEPARATE_OWGW_LB - flag that should change split external DNS for OWGW and other services
- INTERNAL_RESTAPI_ENDPOINT_SCHEMA - what schema to use for internal RESTAPI endpoints (https by default)
- 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)
EOF
usage () {
echo >&2;
echo "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" >&2;
echo >&2;
echo "Required environment variables:" >&2;
echo >&2;
echo "- NAMESPACE - namespace suffix that will used added for the Kubernetes environment (i.e. if you pass 'test', kubernetes namespace will be named 'ucentral-test')" >&2;
echo "- DEPLOY_METHOD - deployment method for the chart deployment (supported methods - 'git' (will use helm-git from assembly chart) and 'bundle' (will use chart stored in the Artifactory0" >&2;
echo "- CHART_VERSION - version of chart to be deployed from assembly chart (for 'git' method git ref may be passed, for 'bundle' method version of chart may be passed)" >&2;
echo >&2;
echo "- VALUES_FILE_LOCATION - path to file with override values that may be used for deployment" >&2;
echo "- DOMAIN - Domain name. default: cicd.lab.wlan.tip.build" >&2;
echo "- OWGW_AUTH_USERNAME - username to be used for requests to OpenWIFI Security" >&2;
echo "- OWGW_AUTH_PASSWORD - hashed password for OpenWIFI Security (details on this may be found in https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/#authenticationdefaultpassword)" >&2;
echo "- OWFMS_S3_SECRET - secret key that is used for OpenWIFI Firmware access to firmwares S3 bucket" >&2;
echo "- OWFMS_S3_KEY - access key that is used for OpenWIFI Firmware access to firmwares S3 bucket" >&2;
echo "- OWSEC_NEW_PASSWORD - password that should be set to default user instead of default password from properties" >&2;
echo "- CERT_LOCATION - path to certificate in PEM format that will be used for securing all endpoint in all services" >&2;
echo "- KEY_LOCATION - path to private key in PEM format that will be used for securing all endpoint in all services" >&2;
echo >&2;
echo "Following environmnet variables may be passed, but will be ignored if CHART_VERSION is set to release (i.e. v2.4.0):" >&2;
echo >&2;
echo "- OWGW_VERSION - OpenWIFI Gateway version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo "- OWGWUI_VERSION - OpenWIFI Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo "- OWSEC_VERSION - OpenWIFI Security version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo "- OWFMS_VERSION - OpenWIFI Firmware version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo "- OWPROV_VERSION - OpenWIFI Provisioning version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)" >&2;
echo "- 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)" >&2;
echo "- 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)" >&2;
echo "- 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)" >&2;
echo "- 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)" >&2;
echo >&2;
echo "Optional environment variables:" >&2;
echo >&2;
echo "- EXTRA_VALUES - extra values that should be passed to Helm deployment separated by comma (,)" >&2;
echo "- DEVICE_CERT_LOCATION - path to certificate in PEM format that will be used for load simulator" >&2;
echo "- DEVICE_KEY_LOCATION - path to private key in PEM format that will be used for load simulator" >&2;
echo "- USE_SEPARATE_OWGW_LB - flag that should change split external DNS for OWGW and other services" >&2;
echo "- INTERNAL_RESTAPI_ENDPOINT_SCHEMA - what schema to use for internal RESTAPI endpoints (https by default)" >&2;
echo "- IPTOCOUNTRY_IPINFO_TOKEN - token that should be set for IPInfo support (owgw/owprov iptocountry.ipinfo.token properties), ommited if not passed" >&2;
echo "- MAILER_USERNAME - SMTP username used for OWSEC mailer" >&2;
echo "- MAILER_PASSWORD - SMTP password used for OWSEC mailer (only if both MAILER_PASSWORD and MAILER_USERNAME are set, mailer will be enabled)" >&2;
}
# Global variables
@@ -50,30 +51,32 @@ VALUES_FILE_LOCATION_SPLITTED=()
EXTRA_VALUES_SPLITTED=()
# Helper functions
function check_if_chart_version_is_release()
{
[[ "$CHART_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]
check_if_chart_version_is_release() {
PARSED_CHART_VERSION=$(echo $CHART_VERSION | grep -xE "v\d+\.\d+\.\d+.*")
if [[ -z "$PARSED_CHART_VERSION" ]]; then
return 1
else
return 0
fi
}
# Check if required environment variables were passed
## Deployment specifics
[ -z ${DEPLOY_METHOD+x} ] && echo "DEPLOY_METHOD is unset" >&2 && usage && exit 1
[ -z ${CHART_VERSION+x} ] && echo "CHART_VERSION is unset" >&2 && usage && exit 1
if [[ "$DEPLOY_METHOD" != "local" ]] ; then
if check_if_chart_version_is_release ; then
echo "Chart version ($CHART_VERSION) is a release version, ignoring services versions"
else
echo "Chart version ($CHART_VERSION) is not a release version, checking if services versions are set"
[ -z ${OWGW_VERSION+x} ] && echo "OWGW_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWGWUI_VERSION+x} ] && echo "OWGWUI_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWSEC_VERSION+x} ] && echo "OWSEC_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWFMS_VERSION+x} ] && echo "OWFMS_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWPROV_VERSION+x} ] && echo "OWPROV_VERSION is unset" >&2 && usage && exit 1
[ -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
if check_if_chart_version_is_release; then
echo "Chart version ($CHART_VERSION) is release version, ignoring services versions"
else
echo "Chart version ($CHART_VERSION) is not release version, checking if services versions are set"
[ -z ${OWGW_VERSION+x} ] && echo "OWGW_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWGWUI_VERSION+x} ] && echo "OWGWUI_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWSEC_VERSION+x} ] && echo "OWSEC_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWFMS_VERSION+x} ] && echo "OWFMS_VERSION is unset" >&2 && usage && exit 1
[ -z ${OWPROV_VERSION+x} ] && echo "OWPROV_VERSION is unset" >&2 && usage && exit 1
[ -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
## Environment specifics
[ -z ${NAMESPACE+x} ] && echo "NAMESPACE is unset" >&2 && usage && exit 1
@@ -105,56 +108,54 @@ export OWANALYTICS_VERSION_TAG=$(echo ${OWANALYTICS_VERSION} | tr '/' '-')
export OWSUB_VERSION_TAG=$(echo ${OWSUB_VERSION} | tr '/' '-')
export OWRRM_VERSION_TAG=$(echo ${OWRRM_VERSION} | tr '/' '-')
# Debug get bash version
bash --version >&2
# Check deployment method that's required for this environment
helm plugin install https://github.com/databus23/helm-diff || true
if [[ "$DEPLOY_METHOD" == "git" ]] ; then
helm plugin install https://github.com/aslafy-z/helm-git --version 0.10.0 || true
rm -rf wlan-cloud-ucentral-deploy || true
git clone https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy.git
cd wlan-cloud-ucentral-deploy
git checkout $CHART_VERSION
cd chart
if ! check_if_chart_version_is_release ; then
sed -i '/wlan-cloud-ucentralgw@/s/ref=.*/ref='${OWGW_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-ucentralgw-ui@/s/ref=.*/ref='${OWGWUI_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-ucentralsec@/s/ref=.*/ref='${OWSEC_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-ucentralfms@/s/ref=.*/ref='${OWFMS_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-owprov@/s/ref=.*/ref='${OWPROV_VERSION}'\"/g' Chart.yaml
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
cd ../..
export DEPLOY_SOURCE="wlan-cloud-ucentral-deploy/chart"
elif [[ "$DEPLOY_METHOD" == "bundle" ]] ; then
helm repo add tip-wlan-cloud-ucentral-helm https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/ || true
export DEPLOY_SOURCE="tip-wlan-cloud-ucentral-helm/openwifi --version $CHART_VERSION"
elif [[ "$DEPLOY_METHOD" == "local" ]] ; then
export DEPLOY_SOURCE=".."
pushd ..
[ -z "$SKIP_DEPS" ] && helm dependency update
popd
if [[ "$DEPLOY_METHOD" == "git" ]]; then
helm plugin install https://github.com/aslafy-z/helm-git --version 0.10.0 || true
rm -rf wlan-cloud-ucentral-deploy || true
git clone https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy.git
cd wlan-cloud-ucentral-deploy
git checkout $CHART_VERSION
cd chart
if ! check_if_chart_version_is_release; then
sed -i '/wlan-cloud-ucentralgw@/s/ref=.*/ref='${OWGW_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-ucentralgw-ui@/s/ref=.*/ref='${OWGWUI_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-ucentralsec@/s/ref=.*/ref='${OWSEC_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-ucentralfms@/s/ref=.*/ref='${OWFMS_VERSION}'\"/g' Chart.yaml
sed -i '/wlan-cloud-owprov@/s/ref=.*/ref='${OWPROV_VERSION}'\"/g' Chart.yaml
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
helm dependency update
cd ../..
export DEPLOY_SOURCE="wlan-cloud-ucentral-deploy/chart"
elif [[ "$DEPLOY_METHOD" == "bundle" ]]; then
helm repo add tip-wlan-cloud-ucentral-helm https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/ || true
export DEPLOY_SOURCE="tip-wlan-cloud-ucentral-helm/openwifi --version $CHART_VERSION"
else
echo "Deploy method is not correct: $DEPLOY_METHOD. Valid values: git, bundle or local" >&2
exit 1
echo "Deploy method is not correct: $DEPLOY_METHOD. Valid values: git or bundle" >&2
exit 1
fi
VALUES_FILES_FLAGS=()
IFS=',' read -ra VALUES_FILE_LOCATION_SPLITTED <<< "$VALUES_FILE_LOCATION"
for VALUE_FILE in ${VALUES_FILE_LOCATION_SPLITTED[*]}; do
VALUES_FILES_FLAGS+=("-f" $VALUE_FILE)
VALUES_FILES_FLAGS+=("-f" $VALUE_FILE)
done
EXTRA_VALUES_FLAGS=()
IFS=',' read -ra EXTRA_VALUES_SPLITTED <<< "$EXTRA_VALUES"
for EXTRA_VALUE in ${EXTRA_VALUES_SPLITTED[*]}; do
EXTRA_VALUES_FLAGS+=("--set" $EXTRA_VALUE)
EXTRA_VALUES_FLAGS+=("--set" $EXTRA_VALUE)
done
if [[ "$USE_SEPARATE_OWGW_LB" == "true" ]] ; then
if [[ "$USE_SEPARATE_OWGW_LB" == "true" ]]; then
export HAPROXY_SERVICE_DNS_RECORDS="sec-${NAMESPACE}.${DOMAIN},fms-${NAMESPACE}.${DOMAIN},prov-${NAMESPACE}.${DOMAIN},analytics-${NAMESPACE}.${DOMAIN},sub-${NAMESPACE}.${DOMAIN}"
export OWGW_SERVICE_DNS_RECORDS="gw-${NAMESPACE}.${DOMAIN}"
else
@@ -162,8 +163,15 @@ else
export OWGW_SERVICE_DNS_RECORDS=""
fi
echo "Deploying into openwifi-${NAMESPACE} with the following values files:"
echo ${VALUES_FILES_FLAGS[*]}
echo
envsubst < values.custom.tpl.yaml > values.custom-${NAMESPACE}.yaml
echo "Using configuration:"
echo "---"
cat values.custom-${NAMESPACE}.yaml
echo "---"
set -x
helm upgrade --install --create-namespace --wait --timeout 60m \
--namespace openwifi-${NAMESPACE} \

View File

@@ -15,8 +15,8 @@ owgwui:
ingresses:
default:
enabled: true
className: alb
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/group.name: wlan-cicd
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:ap-south-1:289708231103:certificate/2cc8c764-11fd-411d-bf7d-a93f488f3f6c
@@ -65,8 +65,8 @@ owprovui:
ingresses:
default:
enabled: true
className: alb
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/group.name: wlan-cicd
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:ap-south-1:289708231103:certificate/2cc8c764-11fd-411d-bf7d-a93f488f3f6c

View File

@@ -1,8 +1,7 @@
owgw:
configProperties:
simulatorid: 53494D020202
storage.type: postgresql
storage.type.postgresql.host: pgsql
storage.type.postgresql.host: pgsql-pgpool
storage.type.postgresql.database: owgw
storage.type.postgresql.username: owgw
storage.type.postgresql.password: owgw
@@ -10,7 +9,7 @@ owgw:
owsec:
configProperties:
storage.type: postgresql
storage.type.postgresql.host: pgsql
storage.type.postgresql.host: pgsql-pgpool
storage.type.postgresql.database: owsec
storage.type.postgresql.username: owsec
storage.type.postgresql.password: owsec
@@ -18,7 +17,7 @@ owsec:
owfms:
configProperties:
storage.type: postgresql
storage.type.postgresql.host: pgsql
storage.type.postgresql.host: pgsql-pgpool
storage.type.postgresql.database: owfms
storage.type.postgresql.username: owfms
storage.type.postgresql.password: owfms
@@ -26,7 +25,7 @@ owfms:
owprov:
configProperties:
storage.type: postgresql
storage.type.postgresql.host: pgsql
storage.type.postgresql.host: pgsql-pgpool
storage.type.postgresql.database: owprov
storage.type.postgresql.username: owprov
storage.type.postgresql.password: owprov
@@ -34,7 +33,7 @@ owprov:
owanalytics:
configProperties:
storage.type: postgresql
storage.type.postgresql.host: pgsql
storage.type.postgresql.host: pgsql-pgpool
storage.type.postgresql.database: owanalytics
storage.type.postgresql.username: owanalytics
storage.type.postgresql.password: owanalytics
@@ -42,37 +41,15 @@ owanalytics:
owsub:
configProperties:
storage.type: postgresql
storage.type.postgresql.host: pgsql
storage.type.postgresql.host: pgsql-pgpool
storage.type.postgresql.database: owsub
storage.type.postgresql.username: owsub
storage.type.postgresql.password: owsub
postgresql:
postgresql-ha:
enabled: true
initDbScriptSecret:
enabled: true
initdbScriptsSecret: tip-openwifi-initdb-scripts
volumePermissions:
enabled: true
global:
postgresql:
auth:
postgresPassword: postgres
auth:
postgresPassword: postgres
primary:
extendedConfiguration: |-
max_connections = 550
shared_buffers = 128MB
# log_error_verbosity = verbose
initdb:
scriptsSecret: tip-openwifi-initdb-scripts
postgresql-ha:
enabled: false
initDbScriptSecret:
enabled: false
initdbScriptsSecret: tip-openwifi-initdb-scripts
pgpool:
adminPassword: admin
resources:
@@ -84,12 +61,11 @@ postgresql-ha:
memory: 1024Mi
initdbScriptsSecret: tip-openwifi-initdb-scripts
postgresql:
replicaCount: 1
password: postgres
replicaCount: 1 # TODO change after tests
password: password
postgresPassword: postgres
repmgrPassword: repmgr
maxConnections: 1000
resources:
requests:
cpu: 250m

View File

@@ -1,13 +0,0 @@
{{- define "openwifi.user_creation_script_sql" -}}
{{- $root := . -}}
{{- $postgresqlBase := index .Values "postgresql" }}
{{- $postgresqlEmulatedRoot := (dict "Values" $postgresqlBase "Chart" (dict "Name" "postgresql") "Release" $.Release) }}
{{ range index .Values "postgresql" "initDbScriptSecret" "services" }}
CREATE USER {{ index $root "Values" . "configProperties" "storage.type.postgresql.username" }};
ALTER USER {{ index $root "Values" . "configProperties" "storage.type.postgresql.username" }} WITH ENCRYPTED PASSWORD '{{ index $root "Values" . "configProperties" "storage.type.postgresql.password" }}';
CREATE DATABASE {{ index $root "Values" . "configProperties" "storage.type.postgresql.database" }};
GRANT ALL PRIVILEGES ON DATABASE {{ index $root "Values" . "configProperties" "storage.type.postgresql.database" }} TO {{ index $root "Values" . "configProperties" "storage.type.postgresql.username" }};
ALTER DATABASE {{ index $root "Values" . "configProperties" "storage.type.postgresql.database" }} OWNER TO {{ index $root "Values" . "configProperties" "storage.type.postgresql.username" }};
{{ end }}
{{- end -}}

View File

@@ -0,0 +1,16 @@
{{- $root := . -}}
{{- if index .Values "postgresql-ha" "initDbScriptSecret" "enabled" }}
---
apiVersion: v1
metadata:
labels:
app.kuberentes.io/name: {{ include "openwifi.name" . }}
helm.sh/chart: {{ include "openwifi.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
name: {{ include "openwifi.fullname" . }}-initdb-scripts
kind: Secret
type: Opaque
data:
users_creation.sh: {{ include "openwifi.user_creation_script" . | b64enc | quote }}
{{- end }}

View File

@@ -1,31 +0,0 @@
{{- $root := . -}}
{{- if index .Values "postgresql-ha" "initDbScriptSecret" "enabled" }}
---
apiVersion: v1
metadata:
labels:
app.kubernetes.io/name: {{ include "openwifi.name" . }}
helm.sh/chart: {{ include "openwifi.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
name: {{ include "openwifi.fullname" . }}-initdb-scripts
kind: Secret
type: Opaque
data:
users_creation.sh: {{ include "openwifi.user_creation_script" . | b64enc | quote }}
{{- end }}
{{- if index .Values "postgresql" "initDbScriptSecret" "enabled" }}
---
apiVersion: v1
metadata:
labels:
app.kubernetes.io/name: {{ include "openwifi.name" . }}
helm.sh/chart: {{ include "openwifi.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
name: {{ include "openwifi.fullname" . }}-initdb-scripts
kind: Secret
type: Opaque
data:
initdb.sql: {{ include "openwifi.user_creation_script_sql" . | b64enc | quote }}
{{- end }}

View File

@@ -1,6 +1,7 @@
# OpenWIFI Gateway (https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/)
owgw:
fullnameOverride: owgw
configProperties:
openwifi.kafka.enable: "true"
openwifi.kafka.brokerlist: kafka:9092
@@ -8,6 +9,7 @@ owgw:
# OpenWIFI Security (https://github.com/Telecominfraproject/wlan-cloud-ucentralsec)
owsec:
fullnameOverride: owsec
configProperties:
openwifi.kafka.enable: "true"
openwifi.kafka.brokerlist: kafka:9092
@@ -15,6 +17,7 @@ owsec:
# OpenWIFI Firmware (https://github.com/Telecominfraproject/wlan-cloud-ucentralfms)
owfms:
fullnameOverride: owfms
configProperties:
openwifi.kafka.enable: "true"
openwifi.kafka.brokerlist: kafka:9092
@@ -22,6 +25,7 @@ owfms:
# OpenWIFI Provisioning (https://github.com/Telecominfraproject/wlan-cloud-owprov/)
owprov:
fullnameOverride: owprov
configProperties:
openwifi.kafka.enable: "true"
openwifi.kafka.brokerlist: kafka:9092
@@ -29,6 +33,7 @@ owprov:
# OpenWIFI Analytics (https://github.com/Telecominfraproject/wlan-cloud-analytics)
owanalytics:
fullnameOverride: owanalytics
configProperties:
openwifi.kafka.enable: "true"
openwifi.kafka.brokerlist: kafka:9092
@@ -44,6 +49,7 @@ owprovui:
# OpenWIFI Subscription (https://github.com/Telecominfraproject/wlan-cloud-userportal/)
owsub:
fullnameOverride: owsub
configProperties:
openwifi.kafka.enable: "true"
openwifi.kafka.brokerlist: kafka:9092
@@ -51,18 +57,23 @@ owsub:
# OpenWIFI radio resource management (https://github.com/Telecominfraproject/wlan-cloud-rrm/)
owrrm:
fullnameOverride: owrrm
mysql:
enabled: true
# kafka (https://github.com/bitnami/charts/blob/master/bitnami/kafka/)
kafka:
enabled: true
fullnameOverride: kafka
image:
registry: docker.io
repository: bitnami/kafka
tag: 2.8.0-debian-10-r43
minBrokerId: 100
zookeeper:
fullnameOverride: zookeeper
@@ -70,10 +81,11 @@ kafka:
clustersysteminfo:
enabled: false
delay: 0 # number of seconds to delay clustersysteminfo execution
images:
clustersysteminfo:
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/clustersysteminfo
tag: main
tag: v3.0.0-RC2
pullPolicy: Always
# regcred:
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
@@ -91,17 +103,23 @@ clustersysteminfo:
# limits:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}
public_env_variables:
FLAGS: "-s --connect-timeout 3"
OWSEC: owsec-owsec:16001
CHECK_RETRIES: 30
secret_env_variables:
OWSEC_DEFAULT_USERNAME: tip@ucentral.com
OWSEC_DEFAULT_PASSWORD: openwifi
#OWSEC_NEW_PASSWORD: "" # Set this value in order for the check to work. Password must comply https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/#authenticationvalidationexpression
activeDeadlineSeconds: 2400
backoffLimit: 5
restartPolicy: OnFailure
@@ -109,7 +127,9 @@ clustersysteminfo:
# OpenWIFI Load Simulator (https://github.com/Telecominfraproject/wlan-cloud-owls)
owls:
enabled: false
fullnameOverride: owls
configProperties:
openwifi.kafka.enable: "true"
openwifi.kafka.brokerlist: kafka:9092
@@ -117,13 +137,17 @@ owls:
# OpenWIFI Load Simulator UI (https://github.com/Telecominfraproject/wlan-cloud-owls-ui)
owlsui:
enabled: false
fullnameOverride: owlsui
# HAproxy (https://github.com/bitnami/charts/tree/master/bitnami/haproxy)
haproxy:
enabled: true
fullnameOverride: proxy
replicaCount: 1
replicaCount: 3
service:
type: LoadBalancer
ports:
@@ -404,6 +428,7 @@ haproxy:
# Cert-manager RESTAPI certs
restapiCerts:
enabled: false
services:
- owgw-owgw
- owsec-owsec
@@ -413,21 +438,8 @@ restapiCerts:
- owanalytics-owanalytics
- owsub-owsub
- owrrm-owrrm
clusterDomain: cluster.local
postgresql:
enabled: false
nameOverride: pgsql
fullnameOverride: pgsql
initDbScriptSecret:
enabled: false
services:
- owgw
- owsec
- owfms
- owprov
- owanalytics
- owsub
clusterDomain: cluster.local
postgresql-ha:
enabled: false

View File

@@ -1,19 +1,19 @@
# Image tags
COMPOSE_PROJECT_NAME=openwifi
OWGW_TAG=master
OWGWUI_TAG=main
OWSEC_TAG=main
OWFMS_TAG=main
OWPROV_TAG=main
OWPROVUI_TAG=main
OWANALYTICS_TAG=main
OWSUB_TAG=main
KAFKA_TAG=2.8.0-debian-10-r43
OWGW_TAG=v3.0.0-RC2
OWGWUI_TAG=v3.0.0-RC1
OWSEC_TAG=v3.0.0-RC2
OWFMS_TAG=v3.0.0-RC2
OWPROV_TAG=v3.0.0-RC2
OWPROVUI_TAG=v3.0.0-RC1
OWANALYTICS_TAG=v3.0.0-RC2
OWSUB_TAG=v3.0.0-RC2
KAFKA_TAG=latest
ZOOKEEPER_TAG=3.8
POSTGRESQL_TAG=15.0
MYSQL_TAG=latest
# NOTE currently OWRRM is only supported in LB installations
#OWRRM_TAG=main
#OWRRM_TAG=v2.8.0
# Microservice root/config directories
OWGW_ROOT=/owgw-data

View File

@@ -1,15 +1,15 @@
# Image tags
COMPOSE_PROJECT_NAME=openwifi
OWGW_TAG=master
OWGWUI_TAG=main
OWSEC_TAG=main
OWFMS_TAG=main
OWPROV_TAG=main
OWPROVUI_TAG=main
OWANALYTICS_TAG=main
OWSUB_TAG=main
OWRRM_TAG=main
KAFKA_TAG=2.8.0-debian-10-r43
OWGW_TAG=v3.0.0-RC2
OWGWUI_TAG=v3.0.0-RC1
OWSEC_TAG=v3.0.0-RC2
OWFMS_TAG=v3.0.0-RC2
OWPROV_TAG=v3.0.0-RC2
OWPROVUI_TAG=v3.0.0-RC1
OWANALYTICS_TAG=v3.0.0-RC2
OWSUB_TAG=v3.0.0-RC2
OWRRM_TAG=v2.8.0
KAFKA_TAG=latest
ZOOKEEPER_TAG=3.8
ACMESH_TAG=latest
TRAEFIK_TAG=latest

View File

@@ -1,15 +1,15 @@
# Image tags
COMPOSE_PROJECT_NAME=openwifi
OWGW_TAG=master
OWGWUI_TAG=main
OWSEC_TAG=main
OWFMS_TAG=main
OWPROV_TAG=main
OWPROVUI_TAG=main
OWANALYTICS_TAG=main
OWSUB_TAG=main
OWRRM_TAG=main
KAFKA_TAG=2.8.0-debian-10-r43
OWGW_TAG=v3.0.0-RC2
OWGWUI_TAG=v3.0.0-RC1
OWSEC_TAG=v3.0.0-RC2
OWFMS_TAG=v3.0.0-RC2
OWPROV_TAG=v3.0.0-RC2
OWPROVUI_TAG=v3.0.0-RC1
OWANALYTICS_TAG=v3.0.0-RC2
OWSUB_TAG=v3.0.0-RC2
OWRRM_TAG=v2.8.0
KAFKA_TAG=latest
ZOOKEEPER_TAG=3.8
ACMESH_TAG=latest
TRAEFIK_TAG=latest

View File

@@ -39,12 +39,6 @@ services:
image: "postgres:${POSTGRESQL_TAG}"
networks:
openwifi:
command:
- "postgres"
- "-c"
- "max_connections=400"
- "-c"
- "shared_buffers=20MB"
env_file:
- postgresql.env
restart: unless-stopped

View File

@@ -3,7 +3,7 @@ COMPOSE_PROJECT_NAME=owls
OWSEC_TAG=main
OWLS_TAG=main
OWLSUI_TAG=master
KAFKA_TAG=2.8.0-debian-10-r43
KAFKA_TAG=latest
ZOOKEEPER_TAG=latest
# Microservice root/config directories