-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to test cookbooks with vagrant + virtualbox or lxc? #1916
Comments
@ArturT Is there any particular reason you want to use Vagrant? A docker container is pretty much a replacement for Vagrant. At this point, you can only use Docker containers to test out VM like deployments. In a few weeks we are announcing a few new plans where you could potentially do this. I am happy to help if you need some guidance on using Docker to test cookbooks. |
@avdrav Oh, so using docker might be a good idea. I need to test cookbooks on fresh ubuntu 14.04. My repo contains only cookbooks. I'll try to play and figure out how to do it. |
Our docker containers or minions are ubuntu 14.04. There is an image tag that you can add to your YML which should instruct what image you want your cook books tested against. It should be super straight forward and happy to help |
I end up with yml file like this ---
language: ruby
rvm:
- 2.1.1
build_image: shippableimages/ubuntu1204_ruby
before_install:
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
- source ~/.rvm/scripts/rvm
- rvm install $SHIPPABLE_RUBY --verify-downloads 1
- source ~/.bashrc && ~/.rvm/scripts/rvm && rvm use $SHIPPABLE_RUBY
install:
- bundle install --gemfile="Gemfile"
before_script:
- bundle exec berks install
- bundle exec berks vendor cookbooks
- apt-get update
- mkdir -p /var/run/sshd
script:
- bundle exec chef-solo -c solo.rb -j nodes/example.com.json But know I have problem with firewall cookbook which requires root access.
I found out moby/moby#4424 that docker needs to be started with |
I would like to test my cookbooks on shippable so I installed on minion the vagrant:
When I tried lxc then this bug occurs:
I also tried virtualbox but without success. Is there any recommended way of testing cookbooks with vagrant on shippable minion?
The text was updated successfully, but these errors were encountered: