Skip to content

Commit

Permalink
add docker based beaker nodesets
Browse files Browse the repository at this point in the history
Copied from puppet-jenkins
  • Loading branch information
jhoblitt committed Jun 28, 2016
1 parent ff24271 commit 69202a0
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/acceptance/nodesets/centos-6-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
HOSTS:
centos-6-x64:
platform: el-6-x86_64
hypervisor : docker
image: centos:6
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'yum install -y crontabs tar wget'
CONFIG:
type: foss
log_level: debug
30 changes: 30 additions & 0 deletions spec/acceptance/nodesets/centos-7-docker.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM centos:7
MAINTAINER puppet-jenkins
ENV container docker

# beaker default behavior
RUN yum clean all
RUN yum install -y sudo openssh-server openssh-clients curl ntpdate
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
RUN mkdir -p /var/run/sshd
RUN echo root:root | chpasswd
RUN sed -ri 's/^#?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
RUN yum install -y crontabs tar wget
EXPOSE 22

# based on https://github.com/slafs/dockerfiles/blob/master/centos7-systemd/Dockerfile
RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs
RUN systemctl mask dev-mqueue.mount dev-hugepages.mount \
systemd-remount-fs.service sys-kernel-config.mount \
sys-kernel-debug.mount sys-fs-fuse-connections.mount \
display-manager.service systemd-logind.service
RUN systemctl disable graphical.target; systemctl enable multi-user.target
RUN systemctl enable sshd.service
VOLUME ["/sys/fs/cgroup"]

# provides /usr/sbin/service required by the service redhat provider
RUN yum install -y initscripts

CMD ["/usr/lib/systemd/systemd"]
9 changes: 9 additions & 0 deletions spec/acceptance/nodesets/centos-7-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
HOSTS:
centos-7-x64:
platform: el-7-x86_64
hypervisor : docker
docker_preserve_image: true
dockerfile: spec/acceptance/nodesets/centos-7-docker.Dockerfile
CONFIG:
type: foss
log_level: debug
11 changes: 11 additions & 0 deletions spec/acceptance/nodesets/ubuntu-14.04-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
HOSTS:
ubuntu-14.04-x64:
platform: ubuntu-14.04-amd64
hypervisor : docker
#image: ubuntu:14.04
image: electrical/ubuntu:14.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
CONFIG:
type: foss
log_level: debug

0 comments on commit 69202a0

Please sign in to comment.