Skip to content

Commit

Permalink
add dockeer based beaker nodesets
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Feb 2, 2017
1 parent 84334e8 commit b3b2725
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/acceptance/nodesets/centos-6-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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'
default_apply_opts:
disable_warnings: deprecations
CONFIG:
type: foss
log_level: debug
29 changes: 29 additions & 0 deletions spec/acceptance/nodesets/centos-7-docker.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM centos:7
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"]
11 changes: 11 additions & 0 deletions spec/acceptance/nodesets/centos-7-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
HOSTS:
centos-7-x64:
platform: el-7-x86_64
hypervisor : docker
docker_preserve_image: true
dockerfile: spec/acceptance/nodesets/centos-7-docker.Dockerfile
default_apply_opts:
disable_warnings: deprecations
CONFIG:
type: foss
log_level: debug
13 changes: 13 additions & 0 deletions spec/acceptance/nodesets/ubuntu-14.04-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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"]'
default_apply_opts:
disable_warnings: deprecations
CONFIG:
type: foss
log_level: debug

0 comments on commit b3b2725

Please sign in to comment.