From af873a87ae305b8a069f8640fbb3b269cddd6276 Mon Sep 17 00:00:00 2001 From: Billy Tat Date: Wed, 27 Nov 2019 16:27:23 -0800 Subject: [PATCH 1/2] Fix example upgrade commands - specify chart version to avoid upgrading during mysql downsize steps - use values.yaml file instead of --reuse-values to avoid templating error --- xml/cap_admin_upgrade.xml | 58 ++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/xml/cap_admin_upgrade.xml b/xml/cap_admin_upgrade.xml index 04abae70..4fc1884d 100644 --- a/xml/cap_admin_upgrade.xml +++ b/xml/cap_admin_upgrade.xml @@ -53,7 +53,8 @@ During a helm upgrade, always ensure your scf-config-values-yaml file is passed. This will preserve any previously set &helm; values while allowing additional - &helm; value changes to be made. + &helm; value changes to be made. Do not + use --reuse-values when performing an upgrade. @@ -199,7 +200,8 @@ config.HA flag is set to false. &prompt.user;helm upgrade susecf-uaa suse/uaa \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.17.1 \ --set config.HA=false \ --set sizing.uaa.count=2 \ --set sizing.mysql.count=1 @@ -239,7 +241,8 @@ config.HA flag is set to false. &prompt.user;helm upgrade susecf-scf suse/cf \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.17.1 \ --set config.HA=false \ --set=sizing.adapter.count=2 --set=sizing.api_group.count=2 \ --set=sizing.autoscaler_actors.count=2 --set=sizing.autoscaler_api.count=2 \ @@ -272,7 +275,7 @@ Get the latest updates from your &helm; chart repositories. This will - allow upgrading to the latest release of the &productname; charts. + allow upgrading to newer releases of the &productname; charts. &prompt.user;helm repo update @@ -288,6 +291,7 @@ &prompt.user;helm upgrade susecf-uaa suse/uaa \ --values scf-config-values.yaml \ +--version 2.18.0 \ --set config.HA=true \ --set config.HA_strict=false \ --set sizing.mysql.count=1 @@ -321,6 +325,7 @@ &prompt.user;helm upgrade susecf-scf suse/cf \ --values scf-config-values.yaml \ +--version 2.18.0 \ --set config.HA=true \ --set config.HA_strict=false \ --set sizing.mysql.count=1 \ @@ -339,6 +344,7 @@ &prompt.user;helm upgrade susecf-uaa suse/uaa \ --values scf-config-values.yaml \ +--version 2.18.0 \ --set config.HA_strict=true \ --set config.HA=true @@ -367,6 +373,7 @@ &prompt.user;helm upgrade susecf-scf suse/cf \ --values scf-config-values.yaml \ +--version 2.18.0 \ --set config.HA_strict=true \ --set config.HA=true \ --set "secrets.UAA_CA_CERT=${CA_CERT}" @@ -377,7 +384,8 @@ If installed, upgrade Stratos. &prompt.user;helm upgrade --recreate-pods susecf-console suse/console \ ---values scf-config-values.yaml +--values scf-config-values.yaml \ +--version 2.5.3 @@ -405,7 +413,8 @@ Scale the mysql instance count to 1. &prompt.user;helm upgrade susecf-uaa suse/uaa \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.17.1 \ --set sizing.mysql.count=1 @@ -435,7 +444,8 @@ Scale the mysql instance count to 1. &prompt.user;helm upgrade susecf-scf suse/cf \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.17.1 \ --set=sizing.mysql.count=1 @@ -456,7 +466,7 @@ Get the latest updates from your &helm; chart repositories. This will - allow upgrading to the latest release of the &productname; charts. + allow upgrading to newer releases of the &productname; charts. &prompt.user;helm repo update @@ -465,7 +475,8 @@ Upgrade uaa. &prompt.user;helm upgrade susecf-uaa suse/uaa \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.18.0 \ --set sizing.mysql.count=1 @@ -490,7 +501,8 @@ Upgrade scf. &prompt.user;helm upgrade susecf-scf suse/cf \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.18.0 \ --set sizing.mysql.count=1 \ --set "secrets.UAA_CA_CERT=${CA_CERT}" @@ -511,7 +523,8 @@ number of instances. &prompt.user;helm upgrade susecf-uaa suse/uaa \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.18.0 \ --set sizing.mysql.count=3 @@ -543,7 +556,8 @@ number of instances. &prompt.user;helm upgrade susecf-scf suse/cf \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.18.0 \ --set sizing.mysql.count=3 \ --set "secrets.UAA_CA_CERT=${CA_CERT}" @@ -553,7 +567,8 @@ If installed, upgrade Stratos. &prompt.user;helm upgrade --recreate-pods susecf-console suse/console \ ---values scf-config-values.yaml +--values scf-config-values.yaml \ +--version 2.5.3 @@ -571,7 +586,7 @@ Get the latest updates from your &helm; chart repositories. This will - allow upgrading to the latest release of the &productname; charts. + allow upgrading to newer releases of the &productname; charts. &prompt.user;helm repo update @@ -580,7 +595,8 @@ Upgrade uaa. &prompt.user;helm upgrade susecf-uaa suse/uaa \ ---reuse-values +--values scf-config-values.yaml \ +--version 2.18.0 Monitor progress using the watch command. @@ -604,7 +620,8 @@ Upgrade scf. &prompt.user;helm upgrade susecf-scf suse/cf \ ---reuse-values \ +--values scf-config-values.yaml \ +--version 2.18.0 \ --set "secrets.UAA_CA_CERT=${CA_CERT}" @@ -617,7 +634,8 @@ If installed, upgrade Stratos. &prompt.user;helm upgrade --recreate-pods susecf-console suse/console \ ---values scf-config-values.yaml +--values scf-config-values.yaml \ +--version 2.5.3 @@ -642,8 +660,10 @@ option to install a specific version: -&prompt.user;helm upgrade --recreate-pods --version 2.11.0 susecf-uaa suse/uaa \ ---values scf-config-values.yaml +&prompt.user;helm upgrade --recreate-pods susecf-uaa suse/uaa \ +--values scf-config-values.yaml \ +--version 2.11.0 + Be sure to install the corresponding versions for scf and From fc1b4aaaf835453e00e11f4628717d059acaca6b Mon Sep 17 00:00:00 2001 From: Billy Tat Date: Fri, 29 Nov 2019 10:28:26 -0800 Subject: [PATCH 2/2] Move some --set XYZ flags into values.yaml --- xml/cap_admin_upgrade.xml | 261 +++++++++++++++++++++++++++++++------- 1 file changed, 217 insertions(+), 44 deletions(-) diff --git a/xml/cap_admin_upgrade.xml b/xml/cap_admin_upgrade.xml index 4fc1884d..03364473 100644 --- a/xml/cap_admin_upgrade.xml +++ b/xml/cap_admin_upgrade.xml @@ -179,6 +179,13 @@ setting config.HA to true (see ). + + The following example assumes your current + scf-config-values.yaml file contains: + +config: + HA: true + @@ -199,12 +206,30 @@ sizing counts of roles are manually specfied and the config.HA flag is set to false. + + Create a custom configuration file, + called ha-uaa-single-mysql.yaml in this example, + with the values below. The counts used for all roles are equivalent to + setting config.HA to true, with + the exception of the mysql role which has a single + instance. Note that it is assumed config.HA=true is + set in your existing scf-config-values.yaml file. + +config: + HA: false +sizing: + uaa: + count: 2 + mysql: + count: 1 + + + Perform the scaling. + &prompt.user;helm upgrade susecf-uaa suse/uaa \ --values scf-config-values.yaml \ ---version 2.17.1 \ ---set config.HA=false \ ---set sizing.uaa.count=2 \ ---set sizing.mysql.count=1 +--values ha-uaa-single-mysql.yaml \ +--version 2.17.1 Monitor progress using the watch command. @@ -240,22 +265,74 @@ sizing counts of roles are manually specfied and the config.HA flag is set to false. + + Create a custom configuration file, + called ha-scf-single-mysql.yaml in this example, + with the values below. The counts used for all roles are equivalent to + setting config.HA to true, with + the exception of the mysql role which has a single + instance. Note that it is assumed config.HA=true is + set in your existing scf-config-values.yaml file. + +config: + HA: false +sizing: + adapter: + count: 2 + api_group: + count: 2 + autoscaler_actors: + count: 2 + autoscaler_api: + count: 2 + autoscaler_metrics: + count: 2 + cc_clock: + count: 2 + cc_uploader: + count: 2 + cc_worker: + count: 2 + cf_usb_group: + count: 2 + diego_api: + count: 2 + diego_brain: + count: 2 + diego_cell: + count: 3 + diego_ssh: + count: 2 + doppler: + count: 2 + locket: + count: 2 + log_api: + count: 2 + log_cache_scheduler: + count: 2 + nats: + count: 2 + nfs_broker: + count: 2 + router: + count: 2 + routing_api: + count: 2 + syslog_scheduler: + count: 2 + tcp_router: + count: 2 + mysql: + count: 1 + + + Perform the scaling. + &prompt.user;helm upgrade susecf-scf suse/cf \ --values scf-config-values.yaml \ ---version 2.17.1 \ ---set config.HA=false \ ---set=sizing.adapter.count=2 --set=sizing.api_group.count=2 \ ---set=sizing.autoscaler_actors.count=2 --set=sizing.autoscaler_api.count=2 \ ---set=sizing.autoscaler_metrics.count=2 --set=sizing.cc_clock.count=2 \ ---set=sizing.cc_uploader.count=2 --set=sizing.cc_worker.count=2 \ ---set=sizing.cf_usb_group.count=2 --set=sizing.diego_api.count=2 \ ---set=sizing.diego_brain.count=2 --set=sizing.diego_cell.count=3 \ ---set=sizing.diego_ssh.count=2 --set=sizing.doppler.count=2 \ ---set=sizing.locket.count=2 --set=sizing.log_api.count=2 \ ---set=sizing.log_cache_scheduler.count=2 --set=sizing.nats.count=2 \ ---set=sizing.nfs_broker.count=2 --set=sizing.router.count=2 \ ---set=sizing.routing_api.count=2 --set=sizing.syslog_scheduler.count=2 \ ---set=sizing.tcp_router.count=2 --set=sizing.mysql.count=1 +--values ha-scf-single-mysql.yaml \ +--version 2.17.1 Monitor progress using the watch command. @@ -289,12 +366,25 @@ config.HA and specifying custom sizing counts simultaneously. For details, refer to . + + Create a custom configuration file, called + ha-strict-false-single-mysql.yaml in this example, + with the values below. The file uses the + config.HA_strict feature to allow setting the + mysql role to a single instance while other roles are + kept HA. Note that it is assumed config.HA=true is set + in your existing scf-config-values.yaml file. + +config: + HA_strict: false +sizing: + mysql: + count: 1 + &prompt.user;helm upgrade susecf-uaa suse/uaa \ --values scf-config-values.yaml \ ---version 2.18.0 \ ---set config.HA=true \ ---set config.HA_strict=false \ ---set sizing.mysql.count=1 +--values ha-strict-false-single-mysql.yaml \ +--version 2.18.0 Monitor progress using the watch command. @@ -323,12 +413,22 @@ config.HA and specifying custom sizing counts simultaneously. For details, refer to . + + Reuse the custom configuration file, called + ha-strict-false-single-mysql.yaml, created earlier. + The file uses the config.HA_strict feature to allow + setting the mysql role to a single instance while other + roles are kept HA. Note that it is assumed + config.HA=true is set in your existing + scf-config-values.yaml file. + + + Perform the upgrade. + &prompt.user;helm upgrade susecf-scf suse/cf \ --values scf-config-values.yaml \ +--values ha-strict-false-single-mysql.yaml \ --version 2.18.0 \ ---set config.HA=true \ ---set config.HA_strict=false \ ---set sizing.mysql.count=1 \ --set "secrets.UAA_CA_CERT=${CA_CERT}" @@ -342,11 +442,26 @@ the mysql role, back to the default high availability mode. + + Create a custom configuration file, called + ha-strict-true.yaml in this example, + with the values below. The file sets config.HA_strict + to true, which enforces all roles, including + mysql, are at the required minimum required instance + count for a default HA configuration. Note that it is assumed + config.HA=true is set in your existing + scf-config-values.yaml file. + +config: + HA_strict: true + + + Perform the scaling. + &prompt.user;helm upgrade susecf-uaa suse/uaa \ --values scf-config-values.yaml \ ---version 2.18.0 \ ---set config.HA_strict=true \ ---set config.HA=true +--values ha-strict-true.yaml \ +--version 2.18.0 Monitor progress using the watch command. @@ -371,11 +486,20 @@ the mysql role, back to the default high availability mode. + + Reuse the custom configuration file, called + ha-strict-true.yaml in this example, + created earlier. The file sets config.HA_strict + to true, which enforces all roles, including + mysql, are at the required minimum required instance + count for a default HA configuration. Note that it is assumed + config.HA=true is set in your existing + scf-config-values.yaml file. + &prompt.user;helm upgrade susecf-scf suse/cf \ --values scf-config-values.yaml \ +--values ha-strict-true.yaml \ --version 2.18.0 \ ---set config.HA_strict=true \ ---set config.HA=true \ --set "secrets.UAA_CA_CERT=${CA_CERT}" @@ -412,10 +536,22 @@ Scale the mysql instance count to 1. + + Modify your existing custom sizing configuration file, called + uaa-sizing.yaml in this example, so that the + mysql role has a count of 1. + +sizing: + mysql: + count: 1 + + + Perform the scaling. + &prompt.user;helm upgrade susecf-uaa suse/uaa \ --values scf-config-values.yaml \ ---version 2.17.1 \ ---set sizing.mysql.count=1 +--values uaa-sizing.yaml \ +--version 2.17.1 Monitor progress using the watch command. @@ -443,10 +579,22 @@ Scale the mysql instance count to 1. + + Modify your existing custom sizing configuration file, called + scf-sizing.yaml in this example, so that the + mysql role has a count of 1. + +sizing: + mysql: + count: 1 + + + Perform the scaling. + &prompt.user;helm upgrade susecf-scf suse/cf \ --values scf-config-values.yaml \ ---version 2.17.1 \ ---set=sizing.mysql.count=1 +--values scf-sizing.yaml \ +--version 2.17.1 Monitor progress using the watch command. @@ -474,10 +622,15 @@ Upgrade uaa. + + Reuse your existing custom sizing configuration file, called + uaa-sizing.yaml in this example, so that the + mysql role has a count of 1. + &prompt.user;helm upgrade susecf-uaa suse/uaa \ --values scf-config-values.yaml \ ---version 2.18.0 \ ---set sizing.mysql.count=1 +--values uaa-sizing.yaml \ +--version 2.18.0 Monitor progress using the watch command. @@ -500,10 +653,15 @@ Upgrade scf. + + Reuse your existing custom sizing configuration file, called + scf-sizing.yaml in this example, so that the + mysql role has a count of 1. + &prompt.user;helm upgrade susecf-scf suse/cf \ --values scf-config-values.yaml \ +--values scf-sizing.yaml \ --version 2.18.0 \ ---set sizing.mysql.count=1 \ --set "secrets.UAA_CA_CERT=${CA_CERT}" @@ -514,18 +672,29 @@ Scale the entire uaa deployment, including - the mysql role, back to the default - high availability mode. + the mysql role, back to high availability mode. Note that as of &productname; 1.5, the mysql role requires at least 3 instances for high availability and must have an odd number of instances. + + Modify your existing custom sizing configuration file, called + uaa-sizing.yaml in this example, so that the + mysql role has a count of 3. + +sizing: + mysql: + count: 3 + + + Perform the scaling. + &prompt.user;helm upgrade susecf-uaa suse/uaa \ --values scf-config-values.yaml \ ---version 2.18.0 \ ---set sizing.mysql.count=3 +--values uaa-sizing.yaml \ +--version 2.18.0 Monitor progress using the watch command. @@ -547,18 +716,22 @@ Scale the entire scf deployment, including - the mysql role, back to the default - high availability mode. + the mysql role, back to high availability mode. Note that as of &productname; 1.5, the mysql role requires at least 3 instances for high availability and must have an odd number of instances. + + Modify your existing custom sizing configuration file, called + scf-sizing.yaml in this example, so that the + mysql role has a count of 3. + &prompt.user;helm upgrade susecf-scf suse/cf \ --values scf-config-values.yaml \ +--values scf-sizing.yaml \ --version 2.18.0 \ ---set sizing.mysql.count=3 \ --set "secrets.UAA_CA_CERT=${CA_CERT}"