Multi Node Deployment

Using CFT Template

Download the tarball (ampool-cft-.tar.gz from Ampool release links. Tarball contains the CFT Tempate (Name: Ampool-MultiNode-.json) for launching the multi-node Ampool cluster. Template launches AMI (ID: ami-532f8729) with desired security group and more configurable parameters.

This template also provides an Auto Scaling launch configuration (ServerLaunchConfig) for Ampool Servers which is used by Server Auto Scaling group (ServerAutoScalingGroup) to scale the cluster size up and down based on specified number of desired server instances. (Note The desired number of server instances should always be less than or equal to max number of server instances specified while deploying the cluster.)

Follow the steps below to create a stack:

  1. Login to AWS console

  2. Go to CloudFormation

  3. Click on Create New Stack button to create a new AWS Cloudformation Stack

  4. Use Upload option to upload the cloud formation template for launching the multi-node Ampool cluster

  5. In the Specify details section input following

    1. Stack Name eg : AmpoolClusterStack
    2. AmpoolInstanceType eg : m3.2xlarge (Choose any one amongst from the drop box list)
    3. KeyName eg : key1 (Mandatory, Name of an existing EC2 KeyPair to enable SSH access to the instance) choose any one amongst from the drop box list
    4. PortsLow eg : 2000 (The lower allowed range of ports for starting a Ampool Cluster, Optional. default : 1024)
    5. PortsHigh eg : 2100 (The higher allowed range of ports for starting a Ampool Cluster, Optional. default : 65535)
    6. SSHLocation eg : x.x.x.x (Mandatory, IP address range to access the Ampool cluster. Set the value to 0.0.0.0/0 for access from entire Internet.)
    7. LocatorClassPath eg : /tools/work/xyz.jar (Optional) (If any application specific additional classes locator should have access to)
    8. LocatorLogLevel eg : fine (Choose any one amongst from the drop box list)
    9. CriticalHeapPercentage eg : 70 (Optional, default: 0)
    10. EnableTimeStatistics eg : false (Optional, default: false)
    11. EvictionHeapPercentage eg : 60 (Optional, default: 0)
    12. HttpServicePort eg : 7070 (Optional, default: 7070)
    13. HttpServiceBindAddress eg : x.x.x.x (Optional, default: private internal ip address)
    14. InitialHeap eg : 1g (Optional, default: )
    15. LocatorWaitTime eg : 30 (Optional, default: 0)
    16. LockMemory eg : false (Optional, default: false)
    17. MaxHeap eg : 2g (Optional, default: )
    18. ServerClassPath eg : /tools/work/xyz.jar (Optional) ((If any application specific additional classes locator should have access to)
    19. ServerLogLevel eg : info (Choose any one amongst from the drop box list)
    20. StartRestApi eg : false (Optional, default: false)
    21. DesiredServerInstances eg : 1 (This will create 1 instance of ampool server)
    22. MinServerInstances eg : 1 (Minimum number of instances to run)
    23. MaxServerInstances eg : 5 (Maximum number of instances to run)
  6. Click on Next button and you can specify other optional parameters like Tags, Permissions

  7. Click on Next button to review just before creating Stack

  8. Click on Create button and you can see All the resources of the stack are getting created in the Events Tab

  9. Once CREATE_COMPLETE status is displayed, go to EC2 dashboard and click on instances to see that following instances have been created with Ampool ADS installed

    1. Ampool Locator & Connectors
    2. Ampool Server & Connectors

    Note: Ampool core client and connectors for Spark/Hive etc are installed on all the nodes.

Using AWS CLI

Follow steps mentioned in [AWS CLI user guide] (http://docs.aws.amazon.com/cli/latest/userguide/tutorial-ec2-ubuntu.html#install-cli) to set up aws command line.

Use the command below to create AmpoolClusterStack with parameters, using the command line:

aws cloudformation create-stack --stack-name AmpoolClusterStack --template-body file:////tools//workspace//ampool//ampool//aws-ampoolOnly//CFT//Ampool-Cluster.json --parameters ParameterKey=SSHLocation,ParameterValue=0.0.0.0/0 ParameterKey=KeyName,ParameterValue=Key1 --capabilities CAPABILITY_IAM

Output

{
    "StackId": "arn:aws:cloudformation:us-west-2:085684456215:stack/AmpoolClusterStack/b429c140-8886-11e7-8056-50d5ca789e1e"
}

Auto scale Multi-node Ampool Cluster

Note: Currently Auto Scaling feature is only available for Ampool Servers.

  1. Go to CloudFormation

  2. Select the created stack eg: AmpoolClusterStack and Click on Resources Tab

  3. Click on ServerAutoScalingGroup Physical ID and click on Edit button

  4. Update desired instances to say 2, and Click on Save button, one more instance from Ampool ServerLaunchConfig will be part of the existing Ampool ADS cluster. The value of desired number of service instances should be less than or equal to "MaxServerInstances" specified during cluster deployment.

  5. Similarly, the desired number of instance can also be reduced, so that those instances will be removed from the existing Ampool ADS cluster

  6. Go to EC2 dashboard and click on instances to see that one more new instance is being launched

Delete Ampool Cluster/Stack

To delete the Ampool ADS cluster and free all the resources associated with the cluster, delete the stack.

Warning

If you individually kill the instances from EC2 console, it may be restarted due to auto scaling configuration.

Check Cluster status

To check if Ampool locator and servers are running, enter http://AMPOOL_LOCATOR_NODE_PUBLIC_IP:7070/pulse in your browser, where AMPOOL_LOCATOR_NODE_PUBLIC_IP is the public ip address of the AWS instance used for locator role.

Login to the Geode Pulse using instance-id of the locator AMI instance as login and password.