How to Reinstall and Restore Components

Edge for Private Cloud v. 4.17.01

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

  1. Stop ZooKeeper:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper stop
  2. Remove old ZooKeeper directories:
    /opt/apigee/data/apigee-zookeeper
    /opt/apigee/etc/apigee-zookeeper.d
  3. Re-install ZooKeeper:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper install
  4. Restore ZooKeeper.
    > /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper restore backup-2016.03.17,14.40.41.tar.gz
  5. 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.

  1. Re-install ZooKeeper:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper install
  2. 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
  3. Start ZooKeeper:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper start

Restore a complete cluster

  1. Stop the complete cluster.
  2. Restore all ZooKeeper nodes from the backup file as described above for a single node.
  3. Start the ZooKeeper cluster.
  4. Restart all components.

Apache Cassandra

Restore one standalone node

  1. Stop Cassandra:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra stop
  2. Remove old Cassandra directories:
    /opt/apigee/data/apigee-cassandra
    /opt/apigee/etc/apigee-cassandra.d
  3. Re-install Cassandra:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra install
  4. Restore Cassandra:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra restore backup-2016.03.17,14.40.41.tar.gz
  5. 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.

  1. Re-install Cassandra:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra install
  2. 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
  3. Start Cassandra:
    > /opt/apigee/apigee-service/bin/apigee-service apigee- cassandra start
  4. 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

  1. Stop the complete cluster.
  2. Restore all Cassandra nodes from the backup file.
  3. Start the Cassandra cluster.
  4. Restart all components.

PostgreSQL database

PosgreSQL running standalone or as Master

  1. 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
  2. Re-install PostgreSQL database:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql install
  3. Start PostgreSQL:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start
  4. Restore PostgreSQL database from the backup file:
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restore 2016.03.17,14.40.41.dump
  5. 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

  1. Re-install PostgreSQL database:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql install
  2. 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
  3. Start PostgreSQL:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start

Postgres Server

  1. Stop Postgres Server on all master and standby nodes:
    > /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
  2. Remove old Postgres Server directories:
    /opt/apigee/data/edge-postgres-server
    /opt/apigee/etc/edge-postgres-server.d
  3. Re-install Postgres Server:
    > /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server install
  4. 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
  5. Start Postgres Server on all master and standby nodes:
    > /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start

Qpid Server and Qpidd

  1. 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
  2. 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
  3. Re-install Qpidd:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd install
  4. Restore Qpidd:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd restore backup-2016.03.17,14.40.41.tar.gz
  5. Start Qpidd:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd start
  6. Re-install Qpid Server:
    > /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server install
  7. Restore Qpid Server:
    > /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restore backup-2016.03.17,14.40.41.tar.gz
  8. 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

  1. Stop OpenLDAP:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-openldap stop
  2. Re-install OpenLDAP:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-openldap install
  3. Remove old OpenLDAP directories:
    /opt/apigee/data/apigee-openldap
    /opt/apigee/etc/apigee-openldap.d
  4. Restore OpenLDAP:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-openldap restore backup-2016.03.17,14.40.41.tar.gz
  5. Restart OpenLDAP:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-openldap start
  6. Restart all Management Servers:
    > /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart

Management Server

  1. Stop Management Server:
    > /opt/apigee/apigee-service/bin/apigee-service edge-management-server stop
  2. Remove old Management Server directories:
    /opt/apigee/data/edge-management-server
    /opt/apigee/etc/edge-management-server.d
  3. Re-install Management Server:
    > /opt/apigee/apigee-service/bin/apigee-service edge-management-server install
  4. 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
  5. Restart Management Server:
    > /opt/apigee/apigee-service/bin/apigee-service edge-management-server start

Message Processor

  1. Stop Message Processor:
    > /opt/apigee/apigee-service/bin/apigee-service edge-message-processor stop
  2. Remove old Message Processor directories:
    /opt/apigee/data/edge-message-processor
    /opt/apigee/etc/edge-message-processor.d
  3. Re-install Message Processor:
    > /opt/apigee/apigee-service/bin/apigee-service edge-message-processor install
  4. 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
  5. Restart Message Processor:
    > /opt/apigee/apigee-service/bin/apigee-service edge-message-processor start

Router

  1. Stop Router:
    > /opt/apigee/apigee-service/bin/apigee-service edge-router stop
  2. Remove old Router directories:
    /opt/apigee/data/edge-router
    /opt/apigee/etc/edge-router.d
  3. Re-install Router:
    > /opt/apigee/apigee-service/bin/apigee-service edge-router install
  4. 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
  5. Restart Router:
    > /opt/apigee/apigee-service/bin/apigee-service edge-router start

Edge UI

  1. Stop UI:
    > /opt/apigee/apigee-service/bin/apigee-service edge-ui stop
  2. Remove old UI directories:
    /opt/apigee/data/edge-ui
    /opt/apigee/etc/edge-ui.d
  3. Re-install UI:
    > /opt/apigee/apigee-service/bin/apigee-service edge-ui install
  4. 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
  5. Restart UI:
    > /opt/apigee/apigee-service/bin/apigee-service edge-ui start

Complete Site Recovery

  1. Stop all component nodes. Note that the order of stopping the subsystems is important - first all Edge nodes and then all datastores nodes.
  2. Restore all components as described above.
  3. Now start all components in the following order. Note that the order of starting the subsystems is important:
    1. Start the ZooKeeper cluster
    2. Start the Cassandra cluster
    3. Ensure that OpenLDAP is up and running
    4. Start qpid
    5. Ensure that the PostgreSQL database is up and running
    6. Start Management Server
    7. Start Routers and Message Processors
    8. Start Qpid Server
    9. Start Postgres Server
    10. Start Apigee UI