Python script using Fabric and Boto to manage and deploy a Vertica cluster into AWS.
It creates a standalone VPC environment. One node is designated as the Internet Gateway and the bootstrap node where the administrative commands are run.
pip install fabric
pip install boto
/etc/boto.cfg or ~/.boto
[Credentials]
aws_access_key_id=<your_key>
aws_secret_access_key=<your_key>
Copy .fabricrc.sample
to .fabricrc
, and update the config as follows:
region
: your ec2 regionami
: a CentOS 6 AMI either PV or HVM depending on yourinstance_type
instance_type
: ec2 instance type. take note of whether it supports PV or HVM, and adjust your ami accordingly.cluster_name
: name you want your cluster tagged askey_pair
: the name of your ec2 key pairkey_filename
: identity file to ssh into ec2local_public_key
: your public key to set up passwordless sshuse_community_edition_license
: 1 or 0, whether to use the community license or notlocal_license_path
: local path to your vertica license, that will be copied to your nodesdb_user
,db_name
,db_pw
: user, database name, and password for verticavertica_rpm_s3_url
: upload the Vertica rpm you donwloaded from my.vertica.com to s3 and put the s3:// url here.
fab -c .fabricrc print_status
fab -c .fabricrc deploy_cluster:total_nodes=3
fab -c .fabricrc deploy_cluster:total_nodes=3,eip_allocation_id=eipalloc-xxxxxx
deploy to an existing vpc cluster, it will consider the gateway node to be the bootstrap if there are existing nodes in the cluster, it will attempt to bring the number of nodes in the cluster to total_nodes
fab -c .fabricrc deploy_cluster:total_nodes=3,vpc_id=vpc-xxxxxxxx
#terminate cluster fab -c .fabricrc terminate_cluster:vpc_id=vpc-xxxxxxxx