From 2326429761007dde9cf9b2ff2ba327b651ed8759 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Wed, 5 May 2021 19:09:18 +0200 Subject: [PATCH] Pin OSM charms to newer revision numbers and update releasing script Change-Id: Ib5e737cfb721e7e987ec14ea94cdc939e2164542 Signed-off-by: David Garcia --- installers/charm/bundles/osm-ha/bundle.yaml | 20 ++++++------- installers/charm/bundles/osm/bundle.yaml | 20 ++++++------- installers/charm/release_edge.sh | 31 +++++++++++++-------- installers/charmed_install.sh | 4 +-- 4 files changed, 42 insertions(+), 33 deletions(-) diff --git a/installers/charm/bundles/osm-ha/bundle.yaml b/installers/charm/bundles/osm-ha/bundle.yaml index 9ee71954..3ffac1ac 100644 --- a/installers/charm/bundles/osm-ha/bundle.yaml +++ b/installers/charm/bundles/osm-ha/bundle.yaml @@ -83,7 +83,7 @@ applications: gui-x: 0 gui-y: 0 nbi: - charm: "cs:~charmed-osm/nbi-6" + charm: "cs:~charmed-osm/nbi-8" scale: 3 series: kubernetes options: @@ -94,7 +94,7 @@ applications: gui-x: 0 gui-y: -250 ro: - charm: "cs:~charmed-osm/ro-1" + charm: "cs:~charmed-osm/ro-3" scale: 3 series: kubernetes options: @@ -103,14 +103,14 @@ applications: gui-x: -300 gui-y: 250 ng-ui: - charm: "cs:~charmed-osm/ng-ui-17" + charm: "cs:~charmed-osm/ng-ui-19" scale: 3 series: kubernetes annotations: gui-x: 600 gui-y: 0 lcm: - charm: "cs:~charmed-osm/lcm-2" + charm: "cs:~charmed-osm/lcm-4" scale: 3 series: kubernetes options: @@ -120,7 +120,7 @@ applications: gui-x: -300 gui-y: 0 mon: - charm: "cs:~charmed-osm/mon-2" + charm: "cs:~charmed-osm/mon-4" scale: 1 series: kubernetes options: @@ -131,7 +131,7 @@ applications: gui-x: 300 gui-y: 0 pol: - charm: "cs:~charmed-osm/pol-1" + charm: "cs:~charmed-osm/pol-3" scale: 3 series: kubernetes options: @@ -140,7 +140,7 @@ applications: gui-x: -300 gui-y: 500 pla: - charm: "cs:~charmed-osm/pla-7" + charm: "cs:~charmed-osm/pla-8" scale: 3 series: kubernetes options: @@ -149,7 +149,7 @@ applications: gui-x: 600 gui-y: -250 prometheus: - charm: "cs:~charmed-osm/prometheus-1" + charm: "cs:~charmed-osm/prometheus-2" scale: 1 series: kubernetes storage: @@ -160,14 +160,14 @@ applications: gui-x: 300 gui-y: 250 grafana: - charm: "cs:~charmed-osm/grafana-1" + charm: "cs:~charmed-osm/grafana-2" scale: 3 series: kubernetes annotations: gui-x: 300 gui-y: 500 keystone: - charm: "cs:~charmed-osm/keystone-5" + charm: "cs:~charmed-osm/keystone-7" scale: 1 series: kubernetes annotations: diff --git a/installers/charm/bundles/osm/bundle.yaml b/installers/charm/bundles/osm/bundle.yaml index 404ed566..cd3a2a67 100644 --- a/installers/charm/bundles/osm/bundle.yaml +++ b/installers/charm/bundles/osm/bundle.yaml @@ -76,7 +76,7 @@ applications: gui-x: 0 gui-y: 0 nbi: - charm: "cs:~charmed-osm/nbi-6" + charm: "cs:~charmed-osm/nbi-8" scale: 1 series: kubernetes options: @@ -87,7 +87,7 @@ applications: gui-x: 0 gui-y: -250 ro: - charm: "cs:~charmed-osm/ro-1" + charm: "cs:~charmed-osm/ro-3" scale: 1 series: kubernetes options: @@ -96,14 +96,14 @@ applications: gui-x: -300 gui-y: 250 ng-ui: - charm: "cs:~charmed-osm/ng-ui-17" + charm: "cs:~charmed-osm/ng-ui-19" scale: 1 series: kubernetes annotations: gui-x: 600 gui-y: 0 lcm: - charm: "cs:~charmed-osm/lcm-2" + charm: "cs:~charmed-osm/lcm-4" scale: 1 series: kubernetes options: @@ -113,7 +113,7 @@ applications: gui-x: -300 gui-y: 0 mon: - charm: "cs:~charmed-osm/mon-2" + charm: "cs:~charmed-osm/mon-4" scale: 1 series: kubernetes options: @@ -124,7 +124,7 @@ applications: gui-x: 300 gui-y: 0 pol: - charm: "cs:~charmed-osm/pol-1" + charm: "cs:~charmed-osm/pol-3" scale: 1 series: kubernetes options: @@ -133,7 +133,7 @@ applications: gui-x: -300 gui-y: 500 pla: - charm: "cs:~charmed-osm/pla-7" + charm: "cs:~charmed-osm/pla-8" scale: 1 series: kubernetes options: @@ -142,7 +142,7 @@ applications: gui-x: 600 gui-y: -250 prometheus: - charm: "cs:~charmed-osm/prometheus-1" + charm: "cs:~charmed-osm/prometheus-2" scale: 1 series: kubernetes storage: @@ -153,14 +153,14 @@ applications: gui-x: 300 gui-y: 250 grafana: - charm: "cs:~charmed-osm/grafana-1" + charm: "cs:~charmed-osm/grafana-2" scale: 1 series: kubernetes annotations: gui-x: 300 gui-y: 500 keystone: - charm: "cs:~charmed-osm/keystone-5" + charm: "cs:~charmed-osm/keystone-7" scale: 1 series: kubernetes annotations: diff --git a/installers/charm/release_edge.sh b/installers/charm/release_edge.sh index 2a6d62f4..6e8a40c0 100755 --- a/installers/charm/release_edge.sh +++ b/installers/charm/release_edge.sh @@ -41,17 +41,26 @@ for charm in $charms; do echo "$charm charm released!" done -# New charms (with resources) (with oci-images from ubuntu) -charms="prometheus grafana" -for charm in $charms; do - echo "Releasing $charm charm" - cs_revision=$(charm push $charm/$charm.charm cs:~charmed-osm/$charm | tail -n +1 | head -1 | awk '{print $2}') - resource_revision=$(charm attach $cs_revision image=external::ubuntu/$charm:latest | tail -n +1 | sed 's/[^0-9]*//g') - image_revision_num=$(echo $resource_revision | awk '{print $NF}') - resources_string="--resource image-$image_revision_num" - charm release --channel $channel $cs_revision $resources_string - echo "$charm charm released!" -done +charm="prometheus" +echo "Releasing $charm charm" +cs_revision=$(charm push $charm/$charm.charm cs:~charmed-osm/$charm | tail -n +1 | head -1 | awk '{print $2}') +resource_revision=$(charm attach $cs_revision image=external::ubuntu/$charm:latest | tail -n +1 | sed 's/[^0-9]*//g') +image_revision_num=$(echo $resource_revision | awk '{print $NF}') +backup_resource_revision=$(charm attach $cs_revision backup-image=external::ed1000/prometheus-backup:latest | tail -n +1 | sed 's/[^0-9]*//g') +backup_image_revision_num=$(echo $backup_resource_revision | awk '{print $NF}') +resources_string="--resource image-$image_revision_num --resource backup-image-$backup_image_revision_num" +charm release --channel $channel $cs_revision $resources_string +echo "$charm charm released!" + + +charm="grafana" +echo "Releasing $charm charm" +cs_revision=$(charm push $charm/$charm.charm cs:~charmed-osm/$charm | tail -n +1 | head -1 | awk '{print $2}') +resource_revision=$(charm attach $cs_revision image=external::ubuntu/$charm:latest | tail -n +1 | sed 's/[^0-9]*//g') +image_revision_num=$(echo $resource_revision | awk '{print $NF}') +resources_string="--resource image-$image_revision_num" +charm release --channel $channel $cs_revision $resources_string +echo "$charm charm released!" # 3. Grant permissions all_charms="ng-ui nbi pla keystone ro lcm mon pol grafana prometheus" diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index e0c3e02a..e1a45d0b 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -25,8 +25,8 @@ PATH=/snap/bin:${PATH} MODEL_NAME=osm -OSM_BUNDLE=cs:osm-60 -OSM_HA_BUNDLE=cs:osm-ha-45 +OSM_BUNDLE=cs:osm-61 +OSM_HA_BUNDLE=cs:osm-ha-46 TAG=testing-daily function check_arguments(){ -- 2.25.1