mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-10-31 19:08:01 +00:00
WIFI-13821 rework gh CGW deploy action-2
Signed-off-by: Carsten Schafer <Carsten.Schafer@kinarasystems.com>
This commit is contained in:
52
.github/workflows/cgw-dev-deployment.yaml
vendored
52
.github/workflows/cgw-dev-deployment.yaml
vendored
@@ -50,9 +50,9 @@ on:
|
|||||||
#other: "us-east-1"
|
#other: "us-east-1"
|
||||||
description: 'AWS Region'
|
description: 'AWS Region'
|
||||||
required: false
|
required: false
|
||||||
just_component:
|
upgrade:
|
||||||
default: 'true'
|
default: 'true'
|
||||||
description: 'Just deploy CGW component, not all the other services'
|
description: 'Just deploy CGW component, set to false for full install'
|
||||||
required: false
|
required: false
|
||||||
id:
|
id:
|
||||||
description: 'run identifier'
|
description: 'run identifier'
|
||||||
@@ -90,13 +90,6 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
matrix: ${{ fromJson( needs.generate-matrix.outputs.matrix ) }}
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
env:
|
|
||||||
IMG_TAG: ${{ github.events.inputs.cgw_image }}
|
|
||||||
VERSION: ${{ github.events.inputs.cgw_version }}
|
|
||||||
CONFIG_NAME: ${{ github.events.inputs.config_name }}
|
|
||||||
NAMESPACE: ${{ github.events.inputs.namespace }}
|
|
||||||
AWS_EKS_NAME: ${{ github.events.inputs.cluster }}
|
|
||||||
AWS_DEFAULT_REGION: ${{ github.events.inputs.region }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo with Helm values
|
- name: Checkout repo with Helm values
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -107,12 +100,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout cgw repo
|
- name: Checkout cgw repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
env:
|
||||||
|
VERSION: ${{ github.events.inputs.cgw_version }}
|
||||||
with:
|
with:
|
||||||
repository: Telecominfraproject/openlan-cgw
|
repository: Telecominfraproject/openlan-cgw
|
||||||
path: openlan-cgw
|
path: openlan-cgw
|
||||||
ref: ${{ env.VERSION }}
|
ref: ${{ env.VERSION }}
|
||||||
|
|
||||||
- name: Fetch kubeconfig
|
- name: Fetch kubeconfig
|
||||||
|
env:
|
||||||
|
AWS_EKS_NAME: ${{ github.events.inputs.cluster }}
|
||||||
|
AWS_DEFAULT_REGION: ${{ github.events.inputs.region }}
|
||||||
run: |
|
run: |
|
||||||
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||||
|
|
||||||
@@ -138,40 +136,44 @@ jobs:
|
|||||||
| grep websocket- >> values/certs.device.yaml
|
| grep websocket- >> values/certs.device.yaml
|
||||||
|
|
||||||
- name: Deploy OpenLAN Cloud Gateway and services
|
- name: Deploy OpenLAN Cloud Gateway and services
|
||||||
if: ${{ github.event.inputs.just_component }} == "false"
|
if: ${{ github.event.inputs.upgrade }} == "false"
|
||||||
working-directory: wlan-cloud-ucentral-deploy/cgw
|
working-directory: wlan-cloud-ucentral-deploy/cgw
|
||||||
|
env:
|
||||||
|
IMG_TAG: ${{ github.events.inputs.cgw_image }}
|
||||||
|
CONFIG_NAME: ${{ github.events.inputs.config_name }}
|
||||||
|
NAMESPACE: ${{ github.events.inputs.namespace }}
|
||||||
run: |
|
run: |
|
||||||
# service components can't be reinstalled easily
|
helm ls -n ${{ env.NAMESPACE }}
|
||||||
helm ls -n ${{ env.FULL_NAMESPACE }}
|
echo "If already installed then it may not be possible to upgrade service components"
|
||||||
if ! helm ls -n ${{ env.FULL_NAMESPACE }} | grep "^kafka" >/dev/null ; then
|
|
||||||
helmfile --environment ${{ env.CONFIG_NAME }} \
|
helmfile --environment ${{ env.CONFIG_NAME }} \
|
||||||
--state-values-set "cgw.tag={{ env.IMG_TAG }}" \
|
--state-values-set "cgw.tag={{ env.IMG_TAG }}" \
|
||||||
apply
|
apply
|
||||||
else
|
|
||||||
helmfile --environment ${{ env.CONFIG_NAME }} -l app=cgw \
|
|
||||||
--state-values-set "cgw.tag={{ env.IMG_TAG }}" \
|
|
||||||
apply
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Deploy OpenLAN Cloud Gateway only
|
- name: Deploy OpenLAN Cloud Gateway only
|
||||||
if: ${{ github.event.inputs.just_component }} == "true"
|
if: ${{ github.event.inputs.upgrade }} == "true"
|
||||||
working-directory: wlan-cloud-ucentral-deploy/cgw
|
working-directory: wlan-cloud-ucentral-deploy/cgw
|
||||||
|
env:
|
||||||
|
IMG_TAG: ${{ github.events.inputs.cgw_image }}
|
||||||
|
CONFIG_NAME: ${{ github.events.inputs.config_name }}
|
||||||
|
NAMESPACE: ${{ github.events.inputs.namespace }}
|
||||||
run: |
|
run: |
|
||||||
helm ls -n ${{ env.FULL_NAMESPACE }}
|
helm ls -n ${{ env.NAMESPACE }}
|
||||||
helmfile --environment ${{ env.CONFIG_NAME }} -l app=cgw \
|
helmfile --environment ${{ env.CONFIG_NAME }} -l app=cgw \
|
||||||
--state-values-set "cgw.tag={{ env.IMG_TAG }}" \
|
--state-values-set "cgw.tag={{ env.IMG_TAG }}" \
|
||||||
apply
|
apply
|
||||||
|
|
||||||
- name: Show resource state on deployment failure
|
- name: Show resource state on deployment failure
|
||||||
if: failure()
|
if: failure()
|
||||||
|
env:
|
||||||
|
NAMESPACE: ${{ github.events.inputs.namespace }}
|
||||||
run: |
|
run: |
|
||||||
echo "Deploy/STS:"
|
echo "Deploy/STS:"
|
||||||
kubectl get deploy,sts --namespace {{ env.FULL_NAMESPACE }} -o wide
|
kubectl get deploy,sts --namespace {{ env.NAMESPACE }} -o wide
|
||||||
echo "Pods:"
|
echo "Pods:"
|
||||||
kubectl get pods --namespace {{ env.FULL_NAMESPACE }} -o wide
|
kubectl get pods --namespace {{ env.NAMESPACE }} -o wide
|
||||||
echo "Pod Descriptions:"
|
echo "Pod Descriptions:"
|
||||||
kubectl describe pods --namespace {{ env.FULL_NAMESPACE }}
|
kubectl describe pods --namespace {{ env.NAMESPACE }}
|
||||||
echo "Services:"
|
echo "Services:"
|
||||||
kubectl get services --namespace {{ env.FULL_NAMESPACE }} -o wide
|
kubectl get services --namespace {{ env.NAMESPACE }} -o wide
|
||||||
echo "Service Descriptions:"
|
echo "Service Descriptions:"
|
||||||
kubectl describe services --namespace {{ env.FULL_NAMESPACE }}
|
kubectl describe services --namespace {{ env.NAMESPACE }}
|
||||||
|
|||||||
Reference in New Issue
Block a user