Skip to content

Asgard Configuration

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

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

// 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'

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

        // Details about when and how to add EBS volumes in a launch configuration.
        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