From 393890b8e8615dedc411fff8738eaabd02487778 Mon Sep 17 00:00:00 2001 From: wangyaoguang Date: Thu, 28 Apr 2016 20:15:54 +0800 Subject: install puppet service when creating OS instances JIRA: BOTTLENECKS-73 Change-Id: I2500c6c81aa154cb8b025e3b425c4362fa798a18 Signed-off-by: wangyaoguang --- utils/infra_setup/user_data/p-agent-user-data | 14 ++++++++++++++ utils/infra_setup/user_data/p-master-user-data | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 utils/infra_setup/user_data/p-agent-user-data create mode 100644 utils/infra_setup/user_data/p-master-user-data (limited to 'utils/infra_setup') diff --git a/utils/infra_setup/user_data/p-agent-user-data b/utils/infra_setup/user_data/p-agent-user-data new file mode 100644 index 00000000..2641c900 --- /dev/null +++ b/utils/infra_setup/user_data/p-agent-user-data @@ -0,0 +1,14 @@ +#cloud-config + +runcmd: + - wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb + - sudo dpkg -i puppetlabs-release-trusty.deb + - sudo apt-get update + - sudo apt-get -y install puppet + - sed -i '/^factpath/a basemodulepath=\/etc\/puppet\/modules' /etc/puppet/puppet.conf + - sed -i '/^factpath/a server=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf + - sed -i '/^factpath/a runinterval=1d' /etc/puppet/puppet.conf + - sed -i '/^templatedir/d' /etc/puppet/puppet.conf + - sed -i 's/START=no/START=yes/g' /etc/default/puppet + +final_message: "The system with puppet is finally up, after $UPTIME seconds." diff --git a/utils/infra_setup/user_data/p-master-user-data b/utils/infra_setup/user_data/p-master-user-data new file mode 100644 index 00000000..05d137dd --- /dev/null +++ b/utils/infra_setup/user_data/p-master-user-data @@ -0,0 +1,13 @@ +#cloud-config + +runcmd: + - wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb + - sudo dpkg -i puppetlabs-release-trusty.deb + - sudo apt-get update + - sudo apt-get -y install puppetserver + - sed -i '/^factpath/a basemodulepath=\/etc\/puppet\/modules' /etc/puppet/puppet.conf + - sed -i '/^factpath/a server=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf + - sed -i '/^factpath/a runinterval=1d' /etc/puppet/puppet.conf + - sed -i '/^templatedir/d' /etc/puppet/puppet.conf + +final_message: "The system with puppet is finally up, after $UPTIME seconds." -- cgit 1.2.3-korg