A Chef cookbook for the Shipyard container manager for Docker
The binaries distributed for Shipyard are compiled for Ubuntu, so a 'standard' install is not possible on RHEL family systems.
This cookbook contains a set of resources that can be consumed directly by your own recipes, and also contains some basic recipes of its own, if that suits your needs better.
shipyard_agent
Installs and configures an instance of Shipyard's agent application to connect to the primary Shipyard host. A number of options are available:
install_type
- The agent can be installed as a Docker:container
or as a more:standard
(the default) binary applicationversion
- The version of the agent to install or the string'latest'
(the default)host
- The Shipyard host the agent will connect to (default:'http://localhost:8000'
)key
- The client key the agent will use when connecting to the host (defaults tonil
and attempting to register with the host, generating a request that needs to be approved in the Shipyard UIaction
- Any of:install
,:uninstall
,:enable
,:disable
,:start
,:stop
,:restart
(defaults to[:install, :enable, :start]
)
For example, to install the latest version as a container in Docker:
shipyard_agent 'agent' do
install_type :container
# version 'latest' # The default behavior
host 'http://1.2.3.4:8000'
key '1234567890qwertyuiop'
action [:install, :enable, :start] # The default behavior
end
agent
Implements the shipyard_agent
resource to do an optional install driven by a
set of node attributes under the node['shipyard']['agent']
namespace
This cookbook implements several suites of syntax, style, unit, integration and acceptance tests, utilizing a number of tools:
- Rubocop for Ruby lint tests
- FoodCritic for Chef lint tests
- ChefSpec for the cookbook unit tests
- Serverspec for post-converge integration tests
- Cucumber for high-level acceptance tests
- Test Kitchen to tie all the tests together
To run the entire suite of tests, simple:
rake
- TODO: The shipyard-agent binary distributed via GitHub doesn't run under CentOS. Support can be added if it's switched to use an Omnibus project.
- TODO: Is there any way to allow someone to "upgrade" from a container to a GitHub deploy or vice versa?
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Run style checks and RSpec tests (
bundle exec rake
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Author:: Jonathan Hartman (j@p4nt5.com)
Copyright 2014, Jonathan Hartman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.