summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup/user_data/p-master-user-data
diff options
context:
space:
mode:
authorwangyaoguang <sunshine.wang@huawei.com>2016-04-28 20:15:54 +0800
committerwangyaoguang <sunshine.wang@huawei.com>2016-04-28 20:17:13 +0800
commit393890b8e8615dedc411fff8738eaabd02487778 (patch)
tree22e115440e9c9b55271d1fa7ddc129ece305b002 /utils/infra_setup/user_data/p-master-user-data
parent79a74e1bc27d14df151c7f7bfaea8f4a4450ba23 (diff)
install puppet service when creating OS instances
JIRA: BOTTLENECKS-73 Change-Id: I2500c6c81aa154cb8b025e3b425c4362fa798a18 Signed-off-by: wangyaoguang <sunshine.wang@huawei.com>
Diffstat (limited to 'utils/infra_setup/user_data/p-master-user-data')
-rw-r--r--utils/infra_setup/user_data/p-master-user-data13
1 files changed, 13 insertions, 0 deletions
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."