Developer Services Portal v. 4.17.09
This procedure describes how to upgrade an existing Apigee Developer Channel Services on-premise installation.
Determining the correct update procedure
The procedure that you use to update the portal is based on your current installation:
- If your installation uses Nginx/Postgres, then use Upgrading a portal using RPMs below.
- If your installation uses Apache/MySQL or Apache/MariaDB, then see Convert a tar-based portal to an RPM-based portal.
Determining your current installation type
If you are unsure about your current installation type, use the following command to determine it:
ls /opt
If you are using Nginx/Postgres, you will see the following directories:
/opt/apigee
and/opt/nginx
.If you are using Apache/MySQL or Apache/MariaDB, then these directories should not be present.
/opt/apigee/apigee-service/bin/apigee-all status
If you are using Nginx/Postgres, you will see the following output:
+ apigee-service apigee-drupal-devportal status OK: apigee-drupal-devportal is up and running + apigee-service apigee-lb status apigee-service: apigee-lb: OK + apigee-service apigee-postgresql status apigee-service: apigee-postgresql: OK
apachectl -S
If you are using Apache/MySQL or Apache/MariaDB, then this command should return the web root directory of the portal, in the form:
*:80 192.168.56.102 (/etc/httpd/conf/vhosts/devportal.conf:1)
Default installation directory
The upgrade process assumes that the Developer Portal was installed at:
- 4.17.05 and later:
/opt/apigee/apigee-drupal/wwwroot
- Prior to 4.17.05:
/opt/apigee/apigee-drupal
(Nginx) or/var/www/html
(Apache)
If you did not install the portal in the default directory, modify the paths in the procedure below to use your installation directory.
Supported upgrade versions
This upgrade procedure is supported for the following versions of the portal:
- OPDK-17-01.x
- OPDK-17-05.x
To determine your portal version, open the following URL in a browser:
http://your_portal.com/buildInfo
Before you update
For existing installations, if you have modified any code in Drupal core or in any non-custom
modules, your modifications will be overwritten. This includes, among other things, any changes
you may have made to .htaccess
.
You should assume that anything outside the /sites
directory is owned by Drupal. An
exception to this rule is robots.txt
; if this file exists in the web
root, it will be preserved for you.
Before proceeding with the installation, make a backup of your entire Drupal web root directory. After performing the installation steps described below, you can restore your customizations from the backup.
Upgrading a portal using RPMs
Use the following procedure to update the portal RPM on a node:
-
Change to the Drupal directory. For example,
/opt/apigee/apigee-drupal/wwwroot
.cd /opt/apigee/apigee-drupal/wwwroot
See Default installation directory for the default directory of your product version.
- Backup your Drupal database instance. The
pg_dump
command creates a copy of the database:
pg_dump --dbname=devportal --host=192.168.56.101 --username=drupaladmin --password --format=c > /tmp/portal.dmp
where:
dbname
specifies the database name as specified by thePG_NAME
property in the portal installation configuration file.host
specifies the IP address of the portal node.username
specifies the Postgres username used by the portal to access the database as specified by theDRUPAL_PG_USER
property in the portal installation configuration file.- You are prompted for the Postgres user password as defined by the
DRUPAL_PG_PASS
property in the portal installation configuration file.
If you later have to restore from the backup, use the command:
pg_restore --clean --dbname=devportal --host=localhost --username=apigee < /tmp/portal.dmp
- Make a backup of your entire Drupal web root directory. The default install location
is /opt/apigee/apigee-drupal,
but you might have changed it.
If you are unsure of the location of this directory, use thedrush status
command or the Configuration > Media > File entry in the Drupal menu to determine the location of the public file system and private file system path (for the next step). - Make a backup of the files in
/opt/apigee/data/apigee-drupal-devportal/private
. - Set Drupal to maintenance mode:
- Select Configuration in the Drupal menu.
- On the Configuration page, select Maintenance mode under Development.
- Select the Put site into maintenance mode box.
- Enter a message users see during maintenance.
- Select Save configuration.
- Disable SELinux as described in Install the Edge apigee-setup utility.
- Change to the
/opt
directory:cd /opt
-
For an upgrade on a server with an Internet connection:
- Download the Edge 4.17.09
bootstrap_4.17.09.sh
file to/tmp/bootstrap_4.17.09.sh
:curl https://software.apigee.com/bootstrap_4.17.09.sh -o /tmp/bootstrap_4.17.09.sh
- Install the Edge 4.17.09
apigee-service
utility and dependencies:sudo bash /tmp/bootstrap_4.17.09.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.
By default, the installer checks to see that you have Java 1.8 installed. You can use the "C" option to continue without installing Java.
- Download the Edge 4.17.09
-
For an upgrade on a server with no Internet connection:
- Create a local 4.17.09 repo as described in "Create a local Apigee repository" at Install the Edge apigee-setup utility.
-
To install apigee-service from a .tar file:
- 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.17.09.tar.gz
:/opt/apigee/apigee-service/bin/apigee-service apigee-mirror package
- 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.
- On the new node, untar the file to the /tmp directory:
tar -xzf apigee-4.17.09.tar.gz
This command creates a new directory, named repos, in the directory containing the .tar file. For example /tmp/repos.
- Install the Edge
apigee-service
utility and dependencies from/tmp/repos
:sudo bash /tmp/repos/bootstrap_4.17.09.sh apigeeprotocol="file://" apigeerepobasepath=/tmp/repos
Notice that you include the path to the repos directory in this command.
- On the node with the local repo, use the following command to package the local
repo into a single .tar file named
-
To install apigee-service using the Nginx webserver:
- Configure the Nginx web server as described in "Install from the repo using the Nginx webserver" at Install the Edge apigee-setup utility.
- On the remote node, download the Edge
bootstrap_4.17.09.sh
file to/tmp/bootstrap_4.17.09.sh
:/usr/bin/curl http://uName:pWord@remoteRepo:3939/bootstrap_4.17.09.sh -o /tmp/bootstrap_4.17.09.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.
- On the remote node, install the Edge
apigee-service
utility and dependencies:codesudo bash /tmp/bootstrap_4.17.09.sh apigeerepohost=remoteRepo:3939 apigeeuser=uName apigeepassword=pWord apigeeprotocol=http://
where uName:pWord are the repo username and password.
- Use
apigee-service
to update theapigee-setup
utility:/opt/apigee/apigee-service/bin/apigee-service apigee-setup update
- Run the update utility on your node to update the Postgres database:
/opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
where configFile is the configuration file that you used to install the Postgres database. The only requirement on the config file is that the configuration file must be accessible or readable by the "apigee" user.
- Start Postgres:
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start
- Run the update utility on your node to update the portal:
/opt/apigee/apigee-setup/bin/update.sh -c dp -f configFile
where configFile is the configuration file that you used to install the portal. The only requirement on the config file is that the configuration file must be accessible or readable by the "apigee" user.
- Run Drupal's
update.php
script by opening the following URL in a browser window:http://portalIP_DNS:8079/update.php
- Disable Drupal to maintenance mode:
- Select Configuration in the Drupal menu.
- On the Configuration page, select Maintenance mode under Development.
- Deselect the Put site into maintenance mode box.
- Select Save configuration.
Note that the root directory after the update is:
/opt/apigee/apigee-drupal/wwwroot
The upgrade is now complete.