- vagrant 1.7.4
- vagrant-vmware-workstation 4.0.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# located at chef_repo/environments/org1-prod.rb | |
require 'deep_merge' | |
name 'org1-prod' | |
description 'Production environment for org1' | |
org1_yml_path = File.expand_path('../common/org1.yml', __FILE__) | |
common = YAML.load_file(org1_yml_path) | |
default_attributes( | |
common['default'].deep_merge!( | |
# declare all you org1-prod specific things here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
driver: | |
name: docker | |
driver_config: | |
provision_command: | |
- curl -L https://www.opscode.com/chef/install.sh | bash -s -- -v 12.3.0 | |
- env GEM_HOME=/tmp/verifier/gems GEM_PATH=/tmp/verifier/gems GEM_CACHE=/tmp/verifier/gems/cache /opt/chef/embedded/bin/gem install thor busser busser-serverspec serverspec bundler && chown -R kitchen:kitchen /tmp/verifier | |
require_chef_omnibus: false | |
use_sudo: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: set up port forwarding to make the docker host work via our weird VPN, too | |
echo port-forwarding docker port 2376 via localhost... | |
VBoxManage controlvm "boot2docker-vm" natpf1 delete "tcp-port2376" >NUL 2>&1 | |
VBoxManage controlvm "boot2docker-vm" natpf1 "tcp-port2376,tcp,,2376,,2376" | |
set DOCKER_HOST=tcp://127.0.0.1:2376 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: see https://docs.docker.com/articles/https/ | |
set LIBDIR=/var/lib/boot2docker/tls | |
b2d ssh -- sudo openssl genrsa -out %LIBDIR%/localhost_key.pem 2048 | |
b2d ssh -- sudo OPENSSL_CONF=/usr/local/etc/ssl/openssl.cnf openssl req -subj '/CN=client' -new -key %LIBDIR%/localhost_key.pem -out %LIBDIR%/localhost_client.csr | |
b2d ssh -- echo extendedKeyUsage = clientAuth ^| sudo tee %LIBDIR%/localhost_extfile.cnf | |
b2d ssh -- sudo openssl x509 -req -days 365 -in %LIBDIR%/localhost_client.csr -CA %LIBDIR%/ca.pem -CAkey %LIBDIR%/cakey.pem -CAcreateserial -out %LIBDIR%/localhost_cert.pem -extfile %LIBDIR%/localhost_extfile.cnf | |
b2d ssh -- sudo rm %LIBDIR%/localhost_client.csr %LIBDIR%/localhost_extfile.cnf | |
b2d ssh -- sudo cat %LIBDIR%/localhost_key.pem > %HOME%\.boot2docker\certs\boot2docker-vm\localhost_key.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your Gemfile lists the gem vagrant-managed-servers (>= 0) more than once. | |
You should probably keep only one of them. | |
While it's not a problem now, it could cause errors if you change the version of just one of them later. | |
INFO global: Vagrant version: 1.7.2 | |
INFO global: Ruby version: 2.1.5 | |
INFO global: RubyGems version: 2.4.4 | |
INFO global: VAGRANT_HOME="W:\\home\\.vagrant.d" | |
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1" | |
INFO global: VAGRANT_LOG="DEBUG" | |
INFO global: Plugins: |
If you are trying to reproduce this exactly, I'm using the following environment:
- VirtualBox 4.3.12
- Bills Kitchen 3.0-rc4 (includes Vagrant, Packer, Chef, etc)
First challenge is to get a windows basebox from somewhere. I couldn't find a good one, so built one myself from the windows/boxcutter packer templates:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure(2) do |config| | |
config.vm.box = "boxcutter/eval-win7x86-enterprise-nocm" | |
# tell the VM to explictly use ssh and not replace keys | |
config.vm.communicator = :ssh | |
config.ssh.insert_key = false | |
config.vm.provision "shell", inline: "echo hello from inline" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Oracle Java 7 | Set Local Download Cache | |
debconf: name='oracle-java7-installer' question='oracle-java7-installer/local' value='/tmp/vagrant-cache/jdk' vtype='string' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tkn@dev-box:~/vagrant-workflow-tests/playground/sample-infrastructure-repo$ vagrant up app_v1 | |
Bringing machine 'app_v1' up with 'lxc' provider... | |
==> app_v1: Using top-level cookbook 'https://github.com/tknerr/sample-toplevel-cookbook' | |
==> app_v1: Ensuring top-level cookbook is checked out at 'v0.2.0' | |
==> app_v1: Installing top-level cookbook dependencies to '/home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks' | |
Resolving cookbook dependencies... | |
Fetching 'sample-app' from source at . | |
Using apt (2.4.0) | |
Using iptables (0.13.2) | |
Using apache2 (1.10.4) |