builderator 0.3.15 → 1.0.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/Gemfile.lock +440 -0
- data/README.md +72 -18
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/bin/build-clean +102 -0
- data/bin/build-data +45 -0
- data/builderator.gemspec +7 -4
- data/docs/configuration.md +154 -0
- data/docs/configuration/cookbook.md +19 -0
- data/docs/configuration/profile.md +71 -0
- data/docs/versioning.md +65 -0
- data/lib/builderator.rb +3 -0
- data/lib/builderator/config.rb +93 -0
- data/lib/builderator/config/attributes.rb +287 -0
- data/lib/builderator/config/defaults.rb +163 -0
- data/lib/builderator/config/file.rb +336 -0
- data/lib/builderator/config/rash.rb +80 -0
- data/lib/builderator/control/cleaner.rb +138 -0
- data/lib/builderator/control/cookbook.rb +16 -0
- data/lib/builderator/control/data.rb +16 -0
- data/lib/builderator/control/data/image.rb +98 -0
- data/lib/builderator/control/version.rb +128 -0
- data/lib/builderator/control/version/auto.rb +48 -0
- data/lib/builderator/control/version/bump.rb +82 -0
- data/lib/builderator/control/version/comparable.rb +77 -0
- data/lib/builderator/control/version/git.rb +45 -0
- data/lib/builderator/control/version/scm.rb +92 -0
- data/lib/builderator/interface.rb +67 -0
- data/lib/builderator/interface/berkshelf.rb +38 -0
- data/lib/builderator/interface/packer.rb +75 -0
- data/lib/builderator/interface/vagrant.rb +31 -0
- data/lib/builderator/metadata.rb +5 -3
- data/lib/builderator/model/cleaner.rb +49 -0
- data/lib/builderator/model/cleaner/images.rb +93 -0
- data/lib/builderator/model/cleaner/instances.rb +58 -0
- data/lib/builderator/model/cleaner/launch_configs.rb +47 -0
- data/lib/builderator/model/cleaner/scaling_groups.rb +45 -0
- data/lib/builderator/model/cleaner/snapshots.rb +50 -0
- data/lib/builderator/model/cleaner/volumes.rb +48 -0
- data/lib/builderator/patch/berkshelf.rb +18 -0
- data/lib/builderator/patch/thor-actions.rb +47 -0
- data/lib/builderator/tasks.rb +127 -17
- data/lib/builderator/tasks/berkshelf.rb +63 -0
- data/lib/builderator/tasks/packer.rb +17 -56
- data/lib/builderator/tasks/vagrant.rb +111 -42
- data/lib/builderator/tasks/vendor.rb +94 -0
- data/lib/builderator/tasks/version.rb +58 -0
- data/lib/builderator/util.rb +37 -11
- data/lib/builderator/util/aws_exception.rb +1 -1
- data/lib/builderator/util/limit_exception.rb +12 -11
- data/lib/builderator/util/task_exception.rb +0 -2
- data/mkmf.log +4 -0
- data/spec/config_spec.rb +30 -0
- data/spec/data/Berksfile +6 -0
- data/spec/data/Buildfile +0 -0
- data/spec/data/Vagrantfile +0 -0
- data/spec/data/history.json +483 -0
- data/spec/data/packer.json +0 -0
- data/spec/interface_spec.rb +36 -0
- data/spec/resource/Buildfile +27 -0
- data/spec/spec_helper.rb +90 -0
- data/spec/version_spec.rb +282 -0
- data/template/Berksfile.erb +10 -0
- data/template/Buildfile.erb +28 -0
- data/template/Gemfile.erb +16 -0
- data/template/README.md.erb +61 -0
- data/template/Vagrantfile.erb +75 -0
- data/template/gitignore.erb +104 -0
- data/{.rubocop.yml → template/rubocop.erb} +0 -0
- metadata +203 -56
- data/.gitignore +0 -14
- data/lib/builderator/control/ami.rb +0 -65
- data/lib/builderator/control/clean.rb +0 -130
- data/lib/builderator/model.rb +0 -46
- data/lib/builderator/model/images.rb +0 -89
- data/lib/builderator/model/instances.rb +0 -55
- data/lib/builderator/model/launch_configs.rb +0 -46
- data/lib/builderator/model/scaling_groups.rb +0 -43
- data/lib/builderator/model/snapshots.rb +0 -49
- data/lib/builderator/model/volumes.rb +0 -48
- data/lib/builderator/tasks/ami.rb +0 -47
- data/lib/builderator/tasks/berks.rb +0 -68
- data/lib/builderator/tasks/clean.rb +0 -97
- data/lib/builderator/util/berkshim.rb +0 -34
- data/lib/builderator/util/cookbook.rb +0 -87
- data/lib/builderator/util/packer.rb +0 -39
- data/lib/builderator/util/shell.rb +0 -44
@@ -0,0 +1,28 @@
|
|
1
|
+
##
|
2
|
+
# Generated by `build generate`
|
3
|
+
##
|
4
|
+
build_name '<%= build_name %>'
|
5
|
+
|
6
|
+
## Maven tags releases for now
|
7
|
+
autoversion.create_tags false
|
8
|
+
|
9
|
+
cookbook do |cookbook|
|
10
|
+
# cookbook.depends 'apt'
|
11
|
+
end
|
12
|
+
|
13
|
+
profile :default do |profile|
|
14
|
+
# profile.tags(:service => Config.build_name,
|
15
|
+
# :version => Config.version,
|
16
|
+
# :created => Config.date.iso8601)
|
17
|
+
|
18
|
+
profile.chef do |chef|
|
19
|
+
# chef.run_list 'apt::default'
|
20
|
+
# chef.node_attrs()
|
21
|
+
end
|
22
|
+
|
23
|
+
## Lookup the latest Ubuntu 14.04 Server (linux-3.13) AMI-ID
|
24
|
+
# profile.vagrant.ec2.source_ami =
|
25
|
+
# lookup(:image, 'filter' => 'ubuntu-14.04-daily').first.image_id
|
26
|
+
# profile.packer.build(:default).source_ami =
|
27
|
+
# lookup(:image, 'filter' => 'ubuntu-14.04-daily').first.image_id
|
28
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'builderator', '<%= generator.project.current.builderator.version %>'
|
4
|
+
|
5
|
+
<% if generator.project.current.vagrant.install -%>
|
6
|
+
gem 'vagrant', :github => 'mitchellh/vagrant',
|
7
|
+
:tag => '<%= generator.project.current.vagrant.version %>',
|
8
|
+
:group => :development
|
9
|
+
|
10
|
+
|
11
|
+
group :plugins do
|
12
|
+
<% generator.project.current.vagrant.plugin.each do |pname, plugin| -%>
|
13
|
+
gem '<%= pname %>'<% if plugin.has?(:version) %>'<%= plugin.version %>'<% end %>
|
14
|
+
<% end -%>
|
15
|
+
end
|
16
|
+
<% end -%>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<%= build_name %>
|
2
|
+
=====
|
3
|
+
|
4
|
+
## Usage
|
5
|
+
|
6
|
+
### Install dependencies
|
7
|
+
|
8
|
+
1. If you have not already done so, configure [`rbenv`](https://github.com/rbenv/rbenv#installation)
|
9
|
+
and [`ruby-build`](https://github.com/rbenv/ruby-build#installation) on your
|
10
|
+
workstation and [install Ruby 2.1.5](https://github.com/rbenv/rbenv#installing-ruby-versions).
|
11
|
+
1. Ensure that a supported version of [bundler](http://bundler.io/) is installed (`">= 1.5.2", "<= 1.10.6"`):
|
12
|
+
|
13
|
+
```bash
|
14
|
+
gem install bundler -v 1.10.6
|
15
|
+
```
|
16
|
+
|
17
|
+
1. Use `bundler` to install application-specific dependencies"
|
18
|
+
|
19
|
+
```bash
|
20
|
+
bundle install
|
21
|
+
```
|
22
|
+
|
23
|
+
1. **Optionally**, add an alias for `build`. In `$HOME/.profile` or `$HOME/bash_profile`
|
24
|
+
add the following, then reload your profile:
|
25
|
+
|
26
|
+
```bash
|
27
|
+
alias build="bundle exec build"
|
28
|
+
```
|
29
|
+
|
30
|
+
```bash
|
31
|
+
. ~/.profile
|
32
|
+
```
|
33
|
+
|
34
|
+
**All subsequent examples with a `build` command assume that you've created an alias
|
35
|
+
or are prepending `bundle exec` to the command string**
|
36
|
+
|
37
|
+
### Start a local Vagrant VM, then SSH into it.
|
38
|
+
|
39
|
+
```bash
|
40
|
+
build local
|
41
|
+
build vagrant ssh
|
42
|
+
```
|
43
|
+
|
44
|
+
To clean up VMs, run
|
45
|
+
|
46
|
+
```bash
|
47
|
+
build vagrant destroy
|
48
|
+
```
|
49
|
+
|
50
|
+
### Launch an EC2 instance
|
51
|
+
|
52
|
+
```bash
|
53
|
+
build ec2
|
54
|
+
build vagrant ssh
|
55
|
+
```
|
56
|
+
|
57
|
+
### Clean up VMs and local generated resources
|
58
|
+
|
59
|
+
```bash
|
60
|
+
build clean
|
61
|
+
```
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
Vagrant.configure('2') do |config|
|
5
|
+
config.vm.hostname = 'builderator-<%= build_name %>'
|
6
|
+
|
7
|
+
## Local Provider
|
8
|
+
config.vm.provider '<%= profile.current.vagrant.local.provider %>' do |local, override|
|
9
|
+
local.memory = <%= profile.current.vagrant.local.memory %>
|
10
|
+
local.cpus = <%= profile.current.vagrant.local.cpus %>
|
11
|
+
|
12
|
+
override.vm.box = '<%= profile.current.vagrant.local.box %>'
|
13
|
+
override.vm.box_url = '<%= profile.current.vagrant.local.box_url %>'
|
14
|
+
end
|
15
|
+
|
16
|
+
## EC2 Provider
|
17
|
+
config.vm.provider '<%= profile.current.vagrant.ec2.provider %>' do |ec2, override|
|
18
|
+
override.vm.box = '<%= profile.current.vagrant.ec2.box %>'
|
19
|
+
override.vm.box_url = '<%= profile.current.vagrant.ec2.box_url %>'
|
20
|
+
override.ssh.username = '<%= profile.current.vagrant.ec2.ssh_username %>'
|
21
|
+
|
22
|
+
ec2.region = '<%= profile.current.vagrant.ec2.region %>'
|
23
|
+
ec2.subnet_id = '<%= profile.current.vagrant.ec2.subnet_id %>'
|
24
|
+
|
25
|
+
## VPN Connected VPC
|
26
|
+
ec2.associate_public_ip = <%= profile.current.vagrant.ec2.associate_public_ip %>
|
27
|
+
ec2.ssh_host_attribute = :<%= profile.current.vagrant.ec2.ssh_host_attribute %>
|
28
|
+
|
29
|
+
ec2.instance_type = '<%= profile.current.vagrant.ec2.instance_type %>'
|
30
|
+
ec2.security_groups = <%= profile.current.vagrant.ec2.security_groups %>
|
31
|
+
ec2.iam_instance_profile_arn = '<%= profile.current.vagrant.ec2.iam_instance_profile_arn %>'
|
32
|
+
|
33
|
+
ec2.ami = '<%= profile.current.vagrant.ec2.source_ami %>'
|
34
|
+
end
|
35
|
+
|
36
|
+
# config.vm.network :forwarded_port, :host => 9200, :guest => 9200
|
37
|
+
|
38
|
+
##
|
39
|
+
# Use the standard data directory for Chef
|
40
|
+
##
|
41
|
+
config.vm.provision :shell,
|
42
|
+
:inline => 'mkdir -p <%= chef.staging_directory %>/cache && chown vagrant:vagrant -R <%= chef.staging_directory %>',
|
43
|
+
:privileged => true
|
44
|
+
|
45
|
+
##
|
46
|
+
# Sync build artifacts to the VM
|
47
|
+
##
|
48
|
+
<% profile.current.artifact.each do |name, artifact| -%>
|
49
|
+
config.vm.provision :file,
|
50
|
+
:source => '<%= artifact.path %>',
|
51
|
+
:destination => '<%= artifact.destination %>'
|
52
|
+
<% end -%>
|
53
|
+
|
54
|
+
config.omnibus.chef_version = '<%= chef.version %>'
|
55
|
+
config.vm.provision :chef_solo do |chef|
|
56
|
+
chef.log_level = :<%= chef.log_level %>
|
57
|
+
|
58
|
+
chef.cookbooks_path = '<%= local.cookbook_path %>'
|
59
|
+
<% unless local.data_bag_path.nil? -%>
|
60
|
+
chef.data_bags_path = '<%= local.data_bag_path %>'
|
61
|
+
<% end -%>
|
62
|
+
<% unless local.environment_path.nil? -%>
|
63
|
+
chef.environments_path = '<%= local.environment_path %>'
|
64
|
+
<% end -%>
|
65
|
+
chef.provisioning_path = '<%= chef.staging_directory %>'
|
66
|
+
|
67
|
+
chef.run_list = <%= profile.current.chef.run_list %>
|
68
|
+
<% unless profile.current.chef.environment.nil? -%>
|
69
|
+
chef.environment = '<%= profile.current.chef.environment %>'
|
70
|
+
<% end -%>
|
71
|
+
<% unless profile.current.chef.node_attrs.nil? -%>
|
72
|
+
chef.json = <%= profile.current.chef.node_attrs %>
|
73
|
+
<% end -%>
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# Compiled source #
|
2
|
+
###################
|
3
|
+
*.com
|
4
|
+
*.class
|
5
|
+
*.dll
|
6
|
+
*.exe
|
7
|
+
*.o
|
8
|
+
*.so
|
9
|
+
|
10
|
+
# Packages #
|
11
|
+
############
|
12
|
+
# it's better to unpack these files and commit the raw source
|
13
|
+
# git has its own built in compression methods
|
14
|
+
*.7z
|
15
|
+
*.dmg
|
16
|
+
*.gz
|
17
|
+
*.iso
|
18
|
+
*.jar
|
19
|
+
*.rar
|
20
|
+
*.tar
|
21
|
+
*.zip
|
22
|
+
|
23
|
+
# Logs and databases #
|
24
|
+
######################
|
25
|
+
*.log
|
26
|
+
|
27
|
+
# OS generated files #
|
28
|
+
######################
|
29
|
+
.DS_Store*
|
30
|
+
ehthumbs.db
|
31
|
+
Icon?
|
32
|
+
Thumbs.db
|
33
|
+
|
34
|
+
# Editor Files #
|
35
|
+
################
|
36
|
+
*~
|
37
|
+
*#
|
38
|
+
.#*
|
39
|
+
\#*#
|
40
|
+
.*.sw[a-z]
|
41
|
+
*.un~
|
42
|
+
pkg/
|
43
|
+
|
44
|
+
# Berkshelf
|
45
|
+
/cookbooks
|
46
|
+
Berksfile.lock
|
47
|
+
|
48
|
+
# Bundler
|
49
|
+
bin/*
|
50
|
+
.bundle/*
|
51
|
+
|
52
|
+
VERSION
|
53
|
+
bundle.tar.gz
|
54
|
+
metadata.json
|
55
|
+
vendor/
|
56
|
+
*.swp
|
57
|
+
|
58
|
+
.vagrant
|
59
|
+
.builderator/*
|
60
|
+
|
61
|
+
# Gradle Files #
|
62
|
+
################
|
63
|
+
.gradle
|
64
|
+
|
65
|
+
# Build output directies
|
66
|
+
/target
|
67
|
+
*/target
|
68
|
+
/build
|
69
|
+
*/build
|
70
|
+
|
71
|
+
# IntelliJ specific files/directories
|
72
|
+
out
|
73
|
+
.idea
|
74
|
+
*.ipr
|
75
|
+
*.iws
|
76
|
+
*.iml
|
77
|
+
atlassian-ide-plugin.xml
|
78
|
+
|
79
|
+
# Eclipse specific files/directories
|
80
|
+
.classpath
|
81
|
+
.checkstyle
|
82
|
+
.project
|
83
|
+
.settings
|
84
|
+
.metadata
|
85
|
+
.checkstyle
|
86
|
+
*/bin
|
87
|
+
test-output
|
88
|
+
|
89
|
+
# NetBeans specific files/directories
|
90
|
+
.nbattrs
|
91
|
+
|
92
|
+
# JavaScript
|
93
|
+
/node_modules
|
94
|
+
/bower_components
|
95
|
+
|
96
|
+
# Maven
|
97
|
+
/.repostory/
|
98
|
+
/test-output/
|
99
|
+
/logs/
|
100
|
+
|
101
|
+
# checkstyle
|
102
|
+
.checkstyle
|
103
|
+
/logs/
|
104
|
+
/bin/
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: builderator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.pre.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Manero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -24,6 +24,48 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '10.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.35'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.35'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: thor-scmversion
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.7.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.7.0
|
27
69
|
- !ruby/object:Gem::Dependency
|
28
70
|
name: aws-sdk
|
29
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +122,20 @@ dependencies:
|
|
80
122
|
- - "~>"
|
81
123
|
- !ruby/object:Gem::Version
|
82
124
|
version: '12.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: faraday_middleware
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.10.0
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.10.0
|
83
139
|
- !ruby/object:Gem::Dependency
|
84
140
|
name: ignorefile
|
85
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,95 +164,175 @@ dependencies:
|
|
108
164
|
- - "~>"
|
109
165
|
- !ruby/object:Gem::Version
|
110
166
|
version: 0.19.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: thor-scmversion
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - '='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 1.7.0
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - '='
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 1.7.0
|
125
167
|
description: |
|
126
168
|
# Builderator
|
127
|
-
__Tools to make CI Packer builds awesome__
|
128
169
|
|
129
|
-
|
170
|
+
Orchestration and configuration of the code development life-cycle.
|
130
171
|
|
131
|
-
|
172
|
+
## Commands
|
132
173
|
|
133
|
-
|
134
|
-
|
135
|
-
|
174
|
+
### `local [PROFILE = default]`
|
175
|
+
|
176
|
+
Provision a local VM using Vagrant and, by default, VirtualBox. Uses Berkshelf to fetch cookbooks, and Chef to provision the VM.
|
177
|
+
|
178
|
+
### `ec2 [PROFILE = default]`
|
179
|
+
|
180
|
+
Provision an EC2 VM using Vagrant. Same workflow as `local` using the `vagrant-aws` plugin.
|
136
181
|
|
137
|
-
|
182
|
+
### `release [PROFILE = default]`
|
138
183
|
|
139
|
-
|
184
|
+
Perform release tasks and execute Packer builds with released artifacts.
|
140
185
|
|
141
|
-
|
186
|
+
## Configuration
|
142
187
|
|
143
|
-
|
188
|
+
Configuration can be loaded from DSL files as well as JSON and command line arguments. By default, Builderator searches in your home directory (`$HOME/.builderator/Buildfile`) and the working directory (`./Builderator`) for DSL files. Configuration sources are layered and flattened into a single DSL in the following order:
|
144
189
|
|
145
|
-
|
190
|
+
* Global defaults defined in the Builderator sources
|
191
|
+
* `Config.defaults` set by plugins, tasks, etc. in code
|
192
|
+
* `$HOME/.builderator/Buildfile`
|
193
|
+
* `./Buildfile`
|
194
|
+
* `Config.overrides` set by plugins, tasks, etc. in code
|
195
|
+
* CLI arguments loaded from Thor
|
146
196
|
|
147
|
-
|
197
|
+
[Additional documentation](docs/configuration.md) describes the configuration DSL interface.
|
148
198
|
|
149
|
-
##
|
199
|
+
## Integrations
|
150
200
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
201
|
+
Builderator integrates with other tools, including [Berkshelf](http://berkshelf.com), [Vagrant](https://www.vagrantup.com/), and [Packer](https://www.packer.io/), to orchestrate workflows by generating `Berksfile`s, `Vagrantfile`s, and JSON strings for Packer. This means that you can replace all of these files in your project with a single `Buildfile`.
|
202
|
+
|
203
|
+
### Packer
|
204
|
+
|
205
|
+
The Packer integration generates Packer JSON and passes it to STDIN of `packer build -`.
|
206
|
+
|
207
|
+
*NOTE* Currently, we assume that you're building Ubuntu images, as one of the provisioners is hard-coded to chown the Chef data directories to `ubuntu:ubuntu`
|
208
|
+
|
209
|
+
## Versioning
|
210
|
+
|
211
|
+
Builderator can automatically detect versions from SCM tags, increment the latest version of an SCM branch by a variety of steps, and create new SCM tags for new versions.
|
212
|
+
|
213
|
+
[Additional documentation](docs/versioning.md) describes CLI commands, configuration, and detailed behavior.
|
214
|
+
|
215
|
+
## Generators
|
216
|
+
|
217
|
+
Builderator includes a task to generate common project trees from configuration definitions and templates.
|
218
|
+
|
219
|
+
Each type of project is configurable via the project collection in the `generator` namespace:
|
220
|
+
|
221
|
+
```ruby
|
222
|
+
generator.project :default do |default|
|
223
|
+
default.ruby.version '2.1.5'
|
224
|
+
default.builderator.version '~> 1.0'
|
225
|
+
|
226
|
+
default.vagrant do |vagrant|
|
227
|
+
vagrant.install false
|
228
|
+
vagrant.version 'v1.8.0'
|
229
|
+
|
230
|
+
vagrant.plugin 'vagrant-aws'
|
231
|
+
vagrant.plugin 'vagrant-omnibus'
|
232
|
+
end
|
233
|
+
|
234
|
+
default.resource :berksfile do |berksfile|
|
235
|
+
berksfile.path 'Berksfile', 'Berksfile.lock'
|
236
|
+
berksfile.action :rm
|
237
|
+
end
|
238
|
+
|
239
|
+
default.resource :buildfile do |buildfile|
|
240
|
+
buildfile.path 'Buildfile'
|
241
|
+
buildfile.action :create
|
242
|
+
buildfile.template 'template/Buildfile.erb'
|
243
|
+
end
|
244
|
+
|
245
|
+
# ...
|
246
|
+
end
|
247
|
+
```
|
248
|
+
|
249
|
+
Valid actions for resources include `:ignore`, `:create` (update only if missing), `:sync` (create or update with prompt), and `:rm`. `:create` and `:sync` actions require a valid template source.
|
250
|
+
|
251
|
+
By default, the `generator` subcommand includes a `default` project which removes Vagrant, Berkshelf, and Packer configurations.
|
156
252
|
email:
|
157
253
|
- jmanero@rapid7.com
|
158
254
|
executables:
|
159
255
|
- build
|
256
|
+
- build-clean
|
257
|
+
- build-data
|
160
258
|
extensions: []
|
161
259
|
extra_rdoc_files: []
|
162
260
|
files:
|
163
|
-
- ".gitignore"
|
164
|
-
- ".rubocop.yml"
|
165
261
|
- Gemfile
|
262
|
+
- Gemfile.lock
|
166
263
|
- LICENSE.txt
|
167
264
|
- README.md
|
168
265
|
- Rakefile
|
169
266
|
- Thorfile
|
170
267
|
- VERSION
|
171
268
|
- bin/build
|
269
|
+
- bin/build-clean
|
270
|
+
- bin/build-data
|
172
271
|
- builderator.gemspec
|
173
272
|
- docs/clean.md
|
273
|
+
- docs/configuration.md
|
274
|
+
- docs/configuration/cookbook.md
|
275
|
+
- docs/configuration/profile.md
|
276
|
+
- docs/versioning.md
|
174
277
|
- lib/builderator.rb
|
175
|
-
- lib/builderator/
|
176
|
-
- lib/builderator/
|
278
|
+
- lib/builderator/config.rb
|
279
|
+
- lib/builderator/config/attributes.rb
|
280
|
+
- lib/builderator/config/defaults.rb
|
281
|
+
- lib/builderator/config/file.rb
|
282
|
+
- lib/builderator/config/rash.rb
|
283
|
+
- lib/builderator/control/cleaner.rb
|
284
|
+
- lib/builderator/control/cookbook.rb
|
285
|
+
- lib/builderator/control/data.rb
|
286
|
+
- lib/builderator/control/data/image.rb
|
287
|
+
- lib/builderator/control/version.rb
|
288
|
+
- lib/builderator/control/version/auto.rb
|
289
|
+
- lib/builderator/control/version/bump.rb
|
290
|
+
- lib/builderator/control/version/comparable.rb
|
291
|
+
- lib/builderator/control/version/git.rb
|
292
|
+
- lib/builderator/control/version/scm.rb
|
293
|
+
- lib/builderator/interface.rb
|
294
|
+
- lib/builderator/interface/berkshelf.rb
|
295
|
+
- lib/builderator/interface/packer.rb
|
296
|
+
- lib/builderator/interface/vagrant.rb
|
177
297
|
- lib/builderator/metadata.rb
|
178
|
-
- lib/builderator/model.rb
|
179
|
-
- lib/builderator/model/images.rb
|
180
|
-
- lib/builderator/model/instances.rb
|
181
|
-
- lib/builderator/model/launch_configs.rb
|
182
|
-
- lib/builderator/model/scaling_groups.rb
|
183
|
-
- lib/builderator/model/snapshots.rb
|
184
|
-
- lib/builderator/model/volumes.rb
|
298
|
+
- lib/builderator/model/cleaner.rb
|
299
|
+
- lib/builderator/model/cleaner/images.rb
|
300
|
+
- lib/builderator/model/cleaner/instances.rb
|
301
|
+
- lib/builderator/model/cleaner/launch_configs.rb
|
302
|
+
- lib/builderator/model/cleaner/scaling_groups.rb
|
303
|
+
- lib/builderator/model/cleaner/snapshots.rb
|
304
|
+
- lib/builderator/model/cleaner/volumes.rb
|
305
|
+
- lib/builderator/patch/berkshelf.rb
|
306
|
+
- lib/builderator/patch/thor-actions.rb
|
185
307
|
- lib/builderator/tasks.rb
|
186
|
-
- lib/builderator/tasks/
|
187
|
-
- lib/builderator/tasks/berks.rb
|
188
|
-
- lib/builderator/tasks/clean.rb
|
308
|
+
- lib/builderator/tasks/berkshelf.rb
|
189
309
|
- lib/builderator/tasks/cookbook.rb
|
190
310
|
- lib/builderator/tasks/packer.rb
|
191
311
|
- lib/builderator/tasks/vagrant.rb
|
312
|
+
- lib/builderator/tasks/vendor.rb
|
313
|
+
- lib/builderator/tasks/version.rb
|
192
314
|
- lib/builderator/util.rb
|
193
315
|
- lib/builderator/util/aws_exception.rb
|
194
|
-
- lib/builderator/util/berkshim.rb
|
195
|
-
- lib/builderator/util/cookbook.rb
|
196
316
|
- lib/builderator/util/limit_exception.rb
|
197
|
-
- lib/builderator/util/packer.rb
|
198
|
-
- lib/builderator/util/shell.rb
|
199
317
|
- lib/builderator/util/task_exception.rb
|
318
|
+
- mkmf.log
|
319
|
+
- spec/config_spec.rb
|
320
|
+
- spec/data/Berksfile
|
321
|
+
- spec/data/Buildfile
|
322
|
+
- spec/data/Vagrantfile
|
323
|
+
- spec/data/history.json
|
324
|
+
- spec/data/packer.json
|
325
|
+
- spec/interface_spec.rb
|
326
|
+
- spec/resource/Buildfile
|
327
|
+
- spec/spec_helper.rb
|
328
|
+
- spec/version_spec.rb
|
329
|
+
- template/Berksfile.erb
|
330
|
+
- template/Buildfile.erb
|
331
|
+
- template/Gemfile.erb
|
332
|
+
- template/README.md.erb
|
333
|
+
- template/Vagrantfile.erb
|
334
|
+
- template/gitignore.erb
|
335
|
+
- template/rubocop.erb
|
200
336
|
homepage: https://github.com/rapid7/builderator
|
201
337
|
licenses:
|
202
338
|
- MIT
|
@@ -212,13 +348,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
212
348
|
version: '0'
|
213
349
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
350
|
requirements:
|
215
|
-
- - "
|
351
|
+
- - ">"
|
216
352
|
- !ruby/object:Gem::Version
|
217
|
-
version:
|
353
|
+
version: 1.3.1
|
218
354
|
requirements: []
|
219
355
|
rubyforge_project:
|
220
|
-
rubygems_version: 2.4.
|
356
|
+
rubygems_version: 2.4.5
|
221
357
|
signing_key:
|
222
358
|
specification_version: 4
|
223
359
|
summary: Tools to make CI Packer builds awesome
|
224
|
-
test_files:
|
360
|
+
test_files:
|
361
|
+
- spec/config_spec.rb
|
362
|
+
- spec/data/Berksfile
|
363
|
+
- spec/data/Buildfile
|
364
|
+
- spec/data/Vagrantfile
|
365
|
+
- spec/data/history.json
|
366
|
+
- spec/data/packer.json
|
367
|
+
- spec/interface_spec.rb
|
368
|
+
- spec/resource/Buildfile
|
369
|
+
- spec/spec_helper.rb
|
370
|
+
- spec/version_spec.rb
|
371
|
+
has_rdoc:
|