From: Mark Beierl Date: Wed, 12 Jul 2023 16:28:23 +0000 (-0400) Subject: Update bundle to v14 X-Git-Tag: v14.0.0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=66b5b1152f282c410a51022f7b544566b1eacbdf;p=osm%2Fdevops.git Update bundle to v14 Updates the channel for the bundles to 14.0 Change-Id: I7c9ae026b318bde46301bbcfdf1e88d22e40bae5 Signed-off-by: Mark Beierl --- diff --git a/installers/charm/bundles/osm-ha/bundle.yaml b/installers/charm/bundles/osm-ha/bundle.yaml index a4e84d31..9e682728 100644 --- a/installers/charm/bundles/osm-ha/bundle.yaml +++ b/installers/charm/bundles/osm-ha/bundle.yaml @@ -63,7 +63,7 @@ applications: mongodb: 50M nbi: charm: osm-nbi - channel: latest/beta + channel: 14.0 trust: true scale: 3 options: @@ -73,7 +73,7 @@ applications: nbi-image: opensourcemano/nbi:testing-daily ro: charm: osm-ro - channel: latest/beta + channel: 14.0 trust: true scale: 3 options: @@ -82,14 +82,14 @@ applications: ro-image: opensourcemano/ro:testing-daily ng-ui: charm: osm-ng-ui - channel: latest/beta + channel: 14.0 trust: true scale: 3 resources: ng-ui-image: opensourcemano/ng-ui:testing-daily lcm: charm: osm-lcm - channel: latest/beta + channel: 14.0 scale: 3 options: database-commonkey: osm @@ -98,7 +98,7 @@ applications: lcm-image: opensourcemano/lcm:testing-daily mon: charm: osm-mon - channel: latest/beta + channel: 14.0 trust: true scale: 1 options: @@ -109,7 +109,7 @@ applications: mon-image: opensourcemano/mon:testing-daily pol: charm: osm-pol - channel: latest/beta + channel: 14.0 scale: 3 options: log-level: DEBUG @@ -117,7 +117,7 @@ applications: pol-image: opensourcemano/pol:testing-daily vca: charm: osm-vca-integrator - channel: latest/beta + channel: 14.0 scale: 1 ingress: charm: nginx-ingress-integrator @@ -125,7 +125,7 @@ applications: scale: 3 prometheus: charm: osm-prometheus - channel: latest/stable + channel: 14.0 scale: 1 series: kubernetes storage: @@ -134,7 +134,7 @@ applications: default-target: "mon:8000" grafana: charm: osm-grafana - channel: latest/stable + channel: 14.0 scale: 3 series: kubernetes keystone: diff --git a/installers/charm/bundles/osm/bundle.yaml b/installers/charm/bundles/osm/bundle.yaml index b2db446c..678f680b 100644 --- a/installers/charm/bundles/osm/bundle.yaml +++ b/installers/charm/bundles/osm/bundle.yaml @@ -62,7 +62,7 @@ applications: mongodb: 50M nbi: charm: osm-nbi - channel: latest/beta + channel: 14.0 trust: true scale: 1 options: @@ -72,7 +72,7 @@ applications: nbi-image: opensourcemano/nbi:testing-daily ro: charm: osm-ro - channel: latest/beta + channel: 14.0 trust: true scale: 1 options: @@ -81,14 +81,14 @@ applications: ro-image: opensourcemano/ro:testing-daily ng-ui: charm: osm-ng-ui - channel: latest/beta + channel: 14.0 trust: true scale: 1 resources: ng-ui-image: opensourcemano/ng-ui:testing-daily lcm: charm: osm-lcm - channel: latest/beta + channel: 14.0 scale: 1 options: database-commonkey: osm @@ -97,7 +97,7 @@ applications: lcm-image: opensourcemano/lcm:testing-daily mon: charm: osm-mon - channel: latest/beta + channel: 14.0 trust: true scale: 1 options: @@ -108,7 +108,7 @@ applications: mon-image: opensourcemano/mon:testing-daily pol: charm: osm-pol - channel: latest/beta + channel: 14.0 scale: 1 options: log-level: DEBUG @@ -116,7 +116,7 @@ applications: pol-image: opensourcemano/pol:testing-daily vca: charm: osm-vca-integrator - channel: latest/beta + channel: 14.0 scale: 1 ingress: charm: nginx-ingress-integrator @@ -124,7 +124,7 @@ applications: scale: 1 prometheus: charm: osm-prometheus - channel: latest/stable + channel: 14.0 scale: 1 series: kubernetes storage: @@ -133,7 +133,7 @@ applications: default-target: "mon:8000" grafana: charm: osm-grafana - channel: latest/stable + channel: 14.0 scale: 1 series: kubernetes keystone: diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index a9dfdf1f..d403a9d3 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -21,7 +21,7 @@ JUJU_AGENT_VERSION=2.9.43 K8S_CLOUD_NAME="k8s-cloud" KUBECTL="microk8s.kubectl" MICROK8S_VERSION=1.26 -OSMCLIENT_VERSION=latest +OSMCLIENT_VERSION=14.0 IMAGES_OVERLAY_FILE=~/.osm/images-overlay.yaml PASSWORD_OVERLAY_FILE=~/.osm/password-overlay.yaml PATH=/snap/bin:${PATH} @@ -44,7 +44,7 @@ MODEL_NAME=osm OSM_BUNDLE=ch:osm OSM_HA_BUNDLE=ch:osm-ha -CHARMHUB_CHANNEL=latest/beta +CHARMHUB_CHANNEL=14.0 unset TAG function check_arguments(){ @@ -249,7 +249,7 @@ function deploy_charmed_osm(){ echo "Deploying OSM with charms" images_overlay="" if [ -v REGISTRY_URL ]; then - [ ! -v TAG ] && TAG='latest' + [ ! -v TAG ] && TAG='14.0' fi [ -v TAG ] && generate_images_overlay && images_overlay="--overlay $IMAGES_OVERLAY_FILE" @@ -369,7 +369,7 @@ function create_pla_overlay(){ applications: pla: charm: osm-pla - channel: latest/stable + channel: 14.0 scale: $scale series: kubernetes options: diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 3b5f2142..b38de9f0 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -712,24 +712,24 @@ EOF""" } // stage('Snap promotion') stage('Charm promotion') { charms = [ - 'osm', // bundle - 'osm-ha', // bundle - 'osm-grafana', - 'osm-mariadb', - 'mongodb-exporter-k8s', - 'mysqld-exporter-k8s', - 'osm-lcm', - 'osm-mon', - 'osm-nbi', - 'osm-ng-ui', - 'osm-pol', - 'osm-ro', - 'osm-prometheus', - 'osm-update-db-operator', - 'osm-vca-integrator', + [name: 'osm', base: "22.04"], + [name: 'osm-ha', base: "22.04"], + [name: 'mongodb-exporter-k8s', base: "20.04"], + [name: 'mysqld-exporter-k8s', base: "20.04"], + [name: 'osm-grafana', base: "20.04"], + [name: 'osm-lcm', base: "22.04"], + [name: 'osm-mon', base: "22.04"], + [name: 'osm-nbi', base: "22.04"], + [name: 'osm-ng-ui', base: "22.04"], + [name: 'osm-pol', base: "22.04"], + [name: 'osm-ro', base: "22.04"], + [name: 'osm-prometheus', base: "20.04"], + [name: 'osm-update-db-operator', base: "20.04"], + [name: 'osm-vca-integrator', base: "22.04"], ] - for (charm in charms) { - + for (entry in charms) { + charm = entry.name + base = entry.base channel = 'latest' if (BRANCH_NAME.startsWith('v')) { channel = BRANCH_NAME.substring(1) @@ -739,15 +739,15 @@ EOF""" withCredentials([string(credentialsId: 'Charmstore', variable: 'CHARMCRAFT_AUTH')]) { sh "charmcraft status $charm --format json > ${charm}.json" - isCharm = sh(returnStdout: true, script: "grep architecture ${charm}.json | wc -l").trim() as int + isCharm = sh(returnStdout: true, script: "grep architecture ${charm}.json | wc -l 2>/dev/null").trim() as int resourceArgument = "" if (isCharm) { - jqScriptEdge = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"20.04\") | .releases[] | select(.channel==\"$channel/edge/merged\")| .version'|head -1" - jqScriptBeta = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"20.04\") | .releases[] | select(.channel==\"$channel/beta\")| .version'|head -1" + jqScriptEdge = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"$base\") | .releases[] | select(.channel==\"$channel/edge/merged\")| .version'|head -1" + jqScriptBeta = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"$base\") | .releases[] | select(.channel==\"$channel/beta\")| .version'|head -1" index=0 while (index < 5) { - resourceNameScript = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"20.04\") | .releases[] | select(.channel==\"$channel/edge/merged\")| .resources[$index].name'|head -1" - resourceRevsScript = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"20.04\") | .releases[] | select(.channel==\"$channel/edge/merged\")| .resources[$index].revision'|head -1" + resourceNameScript = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"$base\") | .releases[] | select(.channel==\"$channel/edge/merged\")| .resources[$index].name'|head -1" + resourceRevsScript = "cat ${charm}.json | jq -r '.[] | select(.track==\"$channel\") | .mappings[] | select(.base.architecture==\"amd64\" and .base.channel==\"$base\") | .releases[] | select(.channel==\"$channel/edge/merged\")| .resources[$index].revision'|head -1" resourceName = sh(returnStdout: true, script: resourceNameScript).trim() resourceRevs = sh(returnStdout: true, script: resourceRevsScript).trim() if (resourceName != "null") {