Difference between revisions of "Userdata-examples"
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
If your openstack cloud supports metadata, here are some sample userdata snippets you can use with UEC images (or any image that has cloud-init) | If your openstack cloud supports metadata, here are some sample userdata snippets you can use with UEC images (or any image that has cloud-init) | ||
+ | |||
+ | '''install devstack''' - put some stack in your stack ''uec-natty'' | ||
+ | |||
+ | <pre><nowiki> | ||
+ | #!/bin/sh | ||
+ | apt-get update | ||
+ | apt-get install git -y | ||
+ | git clone https://github.com/cloudbuilders/devstack.git | ||
+ | cd devstack | ||
+ | echo ADMIN_PASSWORD=golfing >> localrc | ||
+ | echo FLAT_INTERFACE=br100 >> localrc | ||
+ | echo KEYSTONE_REPO=https://github.com/openstack/keystone.git >> localrc | ||
+ | echo KEYSTONE_BRANCH=2011.3 >> localrc | ||
+ | ./stack.sh | ||
+ | </nowiki></pre> | ||
+ | |||
+ | |||
+ | '''install cloudfoundry''' - work in progress ''uec-natty'' | ||
+ | |||
+ | <pre><nowiki> | ||
+ | #!/bin/sh | ||
+ | cd /mnt | ||
+ | curl -k -O https://raw.github.com/anotherjesse/vcap/auto/setup/install | ||
+ | chmod +x install | ||
+ | ./install | ||
+ | ln -s /usr/local/rvm/bin/ruby /usr/local/bin/ | ||
+ | cd /cloudfoundry | ||
+ | bin/vcap start | ||
+ | </nowiki></pre> |
Revision as of 15:27, 11 October 2011
If your openstack cloud supports metadata, here are some sample userdata snippets you can use with UEC images (or any image that has cloud-init)
install devstack - put some stack in your stack uec-natty
#!/bin/sh apt-get update apt-get install git -y git clone https://github.com/cloudbuilders/devstack.git cd devstack echo ADMIN_PASSWORD=golfing >> localrc echo FLAT_INTERFACE=br100 >> localrc echo KEYSTONE_REPO=https://github.com/openstack/keystone.git >> localrc echo KEYSTONE_BRANCH=2011.3 >> localrc ./stack.sh
install cloudfoundry - work in progress uec-natty
#!/bin/sh cd /mnt curl -k -O https://raw.github.com/anotherjesse/vcap/auto/setup/install chmod +x install ./install ln -s /usr/local/rvm/bin/ruby /usr/local/bin/ cd /cloudfoundry bin/vcap start