Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,28 @@ platforms:
provisioner:
puppetfile_path: build/centos7-puppet6/Puppetfile

# CentOS8 with Systemd - Puppet 5
- name: centos8-puppet5
driver:
platform: centos
dockerfile: build/centos8-puppet5/Dockerfile.kitchen
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
puppetfile_path: build/centos8-puppet5/Puppetfile

# CentOS8 with Systemd - Puppet 6
- name: centos8-puppet6
driver:
platform: centos
dockerfile: build/centos8-puppet6/Dockerfile.kitchen
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
puppetfile_path: build/centos8-puppet6/Puppetfile

# Ubuntu Xenial with Systemd - Puppet 5
- name: ubuntu16-puppet5
driver:
Expand Down
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ matrix:
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="centos7-puppet6"
- name: "RHEL/CentOS 8 - Puppet 5"
rvm: 2.5
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="centos8-puppet5"
- name: "RHEL/CentOS 8 - Puppet 6"
rvm: 2.5
gemfile: build/kitchen/Gemfile
env:
- TEST_NAME="centos8-puppet6"
- name: "Ubuntu 16 - Puppet 5"
rvm: 2.5
gemfile: build/kitchen/Gemfile
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ $res = run_task('st2::key_get', $stackstorm_target,
* Ubuntu 18.04
* RHEL/CentOS 6
* RHEL/CentOS 7
* RHEL/CentOS 8

### Supported Puppet versions

Expand Down
44 changes: 44 additions & 0 deletions build/centos8-puppet5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# usage (from the root of the puppet-st2/ directory):
# docker build -t stackstorm/puppet-st2-puppet5 -f build/puppet5/Dockerfile .

FROM stackstorm/packagingtest:centos8-systemd

# install ruby and dependencies for gem install
RUN yum -y install gcc gcc-c++ make which openssl
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN curl -sSL https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c "rvm requirements"
RUN /bin/bash -l -c "rvm install 2.4.4"
RUN /bin/bash -l -c "rvm use 2.4.4 --default"
RUN /bin/bash -l -c "gem install bundler --no-rdoc --no-ri"

# install puppet
RUN yum -y install https://yum.puppet.com/puppet5/puppet5-release-el-8.noarch.rpm
RUN yum -y install puppet-agent
ENV PATH="/opt/puppetlabs/bin:${PATH}"

# print versions (ruby 2.4.x, puppet 5.x)
RUN /bin/bash -l -c "ruby --version"
RUN /bin/bash -l -c "gem --version"
RUN /bin/bash -l -c "bundle --version"
RUN puppet --version

# create our working directory with the code from our repo in it
ENV APP_HOME /puppet_st2
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY . $APP_HOME

# use bundler to install our gems
ENV PUPPET_GEM_VERSION "~> 5.0"
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
BUNDLE_JOBS=2 \
BUNDLE_PATH=/bundle
RUN /bin/bash -l -c "bundle -v"
RUN /bin/bash -l -c "rm -f ${APP_HOME}/Gemfile.lock"
RUN /bin/bash -l -c "gem update --system"
RUN /bin/bash -l -c "gem --version"
RUN /bin/bash -l -c "bundle -v"
RUN cat $BUNDLE_GEMFILE
RUN /bin/bash -l -c "bundle install --without system_tests"
RUN cat $BUNDLE_GEMFILE.lock
37 changes: 37 additions & 0 deletions build/centos8-puppet5/Dockerfile.kitchen
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# usage (from the root of the puppet-st2/ directory):
# docker build -t stackstorm/puppet-st2-puppet5 -f build/puppet5/Dockerfile.kitchen .

FROM stackstorm/packagingtest:centos8-systemd

RUN mkdir -p /var/run/sshd
RUN useradd -d /home/<%= @username %> -m -s /bin/bash <%= @username %>
RUN echo <%= "#{@username}:#{@password}" %> | chpasswd
RUN echo '<%= @username %> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN mkdir -p /home/<%= @username %>/.ssh
RUN chown -R <%= @username %> /home/<%= @username %>/.ssh
RUN chmod 0700 /home/<%= @username %>/.ssh
RUN touch /home/<%= @username %>/.ssh/authorized_keys
RUN chown <%= @username %> /home/<%= @username %>/.ssh/authorized_keys
RUN chmod 0600 /home/<%= @username %>/.ssh/authorized_keys
RUN echo '<%= IO.read(@public_key).strip %>' >> /home/<%= @username %>/.ssh/authorized_keys

# upgrade the image, otherwise installing st2 package hangs
RUN yum -y upgrade

# install doc files (/usr/share/docs) when installing yum packages
# otherwise /usr/share/docs/st2/conf/nginx/st2.conf won't be present
# https://github.com/docker-library/docs/tree/master/centos#package-documentation
RUN sed -i '/nodocs/d' /etc/yum.conf

# install puppet
RUN yum -y install https://yum.puppet.com/puppet5/puppet5-release-el-8.noarch.rpm
RUN yum -y install puppet-agent
ENV PATH="/opt/puppetlabs/bin:${PATH}"
RUN ln -s /opt/puppetlabs/bin/facter /usr/bin/
RUN ln -s /opt/puppetlabs/bin/hiera /usr/bin/
RUN ln -s /opt/puppetlabs/bin/mco /usr/bin/
RUN ln -s /opt/puppetlabs/bin/puppet /usr/bin/

# print versions (ruby 2.4.x, puppet 5.x)
RUN puppet --version
RUN sudo -E puppet --version
File renamed without changes.
44 changes: 44 additions & 0 deletions build/centos8-puppet6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# usage (from the root of the puppet-st2/ directory):
# docker build -t stackstorm/puppet-st2-puppet6 -f build/puppet6/Dockerfile .

FROM stackstorm/packagingtest:centos8-systemd

# install ruby and dependencies for gem install
RUN yum -y install gcc gcc-c++ make which openssl
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN curl -sSL https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c "rvm requirements"
RUN /bin/bash -l -c "rvm install 2.5.1"
RUN /bin/bash -l -c "rvm use 2.5.1 --default"
RUN /bin/bash -l -c "gem install bundler --no-rdoc --no-ri"

# install puppet
RUN yum -y install https://yum.puppet.com/puppet6/puppet6-release-el-8.noarch.rpm
RUN yum -y install puppet-agent
ENV PATH="/opt/puppetlabs/bin:${PATH}"

# print versions (ruby 2.5.x, puppet 6.x)
RUN /bin/bash -l -c "ruby --version"
RUN /bin/bash -l -c "gem --version"
RUN /bin/bash -l -c "bundle --version"
RUN puppet --version

# create our working directory with the code from our repo in it
ENV APP_HOME /puppet_st2
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY . $APP_HOME

# use bundler to install our gems
ENV PUPPET_GEM_VERSION "~> 6.0"
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
BUNDLE_JOBS=2 \
BUNDLE_PATH=/bundle
RUN /bin/bash -l -c "bundle -v"
RUN /bin/bash -l -c "rm -f ${APP_HOME}/Gemfile.lock"
RUN /bin/bash -l -c "gem update --system"
RUN /bin/bash -l -c "gem --version"
RUN /bin/bash -l -c "bundle -v"
RUN cat $BUNDLE_GEMFILE
RUN /bin/bash -l -c "bundle install --without system_tests"
RUN cat $BUNDLE_GEMFILE.lock
37 changes: 37 additions & 0 deletions build/centos8-puppet6/Dockerfile.kitchen
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# usage (from the root of the puppet-st2/ directory):
# docker build -t stackstorm/puppet-st2-puppet6 -f build/puppet6/Dockerfile.kitchen .

FROM stackstorm/packagingtest:centos8-systemd

RUN mkdir -p /var/run/sshd
RUN useradd -d /home/<%= @username %> -m -s /bin/bash <%= @username %>
RUN echo <%= "#{@username}:#{@password}" %> | chpasswd
RUN echo '<%= @username %> ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN mkdir -p /home/<%= @username %>/.ssh
RUN chown -R <%= @username %> /home/<%= @username %>/.ssh
RUN chmod 0700 /home/<%= @username %>/.ssh
RUN touch /home/<%= @username %>/.ssh/authorized_keys
RUN chown <%= @username %> /home/<%= @username %>/.ssh/authorized_keys
RUN chmod 0600 /home/<%= @username %>/.ssh/authorized_keys
RUN echo '<%= IO.read(@public_key).strip %>' >> /home/<%= @username %>/.ssh/authorized_keys

# upgrade the image, otherwise installing st2 package hangs
RUN yum -y upgrade

# install doc files (/usr/share/docs) when installing yum packages
# otherwise /usr/share/docs/st2/conf/nginx/st2.conf won't be present
# https://github.com/docker-library/docs/tree/master/centos#package-documentation
RUN sed -i '/nodocs/d' /etc/yum.conf

# install puppet
RUN yum -y install https://yum.puppet.com/puppet6/puppet6-release-el-8.noarch.rpm
RUN yum -y install puppet-agent
ENV PATH="/opt/puppetlabs/bin:${PATH}"
RUN ln -s /opt/puppetlabs/bin/facter /usr/bin/
RUN ln -s /opt/puppetlabs/bin/hiera /usr/bin/
RUN ln -s /opt/puppetlabs/bin/mco /usr/bin/
RUN ln -s /opt/puppetlabs/bin/puppet /usr/bin/

# print versions (ruby 2.5.x, puppet 6.x)
RUN puppet --version
RUN sudo -E puppet --version
File renamed without changes.
40 changes: 0 additions & 40 deletions build/ubuntu14-puppet5/Dockerfile.kitchen

This file was deleted.

40 changes: 0 additions & 40 deletions build/ubuntu14-puppet6/Dockerfile.kitchen

This file was deleted.

Loading