From f239efe31b1139d44a87d43ab3f3a96b52faad49 Mon Sep 17 00:00:00 2001 From: rshacham Date: Thu, 27 Jun 2019 21:55:39 +0000 Subject: [PATCH] Adding Kong IC for AUX functions Change-Id: I448591107f5907b0ec0cf548955f1b1b3c6385f4 Signed-off-by: rshacham --- ric-aux/80-Auxiliary-Functions/bin/install | 14 +++++++++++++- ric-aux/80-Auxiliary-Functions/bin/uninstall | 2 +- .../helm/kong-aux/.helmignore | 22 ++++++++++++++++++++++ .../helm/kong-aux/Chart.yaml | 5 +++++ .../helm/kong-aux/requirements.yaml | 21 +++++++++++++++++++++ .../helm/kong-aux/values.yaml | 19 +++++++++++++++++++ .../helm/ves/templates/ingress-ves.yaml | 12 ++++++++++++ 7 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 ric-aux/80-Auxiliary-Functions/helm/kong-aux/.helmignore create mode 100644 ric-aux/80-Auxiliary-Functions/helm/kong-aux/Chart.yaml create mode 100644 ric-aux/80-Auxiliary-Functions/helm/kong-aux/requirements.yaml create mode 100644 ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml create mode 100644 ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml diff --git a/ric-aux/80-Auxiliary-Functions/bin/install b/ric-aux/80-Auxiliary-Functions/bin/install index c44cfbb4..df15d9be 100755 --- a/ric-aux/80-Auxiliary-Functions/bin/install +++ b/ric-aux/80-Auxiliary-Functions/bin/install @@ -36,7 +36,7 @@ else NAMESPACE=$RICAUX_NAMESPACE fi -RICAUX_COMPONENTS="dashboard ves message-router" +RICAUX_COMPONENTS="dashboard ves message-router kong-aux" echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]" echo "Platform Namespace: $NAMESPACE" @@ -45,11 +45,23 @@ echo "Helm Release Name: $RELEASE_NAME" COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}') +helm repo remove local + helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common/ for component in $RICAUX_COMPONENTS; do echo "Preparing chart for comonent $component" + + if [ $component = "kong-aux" ]; then + mkdir -p $DIR/../helm/$component/charts + helm dep up $DIR/../helm/$component + helm install --namespace ricaux --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off + continue + fi + + echo "not kong component" + mkdir -p $DIR/../helm/$component/charts/ cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/ if [ -z $OVERRIDEYAML ]; then diff --git a/ric-aux/80-Auxiliary-Functions/bin/uninstall b/ric-aux/80-Auxiliary-Functions/bin/uninstall index 91e56e8c..67e68403 100755 --- a/ric-aux/80-Auxiliary-Functions/bin/uninstall +++ b/ric-aux/80-Auxiliary-Functions/bin/uninstall @@ -35,7 +35,7 @@ else NAMESPACE=$RICAUX_NAMESPACE fi -RICAUX_COMPONENTS="dashboard message-router ves" +RICAUX_COMPONENTS="dashboard message-router ves kong-aux" echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]" echo "Platform Namespace: $NAMESPACE" diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/.helmignore b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/Chart.yaml b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/Chart.yaml new file mode 100644 index 00000000..caf0bbb2 --- /dev/null +++ b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: kong_aux +version: 1.0.0 diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/requirements.yaml b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/requirements.yaml new file mode 100644 index 00000000..2587ea7e --- /dev/null +++ b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/requirements.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + +dependencies: + - name: kong + repository: '@stable' + version: ~0.12.2 \ No newline at end of file diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml new file mode 100644 index 00000000..f55709b3 --- /dev/null +++ b/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml @@ -0,0 +1,19 @@ +# Default values for kong_platform. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +kong: + ingressController: + enabled: true + + postgresql: + enabled: false + + env: + database: "off" + + proxy: + http: + nodePort: 32080 + tls: + nodePort: 32443 \ No newline at end of file diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml new file mode 100644 index 00000000..7a91f7d4 --- /dev/null +++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml @@ -0,0 +1,12 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: ric-ingress-ves +spec: + rules: + - http: + paths: + - path: /vescollector + backend: + serviceName: xdcae-ves-collector + servicePort: 8080 -- 2.16.6