Etapa 2: configure novamente o diretório de instalação
Identifique o diretório de instalação base que foi criado quando o Apigee híbrido
foi instalado originalmente. O
diretório base é o diretório em que o diretório $APIGEEGTL_HOME reside.
No exemplo a seguir,
o diretório base é /Users/myhome/hybrid:
Extraia o conteúdo do arquivo gzip transferido por download no diretório base do Apigee híbrido:
tar xvzf filename.tar.gz -C path-to-base-directory
cd ao diretório base.
O conteúdo dos arquivos tar é, por padrão, expandido em um diretório com a versão e a
plataforma no nome. Por exemplo, ./apigeectl_1.2.0-f7b96a8_linux_64.
Renomeie o diretório apigeectl atual. Por exemplo, se a versão atual for 1.1.1,
renomeie o diretório apigeectl para apigeectl_1.1.1.
Renomeie o diretório de instalação recém-criado para apigeectl. É para
ele que o ambiente $APIGEECTL_HOME aponta agora.
Etapa 3: atualizar o arquivo de modificação
Faça uma cópia do arquivo de modificações. Lembre-se de salvar o arquivo antigo caso
precise reverter a alteração. Nas etapas a seguir, você fará as alterações necessárias
no arquivo de modificação antes de aplicá-lo ao cluster.
Atualize o arquivo de modificação com as alterações descritas abaixo:
Veja a seguir um resumo das alterações
de configuração que você precisa fazer no arquivo de modificações. Veja um exemplo completo
na tabela após o resumo. Como você verá, a propriedade envs[]
mudou significativamente em relação às versões anteriores:
A propriedade envs[].hostAlias foi removida e substituída pela
nova propriedade virtualhosts.hostAliases[].
Adicione a nova propriedade de configuração obrigatória virtualhosts.
Você precisa mover as propriedades envs[].sslCertPath e envs[].sslKeyPath
de envs
para virtualhosts.
Adicione a estrofe de configuração virtualhosts.routingRules.
A propriedade virtualhosts.routingRules substitui a propriedade envs[].paths
anterior. Se você tiver envs[].paths
no arquivo de modificações, será necessário removê-la. Para mais informações sobre a configuração do host virtual,
consulte Configurar hosts virtuais.
A tabela abaixo ilustra as diferenças entre um arquivo de modificações 1.1.1 e um arquivo de
versão 1.2.0. O exemplo serve para destacar os tipos de alterações que você precisa fazer para a
versão 1.2.0:
Se você ativou o Apigee Connect na instalação da versão 1.1.1, será necessário remover
a implantação:
Primeiro, liste as implantações da Apigee:
kubectl -n namespace get ad
Exclua a implantação do Apigee Connect:
kubectl -n namespace delete ad apigee-connect-name
Liste os pods:
kubectl get pods -n namespace
Exclua o pod apigee-cps-setup do cluster. Use o nome completo do pod, que
inclui o nome da organização, conforme retornado no comando anterior. Exemplo:
kubectl -n namespace delete pod apigee-cps-setup-org
Exclua o pod apigee-cps-create-user no mesmo namespace:
kubectl -n namespace delete pod apigee-cps-create-user
Limpe os jobs concluídos do namespace do ambiente de execução híbrido,
em que namespace é o
namespace especificado no arquivo de modificações, se você especificou um namespace. Caso contrário, o namespace padrão
é apigee:
Quando check-ready responder com "Todos os contêineres estão prontos", tente uma instalação simulada.
Execute o comando apply com a sinalização --dry-run=true. Uma simulação
permite verificar se há erros antes de fazer alteração no cluster.
Execute check-ready novamente para determinar quando o upgrade será concluído.
Como reverter um upgrade
Siga estas etapas para reverter um upgrade anterior:
Limpe os jobs concluídos do namespace do ambiente de execução híbrido,
em que namespace é o
namespace especificado no arquivo de modificações, se você especificou um namespace. Caso contrário, o namespace padrão
é apigee:
No diretório raiz da instalação para a qual você quer reverter, execute apigeectl init
e, em seguida, execute
apigeectl apply. Use o arquivo de modificações original da versão para a qual você
quer reverter:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-28 UTC."],[[["\u003cp\u003eVersion 1.2 of the Apigee hybrid documentation is end-of-life and should be upgraded to a newer version, as version 1.0.0 is not backward compatible with later versions and requires a new installation for upgrade.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading to version 1.2.0 involves upgrading your Kubernetes platform, downloading the release package for your operating system, reconfiguring the installation directory, and updating your overrides file with new properties such as \u003ccode\u003evirtualhosts\u003c/code\u003e and \u003ccode\u003eroutingRules\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo apply the upgrade to the cluster, certain steps must be followed, including removing the Apigee Connect deployment if it exists, deleting specific pods (\u003ccode\u003eapigee-cps-setup\u003c/code\u003e and \u003ccode\u003eapigee-cps-create-user\u003c/code\u003e), cleaning up completed jobs in several namespaces, initializing \u003ccode\u003eapigeectl\u003c/code\u003e, and applying the changes with a dry run first.\u003c/p\u003e\n"],["\u003cp\u003eRolling back an upgrade involves cleaning up completed jobs from previous namespaces, deleting the Apigee Operators deployment, and then switching \u003ccode\u003e$APIGEECTL_HOME\u003c/code\u003e to the original version to re-initialize and apply the old overrides.\u003c/p\u003e\n"]]],[],null,["# Upgrading Apigee hybrid\n\n| You are currently viewing version 1.2 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n| You cannot upgrade from 1.0.0 to any later versions, because they are not backward compatible with Version 1.0.0. If you are using Version 1.0.0 and wish to upgrade, you must perform a new installation.\n\nUpgrading to version 1.2.0\n--------------------------\n\n\nFollow these steps to upgrade Apigee hybrid to version 1.2.0:\n\n### Step 1: Upgrade Kubernetes and download the release package\n\n1. Upgrade your Kubernetes platform as follows. Follow your platform's documentation if you need help:\n\n2. Download the release package for your operating system:\n\n **Mac 64 bit:** \n\n ```\n curl -LO \\\n https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/1.2.0/apigeectl_mac_64.tar.gz\n ```\n\n **Linux 64 bit** \n\n ```\n curl -LO \\\n https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/1.2.0/apigeectl_linux_64.tar.gz\n ```\n\n **Mac 32 bit:** \n\n ```\n curl -LO \\\n https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/1.2.0/apigeectl_mac_32.tar.gz\n ```\n\n **Linux 32 bit** \n\n ```\n curl -LO \\\n https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/1.2.0/apigeectl_linux_32.tar.gz\n ```\n\n### Step 2: Reconfigure your installation directory\n\n1. Identify the base installation directory that was created when Apigee hybrid was [originally installed](/apigee/docs/hybrid/v1.2/install-download-install). The base directory is the directory in which the `$APIGEEGTL_HOME` directory resides. In the following example, the base directory is `/Users/myhome/hybrid`: \n\n ```\n echo $APIGEECTL_HOME\n /Users/myhome/hybrid/apigeectl\n ```\n2. Extract the downloaded gzip file contents into the Apigee hybrid base directory:\n\n ```\n tar xvzf filename.tar.gz -C path-to-base-directory\n ```\n3. `cd` to the base directory.\n4. The tar contents are, by default, expanded into a directory with the version and\n platform in its name. For example: `./apigeectl_1.2.0-f7b96a8_linux_64`.\n\n5. Rename the current `apigeectl` directory. For example, if the current version is 1.1.1, rename the `apigeectl` directory to `apigeectl_1.1.1`.\n6. Rename the newly extracted installation directory to `apigeectl`. This is now where the environment `$APIGEECTL_HOME` points to.\n\n### Step 3: Update your overrides file\n\n1. Make a copy of your overrides file, and be careful to save the old file in case you ever need to roll back. In the following steps, you will make required changes to the overrides file before applying it to the cluster. **NOTE:**To upgrade to version 1.2.0, you must make changes in your overrides file that are incompatible with previous versions. The override file changes described in the next step are required.\n2. Update your overrides file with the changes described below:\n\n Following is a **summary** of the\n configuration changes you must make to your overrides file. A complete example is given\n in the table following the summary. As you will see, the `envs[]`\n property has changed significantly from previous versions:\n - The property `envs[].hostAlias` has been removed and replaced by the new property `virtualhosts.hostAliases[]`. **NOTE:** If you used a single wildcard '\\*' for the environment host alias in a previous version, in version 1.2.0 you MUST use either a fully qualified DNS name or a subdomain wildcard in the virtual host alias configuration. For example: `*.mydomain.com`. The single wildcard character configuration `hostAliases['*']` is no longer supported.\n - You must add the new required configuration property `virtualhosts`.\n - You must move the `envs[].sslCertPath` and `envs[].sslKeyPath` properties from `envs` to `virtualhosts`.\n - You must add the `virtualhosts.routingRules` configuration stanza. The `virtualhosts.routingRules` property replaces the previous `envs[].paths` property. If you have `envs[].paths` in your overrides file, you must remove it. For more information on the virtual host configuration, see [Configure virtual hosts](/apigee/docs/hybrid/v1.2/base-path-routing).\n\n\n The table below illustrates the differences between a 1.1.1 overrides file and a version\n 1.2.0 file. The example is intended to highlight the kinds of changes you need to make for\n version 1.2.0:\n | **NOTE:** The code shown is for example purposes only.\n\n | **NOTE:** If you do not specify `envs[].paths` (as shown in the table above), you can omit the `virtualhosts[].routingRules.paths[]` property in the upgrade. By default, the path is \"/\". For example, if you want to use the default path of \"/\", you can configure the `virtualhosts[].routingRules` like this: \n |\n | ```text\n | virtualhosts:\n | - name: default\n | hostAliases: [\"api.example.com\"]\n | sslCertPath: ./certs/fullchain.pem\n | sslKeyPath: ./certs/privkey.pem\n | routingRules:\n | - env: test1\n | - name: prod\n | hostAliases: [\"api.example.com\"]\n | sslCertPath: ./certs/fullchain.pem\n | sslKeyPath: ./certs/privkey.pem\n | routingRules:\n | - env: test2\n | ```\n\n### Step 4: Apply the upgrade to the cluster\n\n1. If you enabled Apigee Connect in your version 1.1.1 installation, you must remove the deployment:\n 1. First, list the Apigee Deployments: \n\n ```\n kubectl -n namespace get ad\n ```\n 2. Delete the Apigee Connect deployment: \n\n ```\n kubectl -n namespace delete ad apigee-connect-name\n ```\n2. List the pods: \n\n ```\n kubectl get pods -n namespace\n ```\n3. Delete the `apigee-cps-setup` pod from the cluster. Use the pod's full name, which includes your organization name, as returned in the previous command. For example: \n\n ```\n kubectl -n namespace delete pod apigee-cps-setup-org\n ```\n4. Delete the `apigee-cps-create-user` pod in the same namespace: \n\n ```\n kubectl -n namespace delete pod apigee-cps-create-user\n ```\n5. Clean up completed jobs for the hybrid runtime namespace, where \u003cvar translate=\"no\"\u003enamespace\u003c/var\u003e is the namespace specified in your overrides file, if you specified a namespace. If not, the default namespace is `apigee`: \n\n ```\n kubectl delete job -n namespace \\\n $(kubectl get job -n namespace -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')\n ```\n6. Clean up completed jobs for the `apigee-system` namespace: \n\n ```\n kubectl delete job -n apigee-system \\\n $(kubectl get job -n apigee-system -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')\n ```\n7. Clean up completed jobs for the `istio-system` namespace: \n\n ```\n kubectl delete job -n istio-system \\\n $(kubectl get job -n istio-system -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')\n ```\n8. `cd` to the `./hybrid-files` directory:\n9. Initialize `apigeectl` for the new version: \n\n ```\n $APIGEECTL_HOME/apigeectl init -f overrides/overrides-file.yaml\n ```\n10. Check to determine when the initialization is complete: \n\n ```\n $APIGEECTL_HOME/apigeectl check-ready -f overrides/overrides-file.yaml\n ```\n11. When `check-ready` replies with \"All containers are ready\", you can try a \"dry run\" install. Execute the `apply` command with the `--dry-run=true` flag. Doing a dry run lets you check for any errors before any changes are made to the cluster: \n\n ```\n $APIGEECTL_HOME/apigeectl apply -f overrides/overrides-file.yaml --dry-run=true\n ```\n12. If there are no errors, you can apply the [Apigee-specific\n runtime components](/apigee/docs/hybrid/v1.2/what-is-hybrid#about-the-runtime-plane) to the cluster: \n\n ```\n $APIGEECTL_HOME/apigeectl apply -f overrides/overrides-file.yaml\n ```\n13. Re-run `check-ready` to determine when the upgrade is complete.\n\nRolling back an upgrade\n-----------------------\n\n\nFollow these steps to roll back a previous upgrade:\n\n1. Clean up completed jobs for the hybrid runtime namespace, where \u003cvar translate=\"no\"\u003enamespace\u003c/var\u003e is the namespace specified in your overrides file, if you specified a namespace. If not, the default namespace is `apigee`: \n\n ```\n kubectl delete job -n namespace \\\n $(kubectl get job -n namespace -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')\n ```\n2. Clean up completed jobs for the `apigee-system` namespace: \n\n ```\n kubectl delete job -n apigee-system \\\n $(kubectl get job -n apigee-system -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')\n ```\n3. Clean up completed jobs for the `istio-system` namespace: \n\n ```\n kubectl delete job -n istio-system \\\n $(kubectl get job -n istio-system -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')\n ```\n4. Delete the Apigee Operators deployment. This operation will not have any effect on your runtime traffic: \n\n ```\n kubectl -n apigee-system delete deployment apigee-controller-manager\n ```\n5. Change the `$APIGEECTL_HOME` variable to point to the directory that contains the original version of `apigeectl`. For example: \n\n ```\n export APIGEECTL_HOME=path-to-original-apigeectl-directory\n ```\n6. In the root directory of the installation you want to roll back to, run `apigeectl init` and then run `apigeectl apply`. Be sure to use the original overrides file for the version you wish to roll back to: \n\n `$APIGEECTL_HOME`/apigeectl init -f overrides/\u003cvar translate=\"no\"\u003eoriginal-overrides\u003c/var\u003e.yaml\n `$APIGEECTL_HOME`/apigeectl apply -f overrides/\u003cvar translate=\"no\"\u003eoriginal-overrides\u003c/var\u003e.yaml"]]