Setting up servers by hand is a pain, even servers that are managed via puppet often require some form of configuration and setup in order to allow puppet to be run.
The idea behind this script is to take the pain away from setting up a newly provisioned server.
The script is built using the assumption that you store your puppet configuration in a github repo and that you are using masterless puppet.
This is a simple bootstrapping script that will perform the following actions:
- Set server hostname (ensure that the fqdn is correct in facter)
- Run apt-get update and apt-get upgrade to ensure base system is up to date
- Install the required packages (puppet, git and ruby)
- Fix broken packages (fixes issue with ping)
- Install the required ruby gems (puppet librarian)
- Disable puppet daemon (masterless puppet)
- Generate default ssh key for root (good practice)
- Generate deployment key (used for cloning the puppet repo)
- Update ssh config (create an alias for the repo)
- Setup known hosts (ssh-keyscan github.com so git clone doesn't ask to accept fingerprint)
- Add deployment key (Register the deployment key for the repo)
- Clone the puppet repo
- Run librarian puppet
- Run puppet
This script has been developed and tested on Debian 8 (Jessie) only.
- Improve the screen error handling and error reporting
- Allow the script to install Ruby ~> 2.0.0 - This will allow it to work on Debian 7 (Wheezy)
- Extend the script to work on Centos
- Extend the script to allow for fully unmanned install (Default username / password etc)