Changes between Version 35 and Version 36 of CloudPlugin
- Timestamp:
- Apr 25, 2011, 11:06:19 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CloudPlugin
v35 v36 3 3 = Orchestrates AWS cloud resources using boto and pychef = 4 4 5 ''This fairly new plugin is nowbeing put through its paces at [http://www.juju.com juju.com]. I welcome others to try it out and submit tickets for bugs and new features. - robguttman, 7 Feb 2011''6 7 '' '''UPDATE:''' The latest version (0.2) now launches and bootstraps new instances in a separate, spawned process which survives Apache timeouts and restarts. See below for more details and screenshot. - robguttman, 13 Mar 2011''5 ''This fairly new plugin is being put through its paces at [http://www.juju.com juju.com]. I welcome others to try it out and submit tickets for bugs and new features. - robguttman, 7 Feb 2011'' 6 7 '' '''UPDATE:''' Latest version supports RDS instances, executing remote commands, and push-button deployments. More details in notes below. - robguttman, 25 Apr 2011'' 8 8 9 9 == Description == … … 12 12 * Launch an ec2 instance, bootstrap it with chef and apply one or more chef roles 13 13 * Terminate ec2 instances and delete its chef node (and client) 14 * Execute commands (e.g., deployments) to ec2 instances based on environment or role 14 15 15 16 [[Image(instance-grid.png)]] 16 17 17 There are additional features and quite possibly more to come, but my intention is to keep the scope down to what's needed to orchestrate between AWS and Chef (and not re-implement either the AWS Management Console or the Chef Server webui).18 There are additional features and quite possibly more to come, but my intention is to keep the scope down to what's needed to orchestrate between AWS and Chef inclusive of managing ec2 instances based on environment or role (and not re-implement either the AWS Management Console or the Chef Server webui). 18 19 19 20 This plugin is highly configurable but is opinionated in some ways. Some of these opinions could be relaxed ([http://trac-hacks.org/newticket?component=CloudPlugin&owner=robguttman submit a ticket!]) but they currently are: … … 52 53 aws_keypair_pem = /path/to/keypair.pem 53 54 aws_username = <ec2-username> 55 rds_username = <rds-master-username> 56 rds_password = <rds-master-password> 54 57 chef_base_path = /path/to/.chef 58 chef_boot_run_list = <list-of-roles-or-recipes> 55 59 }}} 56 60 57 61 === AWS access configuration === 58 The {{{aws_*}}} options (see example above) are for your AWS credentials and security information. For more info, see [http://docs.amazonwebservices.com/AWSSimpleQueueService/2007-05-01/SQSDeveloperGuide/AWSCredentials.html here] and [http://docs.amazonwebservices.com/AWSSecurityCredentials/1.0/AboutAWSCredentials.html here].62 The {{{aws_*}}} and {{{rds_*}}} options (see example above) are for your AWS credentials and security information. For more info, see [http://docs.amazonwebservices.com/AWSSimpleQueueService/2007-05-01/SQSDeveloperGuide/AWSCredentials.html here] and [http://docs.amazonwebservices.com/AWSSecurityCredentials/1.0/AboutAWSCredentials.html here]. 59 63 60 64 === Chef access configuration === … … 176 180 177 181 182 === RDS Instances === 183 RDS instances can be created and deleted using this plugin. The rds instance resource type is configured almost identically to ec2 instances (see above). One important difference is that the list of rds instances and their attributes are saved in a chef data bag. This makes their attributes available to chef recipes. In order to ensure that this data is up-to-date, you can click on the "Audit" button in the grid view. 184 185 === Commands === 186 To help manage many ec2 instances, you can define commands to be run on them in the "Commands" section. The command resource type is configured similarly to ec2 and rds instances. Their data is maintained in a chef data bag. An example command may look this this: 187 {{{ 188 /usr/bin/ssh -i %(keypair_pem)s root@%(host)s "service apache2 restart" 189 }}} 190 191 The {{{%(keypair_pem)s}}} will get replaced with the {{{aws_keypair_pem}}} as defined in {{{trac.ini's [cloud]}}} section (see above). Also, {{{%(host)s}}} will get replaced with the public DNS name of each host. Hosts are selected by environment and/or role. 192 193 === Environments === 194 With Chef 0.10 comes support for environments. This plugin builds on this support by allowing (read: presuming) that AWS resources belong to one and only one environment. For example, there's a default {{{environment}}} field that can get set when creating a new ec2 or rds instance. The environment resource type also allows you to define and set attributes per environment via the plugin's webui. For example, you can set different version control repo branch names and/or changesets per environment so that the right source code gets deployed to each environment. 195 196 ==== Deploy and Audit ==== 197 There are two special commands that can be defined: "deploy" and "audit". A command with a "deploy" ID will cause a "Deploy" button to appear in an environment's View along with widgets to select which role(s) should be used to identify the instances to which to deploy. The 'deploy' script itself is left for you to define as such scripts often require significant logic specific to your environments. 198 199 Similarly, if a command with an "audit" ID will cause an "Audit" button to appear in an environment's View along with widgets to select which role(s) should be used to identify the instances of which to audit. The 'audit' script itself is left for you to define as such scripts often require significant logic specific to your environments. 200 201 178 202 === Progress views === 179 Launching or bootstrapping an ec2 instance can take a variably long time - usually longer than the default Apache timeouts (e.g., {{{FcgidIOTimeout}}}). Instead of wrestling with Apache timeout configurations, this plugin now launches and bootstraps ec2 instances in a separate, spawned process (an orphaned daemon) that survives Apache timeouts and restarts. Surviving Apache restarts is also helpful when Trac itself is chef-managed and may be restarted by the {{{chef-client}}} upon config changes. Creating a new instancenow brings up a new 'Progress' page that tracks the spawned process' progress:203 Actions such as launching or bootstrapping an ec2 instance or deploying code to an environment can take a variably long time - usually longer than the default Apache timeouts (e.g., {{{FcgidIOTimeout}}}). Instead of wrestling with Apache timeout configurations, this plugin executes each of these actions in a separate, spawned process (an orphaned daemon) that survives Apache timeouts and restarts. Surviving Apache restarts is also helpful when Trac itself is chef-managed and may be restarted by the {{{chef-client}}} upon config changes. Creating a new ec2 instance, executing remote commands, etc. now brings up a new 'Progress' page that tracks the spawned process' progress: 180 204 181 205 [[Image(progress.png)]] 182 206 183 As the instance id and public DNS become known, they're presented.207 For launching ec2 instances, as the instance id and public DNS become known, they're presented. 184 208 185 209 == Recent Changes ==