KBEC-00393 - Setting up an environment with two zones and a gateway

Summary

This example goes over the process of setting up a basic environment with 1 commander server, 1 gateway (2 gateway agents), 2 zones, and 1 agent in a different zone than the server.

The installation steps are split up into 4 parts: Commander server installation, gateway agent installation 1, gateway agent installation 2, and regular agent installation. The diagram below shows the order of the installation steps.

These instructions cover the basic steps necessary to set up gateways and zones. You can modify and expand on the steps in this example for your own system.

gatewayDiagram1.png

Solution

Commander server installation:

            External IP: 162.0.0.1

            Internal IP: 10.0.0.1

            Internal Hostname:  ip-10-0-0-1.ec2.internal

            Zone: Default

            Ports: 8000, 8443 (Server); 6800, 7800 (Agent)

  1. Create user and group on the commander server’s machine

sudo addgroup agentlocalgroup
sudo adduser agentlocaluser --ingroup agentlocalgroup (password commander)

  1. Run the installer

sudo /home/ubuntu/installers/ElectricFlow-8.0.3.125753 \
--mode silent \
--installAgent \
--installServer \
--installDatabase \
--installWeb \
--installRepository \
--unixAgentGroup agentlocalgroup \
--unixAgentUser agentlocaluser \
--unixServerGroup ubuntu \
--unixServerUser ubuntu \

  1. Local agent on server needs to be trusted if you plan on using trusted agents

/opt/electriccloud/electriccommander/bin/ectool login --server 10.0.0.1 admin changeme
/opt/electriccloud/electriccommander/bin/eccert --debug --server 10.0.0.1 --securePort 8443 initAgent --remote --force

  1. Now from the Cloud > Resources page in Commander UI make the local agent trusted ( i.e set the "Connection Type" to "Trusted HTTPS" ) and restart the agent service.
  2. Make sure the local agent is pingable from Cloud >Resources Page
  3. Create zone zone1:

/opt/electriccloud/electriccommander/bin/ectool --timeout 300 login admin changeme
/opt/electriccloud/electriccommander/bin/ectool createZone \
zone1 \
--description "zone1"

 

Gateway Agent 1 installation:

            External IP: 172.0.0.2

            Internal IP: 10.0.0.2

            Internal Hostname:  ip-10-0-0-2.ec2.internal

            Zone: Default

            Ports: 6800, 7800

  1. Create user and group on the agent’s machine

sudo addgroup agentp1group
sudo adduser agentp1user --ingroup agentp1group   ( password commander)

  1. Run the installer

sudo /home/ubuntu/installers/ElectricFlow-8.0.3.125753 \
--mode silent \
--installAgent \
--remoteServerCreateResource \
--trustedAgent \
--remoteServer 162.0.0.1 \
--remoteServerUser admin \
--remoteServerPassword changeme \
--remoteServerResource agentp1-gw-01 \
--unixAgentGroup agentp1group \
--unixAgentUser agentp1user \
--agentLocalPort 6800 \
--agentPort 7800 \
--serverHttpPort 8000 \
--serverHttpsPort 8443 \
--zoneName default

  1. Make sure the agent agentp1-gw-01 is pingable from Cloud > Resources Page

 Gateway Agent 2 installation:

            External IP: 182.0.0.3

            Internal IP: 10.0.0.3

            Internal Hostname:  ip-10-0-0-3.ec2.internal

            Zone: Zone 1

 Ports: 6800, 7800

  1. Create user and group on the agent’s machine

sudo addgroup agentp2group
sudo adduser agentp2user --ingroup agentp2group   ( password commander)

  1. Run the installer

sudo /home/ubuntu/installers/ElectricFlow-8.0.3.125753 \
--mode silent \
--installAgent \
--remoteServerCreateResource \
--trustedAgent \
--remoteServer ip-10-0-0-1.ec2.internal \
--remoteServerUser admin \
--remoteServerPassword changeme \
--parallelInstallName agentp2-gw-01 \
--remoteServerResource agentp2-gw-01 \
--agentLocalPort 6800 \
--agentPort 7800 \
--agentGatewayURL  https://ip-10-0-0-2.ec2.internal:7800 \
--zoneName zone1 \
--unixAgentGroup agentp2group \
--unixAgentUser agentp2user

  1. Create the gateway on the Flow server

/opt/electriccloud/electriccommander/bin/ectool createGateway \
Default_to_zone1_gateway \
--description   "Gateway linking Default zone with zone1 zone" \
--resourceName1 "agentp1-gw-01" \
--hostName1     "ip-10-0-0-2.ec2.internal" \
--resourceName2 "agentp2-gw-01" \
--hostName2     "ip-10-0-0-3.ec2.internal"

  1. Make sure the agent agentp2-gw-01 is pingable from Cloud > Resources Page

Regular Agent installation:

            External IP: 192.0.0.4

            Internal IP: 10.0.0.4

            Zone: Zone 1

            Ports: 6800, 7800

  1. Create user and group on the agent’s machine

sudo addgroup agentp4group
sudo adduser agentp4user --ingroup agentp4group   ( password commander)

  1. Run the installer

sudo /home/ubuntu/installers/ElectricFlow-8.0.3.125753 \
--mode silent \
--installAgent \
--remoteServerCreateResource \
--trustedAgent \
--remoteServer ip-10-0-0-1.ec2.internal \
--remoteServerUser admin \
--remoteServerPassword changeme \
--parallelInstallName agentp4_in_zone1 \
--remoteServerResource agentp4_in_zone1 \
--agentLocalPort 6800 \
--agentPort 7800 \
--agentGatewayURL  https://ip-10-0-0-3.ec2.internal:7800 \
--zoneName zone1 \
--unixAgentGroup agentp4group \
--unixAgentUser agentp4user
 

  1. Make sure the agent agentp4_in_zone1 is pingable from Cloud > Resources Page

 

Have more questions? Submit a request

Comments

Powered by Zendesk