Пример #1
0
def deploy_web():

	# Create New Instance
	instance = ec2.create_new_instance()

	# Set Env Host String
	env.host_string = "ec2-user@%s" % (instance.ip_address) 
	
	# Install Web
	connect_attempts = 0
	while connect_attempts <= 3:
		try:
			install_web()
			break
		except NetworkError:
			print "Failed to connect: used attempt %s of 3" % \
											(connect_attempts)
			connect_attempts += 1
			time.sleep(10)
		except:
			print "Failed to install_web"
			break

	return True
Пример #2
0
def deploy_web():

    # Create New Instance
    instance = ec2.create_new_instance()

    # Set Env Host String
    env.host_string = "ec2-user@%s" % (instance.ip_address)

    # Install Web
    connect_attempts = 0
    while connect_attempts <= 3:
        try:
            install_web()
            break
        except NetworkError:
            print "Failed to connect: used attempt %s of 3" % \
                    (connect_attempts)
            connect_attempts += 1
            time.sleep(10)
        except:
            print "Failed to install_web"
            break

    return True
Пример #3
0
def create_instance():
	""" Just Creates an Amazon Instance """
	instance = ec2.create_new_instance()
	return instance
Пример #4
0
def create_instance():
    """ Just Creates an Amazon Instance """
    instance = ec2.create_new_instance()
    return instance
Пример #5
0
def create_instance():
	""" Just Creates an Instance """
	instance = ec2.create_new_instance()