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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32683a4ec5bbfde12b273c6795edd61c60fa1ae5
|
4
|
+
data.tar.gz: aa0f918358722ce021338e62deb77bf682bef45e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55dfd6f5456c2286efb8e99a9cbea42677af389bb5738f1ec0693d85b0f116b1709cfaf5fd45eeab0538c180342ee2a583fb06377ecbc521f3ed2e08da9a7e78
|
7
|
+
data.tar.gz: 4365e45d39319007296e29fd6626c53664e21d938760cc44c8a148e9688d1b0ea55416345b86e2e0a20ff38a2cfbca7b4d36b7871dd63fde14a696cd8a964584
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
23
|
-
|
24
|
+
&& dpkg-divert --local --rename --add /sbin/initctl \
|
25
|
+
&& ln -sf /bin/true /sbin/initctl \
|
24
26
|
<% end %>
|
25
|
-
|
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
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
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
|
-
|
38
|
-
|
39
|
-
|
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
|
-
|
43
|
-
|
44
|
-
|
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
|
-
|
48
|
-
|
49
|
-
|
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
|
-
|
55
|
-
|
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
|
-
|
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
|
-
|
66
|
+
&& echo <%= @username %>:<%= @password %> | chpasswd \
|
64
67
|
<% else %>
|
65
|
-
|
68
|
+
&& passwd -d <%= @username %> \
|
66
69
|
<% end %>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
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
|
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
|
91
|
-
#
|
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?
|
data/lib/poise_boiler/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|