beaker-aws 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,37 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
3
+ require 'beaker-aws/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "beaker-aws"
7
+ s.version = BeakerAws::VERSION
8
+ s.authors = ["Rishi Javia, Kevin Imber, Tony Vu"]
9
+ s.email = ["rishi.javia@puppet.com, kevin.imber@puppet.com, tony.vu@puppet.com"]
10
+ s.homepage = "https://github.com/puppetlabs/beaker-aws"
11
+ s.summary = %q{Beaker DSL Extension Helpers!}
12
+ s.description = %q{For use for the Beaker acceptance testing tool}
13
+ s.license = 'Apache2'
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ # Testing dependencies
21
+ s.add_development_dependency 'rspec', '~> 3.0'
22
+ s.add_development_dependency 'rspec-its'
23
+ s.add_development_dependency 'fakefs', '~> 0.6'
24
+ s.add_development_dependency 'rake', '~> 10.1'
25
+ s.add_development_dependency 'simplecov'
26
+ s.add_development_dependency 'pry', '~> 0.10'
27
+
28
+ # Documentation dependencies
29
+ s.add_development_dependency 'yard'
30
+ s.add_development_dependency 'markdown'
31
+ s.add_development_dependency 'thin'
32
+
33
+ # Run time dependencies
34
+ s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
35
+ s.add_runtime_dependency 'aws-sdk-v1', '~> 1.57'
36
+ end
37
+
data/bin/beaker-aws ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems' unless defined?(Gem)
4
+ require 'beaker-aws'
5
+
6
+ VERSION_STRING =
7
+ "
8
+ _ .--.
9
+ ( ` )
10
+ beaker-aws .-' `--,
11
+ _..----.. ( )`-.
12
+ .'_|` _|` _|( .__, )
13
+ /_| _| _| _( (_, .-'
14
+ ;| _| _| _| '-'__,--'`--'
15
+ | _| _| _| _| |
16
+ _ || _| _| _| _| %s
17
+ _( `--.\\_| _| _| _|/
18
+ .-' )--,| _| _|.`
19
+ (__, (_ ) )_| _| /
20
+ `-.__.\\ _,--'\\|__|__/
21
+ ;____;
22
+ \\YT/
23
+ ||
24
+ |\"\"|
25
+ '=='
26
+ "
27
+
28
+
29
+
30
+ puts BeakerAws::VERSION
31
+
32
+ exit 0
@@ -0,0 +1,5 @@
1
+ AMI:
2
+ ubuntu-1604-x86_64:
3
+ :image:
4
+ :base: ami-835b4efa
5
+ :region: us-west-2
data/ec2.md ADDED
@@ -0,0 +1,82 @@
1
+ Pre-requisite: .fog file correctly configured with your credentials.
2
+
3
+ hypervisor: ec2
4
+
5
+ ### example .fog file ###
6
+ :default:
7
+ :aws_access_key_id: IMTHEKEYID
8
+ :aws_secret_access_key: IMALONGACCESSKYE
9
+
10
+ ### Basic ec2 hosts file ###
11
+ HOSTS:
12
+ centos-5-64-1:
13
+ roles:
14
+ - master
15
+ - dashboard
16
+ - database
17
+ - agent
18
+ vmname: centos-5-x86-64-west
19
+ platform: el-5-x86_64
20
+ hypervisor: ec2
21
+ amisize: c1.medium
22
+ snapshot: pe
23
+ user: ec2-user
24
+ centos-5-64-1:
25
+ roles:
26
+ - agent
27
+ vmname: centos-5-x86-64-west
28
+ platform: el-5-x86_64
29
+ hypervisor: ec2
30
+ amisize: c1.medium
31
+ snapshot: pe
32
+ user: ec2-user
33
+ CONFIG:
34
+ nfs_server: none
35
+ consoleport: 443
36
+
37
+ Currently, there is limited support EC2 nodes; we are adding support for new platforms shortly.
38
+
39
+ AMIs are built for PE based installs on:
40
+ - Enterprise Linux 6, 64 and 32 bit
41
+ - Enterprise Linux 5, 32 bit
42
+ - Ubuntu 10.04, 32 bit
43
+
44
+ Beaker will automagically provision EC2 nodes, provided the 'platform:' section of your config file lists a supported platform type: ubuntu-10.04-i386, el-6-x86_64, el-6-i386, el-5-i386.
45
+
46
+ ### Supported EC2 Variables ###
47
+ These variables can either be set per-host or globally.
48
+ ####`additional_ports`####
49
+ Ports to be opened on the instance, in addition to those opened by Beaker to support Puppet functionality. Can be a single value or an array. Example valid values: 1001, [1001], [1001, 1002].
50
+
51
+ Ports opened by default:
52
+ * all hosts have [22, 61613, 8139] opened
53
+ * `master` will also have [8140, 8142] opened
54
+ * `dashboard` will also have [443, 4433, 4435] opened
55
+ * `database` will also have [5432, 8080, 8081] opened
56
+ * If you have a split install, all the hosts with `master`, `dashboard` and `database` role will have port 8143 opened
57
+
58
+ ####`amisize` ####
59
+ The [instance type](https://aws.amazon.com/ec2/instance-types/) - defaults to `m1.small`.
60
+ ####`snapshot`####
61
+ The snapshot to use for ec2 instance creation.
62
+ ####`subnet_id`####
63
+ If defined the instance will be created in this EC2 subnet. `vpc_id` must be defined. Cannot be defined at the same time as `subnet_ids`.
64
+ ####`subnet_ids`####
65
+ If defined the instace will be crated in one of the provided array of EC2 subnets. `vpc_id` must be defined. Cannot be defined at the same time as `subnet_id`.
66
+ ####`vmname`####
67
+ Used to look up the pre-defined AMI information in `config/image_templates/ec2.yaml`. Will default to `platform` if not defined.
68
+ #####Example ec2.yaml#####
69
+ In this example the `vmname` would be `puppetlabs-centos-5-x86-64-west`. Looking up the `vmname` in the `ec2.yaml` file provides an AMI ID by type (`pe` or `foss`) and the region.
70
+ ```
71
+ AMI:
72
+ puppetlabs-centos-5-x86-64-west:
73
+ :image:
74
+ :pe: ami-pl-12345
75
+ :region: us-west-2
76
+ ```
77
+ ####`volume_size`####
78
+ Size of the [EBS Volume](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) that will be attached to the EC2 instance.
79
+ ####`vpc_id`####
80
+ ID of the [VPC](https://aws.amazon.com/vpc/) to create the instances in. If not provided will either use the default VPC for the provided region (marked as `isDefault`), otherwise falls back to `nil`. If subnet information is provided (`subnet_id`/`subnet_ids`) this must be defined.
81
+ ####`user`####
82
+ By default root login is not allowed with Amazon Linux. Setting it to ec2-user will trigger `sshd_config` and `authorized_keys` changes by beaker.