From 995f230e99ef9736b9533750b422f819b7181316 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Wed, 19 Dec 2018 15:50:36 +0300 Subject: [PATCH 01/18] changed credhub and uaa properties path --- tasks/configure-ert/task.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 3498d9489..5654cd56c 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -271,8 +271,8 @@ cf_properties=$( ".properties.system_database.external.autoscale_username": { "value": $db_autoscale_username }, ".properties.system_database.external.ccdb_password": { "value": { "secret": $db_ccdb_password } }, ".properties.system_database.external.ccdb_username": { "value": $db_ccdb_username }, - ".properties.system_database.external.credhub_username": { "value": $db_credhub_username }, - ".properties.system_database.external.credhub_password": { "value": { "secret": $db_credhub_password } }, + ".properties.credhub_database.external.username": { "value": $db_credhub_username }, + ".properties.credhub_database.external.password": { "value": { "secret": $db_credhub_password } }, ".properties.system_database.external.diego_password": { "value": { "secret": $db_diego_password } }, ".properties.system_database.external.diego_username": { "value": $db_diego_username }, ".properties.system_database.external.host": { "value": $db_host }, @@ -289,8 +289,8 @@ cf_properties=$( ".properties.system_database.external.routing_username": { "value": $db_routing_username }, ".properties.system_database.external.silk_password": { "value": { "secret": $db_silk_password } }, ".properties.system_database.external.silk_username": { "value": $db_silk_username }, - ".properties.system_database.external.uaa_password": { "value": {"secret" : $db_uaa_password } }, - ".properties.system_database.external.uaa_username": { "value": $db_uaa_username }, + ".properties.uaa_database.external.uaa_password": { "value": {"secret" : $db_uaa_password } }, + ".properties.uaa_database.external.uaa_username": { "value": $db_uaa_username }, ".properties.tcp_routing": { "value": "disable" }, ".properties.uaa_database": { "value": "external" }, ".properties.uaa_database.external.host": { "value": $db_host }, From e7c88a39ddad9eca8d6be13a5ecf4431595469bc Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Wed, 19 Dec 2018 18:04:48 +0300 Subject: [PATCH 02/18] get db ssl_ca from gcp --- tasks/configure-ert/task.sh | 12 ++++++++++++ tasks/configure-ert/task.yml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 5654cd56c..15fc86e29 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -103,10 +103,18 @@ if [[ "${pcf_iaas}" == "aws" ]]; then elif [[ "${pcf_iaas}" == "gcp" ]]; then cd terraform-state db_host=$(terraform output --json -state *.tfstate | jq --raw-output '.sql_instance_ip.value') + project=$(terraform output --json -state *.tfstate | jq --raw-output '.project.value') pcf_ert_ssl_cert="$(terraform output -json ert_certificate | jq .value)" pcf_ert_ssl_key="$(terraform output -json ert_certificate_key | jq .value)" cd - + # getting db ca_cert from cloudsql + echo $GCP_SERVICE_ACCOUNT_KEY > app.json + gcloud auth activate-service-account --key-file=app.json + gcloud config set project $project + gcloud sql instances list | grep $db_host | awk '{print $1}' + db_tls_ca=$(gcloud beta sql ssl server-ca-certs list --format='value(cert)' -i pcf21-penguin) + if [ -z "$db_host" ]; then echo Failed to get SQL instance IP from Terraform state file exit 1 @@ -271,8 +279,12 @@ cf_properties=$( ".properties.system_database.external.autoscale_username": { "value": $db_autoscale_username }, ".properties.system_database.external.ccdb_password": { "value": { "secret": $db_ccdb_password } }, ".properties.system_database.external.ccdb_username": { "value": $db_ccdb_username }, + ".properties.credhub_database": { "value": "external" }, + ".properties.credhub_database.external.host": { "value": $db_host }, + ".properties.credhub_database.external.port": { "value": "3306" }, ".properties.credhub_database.external.username": { "value": $db_credhub_username }, ".properties.credhub_database.external.password": { "value": { "secret": $db_credhub_password } }, + ".properties.credhub_database.external.tls_ca": { "value" $db_tls_ca }, ".properties.system_database.external.diego_password": { "value": { "secret": $db_diego_password } }, ".properties.system_database.external.diego_username": { "value": $db_diego_username }, ".properties.system_database.external.host": { "value": $db_host }, diff --git a/tasks/configure-ert/task.yml b/tasks/configure-ert/task.yml index 8ad6c3438..42414d566 100644 --- a/tasks/configure-ert/task.yml +++ b/tasks/configure-ert/task.yml @@ -4,7 +4,7 @@ platform: linux image_resource: type: docker-image source: - repository: pcfnorm/rootfs + repository: poligraph/ubuntu-ci inputs: - name: pcf-pipelines From 3eff6611801469bb5264508d211977a055270c9f Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Wed, 19 Dec 2018 18:13:50 +0300 Subject: [PATCH 03/18] fix typo --- tasks/configure-ert/task.sh | 2 +- tasks/configure-ert/task.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 15fc86e29..293a8758f 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -284,7 +284,7 @@ cf_properties=$( ".properties.credhub_database.external.port": { "value": "3306" }, ".properties.credhub_database.external.username": { "value": $db_credhub_username }, ".properties.credhub_database.external.password": { "value": { "secret": $db_credhub_password } }, - ".properties.credhub_database.external.tls_ca": { "value" $db_tls_ca }, + ".properties.credhub_database.external.tls_ca": { "value": $db_tls_ca }, ".properties.system_database.external.diego_password": { "value": { "secret": $db_diego_password } }, ".properties.system_database.external.diego_username": { "value": $db_diego_username }, ".properties.system_database.external.host": { "value": $db_host }, diff --git a/tasks/configure-ert/task.yml b/tasks/configure-ert/task.yml index 42414d566..be52d552d 100644 --- a/tasks/configure-ert/task.yml +++ b/tasks/configure-ert/task.yml @@ -37,6 +37,7 @@ params: # IaaS Specific for GCP only gcp_storage_access_key: gcp_storage_secret_key: + GCP_SERVICE_ACCOUNT_KEY: # aws specific S3_ENDPOINT: # db credentials From 674a8bba2fc21179e2039f4857485840e549da64 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Wed, 19 Dec 2018 18:58:39 +0300 Subject: [PATCH 04/18] added missed tls ca arg --- tasks/configure-ert/task.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 293a8758f..521b88c63 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -112,8 +112,8 @@ elif [[ "${pcf_iaas}" == "gcp" ]]; then echo $GCP_SERVICE_ACCOUNT_KEY > app.json gcloud auth activate-service-account --key-file=app.json gcloud config set project $project - gcloud sql instances list | grep $db_host | awk '{print $1}' - db_tls_ca=$(gcloud beta sql ssl server-ca-certs list --format='value(cert)' -i pcf21-penguin) + db_name=$(gcloud sql instances list | grep $db_host | awk '{print $1}') + db_tls_ca=$(gcloud beta sql ssl server-ca-certs list --format='value(cert)' -i $db_name) if [ -z "$db_host" ]; then echo Failed to get SQL instance IP from Terraform state file @@ -216,6 +216,7 @@ cf_properties=$( --arg apps_domain "$APPS_DOMAIN" \ --arg mysql_monitor_recipient_email "$mysql_monitor_recipient_email" \ --arg db_host "$db_host" \ + --arg db_tls_ca "$db_tls_ca" \ --arg db_locket_username "$db_locket_username" \ --arg db_locket_password "$db_locket_password" \ --arg db_silk_username "$db_silk_username" \ From 5d56306150c96772ff82a93eeb0f3a61ef2b0e50 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Thu, 20 Dec 2018 15:42:51 +0300 Subject: [PATCH 05/18] remove backup_restore job config --- tasks/configure-ert/task.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 521b88c63..0714987b8 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -155,7 +155,7 @@ cf_resources=$( --argjson internet_connected $INTERNET_CONNECTED \ ' { - "backup_restore": {"internet_connected": $internet_connected}, +# "backup_restore": {"internet_connected": $internet_connected}, #temporarily remove it, does not work in pcf 2.1 "clock_global": {"internet_connected": $internet_connected}, "cloud_controller": {"internet_connected": $internet_connected}, "cloud_controller_worker": {"internet_connected": $internet_connected}, From 76c51cec88d9c2fa6d574dfdd8557bfa039136c9 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Thu, 20 Dec 2018 17:37:38 +0300 Subject: [PATCH 06/18] add config for missing jobs in 2.1.18 --- tasks/configure-ert/task.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 0714987b8..4bb774342 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -156,6 +156,9 @@ cf_resources=$( ' { # "backup_restore": {"internet_connected": $internet_connected}, #temporarily remove it, does not work in pcf 2.1 + "backup-prepare": {"internet_connected": $internet_connected}, # pas 2.1.18 + "consul_server": {"internet_connected": $internet_connected}, # pas 2.1.18 + "service-discovery-controller": {"internet_connected": $internet_connected}, # pas 2.1.18 "clock_global": {"internet_connected": $internet_connected}, "cloud_controller": {"internet_connected": $internet_connected}, "cloud_controller_worker": {"internet_connected": $internet_connected}, From c54c198432df5320f03c17ba1aa534a359fff319 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Thu, 20 Dec 2018 19:17:37 +0300 Subject: [PATCH 07/18] added logic to catch proper jobs config --- tasks/configure-ert/task.sh | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 4bb774342..e52806853 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -148,17 +148,28 @@ cf_network=$( ' ) +# getting PAS version and depending on it - configure jobs +pas_version=$(om-linux \ + --target https://$OPSMAN_DOMAIN_OR_IP_ADDRESS \ + --username "$OPS_MGR_USR" \ + --password "$OPS_MGR_PWD" \ + --skip-ssl-validation \ + staged-products | grep cf | awk '{print $4}') + +# not the best solution to get pas version family +[[ $pas_version =~ ^2\.1 ]] && pas="2.1" +[[ $pas_version =~ ^2\.2 ]] && pas="2.2" +[[ $pas_version =~ ^2\.3 ]] && pas="2.3" + + cf_resources=$( jq -n \ --arg terraform_prefix $terraform_prefix \ --arg iaas $pcf_iaas \ + --arg pas $pas \ --argjson internet_connected $INTERNET_CONNECTED \ ' { -# "backup_restore": {"internet_connected": $internet_connected}, #temporarily remove it, does not work in pcf 2.1 - "backup-prepare": {"internet_connected": $internet_connected}, # pas 2.1.18 - "consul_server": {"internet_connected": $internet_connected}, # pas 2.1.18 - "service-discovery-controller": {"internet_connected": $internet_connected}, # pas 2.1.18 "clock_global": {"internet_connected": $internet_connected}, "cloud_controller": {"internet_connected": $internet_connected}, "cloud_controller_worker": {"internet_connected": $internet_connected}, @@ -183,6 +194,18 @@ cf_resources=$( | + if $pas == "2.1" then + . |= . + { "backup-prepare": {"internet_connected": $internet_connected} } + | . |= . + { "consul_server": {"internet_connected": $internet_connected} } + | . |= . + { "service-discovery-controller": {"internet_connected": $internet_connected} } + elif $pas == "2.3" then + . |= . + { "backup_restore": {"internet_connected": $internet_connected} } + else + . + end + + | + # ELBs if $iaas == "aws" then From ebf6c55cd653124c307c7c103e244b808be6dbf1 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 21 Dec 2018 12:11:48 +0300 Subject: [PATCH 08/18] added config for pcf 2.2 --- tasks/configure-ert/task.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index e52806853..9c61fb646 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -154,12 +154,13 @@ pas_version=$(om-linux \ --username "$OPS_MGR_USR" \ --password "$OPS_MGR_PWD" \ --skip-ssl-validation \ - staged-products | grep cf | awk '{print $4}') + staged-products -f json | jq -r '.[] | select(.name=="cf") | .version') -# not the best solution to get pas version family +# not the best solution to get pas version family, need to be improved [[ $pas_version =~ ^2\.1 ]] && pas="2.1" [[ $pas_version =~ ^2\.2 ]] && pas="2.2" [[ $pas_version =~ ^2\.3 ]] && pas="2.3" +[[ $pas_version =~ ^2\.4 ]] && pas="2.4" cf_resources=$( @@ -194,7 +195,7 @@ cf_resources=$( | - if $pas == "2.1" then + if ( $pas == "2.1" or $pas == "2.2" ) then . |= . + { "backup-prepare": {"internet_connected": $internet_connected} } | . |= . + { "consul_server": {"internet_connected": $internet_connected} } | . |= . + { "service-discovery-controller": {"internet_connected": $internet_connected} } From c996e393e887a85430ea891cccb626cb71b159e5 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 21 Dec 2018 12:26:34 +0300 Subject: [PATCH 09/18] changed options order for om-linux --- tasks/configure-ert/task.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 9c61fb646..5bb31e36e 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -149,12 +149,11 @@ cf_network=$( ) # getting PAS version and depending on it - configure jobs -pas_version=$(om-linux \ +pas_version=$(om-linux -f json \ --target https://$OPSMAN_DOMAIN_OR_IP_ADDRESS \ --username "$OPS_MGR_USR" \ --password "$OPS_MGR_PWD" \ - --skip-ssl-validation \ - staged-products -f json | jq -r '.[] | select(.name=="cf") | .version') + --skip-ssl-validation staged-products | jq -r '.[] | select(.name=="cf") | .version') # not the best solution to get pas version family, need to be improved [[ $pas_version =~ ^2\.1 ]] && pas="2.1" From ffd624d7630520ea4c3fc8f4a1ee8d6ceff3a420 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 21 Dec 2018 14:30:17 +0300 Subject: [PATCH 10/18] added support for pcf 2.4 --- tasks/configure-ert/task.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 5bb31e36e..ffa6ace69 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -198,7 +198,7 @@ cf_resources=$( . |= . + { "backup-prepare": {"internet_connected": $internet_connected} } | . |= . + { "consul_server": {"internet_connected": $internet_connected} } | . |= . + { "service-discovery-controller": {"internet_connected": $internet_connected} } - elif $pas == "2.3" then + elif ( $pas == "2.3" or $pas == "2.4" ) then . |= . + { "backup_restore": {"internet_connected": $internet_connected} } else . From b18673dfece0cb7f7477c177ba1b7a560b1f7688 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 21 Dec 2018 18:03:22 +0300 Subject: [PATCH 11/18] added servicekey var --- install-pcf/gcp/pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/install-pcf/gcp/pipeline.yml b/install-pcf/gcp/pipeline.yml index dbf84cbfb..f5c6337d4 100644 --- a/install-pcf/gcp/pipeline.yml +++ b/install-pcf/gcp/pipeline.yml @@ -265,6 +265,7 @@ jobs: POE_SSL_KEY1: {{poe_ssl_key1}} gcp_storage_access_key: {{gcp_storage_access_key}} gcp_storage_secret_key: {{gcp_storage_secret_key}} + GCP_SERVICE_ACCOUNT_KEY: {{gcp_service_account_key}} PCF_ERT_DOMAIN: {{pcf_ert_domain}} SYSTEM_DOMAIN: {{system_domain}} APPS_DOMAIN: {{apps_domain}} From 31c2cb25a904bf67a438f163b789acf2fc7d7358 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 21 Dec 2018 18:16:07 +0300 Subject: [PATCH 12/18] switch back to pcfnorm image --- tasks/configure-ert/task.sh | 5 +++++ tasks/configure-ert/task.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index ffa6ace69..388916e0a 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -2,6 +2,11 @@ set -euo pipefail +# install gcloud sdk, its actually should be bundled in pcfnorm/rootfs image +wget -c https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-228.0.0-linux-x86_64.tar.gz +tar -zxvf google-cloud-sdk-228.0.0-linux-x86_64.tar.gz +./google-cloud-sdk/install.sh -q + export OPSMAN_DOMAIN_OR_IP_ADDRESS="opsman.$PCF_ERT_DOMAIN" source pcf-pipelines/functions/generate_cert.sh diff --git a/tasks/configure-ert/task.yml b/tasks/configure-ert/task.yml index be52d552d..15c4ac7a7 100644 --- a/tasks/configure-ert/task.yml +++ b/tasks/configure-ert/task.yml @@ -4,7 +4,7 @@ platform: linux image_resource: type: docker-image source: - repository: poligraph/ubuntu-ci + repository: pcfnorm/rootfs inputs: - name: pcf-pipelines From 7b2b06d75673a04059850a1fdc0ead9a1824a22f Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 21 Dec 2018 22:10:11 +0300 Subject: [PATCH 13/18] install gcloud from repo --- tasks/configure-ert/task.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 388916e0a..82dd4f578 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -3,9 +3,13 @@ set -euo pipefail # install gcloud sdk, its actually should be bundled in pcfnorm/rootfs image -wget -c https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-228.0.0-linux-x86_64.tar.gz -tar -zxvf google-cloud-sdk-228.0.0-linux-x86_64.tar.gz -./google-cloud-sdk/install.sh -q +mkdir -p /etc/apt/sources.list.d/ +mkdir -p /etc/apt/apt.conf.d/ +mkdir -p /etc/apt/preferences.d/ +export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" +echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list +curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - +apt-get update && apt-get install google-cloud-sdk export OPSMAN_DOMAIN_OR_IP_ADDRESS="opsman.$PCF_ERT_DOMAIN" From e8a6033118db141c67bd3a5605fef4a66568e1ba Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Thu, 27 Dec 2018 15:33:08 +0300 Subject: [PATCH 14/18] disable bosh retries --- install-pcf/gcp/tasks/config-director/task.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-pcf/gcp/tasks/config-director/task.sh b/install-pcf/gcp/tasks/config-director/task.sh index 48515c190..d34b6a6c6 100755 --- a/install-pcf/gcp/tasks/config-director/task.sh +++ b/install-pcf/gcp/tasks/config-director/task.sh @@ -123,7 +123,7 @@ director_config=$(cat <<-EOF { "ntp_servers_string": "0.pool.ntp.org", "resurrector_enabled": true, - "retry_bosh_deploys": true, + "retry_bosh_deploys": false, "database_type": "internal", "blobstore_type": "local" } From 5c581634ab092b18d88cf0d2ff1ab7321aa6c4b2 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 26 Apr 2019 13:06:22 +0300 Subject: [PATCH 15/18] changed names for PCF 2.5 support --- install-pcf/gcp/tasks/create-infrastructure/task.sh | 2 +- install-pcf/gcp/tasks/upload-opsman/task.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install-pcf/gcp/tasks/create-infrastructure/task.sh b/install-pcf/gcp/tasks/create-infrastructure/task.sh index 6fa22645e..4e13c840c 100755 --- a/install-pcf/gcp/tasks/create-infrastructure/task.sh +++ b/install-pcf/gcp/tasks/create-infrastructure/task.sh @@ -4,7 +4,7 @@ set -eu root=$PWD # us: ops-manager-us/pcf-gcp-1.9.2.tar.gz -> ops-manager-us/pcf-gcp-1.9.2.tar.gz -pcf_opsman_bucket_path=$(grep -i 'us:.*.tar.gz' pivnet-opsmgr/*GCP.yml | cut -d' ' -f2) +pcf_opsman_bucket_path=$(grep -i 'us:.*.tar.gz' pivnet-opsmgr/ops-manager-gcp*.yml | cut -d' ' -f2) # ops-manager-us/pcf-gcp-1.9.2.tar.gz -> opsman-pcf-gcp-1-9-2 pcf_opsman_image_name=$(echo $pcf_opsman_bucket_path | sed 's%.*/\(.*\).tar.gz%opsman-\1%' | sed 's/\./-/g') diff --git a/install-pcf/gcp/tasks/upload-opsman/task.sh b/install-pcf/gcp/tasks/upload-opsman/task.sh index 37159567a..591e0a2b5 100755 --- a/install-pcf/gcp/tasks/upload-opsman/task.sh +++ b/install-pcf/gcp/tasks/upload-opsman/task.sh @@ -8,7 +8,7 @@ gcloud config set project $GCP_PROJECT_ID gcloud config set compute/region $GCP_REGION # us: ops-manager-us/pcf-gcp-1.9.2.tar.gz -> ops-manager-us/pcf-gcp-1.9.2.tar.gz -pcf_opsman_bucket_path=$(grep -i 'us:.*.tar.gz' pivnet-opsmgr/*GCP.yml | cut -d' ' -f2) +pcf_opsman_bucket_path=$(grep -i 'us:.*.tar.gz' pivnet-opsmgr/ops-manager-gcp*.yml | cut -d' ' -f2) # ops-manager-us/pcf-gcp-1.9.2.tar.gz -> opsman-pcf-gcp-1-9-2 pcf_opsman_image_name=$(echo $pcf_opsman_bucket_path | sed 's%.*/\(.*\).tar.gz%opsman-\1%' | sed 's/\./-/g') From 4c2ea4c449f3bc2cd7d3067aeedfdbc9b7d4004d Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 26 Apr 2019 15:00:22 +0300 Subject: [PATCH 16/18] added new pivnet-cli version --- tasks/upload-product-and-stemcell/task.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/upload-product-and-stemcell/task.sh b/tasks/upload-product-and-stemcell/task.sh index e0ce384c0..ab4911bca 100755 --- a/tasks/upload-product-and-stemcell/task.sh +++ b/tasks/upload-product-and-stemcell/task.sh @@ -6,6 +6,8 @@ if [[ -n "$NO_PROXY" ]]; then echo "$OM_IP $OPSMAN_DOMAIN_OR_IP_ADDRESS" >> /etc/hosts fi +curl -o /usr/local/bin/pivnet-cli -L https://github.com/pivotal-cf/pivnet-cli/releases/download/v0.0.57/pivnet-linux-amd64-0.0.57 + STEMCELL_VERSION=$( cat ./pivnet-product/metadata.json | jq --raw-output \ From 877f82e0abaca542b074f7db62e668a16effb4d8 Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 26 Apr 2019 15:27:07 +0300 Subject: [PATCH 17/18] changed conditions --- tasks/configure-ert/task.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 82dd4f578..688fd36cd 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -169,6 +169,7 @@ pas_version=$(om-linux -f json \ [[ $pas_version =~ ^2\.2 ]] && pas="2.2" [[ $pas_version =~ ^2\.3 ]] && pas="2.3" [[ $pas_version =~ ^2\.4 ]] && pas="2.4" +[[ $pas_version =~ ^2\.5 ]] && pas="2.5" cf_resources=$( @@ -207,7 +208,7 @@ cf_resources=$( . |= . + { "backup-prepare": {"internet_connected": $internet_connected} } | . |= . + { "consul_server": {"internet_connected": $internet_connected} } | . |= . + { "service-discovery-controller": {"internet_connected": $internet_connected} } - elif ( $pas == "2.3" or $pas == "2.4" ) then + elif [ $pas == "2.3" ] || ( [ $pas == "2.4" ] || [ $pas == "2.5" ]) then . |= . + { "backup_restore": {"internet_connected": $internet_connected} } else . From 04a3eaf3687c5da3993d5ff7ec1f7adbc414610d Mon Sep 17 00:00:00 2001 From: Konstantin Burtsev Date: Fri, 26 Apr 2019 15:32:56 +0300 Subject: [PATCH 18/18] fixed condition --- tasks/configure-ert/task.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/configure-ert/task.sh b/tasks/configure-ert/task.sh index 688fd36cd..88b9bc89a 100755 --- a/tasks/configure-ert/task.sh +++ b/tasks/configure-ert/task.sh @@ -208,7 +208,7 @@ cf_resources=$( . |= . + { "backup-prepare": {"internet_connected": $internet_connected} } | . |= . + { "consul_server": {"internet_connected": $internet_connected} } | . |= . + { "service-discovery-controller": {"internet_connected": $internet_connected} } - elif [ $pas == "2.3" ] || ( [ $pas == "2.4" ] || [ $pas == "2.5" ]) then + elif ( $pas >= "2.3" ) then . |= . + { "backup_restore": {"internet_connected": $internet_connected} } else .