boxgrinder-build 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/Manifest +44 -2
- data/Rakefile +1 -1
- data/bin/boxgrinder-build +1 -0
- data/boxgrinder-build.gemspec +8 -8
- data/integ/spec/files-spec.rb +2 -1
- data/integ/spec/jeos-spec.rb +2 -1
- data/integ/spec/modular-spec.rb +3 -1
- data/lib/boxgrinder-build/helpers/aws-helper.rb +22 -31
- data/lib/boxgrinder-build/helpers/banner-helper.rb +29 -0
- data/lib/boxgrinder-build/plugins/base-plugin.rb +6 -2
- data/lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb +26 -21
- data/lib/boxgrinder-build/plugins/delivery/ebs/messages.rb +23 -0
- data/lib/boxgrinder-build/plugins/delivery/s3/messages.rb +22 -0
- data/lib/boxgrinder-build/plugins/delivery/s3/s3-plugin.rb +18 -6
- data/lib/boxgrinder-build/plugins/os/fedora/fedora-plugin.rb +9 -3
- data/lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb +9 -7
- data/lib/boxgrinder-build/plugins/platform/ec2/src/fstab_32bit +0 -2
- data/lib/boxgrinder-build/plugins/platform/ec2/src/fstab_64bit +0 -2
- data/rubygem-boxgrinder-build.spec +64 -48
- data/spec/plugins/delivery/ebs/ebs-plugin-spec.rb +0 -14
- data/spec/plugins/delivery/s3/s3-plugin-spec.rb +31 -40
- data/spec/plugins/platform/ec2/ec2-plugin-spec.rb +1 -0
- data/spec/rcov_helper.rb +1 -0
- metadata +135 -132
data/CHANGELOG
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
v0.10.2
|
2
|
+
* [BGBUILD-347] Add support for Fedora 17. Remove unnecessary OS restrictions
|
3
|
+
* [BGBUILD-353] Remove all default attaching (EBS) and mounting (EBS, S3)
|
4
|
+
* [BGBUILD-361] Yum runs before having a proper /etc/resolv.conf (EC2 & CentOS 5)
|
5
|
+
|
1
6
|
v0.10.1
|
2
7
|
|
3
8
|
* [BGBUILD-332] Add support for bash completion
|
data/Manifest
CHANGED
@@ -5,7 +5,6 @@ README.md
|
|
5
5
|
Rakefile
|
6
6
|
bash_completion
|
7
7
|
bin/boxgrinder-build
|
8
|
-
boxgrinder-build.gemspec
|
9
8
|
integ/appliances/gnome-fedora.appl
|
10
9
|
integ/appliances/jeos-centos5-files.appl
|
11
10
|
integ/appliances/jeos-centos5.appl
|
@@ -35,6 +34,7 @@ lib/boxgrinder-build.rb
|
|
35
34
|
lib/boxgrinder-build/appliance.rb
|
36
35
|
lib/boxgrinder-build/helpers/augeas-helper.rb
|
37
36
|
lib/boxgrinder-build/helpers/aws-helper.rb
|
37
|
+
lib/boxgrinder-build/helpers/banner-helper.rb
|
38
38
|
lib/boxgrinder-build/helpers/ec2-helper.rb
|
39
39
|
lib/boxgrinder-build/helpers/guestfs-helper.rb
|
40
40
|
lib/boxgrinder-build/helpers/image-helper.rb
|
@@ -47,11 +47,13 @@ lib/boxgrinder-build/helpers/sftp-helper.rb
|
|
47
47
|
lib/boxgrinder-build/managers/plugin-manager.rb
|
48
48
|
lib/boxgrinder-build/plugins/base-plugin.rb
|
49
49
|
lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb
|
50
|
+
lib/boxgrinder-build/plugins/delivery/ebs/messages.rb
|
50
51
|
lib/boxgrinder-build/plugins/delivery/elastichosts/elastichosts-plugin.rb
|
51
52
|
lib/boxgrinder-build/plugins/delivery/libvirt/libvirt-capabilities.rb
|
52
53
|
lib/boxgrinder-build/plugins/delivery/libvirt/libvirt-plugin.rb
|
53
54
|
lib/boxgrinder-build/plugins/delivery/local/local-plugin.rb
|
54
55
|
lib/boxgrinder-build/plugins/delivery/openstack/openstack-plugin.rb
|
56
|
+
lib/boxgrinder-build/plugins/delivery/s3/messages.rb
|
55
57
|
lib/boxgrinder-build/plugins/delivery/s3/s3-plugin.rb
|
56
58
|
lib/boxgrinder-build/plugins/delivery/s3/src/cert-ec2.pem
|
57
59
|
lib/boxgrinder-build/plugins/delivery/sftp/sftp-plugin.rb
|
@@ -86,4 +88,44 @@ lib/boxgrinder-build/util/permissions/user-switcher.rb
|
|
86
88
|
rubygem-boxgrinder-build.spec
|
87
89
|
spec/appliance-spec.rb
|
88
90
|
spec/helpers/augeas-helper-spec.rb
|
89
|
-
spec/
|
91
|
+
spec/helpers/ec2-helper-spec.rb
|
92
|
+
spec/helpers/guestfs-helper-spec.rb
|
93
|
+
spec/helpers/image-helper-spec.rb
|
94
|
+
spec/helpers/linux-helper-spec.rb
|
95
|
+
spec/helpers/package-helper-spec.rb
|
96
|
+
spec/helpers/plugin-helper-spec.rb
|
97
|
+
spec/helpers/s3-helper-spec.rb
|
98
|
+
spec/managers/plugin-manager-spec.rb
|
99
|
+
spec/plugins/base-plugin-spec.rb
|
100
|
+
spec/plugins/delivery/ebs/ebs-plugin-spec.rb
|
101
|
+
spec/plugins/delivery/ebs/ebs.yaml
|
102
|
+
spec/plugins/delivery/elastichosts/elastichosts-plugin-spec.rb
|
103
|
+
spec/plugins/delivery/libvirt/libvirt-plugin-spec.rb
|
104
|
+
spec/plugins/delivery/libvirt/libvirt_modified.xml
|
105
|
+
spec/plugins/delivery/libvirt/libvirt_modify.sh
|
106
|
+
spec/plugins/delivery/libvirt/libvirt_test.xml
|
107
|
+
spec/plugins/delivery/local/local-plugin-spec.rb
|
108
|
+
spec/plugins/delivery/openstack/openstack-plugin-spec.rb
|
109
|
+
spec/plugins/delivery/s3/s3-plugin-spec.rb
|
110
|
+
spec/plugins/delivery/sftp/sftp-plugin-spec.rb
|
111
|
+
spec/plugins/os/centos/centos-plugin-spec.rb
|
112
|
+
spec/plugins/os/fedora/fedora-plugin-spec.rb
|
113
|
+
spec/plugins/os/rhel/rhel-plugin-spec.rb
|
114
|
+
spec/plugins/os/rpm-based/kickstart-spec.rb
|
115
|
+
spec/plugins/os/rpm-based/rpm-based-os-plugin-spec.rb
|
116
|
+
spec/plugins/os/rpm-based/rpm-dependency-validator-spec.rb
|
117
|
+
spec/plugins/os/rpm-based/src/jeos-f13-plain.ks
|
118
|
+
spec/plugins/os/rpm-based/src/jeos-f13-without-version.ks
|
119
|
+
spec/plugins/os/rpm-based/src/jeos-f13.ks
|
120
|
+
spec/plugins/os/sl/sl-plugin-spec.rb
|
121
|
+
spec/plugins/platform/ec2/ec2-plugin-spec.rb
|
122
|
+
spec/plugins/platform/virtualbox/virtualbox-plugin-spec.rb
|
123
|
+
spec/plugins/platform/virtualpc/virtualpc-plugin-spec.rb
|
124
|
+
spec/plugins/platform/vmware/vmware-plugin-spec.rb
|
125
|
+
spec/rcov_helper.rb
|
126
|
+
spec/rspec-plugin-helper.rb
|
127
|
+
spec/spec_helper.rb
|
128
|
+
spec/util/concurrent/get-set-spec.rb
|
129
|
+
spec/util/permissions/fs-monitor-spec.rb
|
130
|
+
spec/util/permissions/fs-observer-spec.rb
|
131
|
+
spec/util/permissions/user-switcher-spec.rb
|
data/Rakefile
CHANGED
@@ -27,7 +27,7 @@ Echoe.new("boxgrinder-build") do |p|
|
|
27
27
|
p.url = "http://boxgrinder.org/"
|
28
28
|
p.email = "info@boxgrinder.org"
|
29
29
|
p.runtime_dependencies = [
|
30
|
-
"boxgrinder-core ~>0.3.
|
30
|
+
"boxgrinder-core ~>0.3.12",
|
31
31
|
'aws-sdk >=1.1.1', # EBS and S3
|
32
32
|
'net-sftp', 'net-ssh', 'progressbar', # SFTP
|
33
33
|
'rest-client', # ElasticHosts
|
data/bin/boxgrinder-build
CHANGED
data/boxgrinder-build.gemspec
CHANGED
@@ -2,28 +2,28 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "boxgrinder-build"
|
5
|
-
s.version = "0.10.
|
5
|
+
s.version = "0.10.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Marek Goldmann"]
|
9
|
-
s.date = "2012-
|
9
|
+
s.date = "2012-06-14"
|
10
10
|
s.description = "A tool for creating appliances from simple plain text files for various virtual environments."
|
11
11
|
s.email = "info@boxgrinder.org"
|
12
12
|
s.executables = ["boxgrinder-build"]
|
13
|
-
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.md", "bin/boxgrinder-build", "lib/boxgrinder-build.rb", "lib/boxgrinder-build/appliance.rb", "lib/boxgrinder-build/helpers/augeas-helper.rb", "lib/boxgrinder-build/helpers/aws-helper.rb", "lib/boxgrinder-build/helpers/ec2-helper.rb", "lib/boxgrinder-build/helpers/guestfs-helper.rb", "lib/boxgrinder-build/helpers/image-helper.rb", "lib/boxgrinder-build/helpers/linux-helper.rb", "lib/boxgrinder-build/helpers/package-helper.rb", "lib/boxgrinder-build/helpers/plugin-helper.rb", "lib/boxgrinder-build/helpers/qemu.wrapper", "lib/boxgrinder-build/helpers/s3-helper.rb", "lib/boxgrinder-build/helpers/sftp-helper.rb", "lib/boxgrinder-build/managers/plugin-manager.rb", "lib/boxgrinder-build/plugins/base-plugin.rb", "lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb", "lib/boxgrinder-build/plugins/delivery/elastichosts/elastichosts-plugin.rb", "lib/boxgrinder-build/plugins/delivery/libvirt/libvirt-capabilities.rb", "lib/boxgrinder-build/plugins/delivery/libvirt/libvirt-plugin.rb", "lib/boxgrinder-build/plugins/delivery/local/local-plugin.rb", "lib/boxgrinder-build/plugins/delivery/openstack/openstack-plugin.rb", "lib/boxgrinder-build/plugins/delivery/s3/s3-plugin.rb", "lib/boxgrinder-build/plugins/delivery/s3/src/cert-ec2.pem", "lib/boxgrinder-build/plugins/delivery/sftp/sftp-plugin.rb", "lib/boxgrinder-build/plugins/delivery/usb/usb-plugin.rb", "lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb", "lib/boxgrinder-build/plugins/os/fedora/fedora-plugin.rb", "lib/boxgrinder-build/plugins/os/rhel/rhel-plugin.rb", "lib/boxgrinder-build/plugins/os/rpm-based/kickstart.rb", "lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb", "lib/boxgrinder-build/plugins/os/rpm-based/rpm-dependency-validator.rb", "lib/boxgrinder-build/plugins/os/rpm-based/src/appliance.ks.erb", "lib/boxgrinder-build/plugins/os/rpm-based/src/base.repo", "lib/boxgrinder-build/plugins/os/rpm-based/src/motd.init", "lib/boxgrinder-build/plugins/os/sl/sl-plugin.rb", "lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb", "lib/boxgrinder-build/plugins/platform/ec2/src/fstab_32bit", "lib/boxgrinder-build/plugins/platform/ec2/src/fstab_64bit", "lib/boxgrinder-build/plugins/platform/ec2/src/ifcfg-eth0", "lib/boxgrinder-build/plugins/platform/ec2/src/menu.lst", "lib/boxgrinder-build/plugins/platform/ec2/src/rc_local", "lib/boxgrinder-build/plugins/platform/virtualbox/virtualbox-plugin.rb", "lib/boxgrinder-build/plugins/platform/virtualpc/virtualpc-plugin.rb", "lib/boxgrinder-build/plugins/platform/vmware/src/README-enterprise", "lib/boxgrinder-build/plugins/platform/vmware/src/README-personal", "lib/boxgrinder-build/plugins/platform/vmware/src/base.vmdk", "lib/boxgrinder-build/plugins/platform/vmware/src/base.vmx", "lib/boxgrinder-build/plugins/platform/vmware/vmware-plugin.rb", "lib/boxgrinder-build/util/concurrent/get_set.rb", "lib/boxgrinder-build/util/permissions/fs-monitor.rb", "lib/boxgrinder-build/util/permissions/fs-observer.rb", "lib/boxgrinder-build/util/permissions/user-switcher.rb"]
|
14
|
-
s.files = ["CHANGELOG", "LICENSE", "Manifest", "README.md", "Rakefile", "bash_completion", "bin/boxgrinder-build", "
|
13
|
+
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.md", "bin/boxgrinder-build", "lib/boxgrinder-build.rb", "lib/boxgrinder-build/appliance.rb", "lib/boxgrinder-build/helpers/augeas-helper.rb", "lib/boxgrinder-build/helpers/aws-helper.rb", "lib/boxgrinder-build/helpers/banner-helper.rb", "lib/boxgrinder-build/helpers/ec2-helper.rb", "lib/boxgrinder-build/helpers/guestfs-helper.rb", "lib/boxgrinder-build/helpers/image-helper.rb", "lib/boxgrinder-build/helpers/linux-helper.rb", "lib/boxgrinder-build/helpers/package-helper.rb", "lib/boxgrinder-build/helpers/plugin-helper.rb", "lib/boxgrinder-build/helpers/qemu.wrapper", "lib/boxgrinder-build/helpers/s3-helper.rb", "lib/boxgrinder-build/helpers/sftp-helper.rb", "lib/boxgrinder-build/managers/plugin-manager.rb", "lib/boxgrinder-build/plugins/base-plugin.rb", "lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb", "lib/boxgrinder-build/plugins/delivery/ebs/messages.rb", "lib/boxgrinder-build/plugins/delivery/elastichosts/elastichosts-plugin.rb", "lib/boxgrinder-build/plugins/delivery/libvirt/libvirt-capabilities.rb", "lib/boxgrinder-build/plugins/delivery/libvirt/libvirt-plugin.rb", "lib/boxgrinder-build/plugins/delivery/local/local-plugin.rb", "lib/boxgrinder-build/plugins/delivery/openstack/openstack-plugin.rb", "lib/boxgrinder-build/plugins/delivery/s3/messages.rb", "lib/boxgrinder-build/plugins/delivery/s3/s3-plugin.rb", "lib/boxgrinder-build/plugins/delivery/s3/src/cert-ec2.pem", "lib/boxgrinder-build/plugins/delivery/sftp/sftp-plugin.rb", "lib/boxgrinder-build/plugins/delivery/usb/usb-plugin.rb", "lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb", "lib/boxgrinder-build/plugins/os/fedora/fedora-plugin.rb", "lib/boxgrinder-build/plugins/os/rhel/rhel-plugin.rb", "lib/boxgrinder-build/plugins/os/rpm-based/kickstart.rb", "lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb", "lib/boxgrinder-build/plugins/os/rpm-based/rpm-dependency-validator.rb", "lib/boxgrinder-build/plugins/os/rpm-based/src/appliance.ks.erb", "lib/boxgrinder-build/plugins/os/rpm-based/src/base.repo", "lib/boxgrinder-build/plugins/os/rpm-based/src/motd.init", "lib/boxgrinder-build/plugins/os/sl/sl-plugin.rb", "lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb", "lib/boxgrinder-build/plugins/platform/ec2/src/fstab_32bit", "lib/boxgrinder-build/plugins/platform/ec2/src/fstab_64bit", "lib/boxgrinder-build/plugins/platform/ec2/src/ifcfg-eth0", "lib/boxgrinder-build/plugins/platform/ec2/src/menu.lst", "lib/boxgrinder-build/plugins/platform/ec2/src/rc_local", "lib/boxgrinder-build/plugins/platform/virtualbox/virtualbox-plugin.rb", "lib/boxgrinder-build/plugins/platform/virtualpc/virtualpc-plugin.rb", "lib/boxgrinder-build/plugins/platform/vmware/src/README-enterprise", "lib/boxgrinder-build/plugins/platform/vmware/src/README-personal", "lib/boxgrinder-build/plugins/platform/vmware/src/base.vmdk", "lib/boxgrinder-build/plugins/platform/vmware/src/base.vmx", "lib/boxgrinder-build/plugins/platform/vmware/vmware-plugin.rb", "lib/boxgrinder-build/util/concurrent/get_set.rb", "lib/boxgrinder-build/util/permissions/fs-monitor.rb", "lib/boxgrinder-build/util/permissions/fs-observer.rb", "lib/boxgrinder-build/util/permissions/user-switcher.rb"]
|
14
|
+
s.files = ["CHANGELOG", "LICENSE", "Manifest", "README.md", "Rakefile", "bash_completion", "bin/boxgrinder-build", "integ/appliances/gnome-fedora.appl", "integ/appliances/jeos-centos5-files.appl", "integ/appliances/jeos-centos5.appl", "integ/appliances/jeos-centos6.appl", "integ/appliances/jeos-f15.appl", "integ/appliances/jeos-f16-files.appl", "integ/appliances/jeos-f16.appl", "integ/appliances/modular/_hardware_cpus.appl", "integ/appliances/modular/_hardware_memory.appl", "integ/appliances/modular/_hardware_partitions_home.appl", "integ/appliances/modular/_hardware_partitions_root.appl", "integ/appliances/modular/_os_password.appl", "integ/appliances/modular/_packages_groups_base.appl", "integ/appliances/modular/_packages_groups_core.appl", "integ/appliances/modular/_packages_squid.appl", "integ/appliances/modular/_packages_utils.appl", "integ/appliances/modular/_repos_boxgrinder_permanent_noarch.appl", "integ/appliances/modular/_repos_testlocal_ephemeral_noarch.appl", "integ/appliances/modular/_test_base.appl", "integ/appliances/modular/modular.appl", "integ/packages/ephemeral-repo-test-0.1-1.noarch.rpm", "integ/packages/local-repo-test.spec", "integ/spec/files-spec.rb", "integ/spec/jeos-spec.rb", "integ/spec/modular-spec.rb", "lib/boxgrinder-build.rb", "lib/boxgrinder-build/appliance.rb", "lib/boxgrinder-build/helpers/augeas-helper.rb", "lib/boxgrinder-build/helpers/aws-helper.rb", "lib/boxgrinder-build/helpers/banner-helper.rb", "lib/boxgrinder-build/helpers/ec2-helper.rb", "lib/boxgrinder-build/helpers/guestfs-helper.rb", "lib/boxgrinder-build/helpers/image-helper.rb", "lib/boxgrinder-build/helpers/linux-helper.rb", "lib/boxgrinder-build/helpers/package-helper.rb", "lib/boxgrinder-build/helpers/plugin-helper.rb", "lib/boxgrinder-build/helpers/qemu.wrapper", "lib/boxgrinder-build/helpers/s3-helper.rb", "lib/boxgrinder-build/helpers/sftp-helper.rb", "lib/boxgrinder-build/managers/plugin-manager.rb", "lib/boxgrinder-build/plugins/base-plugin.rb", "lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb", "lib/boxgrinder-build/plugins/delivery/ebs/messages.rb", "lib/boxgrinder-build/plugins/delivery/elastichosts/elastichosts-plugin.rb", "lib/boxgrinder-build/plugins/delivery/libvirt/libvirt-capabilities.rb", "lib/boxgrinder-build/plugins/delivery/libvirt/libvirt-plugin.rb", "lib/boxgrinder-build/plugins/delivery/local/local-plugin.rb", "lib/boxgrinder-build/plugins/delivery/openstack/openstack-plugin.rb", "lib/boxgrinder-build/plugins/delivery/s3/messages.rb", "lib/boxgrinder-build/plugins/delivery/s3/s3-plugin.rb", "lib/boxgrinder-build/plugins/delivery/s3/src/cert-ec2.pem", "lib/boxgrinder-build/plugins/delivery/sftp/sftp-plugin.rb", "lib/boxgrinder-build/plugins/delivery/usb/usb-plugin.rb", "lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb", "lib/boxgrinder-build/plugins/os/fedora/fedora-plugin.rb", "lib/boxgrinder-build/plugins/os/rhel/rhel-plugin.rb", "lib/boxgrinder-build/plugins/os/rpm-based/kickstart.rb", "lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb", "lib/boxgrinder-build/plugins/os/rpm-based/rpm-dependency-validator.rb", "lib/boxgrinder-build/plugins/os/rpm-based/src/appliance.ks.erb", "lib/boxgrinder-build/plugins/os/rpm-based/src/base.repo", "lib/boxgrinder-build/plugins/os/rpm-based/src/motd.init", "lib/boxgrinder-build/plugins/os/sl/sl-plugin.rb", "lib/boxgrinder-build/plugins/platform/ec2/ec2-plugin.rb", "lib/boxgrinder-build/plugins/platform/ec2/src/fstab_32bit", "lib/boxgrinder-build/plugins/platform/ec2/src/fstab_64bit", "lib/boxgrinder-build/plugins/platform/ec2/src/ifcfg-eth0", "lib/boxgrinder-build/plugins/platform/ec2/src/menu.lst", "lib/boxgrinder-build/plugins/platform/ec2/src/rc_local", "lib/boxgrinder-build/plugins/platform/virtualbox/virtualbox-plugin.rb", "lib/boxgrinder-build/plugins/platform/virtualpc/virtualpc-plugin.rb", "lib/boxgrinder-build/plugins/platform/vmware/src/README-enterprise", "lib/boxgrinder-build/plugins/platform/vmware/src/README-personal", "lib/boxgrinder-build/plugins/platform/vmware/src/base.vmdk", "lib/boxgrinder-build/plugins/platform/vmware/src/base.vmx", "lib/boxgrinder-build/plugins/platform/vmware/vmware-plugin.rb", "lib/boxgrinder-build/util/concurrent/get_set.rb", "lib/boxgrinder-build/util/permissions/fs-monitor.rb", "lib/boxgrinder-build/util/permissions/fs-observer.rb", "lib/boxgrinder-build/util/permissions/user-switcher.rb", "rubygem-boxgrinder-build.spec", "spec/appliance-spec.rb", "spec/helpers/augeas-helper-spec.rb", "spec/helpers/ec2-helper-spec.rb", "spec/helpers/guestfs-helper-spec.rb", "spec/helpers/image-helper-spec.rb", "spec/helpers/linux-helper-spec.rb", "spec/helpers/package-helper-spec.rb", "spec/helpers/plugin-helper-spec.rb", "spec/helpers/s3-helper-spec.rb", "spec/managers/plugin-manager-spec.rb", "spec/plugins/base-plugin-spec.rb", "spec/plugins/delivery/ebs/ebs-plugin-spec.rb", "spec/plugins/delivery/ebs/ebs.yaml", "spec/plugins/delivery/elastichosts/elastichosts-plugin-spec.rb", "spec/plugins/delivery/libvirt/libvirt-plugin-spec.rb", "spec/plugins/delivery/libvirt/libvirt_modified.xml", "spec/plugins/delivery/libvirt/libvirt_modify.sh", "spec/plugins/delivery/libvirt/libvirt_test.xml", "spec/plugins/delivery/local/local-plugin-spec.rb", "spec/plugins/delivery/openstack/openstack-plugin-spec.rb", "spec/plugins/delivery/s3/s3-plugin-spec.rb", "spec/plugins/delivery/sftp/sftp-plugin-spec.rb", "spec/plugins/os/centos/centos-plugin-spec.rb", "spec/plugins/os/fedora/fedora-plugin-spec.rb", "spec/plugins/os/rhel/rhel-plugin-spec.rb", "spec/plugins/os/rpm-based/kickstart-spec.rb", "spec/plugins/os/rpm-based/rpm-based-os-plugin-spec.rb", "spec/plugins/os/rpm-based/rpm-dependency-validator-spec.rb", "spec/plugins/os/rpm-based/src/jeos-f13-plain.ks", "spec/plugins/os/rpm-based/src/jeos-f13-without-version.ks", "spec/plugins/os/rpm-based/src/jeos-f13.ks", "spec/plugins/os/sl/sl-plugin-spec.rb", "spec/plugins/platform/ec2/ec2-plugin-spec.rb", "spec/plugins/platform/virtualbox/virtualbox-plugin-spec.rb", "spec/plugins/platform/virtualpc/virtualpc-plugin-spec.rb", "spec/plugins/platform/vmware/vmware-plugin-spec.rb", "spec/rcov_helper.rb", "spec/rspec-plugin-helper.rb", "spec/spec_helper.rb", "spec/util/concurrent/get-set-spec.rb", "spec/util/permissions/fs-monitor-spec.rb", "spec/util/permissions/fs-observer-spec.rb", "spec/util/permissions/user-switcher-spec.rb", "boxgrinder-build.gemspec"]
|
15
15
|
s.homepage = "http://boxgrinder.org/"
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Boxgrinder-build", "--main", "README.md"]
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.rubyforge_project = "BoxGrinder Build"
|
19
|
-
s.rubygems_version = "1.8.
|
19
|
+
s.rubygems_version = "1.8.24"
|
20
20
|
s.summary = "A tool for creating appliances from simple plain text files for various virtual environments."
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
23
23
|
s.specification_version = 3
|
24
24
|
|
25
25
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
26
|
-
s.add_runtime_dependency(%q<boxgrinder-core>, ["~> 0.3.
|
26
|
+
s.add_runtime_dependency(%q<boxgrinder-core>, ["~> 0.3.12"])
|
27
27
|
s.add_runtime_dependency(%q<aws-sdk>, [">= 1.1.1"])
|
28
28
|
s.add_runtime_dependency(%q<net-sftp>, [">= 0"])
|
29
29
|
s.add_runtime_dependency(%q<net-ssh>, [">= 0"])
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
33
33
|
s.add_runtime_dependency(%q<builder>, [">= 0"])
|
34
34
|
else
|
35
|
-
s.add_dependency(%q<boxgrinder-core>, ["~> 0.3.
|
35
|
+
s.add_dependency(%q<boxgrinder-core>, ["~> 0.3.12"])
|
36
36
|
s.add_dependency(%q<aws-sdk>, [">= 1.1.1"])
|
37
37
|
s.add_dependency(%q<net-sftp>, [">= 0"])
|
38
38
|
s.add_dependency(%q<net-ssh>, [">= 0"])
|
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
s.add_dependency(%q<builder>, [">= 0"])
|
43
43
|
end
|
44
44
|
else
|
45
|
-
s.add_dependency(%q<boxgrinder-core>, ["~> 0.3.
|
45
|
+
s.add_dependency(%q<boxgrinder-core>, ["~> 0.3.12"])
|
46
46
|
s.add_dependency(%q<aws-sdk>, [">= 1.1.1"])
|
47
47
|
s.add_dependency(%q<net-sftp>, [">= 0"])
|
48
48
|
s.add_dependency(%q<net-ssh>, [">= 0"])
|
data/integ/spec/files-spec.rb
CHANGED
@@ -17,10 +17,11 @@
|
|
17
17
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
18
18
|
|
19
19
|
require 'rubygems'
|
20
|
+
require 'boxgrinder-build'
|
20
21
|
require 'boxgrinder-build/appliance'
|
22
|
+
require 'boxgrinder-build/helpers/guestfs-helper'
|
21
23
|
require 'boxgrinder-core/models/config'
|
22
24
|
require 'boxgrinder-core/helpers/log-helper'
|
23
|
-
require 'boxgrinder-build/helpers/guestfs-helper'
|
24
25
|
require 'fileutils'
|
25
26
|
|
26
27
|
module BoxGrinder
|
data/integ/spec/jeos-spec.rb
CHANGED
@@ -17,10 +17,11 @@
|
|
17
17
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
18
18
|
|
19
19
|
require 'rubygems'
|
20
|
+
require 'boxgrinder-build'
|
20
21
|
require 'boxgrinder-build/appliance'
|
22
|
+
require 'boxgrinder-build/helpers/guestfs-helper'
|
21
23
|
require 'boxgrinder-core/models/config'
|
22
24
|
require 'boxgrinder-core/helpers/log-helper'
|
23
|
-
require 'boxgrinder-build/helpers/guestfs-helper'
|
24
25
|
require 'fileutils'
|
25
26
|
|
26
27
|
module BoxGrinder
|
data/integ/spec/modular-spec.rb
CHANGED
@@ -17,10 +17,12 @@
|
|
17
17
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
18
18
|
|
19
19
|
require 'rubygems'
|
20
|
+
require 'boxgrinder-build'
|
20
21
|
require 'boxgrinder-build/appliance'
|
22
|
+
require 'boxgrinder-build/helpers/guestfs-helper'
|
23
|
+
require 'boxgrinder-core'
|
21
24
|
require 'boxgrinder-core/models/config'
|
22
25
|
require 'boxgrinder-core/helpers/log-helper'
|
23
|
-
require 'boxgrinder-build/helpers/guestfs-helper'
|
24
26
|
require 'fileutils'
|
25
27
|
|
26
28
|
module BoxGrinder
|
@@ -43,39 +43,30 @@ module BoxGrinder
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
46
|
+
|
47
|
+
def self.block_device_mappings_validator(key, map, value)
|
48
|
+
split_mappings = value.split('&') # /dev/xvdb=ephemeral0&/dev/xvdc=ephemeral1
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
AWS.memoize do
|
65
|
-
@ec2.regions.each do |region|
|
66
|
-
endpoints.merge!({
|
67
|
-
region.name => {
|
68
|
-
:endpoint => "#{service_name}.#{region.name}.amazonaws.com",
|
69
|
-
:location => region.name, #or alias?
|
70
|
-
:kernel => {
|
71
|
-
:i386 => select_aki(region, aki_pattern),
|
72
|
-
:x86_64 => select_aki(region, aki_pattern)
|
73
|
-
}
|
74
|
-
}
|
75
|
-
})
|
50
|
+
split_mappings.each do |s_pair|
|
51
|
+
name, blockdevice = s_pair.split('=') # /dev/xvdb=ephemeral0
|
52
|
+
|
53
|
+
if name.nil? || blockdevice.nil?
|
54
|
+
raise PluginValidationError,
|
55
|
+
"Invalid device mapping: '#{s_pair}' in '#{split_mappings.join(', ')}'"
|
56
|
+
else
|
57
|
+
name.sub!(/xvd/, 'sd')
|
58
|
+
end
|
59
|
+
|
60
|
+
bd_keys = [:snapshot_id, :volume_size, :delete_on_termination]
|
61
|
+
bd_values = blockdevice.split(':').map { |x| x.empty? ? nil : x }
|
62
|
+
|
63
|
+
if bd_values.one? # '/dev/sdb' => 'ephemeral0'
|
64
|
+
map.merge!(name => bd_values.first)
|
65
|
+
else # '/dev/sdb' => { :snapshot_id => 'snap-123', ... }
|
66
|
+
map.merge!(name => Hash[bd_keys.zip(bd_values)])
|
76
67
|
end
|
77
68
|
end
|
69
|
+
map
|
78
70
|
end
|
79
|
-
|
80
71
|
end
|
81
|
-
end
|
72
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module BoxGrinder
|
2
|
+
module Banner
|
3
|
+
def self.message(message, delim = "*", wrap = 92, soft_wrap = true)
|
4
|
+
str = ("" << $/ << delim * wrap << $/).green
|
5
|
+
str << long_line_reduce(message, wrap, soft_wrap)
|
6
|
+
str << (delim * wrap << $/).green
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
def self.long_line_reduce(message, wrap, soft_wrap)
|
11
|
+
return "" if message == nil
|
12
|
+
|
13
|
+
message.each_line.reduce("") do |acc, line|
|
14
|
+
if line.length > wrap-1 && line[wrap] != $/
|
15
|
+
wrap_point = soft_wrap ? s_wrap_index(line, wrap) || wrap : wrap
|
16
|
+
line.insert(wrap_point, $/)
|
17
|
+
# Reduce lines that are multiple times the wrap limit.
|
18
|
+
line << long_line_reduce(line.slice!(wrap-1 .. -1), wrap, soft_wrap)
|
19
|
+
end
|
20
|
+
acc << line
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.s_wrap_index(line, wrap)
|
25
|
+
index = line.slice(0, wrap).rindex(" ")
|
26
|
+
index.nil? ? nil : index + 1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -202,8 +202,12 @@ module BoxGrinder
|
|
202
202
|
@target_deliverables
|
203
203
|
end
|
204
204
|
|
205
|
-
def set_default_config_value(key,
|
206
|
-
|
205
|
+
def set_default_config_value(key, default_value=nil, &blk)
|
206
|
+
if block_given? && !(@plugin_config[key].nil?)
|
207
|
+
@plugin_config[key] = yield(key, default_value, @plugin_config[key])
|
208
|
+
else
|
209
|
+
@plugin_config[key] ||= default_value
|
210
|
+
end
|
207
211
|
end
|
208
212
|
|
209
213
|
# This reads the plugin config from file
|
@@ -18,18 +18,19 @@
|
|
18
18
|
|
19
19
|
require 'rubygems'
|
20
20
|
require 'boxgrinder-build/plugins/base-plugin'
|
21
|
+
require 'boxgrinder-build/plugins/delivery/ebs/messages'
|
21
22
|
require 'boxgrinder-build/helpers/ec2-helper'
|
23
|
+
require 'boxgrinder-build/helpers/banner-helper'
|
22
24
|
require 'aws-sdk'
|
23
25
|
require 'open-uri'
|
24
26
|
require 'timeout'
|
25
|
-
require 'pp'
|
26
27
|
|
27
28
|
module BoxGrinder
|
28
29
|
class EBSPlugin < BasePlugin
|
29
30
|
|
30
31
|
ROOT_DEVICE_NAME = '/dev/sda1'
|
31
|
-
POLL_FREQ = 1 #second
|
32
|
-
TIMEOUT = 1000 #seconds
|
32
|
+
POLL_FREQ = 1 # second
|
33
|
+
TIMEOUT = 1000 # seconds
|
33
34
|
EC2_HOSTNAME_LOOKUP_TIMEOUT = 10
|
34
35
|
|
35
36
|
plugin :type => :delivery, :name => :ebs, :full_name => "Elastic Block Storage", :require_root => true
|
@@ -45,19 +46,26 @@ module BoxGrinder
|
|
45
46
|
|
46
47
|
set_default_config_value('kernel', false)
|
47
48
|
set_default_config_value('ramdisk', false)
|
48
|
-
|
49
49
|
set_default_config_value('availability_zone', @current_availability_zone)
|
50
50
|
set_default_config_value('delete_on_termination', true)
|
51
51
|
set_default_config_value('overwrite', false)
|
52
52
|
set_default_config_value('snapshot', false)
|
53
53
|
set_default_config_value('preserve_snapshots', false)
|
54
54
|
set_default_config_value('terminate_instances', false)
|
55
|
+
|
56
|
+
set_default_config_value('account_number') do |_, _, value|
|
57
|
+
value.to_s.gsub!(/-/, '')
|
58
|
+
end
|
59
|
+
|
60
|
+
set_default_config_value('block_device_mappings', {}) do |k, m, v|
|
61
|
+
EC2Helper::block_device_mappings_validator(k, m, v)
|
62
|
+
end
|
63
|
+
|
55
64
|
validate_plugin_config(['access_key', 'secret_access_key', 'account_number'], 'http://boxgrinder.org/tutorials/boxgrinder-build-plugins/#EBS_Delivery_Plugin')
|
56
65
|
|
57
66
|
raise PluginValidationError, "You can only convert to EBS type AMI appliances converted to EC2 format. Use '-p ec2' switch. For more info about EC2 plugin see http://boxgrinder.org/tutorials/boxgrinder-build-plugins/#EC2_Platform_Plugin." unless @previous_plugin_info[:name] == :ec2
|
58
|
-
raise PluginValidationError, "You selected #{@plugin_config['availability_zone']} availability zone, but your instance is running in #{@current_availability_zone} zone. Please change availability zone in plugin configuration file to #{@current_availability_zone} (see http://boxgrinder.org/tutorials/boxgrinder-build-plugins/#EBS_Delivery_Plugin) or use another instance in #{@plugin_config['availability_zone']} zone to create your EBS AMI." if @plugin_config['availability_zone'] != @current_availability_zone
|
59
67
|
|
60
|
-
@plugin_config['
|
68
|
+
raise PluginValidationError, "You selected #{@plugin_config['availability_zone']} availability zone, but your instance is running in #{@current_availability_zone} zone. Please change availability zone in plugin configuration file to #{@current_availability_zone} (see http://boxgrinder.org/tutorials/boxgrinder-build-plugins/#EBS_Delivery_Plugin) or use another instance in #{@plugin_config['availability_zone']} zone to create your EBS AMI." if @plugin_config['availability_zone'] != @current_availability_zone
|
61
69
|
|
62
70
|
AWS.config(:access_key_id => @plugin_config['access_key'],
|
63
71
|
:secret_access_key => @plugin_config['secret_access_key'],
|
@@ -69,13 +77,9 @@ module BoxGrinder
|
|
69
77
|
@ec2helper = EC2Helper.new(@ec2, :log => @log)
|
70
78
|
end
|
71
79
|
|
72
|
-
def after_init
|
73
|
-
register_supported_os('fedora', ['13', '14', '15', '16'])
|
74
|
-
register_supported_os('rhel', ['6'])
|
75
|
-
register_supported_os('centos', ['5', '6'])
|
76
|
-
end
|
77
|
-
|
78
80
|
def execute
|
81
|
+
@log.info Banner.message(EBS::Messages::EPHEMERAL_MESSAGE)
|
82
|
+
|
79
83
|
ebs_appliance_description = "#{@appliance_config.summary} | Appliance version #{@appliance_config.version}.#{@appliance_config.release} | #{@appliance_config.hardware.arch} architecture"
|
80
84
|
|
81
85
|
@log.debug "Checking if appliance is already registered..."
|
@@ -154,14 +158,12 @@ module BoxGrinder
|
|
154
158
|
optmap = {
|
155
159
|
:name => ebs_appliance_name,
|
156
160
|
:root_device_name => ROOT_DEVICE_NAME,
|
157
|
-
:block_device_mappings => {
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
'/dev/sdd' => 'ephemeral2',
|
164
|
-
'/dev/sde' => 'ephemeral3'},
|
161
|
+
:block_device_mappings => {
|
162
|
+
ROOT_DEVICE_NAME => {
|
163
|
+
:snapshot => snapshot,
|
164
|
+
:delete_on_termination => @plugin_config['delete_on_termination']
|
165
|
+
}
|
166
|
+
},
|
165
167
|
:architecture => @appliance_config.hardware.base_arch,
|
166
168
|
:kernel_id => @plugin_config['kernel'] || @ec2_endpoints[@current_region][:kernel][@appliance_config.hardware.base_arch.intern][:aki],
|
167
169
|
:description => ebs_appliance_description
|
@@ -169,7 +171,11 @@ module BoxGrinder
|
|
169
171
|
|
170
172
|
optmap.merge!(:ramdisk_id => @plugin_config['ramdisk']) if @plugin_config['ramdisk']
|
171
173
|
|
174
|
+
unless @plugin_config['block_device_mappings'].empty?
|
175
|
+
optmap[:block_device_mappings].merge!(@plugin_config['block_device_mappings'])
|
176
|
+
end
|
172
177
|
|
178
|
+
@log.debug("Options map: #{optmap.inspect}")
|
173
179
|
image = @ec2.images.create(optmap)
|
174
180
|
|
175
181
|
@log.info "Waiting for the new EBS AMI to become available"
|
@@ -266,7 +272,6 @@ module BoxGrinder
|
|
266
272
|
end
|
267
273
|
false
|
268
274
|
end
|
269
|
-
|
270
275
|
end
|
271
276
|
end
|
272
277
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module BoxGrinder
|
2
|
+
module EBS
|
3
|
+
module Messages
|
4
|
+
EPHEMERAL_MESSAGE = <<-DOC
|
5
|
+
#{%(As of version 0.10.2 BoxGrinder no longer *attaches* or *mounts* any
|
6
|
+
ephemeral disks by default for EBS AMIs.).bold}
|
7
|
+
|
8
|
+
It is still possible to specify device mappings at build-time if you desire by
|
9
|
+
using:
|
10
|
+
#{%(--delivery-config block_device_mappings:"/dev/sdb=ephemeral0&/dev/sdc=ephemeral1").bold}
|
11
|
+
|
12
|
+
You may specify additional EBS devices to be created and attached at launch-time,
|
13
|
+
see documentation for examples.
|
14
|
+
|
15
|
+
Alternatively, mappings can be specified at launch-time rather than build-time.
|
16
|
+
|
17
|
+
For fuller details, including an outline of terminology and different strategies
|
18
|
+
for attaching and mounting, see the following resource:
|
19
|
+
#{%(http://www.boxgrinder.org/permalink/ephemeral#ebs).bold}
|
20
|
+
DOC
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module BoxGrinder
|
2
|
+
module S3
|
3
|
+
module Messages
|
4
|
+
EPHEMERAL_MESSAGE = <<-DOC
|
5
|
+
#{%(As of version 0.10.2 BoxGrinder no longer *mounts* any ephemeral disks by
|
6
|
+
default for S3 AMIs.).bold}
|
7
|
+
|
8
|
+
It is possible to modify device mappings at build-time if you desire by using:
|
9
|
+
#{%(--delivery-config block_device_mappings:"/dev/sdb=ephemeral0&/dev/sdc=ephemeral1").bold}
|
10
|
+
|
11
|
+
You may specify additional EBS devices to be created and attached at launch-time,
|
12
|
+
see documentation for examples.
|
13
|
+
|
14
|
+
Alternatively, mappings can be specified at launch-time rather than build-time.
|
15
|
+
|
16
|
+
For fuller details, including an outline of terminology and different strategies
|
17
|
+
for attaching and mounting, see the following resource:
|
18
|
+
#{%(http://www.boxgrinder.org/permalink/ephemeral#s3).bold}
|
19
|
+
DOC
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|