public
Last active

puppet-git-receiver cloud-config install script

  • Download Gist
brightbox cloud example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
$ brightbox-servers create --user-data="#include https://raw.github.com/gist/3129203/puppet-git-receiver-install" img-9h5cv
 
Creating a nano (typ-4nssg) server with image Ubuntu Precise 12.04 LTS server (img-9h5cv) with 0.10k of user data
 
id status type zone created_on image_id cloud_ip_ids name
-----------------------------------------------------------------------------
srv-3te8u creating nano gb1-a 2012-07-17 img-9h5cv
-----------------------------------------------------------------------------
 
$ git init
Initialized empty Git repository in /home/john/tmp/puppet-git-receiver-test/
 
$ mkdir manifests
cat <<EOF > manifests/site.pp
package { ["pwgen","zip","cowsay"]:
ensure => installed
}
EOF
 
$ git add manifests/site.pp
$ git commit -m "install some packages"
$ git remote add srv-3te8u puppet-git@ipv6.srv-3te8u.gb1.brightbox.com:puppet.git
$ git push -u srv-3te8u master
 
The authenticity of host 'ipv6.srv-3te8u.gb1.brightbox.com (2a02:1348:14c:16b8:24:19ff:fef0:5ae2)' can't be established.
ECDSA key fingerprint is a3:13:ee:ef:05:d9:44:be:8e:0a:5c:4d:55:c3:42:3a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ipv6.srv-3te8u.gb1.brightbox.com,2a02:1348:14c:16b8:24:19ff:fef0:5ae2' (ECDSA) to the list of known hosts.
Counting objects: 12, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (12/12), 921 bytes, done.
Total 12 (delta 0), reused 0 (delta 0)
remote: *** Validating puppet manifests for refs/heads/master
remote: *** Applying puppet manifests
remote: notice: /Stage[main]//Package[pwgen]/ensure: ensure changed 'purged' to 'present'
remote: notice: /Stage[main]//Package[zip]/ensure: ensure changed 'purged' to 'present'
remote: notice: /Stage[main]//Package[cowsay]/ensure: ensure changed 'purged' to 'present'
remote: notice: Finished catalog run in 6.50 seconds
remote: *** Puppet manifests applied successfully
To puppet-git@ipv6.srv-3te8u.gb1.brightbox.com:puppet.git
* [new branch] master -> master
Branch master set up to track remote branch master from srv-3te8u.
puppet-git-receiver-install
1 2 3 4 5 6 7 8
#cloud-config
apt_sources:
- source: "ppa:brightbox/puppet"
packages:
- puppet-git-receiver
runcmd:
- cp -ar /home/ubuntu/.ssh /var/lib/puppet-git-receiver/
- chown -R puppet-git.puppet-git /var/lib/puppet-git-receiver/.ssh

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.