Update Apigee Edge 4.16.01.x to latest 4.16.01 release

This document contains the procedure that you use to update your existing 4.16.01 installation to use the latest RPMs and support files from Apigee. This procedure uses the update.sh utility to perform the update.

Which Edge versions can you update to the latest 4.16.01 release

You can only update an existing Apigee Edge version 4.16.01.x installation to the latest 4.16.01 release.

If you are currently running Edge version 4.15.07.0x or earlier, you must first migrate to 4.16.01. See the Apigee Edge 4.16.01 Installation Guide, available on the Apigee ftp site: ftp://ftp.apigee.com/, for information on how to migrate to version 4.16.01 from version 4.15.07.0x or earlier.

Who can perform the update

The user running the update should be the same as the user who originally installed Edge, or a user running as root.

After you install the Edge RPMs, any user can configure them.

Disk space requirements for update

Ensure that you have at least 1 GBytes of free disk space before you perform the update.

Automatic propagation of property settings from 4.16.01.x

If you have set any properties by editing .properties files in /opt/apigee/customer/application then these values are retained by the update.

Update prerequisites

Take care of following prerequisites before upgrading Apigee Edge:

  • Backup all nodes
    Before you update, it is recommended to perform a complete backup of all nodes for safety reasons. Use the procedure for your current version of Edge to perform the backup.

    This allows you to have a backup plan, in case the update to a new version doesn’t function properly. For more information on backup, see the Apigee Edge 4.16.01 Operations Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/.
  • Ensure Edge is running
    Ensure that Edge is up and running during update process by using the command:

    > /<inst_root>/apigee/apigee-service/bin/apigee-all status

Handling a failed update

In the case of an update failure, you can try to correct the issue, and then run update.sh again. You can run the update multiple times and it continues the update from where it last left off.

If the failure requires that you roll back the update to your previous version, see the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/

Logging update information

By default, the update.sh utility writes log information to:

/opt/apigee/var/log/apigee-setup/update.log

If the user running the update.sh utility does not have access to that directory, it writes the log to the /tmp directory as a file named update_username.log.

If the user does not have access to /tmp, the update.sh utility fails.

Zero-downtime update

A zero-downtime update, or rolling update, lets you update your Edge installation without bringing down Edge.

The key to zero-downtime upgrading is to remove each Router, one at a time, from the load balancer. You then update the Router and any other components on the same machine as the Router, and then add the Router back to the load balancer.

  1. Update the machines in the correct order for your installation as described below in "Order of machine update".
  2. When it is time to update the Routers, select any one Router and make it unreachable, as described in the next section "Making a Router and Message Processor unreachable".
  3. Update the selected Router and all other Edge components on the same machine as the Router. All Edge configurations show a Router and Message Processor on the same node.
  4. Make the Router reachable again.
  5. Repeat steps 2 through 4 for the remaining Routers.
  6. Continue the update for any remaining machines in your installation.

Making a Router and Message Processor unreachable

In a production setup, you will have multiple Routers and Message Processors to achieve optimal performance and you must enable/disable reachability of these Routers and Message Processors before/after update.

The following API call configures a node as reachable or unreachable:

> curl -u adminEmail:pWord -X POST "http://<ms_IP>:8080/v1/servers/UUID" -d "reachable=true|false"

where UUID is the UUID of the Message Processor or Router, and reachable is set to either true or false.

If you need to determine the UUID of the Router, use the following cURL command:

> curl http://<routerIP>:8081/v1/servers/self

If you need to determine the UUID of the Message Processor, use the following cURL command:

> curl http://<mpIP>:8082/v1/servers/self

Take care of the following before/after update:

  • On combined Router and Message Processor node:
    • Before update – perform the following:
      1. Make the Router unreachable by using the API call shown above.
      2. Make the Message Processor unreachable.
    • After update - perform the following:
      1. Make the Message Processor reachable.
      2. Make the Router reachable.
  • On single Router node:
    • Before update, make the Router reachable.
    • After update, make the Router reachable.
  • On single Message Processor node:
    • Before update, make the Message Processor unreachable.
    • After update, make the Message Processor reachable.

Using a silent configuration file

You must pass a silent configuration file to the update command. The silent configuration file should be the same one you used to instal Edge 4.16.01.

Procedure for updating 4.16.01 on a node with an external internet connection

Use the following procedure to update the Edge components on a node:

  1. If present, disable any CRON jobs configured to perform a repair operation on Cassandra until after the update completes.
  2. Log in to your node as root to install the Edge RPMs
    Note: While RPM installation requires root access, you can perform Edge configuration without root access.
  3. Disable SELinux as described in the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/
  4. Clean all Yum caches:
    > sudo yum clean all
  5. Download the latest Edge bootstrap.sh file to /tmp/bootstrap.sh:
    > curl https://software.apigee.com/bootstrap.sh -o /tmp/bootstrap.sh
  6. Update the Edge apigee-service utility and dependencies:
    > sudo bash /tmp/bootstrap.sh apigeeuser=uName apigeepassword=pWord

    where uName:pWord are the username and password you received from Apigee. If you omit pWord, you will be prompted to enter it.
  7. Use apigee-service to update the apigee-setup utility:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-setup update
    This update to apigee-service installs the update.sh utility in <inst_dir>/apigee/apigee-setup/bin.
  8. Run the update utility on your nodes in the order described below in "Order of machine update" below:
    > /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile
    The only requirement on the config file is that the configuration file must be accessible or readable by the "apigee" user. For example, put the file in the /tmp directory on the node.
    Use the “-c” option to specify the component to update. The list of possible components includes:
    • ldap = OpenLDAP
    • cs = Cassandr
    • zk = Zookeeper
    • qpid = qpidd
    • ps = postgresql
    • edge =All Edge components except Edge UI: Management Server, Message Processor, Router, QPID Server, Postgres Server
    • ui = Edge UI
    • all = update all components on machine (only use for an Edge aio installation profile or an API BaaS asa installation profile)
    • e = ElasticSearch
    • b = API BaaS Stack
    • p = API BaaS Portal
    • ebp = ElasticSearch, API BaaS Stack, and API BaaS Portal on the same node
  9. Test the update by running the apigee-validate utility on the Message Processor, as described in the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/

Procedure for updating 4.16.01 from a local repo

If your Edge nodes are behind a firewall, or in some other way are prohibited from accessing the Apigee repository over the Internet, then you can perform the update from a local repository, or mirror, of the Apigee repo.

After you create a local Edge repository, you have two options for updating Edge from the local repo:

  • Create a .tar file of the repo, copy the .tar file to a node, and then update Edge from the .tar file.
  • Install a webserver on the node with the local repo so that other nodes can access it. Apigee provides the Nginx webserver for you to use, or you can use your own webserver.

To update from a local 4.16.01 repo:

  1. Ensure you have a local 4.16.01 repo as described in the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/
  2. Update the local repo:
    1. Download the latest Edge bootstrap.sh file to /tmp/bootstrap.sh:
      > curl https://software.apigee.com/bootstrap.sh -o /tmp/bootstrap.sh
    2. Perform the sync:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync --only-new-rpms
  3. To install apigee-service from a .tar file:
    1. On the node with the local repo, use the following command to package the local repo into a single .tar file named /opt/apigee/data/apigee-mirror/apigee-4.16.01.tar.gz:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror package
    2. Copy the .tar file to the node where you want to update Edge. For example, copy it to the /tmp directory on the new node.
    3. On the new node, untar the file to the /tmp directory:
      > tar -xzf apigee-4.16.01.tar.gz
      This command creates a new directory, named repos, in the directory containing the .tar file. For example /tmp/repos.
    4. Log in to your node as root to install the Edge RPMs
      Note: While RPM installation requires root access, you can perform Edge configuration without root access.
    5. Disable SELinux as described in the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/
    6. Install the Edge apigee-service utility and dependencies from /tmp/repos:
      > sudo bash /tmp/repos/bootstrap.sh apigeeprotocol="file://" apigeerepobasepath=/tmp/repos
      Notice that you include the path to the repos directory in this command.
  4. To install apigee-service using the Nginx webserver:
    1. Configure the Nginx web server as described in "Install from the repo using the Nginx webserver" in the Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/
    2. On the remote node, download the Edge bootstrap.sh file to /tmp/bootstrap.sh:
      > /usr/bin/curl http://uName:pWord@remoteRepo:3939/bootstrap.sh -o /tmp/bootstrap.sh
                

      where uName:pWord are the username and password you set above for the repo, and remoteRepo is the IP address or DNS name of the repo node.

    3. Log in to your node as root to install the Edge RPMs
      Note: While RPM installation requires root access, you can perform Edge configuration without root access.
    4. Disable SELinux as described in the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/
    5. On the remote node, install the Edge apigee-service utility and dependencies:
      > sudo bash /tmp/bootstrap.sh apigeerepohost=remoteRepo:3939 apigeeuser=uName apigeepassword=pWord apigeeprotocol=http://
      where uName:pWord are the repo username and password.
  5. If present, disable any CRON jobs configured to perform a repair operation on Cassandra until after the update completes.
  6. Use apigee-service to update the apigee-setup utility:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-setup update
    This update to apigee-service installs the update.sh utility in <inst_dir>/apigee/apigee-setup/bin.
  7. Run the update utility on your nodes in the order described below in "Order of machine update" below:
    > /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile
    The only requirement on the config file is that the configuration file must be accessible or readable by the "apigee" user. For example, put the file in the /tmp directory on the node.
    Use the “-c” option to specify the component to update. The list of possible components includes:
    • ldap = OpenLDAP
    • cs = Cassandr
    • zk = Zookeeper
    • qpid = qpidd
    • ps = postgresql
    • edge =All Edge components except Edge UI: Management Server, Message Processor, Router, QPID Server, Postgres Server
    • ui = Edge UI
    • all = update all components on machine (only use for an Edge aio installation profile or an API BaaS asa installation profile)
    • e = ElasticSearch
    • b = API BaaS Stack
    • p = API BaaS Portal
    • ebp = ElasticSearch, API BaaS Stack, and API BaaS Portal on the same node
  8. Test the update by running the apigee-validate utility on the Message Processor, as described in the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/

Order of machine update

The order that you update the machines in an Edge installation is important. The most important considerations to an update are:

  • You must update all Cassandra and ZooKeeper nodes before you update any other nodes.
  • You must update all qpidd and postgresql nodes before you update any Router and Message Processor nodes.
  • For any machine with multiple Edge components (Management Server, Message Processor, Router, QPID Server, Postgres Server), use the "-c edge" option to update them all at the same time.
  • If a step specifies that it should be performed on multiple machines, perform it in the specified machine order.
  • There is no separate step to update Monetization. It is updated when you specify the "-c edge" option.
  • After you update a Router node, you must remove all files from the /opt/nginx/conf.d directory, and then restart the Router.

For a 1-host standalone installation

  1. Update machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c all -f configFile
  2. Delete any files in /opt/nginx/conf.d:
    > rm -f /opt/nginx/conf.d/*
  3. Restart the Edge Router:
    > /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart

For a 2-host standalone installation

See the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/ for the list of Edge topologies and node numbers.

  1. Update Cassandra and ZooKeeper on machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  2. Update qpidd and postgresql on machine 2:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid,ps -f configFile
  3. Update LDAP on machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  4. Update Edge components on machine 2 and machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  5. On node 1:
    1. Delete any files in /opt/nginx/conf.d:
      > rm -f /opt/nginx/conf.d/*
    2. Restart the Edge Router:
      > /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
  6. Update UI on machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile

For a 5-host clustered installation

See the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/ for the list of Edge topologies and node numbers.

  1. Update Cassandra and ZooKeeper on machine 1, 2, and 3:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  2. Update qpidd and postgresql on machine 4 and 5:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid,ps -f configFile
  3. Update LDAP on machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  4. Update Edge components on machine 4, 5, 1, 2, 3:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  5. On node 2 and 3:
    1. Delete any files in /opt/nginx/conf.d:
      > rm -f /opt/nginx/conf.d/*
    2. Restart the Edge Router:
      > /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
  6. Update UI on machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile

For a 9-host clustered installation

See the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/ for the list of Edge topologies and node numbers.

  1. Update Cassandra and ZooKeeper on machine 1, 2, and 3:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  2. Update qpidd on machine 6 and 7:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  3. Update postgresql on machine 8 and 9:
    > /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
  4. Update LDAP on machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  5. Update Edge components on machine 6, 7, 8, 9, 1, 4, and 5 in that order:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  6. On node 4 and 5:
    1. Delete any files in /opt/nginx/conf.d:
      > rm -f /opt/nginx/conf.d/*
    2. Restart the Edge Router:
      > /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
  7. Update UI on machine 1:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile

For a 13-host clustered installation

See the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/ for the list of Edge topologies and node numbers.

  1. Update Cassandra and ZooKeeper on machine 1, 2, and 3:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  2. Update qpidd on machine 12 and 13:
    >
        /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  3. Update postgresql on machine 8 and 9:
    >
        /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
  4. Update LDAP on machine 4 and 5:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  5. Update Edge components on machine 12, 13, 8, 9, 6, 7, 10, and 11 in that order:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  6. On node 10 and 11:
    1. Delete any files in /opt/nginx/conf.d:
      > rm -f /opt/nginx/conf.d/*
    2. Restart the Edge Router:
      > /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
  7. Update UI on machine 6 and 7:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile

For a 12-host clustered installation

See the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/ for the list of Edge topologies and node numbers.

  1. Update Cassandra and ZooKeeper:
    1. On machines 1, 2 and 3 in Data Center 1:
      > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
    2. On machines 7, 8, and 9 in Data Center 2
      > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  2. Update qpidd:
    1. Machines 4, 5 in Data Center 1
      > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
    2. Machines 10, 11 in Data Center 2
      > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  3. Update postgresql:
    1. Machines 6 in Data Center 1
      > /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    2. Machines 12 in Data Center 2
      > /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
  4. Update LDAP:
    1. Machines 1 in Data Center 1
      > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
    2. Machines 7 in Data Center 2
      > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  5. Update Edge components:
    1. Machines 4, 5, 6, 1, 2, 3 in Data Center 1
      > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
    2. Machines 10, 11, 12, 7, 8, 9 in Data Center 2
      > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
    3. On node 2, 3, 8, and 9:
      1. Delete any files in /opt/nginx/conf.d:
        > rm -f /opt/nginx/conf.d/*
      2. Restart the Edge Router:
        > /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
  6. Update UI:
    1. Machine 1 in Data Center 1
      > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
    2. Machine 7 in Data Center 2
      > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile

For a 7-host API BaaS installation

See the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/ for the list of Edge topologies and node numbers.

  1. Update Cassandra on machine 5, 6, and 7:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
  2. Update ElasticSearch and API BaaS Stack on machine 1, 2, and 3:
    > /opt/apigee/apigee-setup/bin/update.sh -c e,b -f configFile
  3. Update API BaaS Portal on machine 4:
    > /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile

For a 10-host API BaaS installation

See the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/ for the list of Edge topologies and node numbers.

  1. Update Cassandra on machine 8, 9, and 10:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
  2. Update ElasticSearch on machine 1, 2, and 3:
    > /opt/apigee/apigee-setup/bin/update.sh -c e -f configFile
  3. Update API BaaS Stack on machine 4, 5, and 6:
    > /opt/apigee/apigee-setup/bin/update.sh -c b -f configFile
  4. Update API BaaS Portal on machine 7:
    > /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile

For a non-standard installation

If you have a non-standard installation, then update Edge components in the following order:

  1. ZooKeeper
  2. Cassandra
  3. qpidd
  4. postgresql
  5. LDAP
  6. Edge, meaning the "-c edge" profile on all nodes in the order: Qpid, Postgres, Management Server, Message Processor, Router.
  7. On all Router nodes:
    1. Delete any files in /opt/nginx/conf.d:
      > rm -f /opt/nginx/conf.d/*
    2. Restart the Edge Router:
      > /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
  8. UI