Installing Developer Portal Multi Datacenter Version:4.17.xx and higher

0 1 1,914

Background

Apigee Developer portal on premise OOTB installation does not support HA, main reason for this is because on-premise developer portal is considered as not a tier 1 component, that is no impact to API runtime traffic.

Having said that in order to implement DevPortal HA for On-Premise customers who has strict HA requirement (w.r.t both Portal and Postgres DB) can refer this article

Installation Instructions

Important Notes:

  1. Below response file template was created with assumption of below topology. Please update template accordingly.
  2. Both DC1 and DC2 portal response file should point to same postgres node/ip (master)
  3. As first step of installation, master-slave replication should be setup between two postgre nodes/IPs

refer: https://docs.apigee.com/private-cloud/latest/developer-services-portal-installation

refer: Sample developer portal response file for (Multi data center)

IP1=IPorDNSnameOfNode

# if postgres server is not in same not as developer portal then specify portal posgres

#IP2= IPorDNSnameOfNodePostgres

# Must resolve to IP address or DNS name of host - not to 127.0.0.1 or localhost.

HOSTIP=$(hostname -i)

# Specify the name of the portal database in Postgres.

PG_NAME=devportal

# Specify the Postgres admin credentials.

# The portal connects to Postgres by using the 'apigee' user.

# If you changed the Postgres password from the default of 'postgres'

# then set PG_PWD accordingly.

# If connecting to a Postgres node installed with Edge,

# contact the Edge sys admin to get these credentials.

PG_USER=apigee

PG_PWD=postgres

# The IP address of the Postgres server.

# If it is installed on the same node as the portal, specify that IP.

# If connecting to a remote Postgres server,specify its IP address. IP2

PG_HOST=$IP1

# The Postgres user credentials used by the portal

# to access the Postgres database,

# This account is created if it does not already exist.

DRUPAL_PG_USER=drupaladmin

DRUPAL_PG_PASS=portalSecret

# Specify 'postgres' as the database.

DEFAULT_DB=postgres

# Specify the Drupal admin account details.

# DO NOT set DEVPORTAL_ADMIN_USERNAME=admin.

# The installer creates this user on the portal.

DEVPORTAL_ADMIN_FIRSTNAME=firstName

DEVPORTAL_ADMIN_LASTNAME=lastName

DEVPORTAL_ADMIN_USERNAME=userName

DEVPORTAL_ADMIN_PWD=pWord

DEVPORTAL_ADMIN_EMAIL=foo@bar.com

# Edge connection details.

# If omitted, you can set them in the portal UI.

# Specify the Edge organization associated with the portal.

EDGE_ORG=edgeOrgName

# Specify the URL of the Edge management API.

# For a Cloud based installation of Edge, the URL is:

# https://api.enterprise.apigee.com/v1

# For a Private Cloud installation, it is in the form:

# http://<ms_ip_or_DNS>:8080/v1 or

# https://<ms_ip_or_DNS>:TLSport/v1

MGMT_URL=https://api.enterprise.apigee.com/v1

# The org admin credentials for the Edge organization in the form

# of Edge emailAddress:pword.

# The portal uses this information to connect to Edge.

DEVADMIN_USER=orgAdmin@myCorp.com

DEVADMIN_PWD=pWord

# The PHP port.

# If omitted, it defaults to 8888.

PHP_FPM_PORT=8888

# You must configure the SMTP server used by the portal.

# The properties SMTPHOST and SMTPPORT are required.

# The others are optional with a default value as notated below.

# SMTP hostname. For example, for the Gmail server, use smtp.gmail.com.

SMTPHOST=smtp.gmail.com

# Use SSL for SMTP: 'y' or 'n' (default).

SMTPSSL="n"

# SMTP port (usually 25).

# The value can be different based on the selected encryption protocol.

# For example, for Gmail, the port is 465 when using SSL and 587 for TLS.

SMTPPORT=25

# Username used for SMTP authentication, defaults is blank.

SMTPUSER=your@email.com

# Password used for SMTP authentication, default is blank.

SMTPPASSWORD=yourEmailPassword

Developer Portal (DP) prerequisites

Test connection DP to Edge management server

Test your connection to the Edge management server by executing the following cURL command from a command prompt on the portal server:

curl -u <admin_user>:<admin_password> http://<MS_IP>:8080/v1/organizations/<Org_name>

If successful, this command returns a response like the following:

{

"createdAt" : 1348689232699,

"createdBy" : "USERNAME",

"displayName" : "cg",

"environments" : [ "test", "prod" ],

"lastModifiedAt" : 1348689232699,

"lastModifiedBy" : "foo@bar.com",

"name" : "cg",

"properties" : {

"property" : [ ]

},

"type" : "trial"

}

Prerequisite configuration

  • As per the community article link, here are the follow pre-requisite needed before DP install
  • File System synchronization
    • Drupal stores user uploaded files on the file system in sites/default/files and sites/default/private directories.
    • We must make sure that these two directories are synchronized between the two data-centers. You can use NFS, GlusterFS, S3, or other type of syncing mechanism to sync
    • two-way sync DC 1 and DC 2 is needed

As part of installation postgres DB will be synced, hence the content upload into portal (Open API specs, Apps, developers, Logo etc..) will be automatically synced with other datacenter portal

Uninstall previous version of PHP

Run the below command to check for the previous versions of PHP and uninstall if found any.

ps –ef|grep php

yum <to search active php instances>

yum remove <package-name>

php

php-cli

php-common

php-gd

php-mbstring

php-mysql

php-pdo

php-pear

php-pecl-apc

php-process

php-xml

Apigee setup Install

Refer Apigee document link for installation of Apigee Setup Utility

Developer Portal Installation

  • First run the below command on postgres database node to install postgres DB
      • /opt/apigee/apigee-setup/bin/setup.sh -p pdb -f /<path>/apigee/devportal-response.txt
  • Next run the below command portal node
  • /opt/apigee/apigee-setup/bin/setup.sh -p dp -f /<path>/apigee/devportal-response.txt

    Configure Master-Standby Replication after installation

    You can configure master-standby replication after installation by by using the following procedure:

    • Identify which Postgres node will be the master and which will be the standby server. Create configFile as below
    PG_MASTER=IPorDNSofNewMaster

    PG_STANDBY=IPorDNSofNewStandby

    • Enable replication on the new master:

    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-master -f configFIle

    • On the standby node, stop the standby node:

    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop

    • On the standby node, delete any existing Postgres data:

    > rm -rf /opt/apigee/data/apigee-postgresql/

    Note: If necessary, you can backup this data before deleting it.

    • Configure the standby node:

    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby -f configFile

    Test Master-Standby Replication

    Here is the link to check the replication state in postgres slave node to verify above replication set up.

    References

    Refer below Apigee documentation for more details on the install

    https://docs.apigee.com/private-cloud/latest/developer-services-portal-installation

    Comments
    cristiangache
    Participant I

    how do you find out the PHP port? My installation is failing at that point.

    Version history
    Last update:
    ‎01-12-2018 04:47 PM
    Updated by: