Added framework for kitchen test-suite but no tests, yet
This commit is contained in:
parent
9f82056e3f
commit
2646a721d1
3 changed files with 52 additions and 0 deletions
24
.kitchen.yml
Normal file
24
.kitchen.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
driver:
|
||||||
|
name: docker
|
||||||
|
use_sudo: false
|
||||||
|
require_chef_omnibus: 12.2.1
|
||||||
|
|
||||||
|
provisioner:
|
||||||
|
name: chef_zero
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: centos-6.6
|
||||||
|
- name: centos-7.0
|
||||||
|
driver:
|
||||||
|
dockerfile: test/centos7-dockerfile
|
||||||
|
platform: centos
|
||||||
|
privileged: true
|
||||||
|
use_sudo: false
|
||||||
|
- name: debian-7.8
|
||||||
|
|
||||||
|
suites:
|
||||||
|
- name: default
|
||||||
|
run_list:
|
||||||
|
- recipe[sudo_rules::default]
|
||||||
|
attributes:
|
1
Gemfile
1
Gemfile
|
@ -16,5 +16,6 @@ gem 'berkshelf'
|
||||||
|
|
||||||
gem "test-kitchen"
|
gem "test-kitchen"
|
||||||
gem "kitchen-docker"
|
gem "kitchen-docker"
|
||||||
|
gem "kitchen-vagrant"
|
||||||
gem "stove"
|
gem "stove"
|
||||||
|
|
||||||
|
|
27
test/centos7-dockerfile
Normal file
27
test/centos7-dockerfile
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
FROM centos:7
|
||||||
|
RUN yum -y swap -- remove systemd-container systemd-container-libs -- install systemd systemd-libs sudo openssh-server openssh-clients curl
|
||||||
|
RUN yum -y update; yum clean all; \
|
||||||
|
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||||
|
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||||
|
rm -f /etc/systemd/system/*.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||||
|
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||||
|
|
||||||
|
# OpenSSH Server Tweaks
|
||||||
|
RUN sed -i '/UsePAM/d' /etc/ssh/sshd_config
|
||||||
|
RUN echo 'UsePrivilegeSeparation no' >> /etc/ssh/sshd_config
|
||||||
|
RUN echo 'UsePAM no' >> /etc/ssh/sshd_config
|
||||||
|
RUN systemctl enable sshd
|
||||||
|
|
||||||
|
# test-kitchen
|
||||||
|
RUN useradd -d /home/kitchen -m -s /bin/bash kitchen
|
||||||
|
RUN echo "kitchen:kitchen" | chpasswd
|
||||||
|
RUN echo 'kitchen ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
|
||||||
|
VOLUME [ "/sys/fs/cgroup" ]
|
||||||
|
#VOLUME [ "/cgroup" ]
|
||||||
|
ENTRYPOINT ["/usr/sbin/init"]
|
||||||
|
|
Loading…
Reference in a new issue