Edge for Private Cloud v4.18.05
This document covers re-installation and restoration of an Edge component. Use this procedure if you have to re-install the Edge component before you restore the backup.
Apache ZooKeeper
Restore one standalone node
- Stop ZooKeeper:
> /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper stop - Remove old ZooKeeper directories:
/opt/apigee/data/apigee-zookeeper
/opt/apigee/etc/apigee-zookeeper.d - Re-install ZooKeeper:
> /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper install - Restore ZooKeeper.
> /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper restore backup-2016.03.17,14.40.41.tar.gz - Restart all components:
> /opt/apigee/apigee-service/bin/apigee-all restart
Restore one cluster node
If a single ZooKeeper node fails that is part of an ensemble, you can create a new node with the same hostname/IP address and re-install ZooKeeper. When the new ZooKeeper node joins the ZooKeeper ensemble it will get the latest snapshots from the Leader and start to serve clients. You do not need to restore data in this instance.
- Re-install ZooKeeper:
> /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper install - Run setup on the ZooKeeper node using the same config file used when installing the
original node:
> /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper setup -f configFile - Start ZooKeeper:
> /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper start
Restore a complete cluster
- Stop the complete cluster.
- Restore all ZooKeeper nodes from the backup file as described above for a single node.
- Start the ZooKeeper cluster.
- Restart all components.
Apache Cassandra
Restore one standalone node
- Stop Cassandra:
> /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra stop - Remove old Cassandra directory:
/opt/apigee/data/apigee-cassandra - Re-install Cassandra:
> /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra install - Restore Cassandra:
> /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra restore backup-2016.03.17,14.40.41.tar.gz - Restart all components:
> /opt/apigee/apigee-service/bin/apigee-all restart
Restore one cluster node
If a single Cassandra node fails, that is part of an ensemble, you can create a new node with the same hostname/IP address. You only need to re-install Cassandra, you do not need to restore the data.
Note: When performing a re-install on a non-seed node, ensure that at least one Cassandra seed node is up.
- Re-install Cassandra:
> /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra install - Run setup on the Cassandra node using the same config file used when installing the
original node:
> /opt/apigee/apigee-service/bin/apigee-service apigee- cassandra setup -f configFile - Start Cassandra:
> /opt/apigee/apigee-service/bin/apigee-service apigee- cassandra start - After installing Cassandra, and the node is up, (given that RF>=2 for all keyspaces)
execute the following nodetool command to initialize the node:
opt/apigee/apigee-cassandra/bin/nodetool -h localhost repair
Restore a complete cluster
- Stop the complete cluster.
- Restore all Cassandra nodes from the backup file.
- Start the Cassandra cluster.
- Restart all components.
PostgreSQL database
PosgreSQL running standalone or as Master
- Stop the Management Server, Qpid Server, and Postgres Server on all nodes:
Note: Your system can still handle requests to API proxies while these components are stopped.
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server stop
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop - Re-install PostgreSQL database:
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql install - Start PostgreSQL:
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start - Restore PostgreSQL database from the backup file:
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restore 2016.03.17,14.40.41.dump - Start the Management Server, Qpid Server, and Postgres Server on all nodes:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server start
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
PosgreSQL running as Standby
- Re-install PostgreSQL database:
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql install - Reconfigure PostgreSQL database using the same config file you used to install it:
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup -f configFile - Start PostgreSQL:
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start
Postgres Server
- Stop Postgres Server on all master and standby nodes:
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop - Remove old Postgres Server directories:
/opt/apigee/data/edge-postgres-server
/opt/apigee/etc/edge-postgres-server.d - Re-install Postgres Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server install - Restore Postgres Server from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-postgre-server restore backup-2016.03.17,14.40.41.tar.gz - Start Postgres Server on all master and standby nodes:
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
Qpid Server and Qpidd
- Stop Qpidd, Qpid Server, and Postgres Server on all nodes:
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
> /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd stop - Remove old Qpid Server and Qpidd directories:
/opt/apigee/data/edge-qpid-server
/opt/apigee/etc/edge-qpid-server.d
/opt/apigee/data/apigee-qpidd
/opt/apigee/etc/apigee-qpidd.d - Re-install Qpidd:
> /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd install - Restore Qpidd:
> /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd restore backup-2016.03.17,14.40.41.tar.gz - Start Qpidd:
> /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd start - Re-install Qpid Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server install - Restore Qpid Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restore backup-2016.03.17,14.40.41.tar.gz - Restart Qpid Server, Qpidd, and Postgres Servers on all nodes:
> /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd restart
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
OpenLDAP
- Stop OpenLDAP:
> /opt/apigee/apigee-service/bin/apigee-service apigee-openldap stop - Re-install OpenLDAP:
> /opt/apigee/apigee-service/bin/apigee-service apigee-openldap install - Remove old OpenLDAP directories:
/opt/apigee/data/apigee-openldap
/opt/apigee/etc/apigee-openldap.d - Restore OpenLDAP:
> /opt/apigee/apigee-service/bin/apigee-service apigee-openldap restore backup-2016.03.17,14.40.41.tar.gz - Restart OpenLDAP:
> /opt/apigee/apigee-service/bin/apigee-service apigee-openldap start - Restart all Management Servers:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
Management Server
- Stop Management Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server stop - Remove old Management Server directories:
/opt/apigee/data/edge-management-server
/opt/apigee/etc/edge-management-server.d - Re-install Management Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server install - Restore Management Server from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server restore backup-2016.03.17,14.40.41.tar.gz - Restart Management Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server start
Message Processor
- Stop Message Processor:
> /opt/apigee/apigee-service/bin/apigee-service edge-message-processor stop - Remove old Message Processor directories:
/opt/apigee/data/edge-message-processor
/opt/apigee/etc/edge-message-processor.d - Re-install Message Processor:
> /opt/apigee/apigee-service/bin/apigee-service edge-message-processor install - Restore Message Processor from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restore backup-2016.03.17,14.40.41.tar.gz - Restart Message Processor:
> /opt/apigee/apigee-service/bin/apigee-service edge-message-processor start
Router
- Stop Router:
> /opt/apigee/apigee-service/bin/apigee-service edge-router stop - Remove old Router directories:
/opt/apigee/data/edge-router
/opt/apigee/etc/edge-router.d - Re-install Router:
> /opt/apigee/apigee-service/bin/apigee-service edge-router install - Restore Router from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-router restore backup-2016.03.17,14.40.41.tar.gz - Restart Router:
> /opt/apigee/apigee-service/bin/apigee-service edge-router start
Edge UI
- Stop UI:
> /opt/apigee/apigee-service/bin/apigee-service edge-ui stop - Remove old UI directories:
/opt/apigee/data/edge-ui
/opt/apigee/etc/edge-ui.d - Re-install UI:
> /opt/apigee/apigee-service/bin/apigee-service edge-ui install - Restore UI from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-ui restore backup-2016.03.17,14.40.41.tar.gz - Restart UI:
> /opt/apigee/apigee-service/bin/apigee-service edge-ui start
Complete Site Recovery
- Stop all component nodes. Note that the order of stopping the subsystems is important - first all Edge nodes and then all datastores nodes.
- Restore all components as described above.
- Now start all components in the following order. Note that the order of starting the
subsystems is important:
- Start the ZooKeeper cluster
- Start the Cassandra cluster
- Ensure that OpenLDAP is up and running
- Start qpid
- Ensure that the PostgreSQL database is up and running
- Start Management Server
- Start Routers and Message Processors
- Start Qpid Server
- Start Postgres Server
- Start Apigee UI