コード例 #1
0
def stage():
    utils.status("Setting up STAGE")
    env.zone = 'your-domain.co.uk.'  # Base R53 zone, the dot is significant
    env.qa_urls = ['www.qa%s.your-domain.co.uk.']
    env.urls = ['www.your-domain.co.uk']
    env.base_url = 'your-domain.co.uk'
    env.environment = 'stage'
    env.load_balancer_name = '%s-%s' % (env.project, env.environment)
    env.instance_type = 't2.medium'
    env.docker_host = ''
    env.security_groups = ['stage']
    env.basic_auth = ("auth_basic 'Restricted'; "
                      "auth_basic_user_file /etc/nginx/users;")
    env.asg_desired_capacity = 1
    env.asg_adjustment_up = 1
    env.asg_adjustment_down = -1
    env.nagios_master_config_dir = '/etc/nagios3/aws.%s' % env.project
    env.r53_ttl = 60

    """
    The ID of your application base AMI. Having a base application AMI will speed
    up your deployment process.
    """
    env.ami_image_id = ''

    """
    The URL you will use to hit your Kibana box
    """
    env.logging_urls = ['logs.%s-%s.co.uk' % (env.project, env.environment)]

    """
    Amount of time in seconds to wait before attempting another scaling
    activity

    env.asg_default_cooldown = 180
    """
    env.asg_default_cooldown = 180

    """
    The minimum size of your autoscaling group.
    """
    env.asg_min_size = 1

    """
    The maximum size that your autoscaling group can grow to.
    """
    env.asg_max_size = 1
コード例 #2
0
def live():
    utils.status("Setting up LIVE")
    env.zone = 'your-domain.co.uk.'  # Base R53 zone, the dot is significant
    env.qa_url = ['www.qa%s.your-domain.co.uk.']
    env.urls = ['www.your-domain.co.uk']
    env.base_url = 'your-domain.co.uk'
    env.environment = 'live'
    env.load_balancer_name = '%s-%s' % (env.project, env.environment)
    env.instance_type = 't2.medium'
    env.docker_host = ''
    env.security_groups = ['live']
    env.basic_auth = ''
    env.asg_desired_capacity = 2
    env.asg_adjustment_up = 2
    env.asg_adjustment_down = -1
    env.nagios_master_config_dir = '/etc/nagios3/aws.%s' % env.project
    env.r53_ttl = 60

    """
    The URL you will use to hit your Kibana box
    """
    env.logging_urls = ['logs.%s' % env.base_url]

    """
    Amount of time in seconds to wait before attempting another scaling
    activity

    env.asg_default_cooldown = 180
    """
    env.asg_default_cooldown = 180

    """
    The minimum size of your autoscaling group.
    """
    env.asg_min_size = 2

    """
    The maximum size that your autoscaling group can grow to.
    """
    env.asg_max_size = 2
    env.ami_image_id = ''