Skip to content

Commit 2278c9d

Browse files
authored
Merge pull request #281 from StackStorm/feature/ubuntu18
Ubuntu 18.04
2 parents 0157bb1 + b2b528b commit 2278c9d

File tree

18 files changed

+465
-163
lines changed

18 files changed

+465
-163
lines changed

.kitchen.yml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,61 +80,49 @@ platforms:
8080
provisioner:
8181
puppetfile_path: build/centos7-puppet6/Puppetfile
8282

83-
# Ubuntu Trusty with Upstart - Puppet 5
84-
- name: ubuntu14-puppet5
83+
# Ubuntu Xenial with Systemd - Puppet 5
84+
- name: ubuntu16-puppet5
8585
driver:
8686
platform: ubuntu
87-
dockerfile: build/ubuntu14-puppet5/Dockerfile.kitchen
88-
disable_upstart: false
87+
dockerfile: build/ubuntu16-puppet5/Dockerfile.kitchen
8988
run_command: /sbin/init
89+
volume:
90+
- /sys/fs/cgroup:/sys/fs/cgroup:ro
9091
provisioner:
91-
puppetfile_path: build/ubuntu14-puppet5/Puppetfile
92-
# Due to issues with running apt-get during 'docker build' on Ubuntu 14,
93-
# we need to install Puppet once the container has started.
94-
# Good news, kitchen-puppet supports this with the following commands:
95-
require_puppet_omnibus: true
96-
require_puppet_collections: true
97-
require_puppet_repo: false
98-
puppet_omnibus_url: https://raw.githubusercontent.com/petems/puppet-install-shell/master/install_puppet_5_agent.sh
92+
puppetfile_path: build/ubuntu16-puppet5/Puppetfile
9993

100-
# Ubuntu Trusty with Upstart - Puppet 6
101-
- name: ubuntu14-puppet6
94+
# Ubuntu Xenial with Systemd - Puppet 6
95+
- name: ubuntu16-puppet6
10296
driver:
10397
platform: ubuntu
104-
dockerfile: build/ubuntu14-puppet6/Dockerfile.kitchen
105-
disable_upstart: false
98+
dockerfile: build/ubuntu16-puppet6/Dockerfile.kitchen
10699
run_command: /sbin/init
100+
volume:
101+
- /sys/fs/cgroup:/sys/fs/cgroup:ro
107102
provisioner:
108-
puppetfile_path: build/ubuntu14-puppet6/Puppetfile
109-
# Due to issues with running apt-get during 'docker build' on Ubuntu 14,
110-
# we need to install Puppet once the container has started.
111-
# Good news, kitchen-puppet supports this with the following commands:
112-
require_puppet_omnibus: true
113-
require_puppet_collections: true
114-
require_puppet_repo: false
115-
puppet_omnibus_url: https://raw.githubusercontent.com/nmaludy/puppet-install-shell/master/install_puppet_6_agent.sh
103+
puppetfile_path: build/ubuntu16-puppet6/Puppetfile
116104

117-
# Ubuntu Xenial with Systemd - Puppet 5
118-
- name: ubuntu16-puppet5
105+
# Ubuntu Bionic with Systemd - Puppet 5
106+
- name: ubuntu18-puppet5
119107
driver:
120108
platform: ubuntu
121-
dockerfile: build/ubuntu16-puppet5/Dockerfile.kitchen
109+
dockerfile: build/ubuntu18-puppet5/Dockerfile.kitchen
122110
run_command: /sbin/init
123111
volume:
124112
- /sys/fs/cgroup:/sys/fs/cgroup:ro
125113
provisioner:
126-
puppetfile_path: build/ubuntu16-puppet5/Puppetfile
114+
puppetfile_path: build/ubuntu18-puppet5/Puppetfile
127115

128-
# Ubuntu Xenial with Systemd - Puppet 6
129-
- name: ubuntu16-puppet6
116+
# Ubuntu Bionic with Systemd - Puppet 6
117+
- name: ubuntu18-puppet6
130118
driver:
131119
platform: ubuntu
132-
dockerfile: build/ubuntu16-puppet6/Dockerfile.kitchen
120+
dockerfile: build/ubuntu18-puppet6/Dockerfile.kitchen
133121
run_command: /sbin/init
134122
volume:
135123
- /sys/fs/cgroup:/sys/fs/cgroup:ro
136124
provisioner:
137-
puppetfile_path: build/ubuntu16-puppet6/Puppetfile
125+
puppetfile_path: build/ubuntu18-puppet6/Puppetfile
138126

139127
suites:
140128
- name: default

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,26 +84,26 @@ matrix:
8484
gemfile: build/kitchen/Gemfile
8585
env:
8686
- TEST_NAME="centos7-puppet6"
87-
- name: "Ubuntu 14 - Puppet 5"
87+
- name: "Ubuntu 16 - Puppet 5"
8888
rvm: 2.5
8989
gemfile: build/kitchen/Gemfile
9090
env:
91-
- TEST_NAME="ubuntu14-puppet5"
92-
- name: "Ubuntu 14 - Puppet 6"
91+
- TEST_NAME="ubuntu16-puppet5"
92+
- name: "Ubuntu 16 - Puppet 6"
9393
rvm: 2.5
9494
gemfile: build/kitchen/Gemfile
9595
env:
96-
- TEST_NAME="ubuntu14-puppet6"
97-
- name: "Ubuntu 16 - Puppet 5"
96+
- TEST_NAME="ubuntu16-puppet6"
97+
- name: "Ubuntu 18 - Puppet 5"
9898
rvm: 2.5
9999
gemfile: build/kitchen/Gemfile
100100
env:
101-
- TEST_NAME="ubuntu16-puppet5"
102-
- name: "Ubuntu 16 - Puppet 6"
101+
- TEST_NAME="ubuntu18-puppet5"
102+
- name: "Ubuntu 18 - Puppet 6"
103103
rvm: 2.5
104104
gemfile: build/kitchen/Gemfile
105105
env:
106-
- TEST_NAME="ubuntu16-puppet6"
106+
- TEST_NAME="ubuntu18-puppet6"
107107

108108
notifications:
109109
# Post build failures to '#puppet' channel in 'stackstorm-community' Slack

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
- Reorganized README.md to conform to the [Puppet module README template](https://puppet.com/docs/puppet/latest/modules_documentation.html#concept-3315)
1616
#283 (Enhancement)
1717
Contributed by @nmaludy
18+
19+
- Added support for Ubuntu 18.04 (Feature)
20+
Contributed by @nmaludy
21+
22+
- Dropped support for Ubuntu 14.04 (Enhancement)
23+
Contributed by @nmaludy
1824

1925
## 1.5.0 (Oct 2, 2019)
2026

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ and [librarian-puppet](http://librarian-puppet.com/).
7171
* RHEL/CentOS 6 - Puppet 6 - [build/centos6-puppet6/Puppetfile](build/centos6-puppet6/Puppetfile)
7272
* RHEL/CentOS 7 - Puppet 5 - [build/centos7-puppet5/Puppetfile](build/centos7-puppet5/Puppetfile)
7373
* RHEL/CentOS 7 - Puppet 6 - [build/centos7-puppet6/Puppetfile](build/centos7-puppet6/Puppetfile)
74-
* Ubuntu 14.04 - Puppet 5 - [build/ubuntu14-puppet5/Puppetfile](build/ubuntu14-puppet5/Puppetfile)
75-
* Ubuntu 14.04 - Puppet 6 - [build/ubuntu14-puppet6/Puppetfile](build/ubuntu14-puppet6/Puppetfile)
7674
* Ubuntu 16.04 - Puppet 5 - [build/ubuntu16-puppet5/Puppetfile](build/ubuntu16-puppet5/Puppetfile)
7775
* Ubuntu 16.04 - Puppet 6 - [build/ubuntu16-puppet6/Puppetfile](build/ubuntu16-puppet6/Puppetfile)
78-
76+
* Ubuntu 18.04 - Puppet 5 - [build/ubuntu18-puppet5/Puppetfile](build/ubuntu18-puppet5/Puppetfile)
77+
* Ubuntu 18.04 - Puppet 6 - [build/ubuntu18-puppet6/Puppetfile](build/ubuntu18-puppet6/Puppetfile)
78+
7979
### Beginning with st2
8080

8181
For a full installation on a single node, a profile already exists to
@@ -380,8 +380,8 @@ $res = run_task('st2::key_get', $stackstorm_target,
380380

381381
### Supported platforms
382382

383-
* Ubuntu 14.04
384383
* Ubuntu 16.04
384+
* Ubuntu 18.04
385385
* RHEL/CentOS 6
386386
* RHEL/CentOS 7
387387

Vagrantfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,23 @@
2424
# - Fix sudoers directory
2525
# sudo su -
2626
# chmod 440 -R /etc/sudoers.d
27+
# chmod 755 -R /etc/sudoers.d # on ubuntu to get rsync to work
2728
#
2829
# - Run puppet to install StackStorm
2930
# puppet apply -e "include st2::profile::fullinstall"
3031
#
3132
# - Keep editing files locally and re-running puppet with the command above
33+
#
34+
# Nick's notes
35+
# vagrant destroy -f
36+
# vagrant up
37+
# vagrant ssh
38+
# sudo su -
39+
# vi /etc/puppetlabs/code/modules/mongodb/manifests/repo.pp
40+
# '4.2' => 'E162F504A20CDF15827F718D4B7C549A058F8B6B',
41+
# '4.0' => '9DA31620334BD75D9DCB49F368818C72E52529D4',
42+
#
43+
# puppet apply -e "include st2::profile::fullinstall"
3244

3345
# hostname of the VM
3446
hostname = ENV['HOSTNAME'] ? ENV['HOSTNAME'] : 'puppet-st2-vagrant'
@@ -43,8 +55,8 @@ provider = provider.to_sym
4355
# - generic/ubuntu1404
4456
# - generic/ubuntu1604
4557
# - generic/ubuntu1804
46-
box = ENV['BOX'] ? ENV['BOX'] : 'generic/centos8'
47-
#box = ENV['BOX'] ? ENV['BOX'] : 'generic/ubuntu1604'
58+
#box = ENV['BOX'] ? ENV['BOX'] : 'generic/centos8'
59+
box = ENV['BOX'] ? ENV['BOX'] : 'generic/ubuntu1804'
4860

4961
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5062
VAGRANTFILE_API_VERSION = "2"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# usage (from the root of the puppet-st2/ directory):
2+
# docker build -t stackstorm/puppet-st2-ubuntu18-puppet5 -f build/ubuntu18-puppet5/Dockerfile.kitchen .
3+
4+
FROM stackstorm/packagingtest:bionic-systemd
5+
6+
# kitchen setup
7+
RUN mkdir -p /var/run/sshd
8+
RUN useradd -d /home/<%= @username %> -m -s /bin/bash <%= @username %>
9+
RUN echo '<%= @username %> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
10+
RUN mkdir -p /home/<%= @username %>/.ssh
11+
RUN chown -R <%= @username %> /home/<%= @username %>/.ssh
12+
RUN chmod 0700 /home/<%= @username %>/.ssh
13+
RUN touch /home/<%= @username %>/.ssh/authorized_keys
14+
RUN chown <%= @username %> /home/<%= @username %>/.ssh/authorized_keys
15+
RUN chmod 0600 /home/<%= @username %>/.ssh/authorized_keys
16+
RUN echo '<%= IO.read(@public_key).strip %>' >> /home/<%= @username %>/.ssh/authorized_keys
17+
18+
# update OS
19+
RUN sudo apt-get -y update
20+
21+
# install puppet
22+
# https://puppet.com/docs/puppet/5.5/puppet_platform.html#apt-based-systems
23+
RUN wget https://apt.puppetlabs.com/puppet5-release-bionic.deb
24+
RUN sudo dpkg -i puppet5-release-bionic.deb
25+
RUN sudo apt-get -y update
26+
RUN sudo apt-get -y install puppet-agent
27+
28+
# put puppet in our path
29+
ENV PATH="/opt/puppetlabs/bin:${PATH}"
30+
RUN ln -s /opt/puppetlabs/bin/facter /usr/bin/
31+
RUN ln -s /opt/puppetlabs/bin/hiera /usr/bin/
32+
RUN ln -s /opt/puppetlabs/bin/mco /usr/bin/
33+
RUN ln -s /opt/puppetlabs/bin/puppet /usr/bin/
34+
35+
# print versions (ruby 2.4.x, puppet 5.x)
36+
RUN puppet --version
37+
RUN sudo -E puppet --version

build/ubuntu18-puppet5/Puppetfile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# coding: utf-8
2+
# ################
3+
# # Instructions #
4+
# ################
5+
# yum -y install puppet (or equivalent)
6+
# gem install r10k
7+
# # create a new file ./Puppetfile with the contents of this file
8+
# r10k puppetfile install -v --moduledir=./modules --puppetfile=./Puppetfile
9+
# # to check the module dependencies here:
10+
# # puppet module list --tree --modulepath ./modules/
11+
# puppet apply --modulepath=./modules -e "include st2::profile::fullinstall"
12+
#
13+
# #############
14+
# # DEV Notes #
15+
# #############
16+
# # To generate this file i did this, make sure you have this repo cloned:
17+
# pdk build
18+
# puppet module install ./pkg/stackstorm-st2-x.y.z.tar.gz
19+
# puppet module list --tree
20+
#
21+
# ######################
22+
# # Latest Module Tree #
23+
# ######################
24+
# └─┬ stackstorm-st2 (v1.4.0)
25+
# ├── jamtur01-httpauth (v0.0.3)
26+
# ├── puppetlabs-stdlib (v5.2.0)
27+
# ├─┬ puppetlabs-apt (v6.3.0)
28+
# │ └── puppetlabs-translate (v1.2.0)
29+
# ├── puppet-wget (v2.0.1)
30+
# ├── saz-sudo (v6.0.0)
31+
# ├─┬ puppet-python (v2.2.2)
32+
# │ └── stahnma-epel (v1.3.1)
33+
# ├── puppetlabs-inifile (v2.5.0)
34+
# ├── puppet-mongodb (v2.4.1)
35+
# ├─┬ puppetlabs-postgresql (v5.12.1)
36+
# │ └── puppetlabs-concat (v5.3.0)
37+
# ├─┬ puppet-rabbitmq (v9.0.0)
38+
# │ ├── puppet-archive (v3.2.1)
39+
# │ └── camptocamp-systemd (v2.3.0)
40+
# ├── ghoneycutt-facter (v3.5.0)
41+
# ├── computology-packagecloud (v0.3.2)
42+
# ├── puppet-selinux (v1.6.1)
43+
# ├── puppet-nginx (v0.16.0)
44+
# └── puppet-nodejs (v7.0.0)
45+
forge "https://forgeapi.puppetlabs.com"
46+
47+
mod 'jamtur01-httpauth'
48+
mod 'puppetlabs-apt'
49+
mod 'stahnma-epel'
50+
mod 'puppetlabs-translate' # dependency of puppetlabs-apt
51+
mod 'puppet-wget'
52+
mod 'saz-sudo'
53+
mod 'puppet-python'
54+
mod 'puppet-mongodb'
55+
mod 'puppetlabs-postgresql'
56+
mod 'puppetlabs-concat' # dependency of puppetlabs-postgresql
57+
mod 'puppet-rabbitmq'
58+
mod 'puppet-archive' # dependency of puppet-rabbitmq
59+
mod 'camptocamp-systemd' # dependency of puppet-rabbitmq
60+
mod 'ghoneycutt-facter'
61+
mod 'computology-packagecloud'
62+
mod 'puppet-selinux'
63+
mod 'puppet-nginx'
64+
mod 'puppet-nodejs'
65+
mod 'puppetlabs-inifile'
66+
mod 'puppetlabs-stdlib'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# usage (from the root of the puppet-st2/ directory):
2+
# docker build -t stackstorm/puppet-st2-ubuntu18-puppet6 -f build/ubuntu18-puppet6/Dockerfile.kitchen .
3+
4+
FROM stackstorm/packagingtest:bionic-systemd
5+
6+
# kitchen setup
7+
RUN mkdir -p /var/run/sshd
8+
RUN useradd -d /home/<%= @username %> -m -s /bin/bash <%= @username %>
9+
RUN echo '<%= @username %> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
10+
RUN mkdir -p /home/<%= @username %>/.ssh
11+
RUN chown -R <%= @username %> /home/<%= @username %>/.ssh
12+
RUN chmod 0700 /home/<%= @username %>/.ssh
13+
RUN touch /home/<%= @username %>/.ssh/authorized_keys
14+
RUN chown <%= @username %> /home/<%= @username %>/.ssh/authorized_keys
15+
RUN chmod 0600 /home/<%= @username %>/.ssh/authorized_keys
16+
RUN echo '<%= IO.read(@public_key).strip %>' >> /home/<%= @username %>/.ssh/authorized_keys
17+
18+
# update OS
19+
RUN sudo apt-get -y update
20+
21+
# install puppet
22+
# https://puppet.com/docs/puppet/6.0/puppet_platform.html
23+
RUN wget https://apt.puppetlabs.com/puppet6-release-bionic.deb
24+
RUN sudo dpkg -i puppet6-release-bionic.deb
25+
RUN sudo apt-get -y update
26+
RUN sudo apt-get -y install puppet-agent
27+
28+
# put puppet in our path
29+
ENV PATH="/opt/puppetlabs/bin:${PATH}"
30+
RUN ln -s /opt/puppetlabs/bin/facter /usr/bin/
31+
RUN ln -s /opt/puppetlabs/bin/hiera /usr/bin/
32+
RUN ln -s /opt/puppetlabs/bin/mco /usr/bin/
33+
RUN ln -s /opt/puppetlabs/bin/puppet /usr/bin/
34+
35+
# print versions (ruby 2.5.x, puppet 6.x)
36+
RUN puppet --version
37+
RUN sudo -E puppet --version

build/ubuntu18-puppet6/Puppetfile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# coding: utf-8
2+
# ################
3+
# # Instructions #
4+
# ################
5+
# yum -y install puppet (or equivalent)
6+
# gem install r10k
7+
# # create a new file ./Puppetfile with the contents of this file
8+
# r10k puppetfile install -v --moduledir=./modules --puppetfile=./Puppetfile
9+
# # to check the module dependencies here:
10+
# # puppet module list --tree --modulepath ./modules/
11+
# puppet apply --modulepath=./modules -e "include st2::profile::fullinstall"
12+
#
13+
# #############
14+
# # DEV Notes #
15+
# #############
16+
# # To generate this file i did this, make sure you have this repo cloned:
17+
# pdk build
18+
# puppet module install ./pkg/stackstorm-st2-x.y.z.tar.gz
19+
# puppet module list --tree
20+
#
21+
# ######################
22+
# # Latest Module Tree #
23+
# ######################
24+
# └─┬ stackstorm-st2 (v1.4.0)
25+
# ├── jamtur01-httpauth (v0.0.3)
26+
# ├── puppetlabs-stdlib (v5.2.0)
27+
# ├─┬ puppetlabs-apt (v6.3.0)
28+
# │ └── puppetlabs-translate (v1.2.0)
29+
# ├── puppet-wget (v2.0.1)
30+
# ├── saz-sudo (v6.0.0)
31+
# ├─┬ puppet-python (v2.2.2)
32+
# │ └── stahnma-epel (v1.3.1)
33+
# ├── puppetlabs-inifile (v2.5.0)
34+
# ├── puppet-mongodb (v2.4.1)
35+
# ├─┬ puppetlabs-postgresql (v5.12.1)
36+
# │ └── puppetlabs-concat (v5.3.0)
37+
# ├─┬ puppet-rabbitmq (v9.0.0)
38+
# │ ├── puppet-archive (v3.2.1)
39+
# │ └── camptocamp-systemd (v2.3.0)
40+
# ├── ghoneycutt-facter (v3.5.0)
41+
# ├── computology-packagecloud (v0.3.2)
42+
# ├── puppet-selinux (v1.6.1)
43+
# ├── puppet-nginx (v0.16.0)
44+
# └── puppet-nodejs (v7.0.0)
45+
forge "https://forgeapi.puppetlabs.com"
46+
47+
mod 'jamtur01-httpauth'
48+
mod 'puppetlabs-apt'
49+
mod 'stahnma-epel'
50+
mod 'puppetlabs-translate' # dependency of puppetlabs-apt
51+
mod 'puppet-wget'
52+
mod 'saz-sudo'
53+
mod 'puppet-python'
54+
mod 'puppet-mongodb'
55+
mod 'puppetlabs-postgresql'
56+
mod 'puppetlabs-concat' # dependency of puppetlabs-postgresql
57+
mod 'puppet-rabbitmq'
58+
mod 'puppet-archive' # dependency of puppet-rabbitmq
59+
mod 'camptocamp-systemd' # dependency of puppet-rabbitmq
60+
mod 'ghoneycutt-facter'
61+
mod 'computology-packagecloud'
62+
mod 'puppet-selinux'
63+
mod 'puppet-nginx'
64+
mod 'puppet-nodejs'
65+
mod 'puppetlabs-inifile'
66+
mod 'puppetlabs-stdlib'

0 commit comments

Comments
 (0)