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
Important Notes:
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 |
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 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
Refer Apigee document link for installation of Apigee Setup Utility
/opt/apigee/apigee-setup/bin/setup.sh -p dp -f /<path>/apigee/devportal-response.txt
You can configure master-standby replication after installation by by using the following procedure:
PG_MASTER=IPorDNSofNewMaster PG_STANDBY=IPorDNSofNewStandby |
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-master -f configFIle
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
> rm -rf /opt/apigee/data/apigee-postgresql/
Note: If necessary, you can backup this data before deleting it.
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby -f configFile
Here is the link to check the replication state in postgres slave node to verify above replication set up.
Refer below Apigee documentation for more details on the install
https://docs.apigee.com/private-cloud/latest/developer-services-portal-installation
how do you find out the PHP port? My installation is failing at that point.