poise-boiler 1.9.0 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: decb85a1657b0c1c205af3a06f5230e560ebd263
4
- data.tar.gz: f1779ebb60dce5312bbe7e6acc0b04888ef752fb
3
+ metadata.gz: 32683a4ec5bbfde12b273c6795edd61c60fa1ae5
4
+ data.tar.gz: aa0f918358722ce021338e62deb77bf682bef45e
5
5
  SHA512:
6
- metadata.gz: 7592335dce58c6705c6e563ab94f83e5d39bb328dae8bbf93999af6364b89ecbb88056a553e447b348b56d89ed7c6f3997a45c7d2707d7ed919bd601e284fb82
7
- data.tar.gz: d3a1c25c7071428b36971465a31a76a1949ecb839e48824348532c2c9bfd849de1a391bd9123a08149ddd7c8885b4cae42a51cf8b6a83611ec16973468d6f4e1
6
+ metadata.gz: 55dfd6f5456c2286efb8e99a9cbea42677af389bb5738f1ec0693d85b0f116b1709cfaf5fd45eeab0538c180342ee2a583fb06377ecbc521f3ed2e08da9a7e78
7
+ data.tar.gz: 4365e45d39319007296e29fd6626c53664e21d938760cc44c8a148e9688d1b0ea55416345b86e2e0a20ff38a2cfbca7b4d36b7871dd63fde14a696cd8a964584
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.10.0
4
+
5
+ * Major reduction in the number of Docker layers created during tests.
6
+ * Minimal support for kitchen-ec2.
7
+
3
8
  ## v1.9.0
4
9
 
5
10
  * Super experimental Halite+Policy provisioner plugin.
@@ -18,62 +18,66 @@ ENV NO_PROXY <%= no_proxy %>
18
18
  <% end %>
19
19
  <%# Per-platform initializations. %>
20
20
  <% case @platform; when 'debian', 'ubuntu' %>
21
+ ENV DEBIAN_FRONTEND noninteractive
22
+ RUN apt-get update -o dockercachebust=<%= Date.today %> \
21
23
  <% if @disable_upstart %>
22
- RUN dpkg-divert --local --rename --add /sbin/initctl
23
- RUN ln -sf /bin/true /sbin/initctl
24
+ && dpkg-divert --local --rename --add /sbin/initctl \
25
+ && ln -sf /bin/true /sbin/initctl \
24
26
  <% end %>
25
- ENV DEBIAN_FRONTEND noninteractive
26
- RUN apt-get update -o dockercachebust=<%= Date.today %>
27
- RUN apt-get install -y sudo openssh-server curl lsb-release net-tools rsync
27
+ && apt-get install -y sudo openssh-server curl lsb-release net-tools rsync \
28
28
  <% when 'rhel', 'centos', 'fedora' %>
29
- RUN yum clean all
30
- RUN yum install -y sudo openssh-server openssh-clients which curl net-tools iproute rsync passwd
29
+ RUN yum clean all \
30
+ && yum install -y sudo openssh-server openssh-clients which curl net-tools iproute rsync passwd \
31
31
  <%# CentOS 7 does not install hostname by default, but EL6 has no hostname package. %>
32
- RUN yum install -y hostname || true
33
- RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
34
- RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
32
+ && yum install -y hostname || true \
33
+ && ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' \
34
+ && ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' \
35
35
  <% when 'arch' %>
36
- RUN pacman -Syu --noconfirm
37
- RUN pacman -S --noconfirm openssh sudo curl
38
- RUN ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
39
- RUN ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
36
+ RUN pacman -Syu --noconfirm \
37
+ && pacman -S --noconfirm openssh sudo curl \
38
+ && ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key \
39
+ && ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key \
40
40
  <% when 'gentoo' %>
41
- RUN emerge sync
42
- RUN emerge net-misc/openssh app-admin/sudo
43
- RUN ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
44
- RUN ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
41
+ RUN emerge sync \
42
+ && emerge net-misc/openssh app-admin/sudo \
43
+ && ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key \
44
+ && ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key \
45
45
  <% when 'gentoo-paludis' %>
46
- RUN cave sync
47
- RUN cave resolve -zx net-misc/openssh app-admin/sudo
48
- RUN ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
49
- RUN ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
46
+ RUN cave sync \
47
+ && cave resolve -zx net-misc/openssh app-admin/sudo \
48
+ && ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key \
49
+ && ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key \
50
50
  <% when 'freebsd' %>
51
51
  <%# SUPER UN-TESTED BULLSHIT %>
52
52
  RUN echo "nameserver 8.8.8.8" >> /etc/resolv.conf \
53
- && env ASSUME_ALWAYS_YES=true pkg install sudo curl bash
54
- RUN ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
55
- RUN ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
53
+ && env ASSUME_ALWAYS_YES=true pkg install sudo curl bash \
54
+ && ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key \
55
+ && ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key \
56
+ <% else %>
57
+ <%# Make sure we start off the RUN directive to match the others. %>
58
+ RUN true \
56
59
  <% end %>
57
60
  <%# Create the kitchen user, give it sudo, and create and authorized keys. %>
58
61
  <% homedir = @username == 'root' ? '/root' : "/home/#{@username}" %>
59
- RUN if ! getent passwd <%= @username %>; then \
62
+ && if ! getent passwd <%= @username %>; then \
60
63
  <% if @platform == 'freebsd' %>pw <% end %>useradd <%= @username %> -d <%= homedir %> -m -s /bin/<%= @platform == 'freebsd' ? 'csh' : 'bash' %>; \
61
- fi
64
+ fi \
62
65
  <% if @password && !@password.empty? %>
63
- RUN echo <%= @username %>:<%= @password %> | chpasswd
66
+ && echo <%= @username %>:<%= @password %> | chpasswd \
64
67
  <% else %>
65
- RUN passwd -d <%= @username %>
68
+ && passwd -d <%= @username %> \
66
69
  <% end %>
67
- RUN echo '<%= @username %> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
68
- RUN mkdir -p /etc/sudoers.d
69
- RUN echo '<%= @username %> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/<%= @username %>
70
- RUN chmod 0440 /etc/sudoers.d/<%= @username %>
71
- RUN mkdir -p <%= homedir %>/.ssh
72
- RUN chown -R <%= @username %> <%= homedir %>/.ssh
73
- RUN chmod 0700 <%= homedir %>/.ssh
74
- RUN touch <%= homedir %>/.ssh/authorized_keys
75
- RUN chown <%= @username %> <%= homedir %>/.ssh/authorized_keys
76
- RUN chmod 0600 <%= homedir %>/.ssh/authorized_keys
70
+ && echo '<%= @username %> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
71
+ && mkdir -p /etc/sudoers.d \
72
+ && echo '<%= @username %> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/<%= @username %> \
73
+ && chmod 0440 /etc/sudoers.d/<%= @username %> \
74
+ && mkdir -p <%= homedir %>/.ssh \
75
+ && chown -R <%= @username %> <%= homedir %>/.ssh \
76
+ && chmod 0700 <%= homedir %>/.ssh \
77
+ && touch <%= homedir %>/.ssh/authorized_keys \
78
+ && chown <%= @username %> <%= homedir %>/.ssh/authorized_keys \
79
+ && chmod 0600 <%= homedir %>/.ssh/authorized_keys
80
+ <%# /RUN layer started in the platform initialization %>
77
81
  <%# Install Chef and Test Kitchen-related gems. %>
78
82
  RUN curl -L https://chef.io/chef/install.sh | bash -s --<%= ENV['POISE_MASTER_BUILD'] ? " -n -- #{Date.today}" : PoiseBoiler::Kitchen.instance.chef_version ? " -v #{PoiseBoiler::Kitchen.instance.chef_version}" : '' %> && \
79
83
  env GEM_HOME=/tmp/verifier/gems GEM_PATH=/tmp/verifier/gems GEM_CACHE=/tmp/verifier/gems/cache /opt/chef/embedded/bin/gem install --no-rdoc --no-ri --bindir /tmp/verifier/bin busser busser-serverspec serverspec && \
@@ -154,6 +154,10 @@ module PoiseBoiler
154
154
  when 'rackspace'
155
155
  # Set a default instance size.
156
156
  config['flavor_id'] = options[:rackspace_flavor] || 'general1-1'
157
+ when 'ec2'
158
+ # Allow passing some values as environment variables.
159
+ config['security_group_ids'] = [ENV['AWS_SECURITY_GROUP_ID']]
160
+ config['subnet_id'] = ENV['AWS_SUBNET_ID']
157
161
  end
158
162
  config
159
163
  end
@@ -57,7 +57,7 @@ module PoiseBoiler
57
57
  end
58
58
 
59
59
  desc 'Run Test-Kitchen integration tests.'
60
- task 'travis:integration' => ( integration_rackspace? ? %w{.ssh/id_rsa chef:kitchen} : %w{test/docker/docker.key ./docker chef:kitchen} )
60
+ task 'travis:integration' => ( ( integration_rackspace? ? %w{.ssh/id_rsa} : integration_docker? ? %w{test/docker/docker.key ./docker} : [] ) + %w{chef:kitchen} )
61
61
 
62
62
  desc 'Run CI tests'
63
63
  task 'travis' do
@@ -87,8 +87,14 @@ module PoiseBoiler
87
87
  ENV['TRAVIS_SECURE_ENV_VARS'] == 'true' && File.exist?('.kitchen.yml')
88
88
  end
89
89
 
90
- # Should we set things up for Rackspace integration tests? The default
91
- # is to use Docker.
90
+ # Should we set things up for Docker integration tests?
91
+ #
92
+ # @return [Boolean]
93
+ def integration_docker?
94
+ File.exist?('test/docker')
95
+ end
96
+
97
+ # Should we set things up for Rackspace integration tests?
92
98
  #
93
99
  # @return [Boolean]
94
100
  def integration_rackspace?
@@ -16,5 +16,5 @@
16
16
 
17
17
 
18
18
  module PoiseBoiler
19
- VERSION = '1.9.0'
19
+ VERSION = '1.10.0'
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poise-boiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Kantrowitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler