From 1a04b4516572409f59429d4710a73d77f861fe8f Mon Sep 17 00:00:00 2001 From: Anuj Chaudhari Date: Sat, 28 Sep 2024 21:09:49 -0700 Subject: [PATCH] Update documentation to use new `tanzu-cli-installer-packages` repo for APT/RPM packages and new Public Key (#816) * Update documentation to use new `tanzu-cli-installer-packages` repo for APT/RPM packages and new Public Key * Update repo location and key in apt/rpm packages and plugin templates --- .../plugintemplates/github_workflow_build.yaml.tmpl | 2 +- .../template/plugintemplates/gitlab-ci.yml.tmpl | 2 +- docs/quickstart/install.md | 8 ++++---- hack/apt/README.md | 10 +++++----- hack/apt/build_package_repo.sh | 2 +- hack/rpm/README.md | 10 +++++----- hack/rpm/build_package.sh | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cmd/plugin/builder/template/plugintemplates/github_workflow_build.yaml.tmpl b/cmd/plugin/builder/template/plugintemplates/github_workflow_build.yaml.tmpl index b55cfa96c..f3fb4c92a 100644 --- a/cmd/plugin/builder/template/plugintemplates/github_workflow_build.yaml.tmpl +++ b/cmd/plugin/builder/template/plugintemplates/github_workflow_build.yaml.tmpl @@ -26,7 +26,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y ca-certificates - sudo echo "deb https://storage.googleapis.com/tanzu-cli-os-packages/apt tanzu-cli-jessie main" | sudo tee /etc/apt/sources.list.d/tanzu.list + sudo echo "deb https://storage.googleapis.com/tanzu-cli-installer-packages/apt tanzu-cli-jessie main" | sudo tee /etc/apt/sources.list.d/tanzu.list sudo apt-get update --allow-insecure-repositories sudo apt-get install -y tanzu-cli --allow-unauthenticated tanzu ceip-participation set false diff --git a/cmd/plugin/builder/template/plugintemplates/gitlab-ci.yml.tmpl b/cmd/plugin/builder/template/plugintemplates/gitlab-ci.yml.tmpl index 4b972e69f..6b00f8472 100644 --- a/cmd/plugin/builder/template/plugintemplates/gitlab-ci.yml.tmpl +++ b/cmd/plugin/builder/template/plugintemplates/gitlab-ci.yml.tmpl @@ -9,7 +9,7 @@ build-job: script: - apt-get update - apt-get install -y ca-certificates - - echo "deb https://storage.googleapis.com/tanzu-cli-os-packages/apt tanzu-cli-jessie main" | tee /etc/apt/sources.list.d/tanzu.list + - echo "deb https://storage.googleapis.com/tanzu-cli-installer-packages/apt tanzu-cli-jessie main" | tee /etc/apt/sources.list.d/tanzu.list - apt-get update --allow-insecure-repositories - apt-get install -y tanzu-cli --allow-unauthenticated - tanzu ceip-participation set false diff --git a/docs/quickstart/install.md b/docs/quickstart/install.md index 71d036708..13957c0a7 100644 --- a/docs/quickstart/install.md +++ b/docs/quickstart/install.md @@ -139,8 +139,8 @@ To uninstall: `choco uninstall tanzu-cli-unstable` sudo apt update sudo apt install -y ca-certificates curl gpg sudo mkdir -p /etc/apt/keyrings -curl -fsSL https://packages-prod.broadcom.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub | sudo gpg --dearmor -o /etc/apt/keyrings/tanzu-archive-keyring.gpg -echo "deb [signed-by=/etc/apt/keyrings/tanzu-archive-keyring.gpg] https://storage.googleapis.com/tanzu-cli-os-packages/apt tanzu-cli-jessie main" | sudo tee /etc/apt/sources.list.d/tanzu.list +curl -fsSL https://storage.googleapis.com/tanzu-cli-installer-packages/keys/TANZU-PACKAGING-GPG-RSA-KEY.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/tanzu-archive-keyring.gpg +echo "deb [signed-by=/etc/apt/keyrings/tanzu-archive-keyring.gpg] https://storage.googleapis.com/tanzu-cli-installer-packages/apt tanzu-cli-jessie main" | sudo tee /etc/apt/sources.list.d/tanzu.list sudo apt update sudo apt install -y tanzu-cli ``` @@ -192,11 +192,11 @@ To uninstall: `sudo apt remove tanzu-cli-unstable` cat << EOF | sudo tee /etc/yum.repos.d/tanzu-cli.repo [tanzu-cli] name=Tanzu CLI -baseurl=https://storage.googleapis.com/tanzu-cli-os-packages/rpm/tanzu-cli +baseurl=https://storage.googleapis.com/tanzu-cli-installer-packages/rpm/tanzu-cli enabled=1 gpgcheck=1 repo_gpgcheck=1 -gpgkey=https://packages-prod.broadcom.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub +gpgkey=https://storage.googleapis.com/tanzu-cli-installer-packages/keys/TANZU-PACKAGING-GPG-RSA-KEY.gpg EOF sudo yum install -y tanzu-cli # dnf install can also be used diff --git a/hack/apt/README.md b/hack/apt/README.md index 5d5a101f2..e4568dd6b 100644 --- a/hack/apt/README.md +++ b/hack/apt/README.md @@ -30,7 +30,7 @@ run the `hack/apt/build_package*.sh` scripts. The remote location of the existing repository can be overridden by setting the variable `DEB_METADATA_BASE_URI`. For example, the default value for -this variable is currently `https://storage.googleapis.com/tanzu-cli-os-packages` +this variable is currently `https://storage.googleapis.com/tanzu-cli-installer-packages` ### Pre-requisite @@ -82,7 +82,7 @@ apt install -y tanzu-cli-unstable --allow-unauthenticated ## Publishing the package to GCloud The GCloud bucket dedicated to hosting the Tanzu CLI OS packages is -gs://tanzu-cli-os-packages`. +gs://tanzu-cli-installer-packages`. Building the Debian repository incrementally means that we create the repository metadata for the new package version *and* for any existing packages on @@ -92,7 +92,7 @@ built `hack/apt/_output/apt` on top of the existing bucket's `apt` directory. This can be done using the `gcloud` CLI: ```bash -gcloud storage cp -r hack/apt/_output/apt gs://tanzu-cli-os-packages +gcloud storage cp -r hack/apt/_output/apt gs://tanzu-cli-installer-packages ``` This will effectively: @@ -115,8 +115,8 @@ $ docker run --rm -it ubuntu apt update apt install -y ca-certificates curl gpg mkdir -p /etc/apt/keyrings -curl -fsSL https://packages-prod.broadcom.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub | gpg --dearmor -o /etc/apt/keyrings/tanzu-archive-keyring.gpg -echo "deb [signed-by=/etc/apt/keyrings/tanzu-archive-keyring.gpg] https://storage.googleapis.com/tanzu-cli-os-packages/apt tanzu-cli-jessie main" | tee /etc/apt/sources.list.d/tanzu.list +curl -fsSL https://storage.googleapis.com/tanzu-cli-installer-packages/keys/TANZU-PACKAGING-GPG-RSA-KEY.gpg | gpg --dearmor -o /etc/apt/keyrings/tanzu-archive-keyring.gpg +echo "deb [signed-by=/etc/apt/keyrings/tanzu-archive-keyring.gpg] https://storage.googleapis.com/tanzu-cli-installer-packages/apt tanzu-cli-jessie main" | tee /etc/apt/sources.list.d/tanzu.list apt update apt install -y tanzu-cli ``` diff --git a/hack/apt/build_package_repo.sh b/hack/apt/build_package_repo.sh index 293eb2d91..6e44bfb18 100755 --- a/hack/apt/build_package_repo.sh +++ b/hack/apt/build_package_repo.sh @@ -71,7 +71,7 @@ for arch in amd64 arm64; do # All that is needed from the original repo is to have the original Packages files under: # ${FINAL_DIR}/Packages - DEB_METADATA_BASE_URI=${DEB_METADATA_BASE_URI:=https://storage.googleapis.com/tanzu-cli-os-packages} + DEB_METADATA_BASE_URI=${DEB_METADATA_BASE_URI:=https://storage.googleapis.com/tanzu-cli-installer-packages} mkdir -p ${FINAL_DIR} if [ "${DEB_METADATA_BASE_URI}" = "new" ]; then echo diff --git a/hack/rpm/README.md b/hack/rpm/README.md index ad332170f..1fb04bb8f 100644 --- a/hack/rpm/README.md +++ b/hack/rpm/README.md @@ -26,7 +26,7 @@ target will first start a docker container and then run the The remote location of the existing repository can be overridden by setting the variable `RPM_METADATA_BASE_URI`. For example, the default value for -this variable is currently `https://storage.googleapis.com/tanzu-cli-os-packages` +this variable is currently `https://storage.googleapis.com/tanzu-cli-installer-packages` ### Pre-requisite @@ -78,7 +78,7 @@ yum install -y tanzu-cli-unstable ## Publishing the package to GCloud The GCloud bucket dedicated to hosting the Tanzu CLI OS packages is -gs://tanzu-cli-os-packages`. +gs://tanzu-cli-installer-packages`. Building the RPM repository incrementally means that we create the repository metadata for the new package version *and* for any existing packages on @@ -88,7 +88,7 @@ built `hack/rpm/_output/rpm` on top of the existing bucket's `rpm` directory. This can be done using the `gcloud` CLI: ```bash -gcloud storage cp -r hack/rpm/_output/rpm gs://tanzu-cli-os-packages +gcloud storage cp -r hack/rpm/_output/rpm gs://tanzu-cli-installer-packages ``` This will effectively: @@ -111,11 +111,11 @@ $ docker run --rm -it fedora cat << EOF | sudo tee /etc/yum.repos.d/tanzu-cli.repo [tanzu-cli] name=Tanzu CLI -baseurl=https://storage.googleapis.com/tanzu-cli-os-packages/rpm/tanzu-cli +baseurl=https://storage.googleapis.com/tanzu-cli-installer-packages/rpm/tanzu-cli enabled=1 gpgcheck=1 repo_gpgcheck=1 -gpgkey=https://packages-prod.broadcom.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub +gpgkey=https://storage.googleapis.com/tanzu-cli-installer-packages/keys/TANZU-PACKAGING-GPG-RSA-KEY.gpg EOF yum install -y tanzu-cli ``` diff --git a/hack/rpm/build_package.sh b/hack/rpm/build_package.sh index 61c6524e9..71cd32da5 100755 --- a/hack/rpm/build_package.sh +++ b/hack/rpm/build_package.sh @@ -98,8 +98,8 @@ done ###################### # Prepare the existing repository info so we can sync from it -RPM_METADATA_BASE_URI=${RPM_METADATA_BASE_URI:=https://storage.googleapis.com/tanzu-cli-os-packages} -RPM_REPO_GPG_PUBLIC_KEY_URI=${RPM_REPO_GPG_PUBLIC_KEY_URI:=https://packages-prod.broadcom.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub} +RPM_METADATA_BASE_URI=${RPM_METADATA_BASE_URI:=https://storage.googleapis.com/tanzu-cli-installer-packages} +RPM_REPO_GPG_PUBLIC_KEY_URI=${RPM_REPO_GPG_PUBLIC_KEY_URI:=https://storage.googleapis.com/tanzu-cli-installer-packages/keys/TANZU-PACKAGING-GPG-RSA-KEY.gpg} if [ "${RPM_METADATA_BASE_URI}" = "new" ]; then echo echo "Building a brand new repository"