Commit 8fe9dd19 authored by Tim Smith's avatar Tim Smith
Browse files

Switch from digital ocean to kitchen-docker

parent 91628b1f
---
driver_plugin: vagrant
driver_plugin: digitalocean
driver_config:
digitalocean_client_id: <%= ENV['DIGITAL_OCEAN_CLIENT_ID'] %>
digitalocean_api_key: <%= ENV['DIGITAL_OCEAN_API_KEY'] %>
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
ssh_key: <%= ENV['AWS_PRIVATE_KEY_PATH'] %>
rackspace_username: <%= ENV['RACKSPACE_USERNAME'] %>
rackspace_api_key: <%= ENV['RACKSPACE_API_KEY'] %>
require_chef_omnibus: latest
platforms:
# - name: omnios-r151006c
# driver_plugin: ec2
# driver_config:
# image_id: ami-35eb835c
# username: root
- name: centos-5.8
driver_plugin: digitalocean
driver_config:
image_id: 1601
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
- name: centos-6.4
driver_plugin: digitalocean
driver_config:
image_id: 562354
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
# - name: amazon-2013.09
# driver_plugin: ec2
# driver_config:
# image_id: ami-3be4bc52
# username: ec2-user
- name: ubuntu-1004
driver_plugin: digitalocean
driver_config:
image_id: 14097
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
run_list:
- recipe[apt]
- name: ubuntu-1204
driver_plugin: digitalocean
driver_config:
image_id: 1505447
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
run_list:
- recipe[apt]
suites:
- name: default
run_list:
- recipe[rsyslog::default]
- name: relp
run_list:
- recipe[rsyslog::default]
attributes:
rsyslog:
use_relp: true
# CentOS and OmniOS do not support relp
excludes:
- centos-5.8
- omnios-r151006c
- name: client
run_list:
- recipe[rsyslog::client]
attributes:
rsyslog:
server_ip: 10.0.0.50
- name: server
run_list:
- recipe[rsyslog::server]
\ No newline at end of file
---
driver_config:
digitalocean_client_id: <%= ENV['DIGITAL_OCEAN_CLIENT_ID'] %>
digitalocean_api_key: <%= ENV['DIGITAL_OCEAN_API_KEY'] %>
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
provisioner:
name: chef_zero
require_chef_omnibus: latest
platforms:
- name: centos-5.8
driver_plugin: digitalocean
driver_config:
image_id: 1601
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
- name: centos-6.4
driver_plugin: digitalocean
driver_config:
image_id: 562354
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
# - name: amazon-2013.09
# driver_plugin: ec2
# driver_config:
# image_id: ami-3be4bc52
# username: ec2-user
# ssh_key: <%= ENV['EC2_SSH_KEY_PATH'] %>
- name: fedora-19
driver_plugin: digitalocean
driver_config:
image_id: 696598
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
- name: ubuntu-1004
driver_plugin: digitalocean
driver_config:
image_id: 14097
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
run_list:
- recipe[apt]
- name: ubuntu-1204
driver_plugin: digitalocean
driver_config:
image_id: 1505447
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
run_list:
- recipe[apt]
suites:
- name: default
run_list:
- recipe[rsyslog::default]
- name: relp
run_list:
- recipe[rsyslog::default]
attributes:
rsyslog:
use_relp: true
# CentOS and OmniOS do not support relp
excludes:
- centos-5.8
- omnios-r151006c
- name: client
run_list:
- recipe[rsyslog::client]
attributes:
rsyslog:
server_ip: 10.0.0.50
- name: server
run_list:
- recipe[rsyslog::server]
settings:
parallel: true
driver:
name: docker
# privileged is required otherwise the container doesn't boot right
privileged: true
platforms:
- name: centos-7.1
driver:
image: centos:7
platform: rhel
run_command: /usr/lib/systemd/systemd
provision_command:
- /bin/yum install -y initscripts net-tools wget
- name: ubuntu-12.04
driver:
image: ubuntu-upstart:12.04
platform: ubuntu
disable_upstart: false
run_command: /sbin/init
provision_command:
- /usr/bin/apt-get update
- /usr/bin/apt-get install apt-transport-https net-tools -y
- name: ubuntu-14.04
driver:
image: ubuntu-upstart:14.04
platform: ubuntu
disable_upstart: false
run_command: /sbin/init
provision_command:
- /usr/bin/apt-get update
- /usr/bin/apt-get install apt-transport-https net-tools -y
suites:
- name: default
run_list:
- recipe[rsyslog::default]
- name: relp
run_list:
- recipe[rsyslog::default]
attributes:
rsyslog:
use_relp: true
- name: client
run_list:
- recipe[rsyslog_test::client]
attributes:
rsyslog:
server_ip: 10.0.0.50
custom_remote:
- server: 10.0.0.45
logs: auth.*,mail.*
port: 555
protocol: udp
- server: 10.1.1.33
logs: authpriv.*,cron.*,daemon.*
port: 654
protocol: tcp
remote_template: RSYSLOG_SyslogProtocol23Format
- name: server
run_list:
- recipe[rsyslog_test::server]
- name: input_file_provider
run_list:
- recipe[rsyslog_test::input_file_provider]
# Use Travis's cointainer based infrastructure
sudo: false
rvm: 2.2
sudo: required
# install the pre-release chef-dk. Use chef-stable-precise to install the stable release
addons:
apt:
sources:
......@@ -7,22 +10,37 @@ addons:
packages:
- chefdk
services: docker
env:
matrix:
- INSTANCE=default-ubuntu-1404
- INSTANCE=default-ubuntu-1204
- INSTANCE=default-centos-71
- INSTANCE=input_file_provider-ubuntu-1404
- INSTANCE=input_file_provider-ubuntu-1204
- INSTANCE=input_file_provider-centos-71
- INSTANCE=client-ubuntu-1404
- INSTANCE=client-ubuntu-1204
- INSTANCE=client-centos-71
- INSTANCE=server-ubuntu-1404
- INSTANCE=server-ubuntu-1204
- INSTANCE=server-centos-71
# Don't `bundle install`
install: echo "skip bundle install"
branches:
only:
- master
# Ensure we make ChefDK's Ruby the default
before_script:
# https://github.com/zuazo/kitchen-in-travis-native/issues/1#issuecomment-142230889
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
# We have to install chef-sugar for ChefSpec
- /opt/chefdk/embedded/bin/chef gem install chef-sugar
- /opt/chefdk/embedded/bin/chef gem install kitchen-docker
script:
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/rubocop --version
- /opt/chefdk/embedded/bin/rubocop
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec
- /opt/chefdk/embedded/bin/rspec spec
- /opt/chefdk/embedded/bin/rspec
- KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment