Created
May 20, 2014 17:34
-
-
Save kornypoet/af02245666d4bf193f16 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Adjust hosts file for DNS | |
| private_ip=$1 | |
| public_hostname=$2 | |
| public_domain=$3 | |
| host_string="${private_ip} ${public_hostname}.${public_domain} ${public_hostname}\n" | |
| sed -i "1s/^/${host_string}/" /etc/hosts | |
| # Set the machine host and domain | |
| hostname $public_hostname | |
| domainname $public_domain | |
| hostname -f | |
| src_dir=/usr/local/src | |
| # Download and unpack installer tarball | |
| cd $src_dir | |
| wget https://s3.amazonaws.com/artifacts.chimpy.us/tarballs/puppet-enterprise-3.2.3-el-6-x86_64.tar.gz | |
| tar -xvzf puppet-enterprise-3.2.3-el-6-x86_64.tar.gz | |
| # Create automated install file | |
| cat <<EOF > install_answers.txt | |
| # Installation answers | |
| q_install=y | |
| # Install additional packages as necessary | |
| q_vendor_packages_install=y | |
| # Puppet master role | |
| q_puppetmaster_install=y | |
| q_all_in_one_install=y | |
| q_puppetmaster_certname=puppet-master-0.infochimps.com | |
| q_puppetmaster_dnsaltnames=puppet-master-0.infochimps.com,puppet-master-0,puppet | |
| q_pe_check_for_updates=n | |
| # Puppet database role | |
| q_puppetdb_install=y | |
| q_database_install=y | |
| # Puppet console role | |
| q_puppet_enterpriseconsole_install=y | |
| [email protected] | |
| q_puppet_enterpriseconsole_auth_password=admin | |
| q_puppet_enterpriseconsole_smtp_host=smtp.gmail.com | |
| # Puppet agent role | |
| q_puppetagent_install=n | |
| # Puppet cloud role | |
| q_puppet_cloud_install=n | |
| EOF | |
| # Install puppet master | |
| puppet-enterprise-3.2.3-el-6-x86_64/puppet-enterprise-installer -a install_answers.txt | |
| # Run first puppet converge | |
| /usr/local/bin/puppet agent --test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment