#Try puppetinstall
It is on Puppet v3 and support Debian and CentOS operating systems.
Puppet installation script is a simple automation tool to install puppet master and puppet client with minimal effort. User only need to know the required environment details to setup the puppet environment. All other configurations will be generated by this script.
-
User need to have ‘root’ or ‘sudo’ access to the system.
-
There are two ways to execute the script;
-
Run the script in interactive mode.
Script will ask several questions that user need to answer. According to the answers script will install and configure the puppet master or the puppet client.
-
Pass information as command line arguments to the script.
User can specify all relevant parameters with relevant values and run the script. Those parameters will describe in following steps.
-
-
User should know following details
-
Install puppet master or puppet agent that the user need to install and configure. (--master or --agent)
-
Domain name that will associate with the environment. (--domain your.domain.com)
eg: apps.wso2.com
-
IP address of the instance the puppet master will be installed in. (--master-ip 10.0.0.1)
eg: 10.10.10.10
-
Host name convention of other instances. By default puppet master will have ‘puppetmaster’ as the host name. (--hostname node001)
eg. node001, node002 …
** Note : Do not give any fully qualified domain names (FQDN) as hostname like node0023.apps.wso2.com.
-
Operating system on the instance. (--os ubuntu)
** Note : Currently this supports only for Ubuntu and Debian systems only.
-
-
Get a clone of the setup scripts from github.
git clone https://github.com/thilinapiy/puppet-installation-script
-
Copy the ‘puppet-installation-script’ to the desired instance.
-
Get the IP address of the instance. Make sure it is a static IP.
-
Change the current directory in to ‘puppet-installation-script’.
-
Run the script;
In interactive mode:
sudo python puppet_install.py
And set option as ‘1’.
Or pass values as arguments;
sudo python puppet_install.py --master \ --domain apps.wso2.com \ --master-ip 10.1.1.1 \ --os ubuntu
-
First install the puppet master. If that is almost done get the IP address of it.
-
Fix a instance hostname naming convention like node001, node002, … .
-
Copy the ‘puppet-installation-script’ to the desired instance.
-
Change the current directory in to ‘puppet-installation-script’.
-
Run the script;
In interactive mode:
sudo python puppet_install.py
And set option as ‘2’.
Or pass values as arguments:
sudo python puppet_install.py --agent \ --domain apps.wso2.com \ --master-ip 10.1.1.1 \ --hostname node001 \ --os ubuntu
-
Make ‘manifests’ directory in ‘/mnt/puppet/your.domain.com/’ location.
mkdir /mnt/puppet/apps.wso2.com/manifests
-
Create a ‘site.pp’ file in that location.
touch /mnt/puppet/apps.wso2.com/manifests/site.pp
-
Add following script on that site.pp with respective hostname that you gave to the relevant node that you are going to test.
node 'node001.apps.wso2.com' { file { '/mytestfile.t': owner => 'root', group => 'root', content => "This will be on the file.\n", ensure => present, } }
-
On the puppet agent node (node001) run
puppetd -vt
-
Check the file in ‘/mytestfile.t’.
cat /mytestfile.t