An attempt to bootstrap my Linux machines with the settings I like
The idea is that by using a oneliner you can fetch a bash script that adds the official Puppet Labs repository for a distribution. I intend to use the Puppet Collections (version 1 currently) so I can choose when to migrate to a newer release at my convenience.
After updating packages and adding the Puppet Labs repository, the Puppet agent is installed. Using git, a puppet repository is cloned and applied. This puppet repository can contain the puppet configuration in any way you like. Additional puppet modules from the Forge can be installed before applying the site manifest. These are installed in the Puppet Collections installdir (using $modulepath
). In this way they are available at all times, and not stored with your own code. You may also choose to apply a site manifest from a different environment. I've dealt with Puppet masters and am leaning towards masterless Puppet with this script.
The bash script currently uses a team and a user to clone a private git repository at Bitbucket. It also focuses on recent distributions of Red Hat Enterprise Linux, CentOS, Fedora, Debian and Ubuntu. The default environment for puppet apply
is production.
If it doesn't fit your needs, contribute or fork but please share.
Simply execute a oneliner with some parameters. For example as a user with sudo permissions:
curl https://raw.githubusercontent.com/D43m0n/bootstrap/master/deploy-puppet.sh | sudo bash /dev/stdin -u <username> -p <password> -h <hostname> -t <team name> -r <repository name> -e <environment>
All the default output is printed on stdout
.