Skip to content

Asgard Configuration

Joe Sondow edited this page Nov 25, 2013 · 14 revisions

Optional functions of Asgard can be enabled by editing ~/.asgard/Config.groovy

Note: The following customInstanceTypes is not compatible with asgard-1.3.1. See this version of Config.groovy for a 1.3.1 compatible version

import com.netflix.asgard.model.HardwareProfile
import com.netflix.asgard.model.InstanceTypeData

// List of relevant Amazon Web Services account numbers as strings, starting
// with the account primarily used by this Asgard instance. All other accounts
// in the list are candidates for cross-account sharing of resources such as
// Amazon Machine Images (AMIs). When an AMI gets used in an Auto Scaling Group
// in the current account, Asgard then attempts to grant launch permissions for
// that AMI to all other accounts
// in this list.
grails.awsAccounts = ['123456789012', '098765432109']


// Map of interesting AWS account numbers to account nicknames. These will be
// displayed on the home page and may also be used in some parts of the user
// interface to show the account nickname instead of the account number.
grails.awsAccountNames = ['123456789012': 'test', '098765432109': 'prod']

cloud {
    // Nickname of the current account, for display and messages. Usually this 
    // should match the first value in grails.awsAccountNames.
    accountName = 'test'

    // Choose a skin name to change the look and feel of this Asgard GUI.
    // 'test' has a black header with red logotype, 'prod' has a red header with
    // black logotype.
    envStyle = 'test'

    // The name of the EC2 SSH Keypair that you recommend for most deployments.
    defaultKeyName = 'test-keypair-primary'

    // The root URL of the build server (probably Jenkins) that Asgard should 
    // use to construct hyperlinks to the builds that generated tagged AMIs 
    // through Aminator.
    buildServer = 'http://builds.example.com'

    // A list of instance types that should be added to the instance types list 
    // screen and the instance types form select fields. By default this custom 
    // list is empty, and only the instance types published in the 
    // InstanceType.java enum in the aws-java-sdk library get displayed.
    customInstanceTypes = [
            new InstanceTypeData(linuxOnDemandPrice: 0.15, hardwareProfile:
                    new HardwareProfile(instanceType: 'c3.large',
                            family: 'Compute Optimized', group: 'c3',
                            size: 'Large', arch: '64-bit', vCpu: '2', ecu: '7', 
                            mem: '3.75', storage: '2 x 16', ebsOptim: '-', 
                            netPerf: '?')),
            new InstanceTypeData(linuxOnDemandPrice: 0.30, hardwareProfile:
                    new HardwareProfile(instanceType: 'c3.xlarge',
                            family: 'Compute Optimized', group: 'c3',
                            size: 'Extra Large', arch: '64-bit', vCpu: '4', 
                            ecu: '14', mem: '7', storage: '2 x 40', 
                            ebsOptim: '-', netPerf: '?')),
            new InstanceTypeData(linuxOnDemandPrice: 0.60, hardwareProfile:
                    new HardwareProfile(instanceType: 'c3.2xlarge',
                            family: 'Compute Optimized', group: 'c3',
                            size: 'Double Extra Large', arch: '64-bit', 
                            vCpu: '8', ecu: '28', mem: '15', storage: '2 x 80', 
                            ebsOptim: '-', netPerf: '?')),
            new InstanceTypeData(linuxOnDemandPrice: 1.20, hardwareProfile:
                    new HardwareProfile(instanceType: 'c3.4xlarge',
                            family: 'Compute Optimized', group: 'c3',
                            size: 'Quadruple Extra Large', arch: '64-bit', 
                            vCpu: '16', ecu: '55', mem: '30', 
                            storage: '2 x 160', ebsOptim: '-', netPerf: '?')),
            new InstanceTypeData(linuxOnDemandPrice: 2.40, hardwareProfile:
                    new HardwareProfile(instanceType: 'c3.8xlarge',
                            family: 'Compute Optimized', group: 'c3',
                            size: 'Eight Extra Large', arch: '64-bit', 
                            vCpu: '32', ecu: '108', mem: '60', 
                            storage: '2 x 320', ebsOptim: '-', netPerf: '?')),
    ]

    // Special cases for how to launch certain instance types.
    launchConfig {

        // Details about when and how to add EBS volumes in a launch config.
        ebsVolumes {

            // A Closure that takes an instance type string and returns a 
            // boolean. If true, EBS volumes will be added for the instance
            // type. Otherwise, no EBS volumes.
            instanceTypeNeeds = { String instanceType ->
                instanceType.startsWith('m3.') // Default implementation
            }

            // Number of GB of storage each EBS volume will have, if the 
            // instance type needs EBS volumes.
            size = 125 // Default value

            // The list of device names of all the EBS volumes that be added, if
            // the instance type needs EBS volumes.
            deviceNames = ['/dev/sdb', '/dev/sdc'] // Default list
        }
    }
}

promote {
    // The address of the Asgard server that should receive all the REST calls 
    // to add, update, and delete image tags in order keep the image tags 
    // identical between the source and target accounts.
    targetServer = 'http://asgardprod'

    // Set this to true in order to turn on image replication from this Asgard 
    // instance. Only set this on the source Asgard, not on the target Asgard.
    imageTags = true

    // The address of the One True Asgard Instance that should be solely 
    // responsible for automated replication of image tags to the tag promotion 
    // target account. Asgard will query this address for its internal host name 
    // in order to answer the question "Am I the current Asgard instance who 
    // should do the tag replication?"
    canonicalServerForBakeEnvironment = 'http://asgardtest'
}
Clone this wiki locally