Skip to content

Commit

Permalink
Add custom AMI support to ClusterLauncher. Now always prime nodes and…
Browse files Browse the repository at this point in the history
… only print primed connections.
  • Loading branch information
joaquincasares committed Feb 14, 2012
1 parent cb0d452 commit 9805a26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions cassandralauncher/cassandralauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ def prime_connections(public_ips, user):
#################################
# Installing OpsCenter Agents

def install_opsc_agents(user):
"""Wait for OpsCenter agent tarball to be created. Then install the agent on all other nodes."""
def start_priming(user):
"""Prime connections to all nodes"""

# Give AWS some time to warm up
wait = 10
Expand All @@ -181,6 +181,10 @@ def install_opsc_agents(user):

# Authenticate and ring cluster with keyless SSH
prime_connections(public_ips, user)
print

def install_opsc_agents(user):
"""Wait for OpsCenter agent tarball to be created. Then install the agent on all other nodes."""

if check_cascading_options('installopscenter', optional=True) != 'False':
# Connection to the OpsCenter machine to be used later
Expand Down Expand Up @@ -491,26 +495,22 @@ def main():
# Log clusterinfo
running_log(reservation, demotime)

# Print SSH commands
print 'Unprimed Connection Strings:'
for publicIP in public_ips:
print '{0} -i {1} {2}@{3}'.format(config.get('System', 'ssh'), PEM_FILE, user, publicIP)
print

if check_cascading_options('installopscenter', optional=True) != 'False':
# Print OpsCenter url
print "OpsCenter Address:"
print "http://%s:8888" % public_ips[0]
print "Note: You must wait 60 seconds after Cassandra becomes active to access OpsCenter."
print

install_opsc_agents(user)
start_priming(user)

print 'Primed Connection Strings:'
for node in public_ips:
print '{0} -i {1} -o UserKnownHostsFile={2} {3}@{4}'.format(config.get('System', 'ssh'), PEM_FILE, HOST_FILE, user, node)
print

install_opsc_agents(user)

end_time = int(time.time() - start_time)
print 'Total Elapsed Time: %s minutes %s seconds' % (end_time / 60, end_time % 60)
print
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"""

setup(name='CassandraLauncher',
version='1.8-1',
version='1.9-0',
description='Command line utilities for launching Cassandra clusters in EC2',
long_description=long_description,
author='Joaquin Casares',
Expand Down

0 comments on commit 9805a26

Please sign in to comment.