This cookbook download rancid-git fork by "dotwaffle" which support git as the backend for configuration management.
Since this cookbook compiles rancid-git from source the build-essential and git is required to be installed. I've only test this on Ubuntu 12.04
You will still need to install a MTA to send emails from the rancid machine.
To securely store and manage the remote devices. You will need chef-vault to manage the credential that's going to be deploy on the machine.
These default attributes are set. You can change them to suit your needs.
default[:postfix][:enabled] = true default[:rancid][:user] = 'rancid' default[:rancid][:group] = 'rancid' default[:rancid][:uid] = 2021 default[:rancid][:gid] = 2021
default[:rancid][:run_interval] = 1 # hourly default[:rancid][:cleanup_interval] = 23 # daily at 23rd hour
default[:rancid][:prefix_dir] = '/home/rancid' default[:rancid][:install_dir] = '/home/rancid' default[:rancid][:local_state_dir] = "#{node[:rancid][:prefix_dir]}/var/rancid"
default[:rancid][:url] = 'https://github.com/dotwaffle/rancid-git.git' default[:rancid][:version] = 'af62ee744c0bb268fddb9715b57b6c60ec1463b0'
{
"id": "sjc1",
"routers": [
{
"name": "router1.company.com",
"model": "juniper",
"status": "up"
},
{
"name": "router2.company.com",
"model": "juniper",
"status": "up"
}
]
}
Just include rancid-git
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[rancid-git]"
]
}
Note that by default, it will only install RANCID. You still need to configure rancid.conf, .cloginrc and /etc/aliases to make rancid fully functional.
Will generate a new SSH key to be used to deploy to the routers/switches. It also has the code to retreive secrets from data bag items encrypted with chef-vault.
e.g.
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write you change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Authors: Bao Nguyen