Beispiel #1
0
def deploy():
    S3Bucket.create_bucket(defaults.S3_PHOTO_BUCKET)
    instance = LaunchEC2.launch_instance(cmd_shell=False)[0]
    sleeptime = 60
    print('sleeping for %d seconds' % sleeptime)
    time.sleep(sleeptime)

    print('attempting to connect to %s' % instance.public_dns_name)
    execute(deploy_photosite, hosts=[instance.public_dns_name])
def deploy(noip_user_pass=os.getenv("NOIP_USERPASSWORD"), noip_user_email=os.getenv("NOIP_USERAGENT"), noip_hostname=os.getenv("NOIP_HOSTNAME")):
    if noip_user_pass is None or noip_user_email is None or noip_hostname is None :
        raise Exception('Provide a username:password, email and hostname for noip_user_arg, noip_user_email, noip_hostname')
    instance = LaunchEC2.launch_instance(cmd_shell=False)[0]
    sleeptime = 60
    print('sleeping for %d seconds' % sleeptime)
    time.sleep(sleeptime)

    env.instance_ip = {
        instance.public_dns_name:instance.ip_address
    }

    print('attempting to connect to %s' % instance.public_dns_name)
    execute(update_noip, noip_user_pass=noip_user_pass, noip_user_email=noip_user_email, noip_hostname= noip_hostname, hosts=[instance.public_dns_name])
    execute(prepare_webapp, hosts=[instance.public_dns_name])
    execute(deploy_glasswebapp, hosts=[instance.public_dns_name])
def launchEC2():
    instance = LaunchEC2.launch_instance(cmd_shell=False)[0]
    print('launched instance %s' % instance.public_dns_name)