Skip to content

GeoffWilliams/r10k-control

Repository files navigation

R10K Control Repository

Build Status

A basic R10K control repository including:

  • Production branch (master is deleted)
  • Local roles and profiles site directory
  • Access to ready profiles r_profile

Requirements

  • Puppet Enterprise LTR or later point release

How to use

Testing

This project comes equiped with RSpec and beaker tests. They can be run separately or together via a rake task.

RSpec tests

bundle install
bundle exec rake spec

Beaker tests

bundle install
bundle exec rspec spec/acceptance

* The beaker tests are configured to use docker, ensure you have it installed and working before attempting to run the tests
* The required docker image (official centos) and the puppet installer will be downloaded from the internet so connectivity is required.  This hasn't been tested with proxies in place

### Debugging beaker tests
To prevent the test docker instance from being destroyed after a test run, export the BEAKER_destroy variable before running tests, eg:
```shell
export BEAKER_destroy=no

You will then be able to docker ps to find the VM after your tests are completed:

geoff ~/vagrant_labs/pe2015/r10k-control $ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED              STATUS              PORTS                   NAMES
2a2457b39276        f3cf28f75596        "/sbin/init"        About a minute ago   Up About a minute   0.0.0.0:32829->22/tcp   insane_lalande

Here we can see that port 22 (SSH) has been bound to local port 32829. Note that if you use a mac, 0.0.0.0 refers to the VM running docker-machine. You can find the IP address you need with the command:

geoff ~/vagrant_labs/pe2015/r10k-control $ docker-machine ip default
192.168.99.100

And may then combine the above data into an ssh command:

ssh -p 32829 root@192.168.99.100

The password for root is root.

About

R10K control repository :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published