Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 5e9bb9e

Browse files
author
Sebastian Gumprich
committed
docker support
1 parent 1510f92 commit 5e9bb9e

File tree

4 files changed

+102
-44
lines changed

4 files changed

+102
-44
lines changed

.kitchen.vagrant.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
driver:
3+
name: vagrant
4+
provisioner:
5+
name: ansible_playbook
6+
test_repo_uri: https://github.com/hardening-io/tests-mysql-hardening.git
7+
hosts: all
8+
playbook: default.yml
9+
require_ansible_repo: false
10+
require_ansible_omnibus: true
11+
requirements_path: requirements.yml
12+
ansible_verbose: true
13+
ansible_diff: true
14+
roles_path: ../ansible-mysql-hardening/
15+
16+
platforms:
17+
- name: ubuntu-12.04
18+
driver_config:
19+
box: opscode-ubuntu-12.04
20+
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box
21+
- name: ubuntu-14.04
22+
driver_config:
23+
box: opscode-ubuntu-14.04
24+
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box
25+
- name: centos-6.4
26+
driver_config:
27+
box: opscode-centos-6.4
28+
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
29+
- name: centos-6.5
30+
driver_config:
31+
box: opscode-centos-6.5
32+
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
33+
- name: oracle-6.4
34+
driver_config:
35+
box: oracle-6.4
36+
box_url: https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel64-64.box
37+
- name: oracle-6.5
38+
driver_config:
39+
box: oracle-6.5
40+
box_url: https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel65-64.box
41+
- name: debian-6
42+
driver_config:
43+
box: debian-6
44+
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-6.0.10_chef-provisionerless.box
45+
- name: debian-7
46+
driver_config:
47+
box: debian-7
48+
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8_chef-provisionerless.box
49+
- name: debian-8
50+
driver_config:
51+
box: debian-8
52+
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-8.1_chef-provisionerless.box
53+
suites:
54+
- name: ansible_1.9
55+
provisioner:
56+
ansible_version: 1.9.4
57+
- name: ansible_latest

.kitchen.yml

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,59 @@
11
---
22
driver:
3-
name: vagrant
3+
name: docker
4+
5+
transport:
6+
max_ssh_sessions: 5
7+
48
provisioner:
59
name: ansible_playbook
6-
test_repo_uri: https://github.com/hardening-io/tests-mysql-hardening.git
710
hosts: all
8-
playbook: default.yml
911
require_ansible_repo: false
1012
require_ansible_omnibus: true
13+
require_chef_for_busser: false
14+
require_ruby_for_busser: false
1115
requirements_path: requirements.yml
1216
ansible_verbose: true
13-
ansible_diff: true
1417
roles_path: ../ansible-mysql-hardening/
1518
sudo_command: 'sudo -E -H'
19+
playbook: default.yml
1620

1721
platforms:
1822
- name: ubuntu-12.04
19-
driver_config:
20-
box: opscode-ubuntu-12.04
21-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box
23+
driver:
24+
image: ubuntu:12.04
2225
- name: ubuntu-14.04
23-
driver_config:
24-
box: opscode-ubuntu-14.04
25-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box
26-
- name: centos-6.4
27-
driver_config:
28-
box: opscode-centos-6.4
29-
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
30-
- name: centos-6.5
31-
driver_config:
32-
box: opscode-centos-6.5
33-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
34-
- name: oracle-6.4
35-
driver_config:
36-
box: oracle-6.4
37-
box_url: https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel64-64.box
38-
- name: oracle-6.5
39-
driver_config:
40-
box: oracle-6.5
41-
box_url: https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel65-64.box
42-
- name: debian-6
43-
driver_config:
44-
box: debian-6
45-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-6.0.10_chef-provisionerless.box
26+
driver:
27+
image: ubuntu:14.04
28+
- name: ubuntu-16.04
29+
driver:
30+
image: ubuntu:16.04
31+
- name: centos-6.6
32+
driver:
33+
image: centos:6.6
34+
- name: centos-6.7
35+
driver:
36+
image: centos:6.7
37+
- name: centos-7
38+
driver:
39+
image: centos:7
40+
privileged: true
41+
run_command: /usr/sbin/init
4642
- name: debian-7
47-
driver_config:
48-
box: debian-7
49-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8_chef-provisionerless.box
43+
driver:
44+
image: debian:7
5045
- name: debian-8
51-
driver_config:
52-
box: debian-8
53-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-8.1_chef-provisionerless.box
46+
driver:
47+
image: debian:8
48+
49+
verifier:
50+
name: inspec
51+
sudo: true
52+
inspec_tests:
53+
- https://github.com/dev-sec/tests-mysql-hardening
54+
5455
suites:
55-
- name: ansible_1.9
56+
- name: mysql-ansible_1.9
5657
provisioner:
5758
ansible_version: 1.9.4
58-
- name: ansible_latest
59+
- name: mysql-ansible_latest

Gemfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ source 'https://rubygems.org'
44

55
group :test do
66
gem 'rake'
7-
# gem 'chefspec', '~> 4.2.0'
87
gem 'foodcritic', '~> 4.0'
98
gem 'thor-foodcritic'
10-
# gem 'rubocop', '~> 0.28.0'
119
gem 'coveralls', require: false
1210
end
1311

1412
group :development do
1513
gem 'guard'
1614
gem 'guard-rspec'
1715
gem 'guard-kitchen'
18-
# gem 'guard-rubocop'
19-
# gem 'guard-foodcritic'
2016
end
2117

2218
group :integration do
23-
gem 'test-kitchen', '~> 1.0'
19+
gem 'test-kitchen', '~> 1.0', :git => 'https://github.com/test-kitchen/test-kitchen'
2420
gem 'kitchen-ansible'
2521
gem 'kitchen-vagrant'
22+
gem 'kitchen-inspec'
2623
gem 'kitchen-sharedtests', '~> 0.2.0'
24+
gem 'kitchen-sync'
25+
gem 'kitchen-transport-rsync'
26+
gem 'kitchen-docker'
2727
end
2828

2929
group :openstack do

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mysql_hardening_group: 'root'
77
mysql_datadir: '/var/lib/mysql'
88
mysql_hardening_hardening_conf: '/etc/mysql/conf.d/hardening.cnf'
99
# You have to change this to your own strong enough mysql root password
10-
mysql_root_password: '-----====>SetR00tPa$$wordH3r3!!!<====-----'
10+
mysql_root_password: 'root'
1111
# There .my.cnf with mysql root credentials will be installed
1212
mysql_user_home: "{{ ansible_env.HOME}}"
1313

0 commit comments

Comments
 (0)