Skip to content

Instantly share code, notes, and snippets.

@gtato
Last active August 29, 2015 14:09
Show Gist options
  • Save gtato/c0e012673b0fdebdd844 to your computer and use it in GitHub Desktop.
Save gtato/c0e012673b0fdebdd844 to your computer and use it in GitHub Desktop.
Some openstack commands
# save docker image in glance
docker save conpaas-director-squeeze | glance image-create --is-public=True --container-format=docker --disk-format=raw --name conpaas-director-squeeze
# start a vm on a particular network
nova boot --flavor m1.small --image conpaas-director-squeeze --security-groups demo-secgroup --key-name demo-keypair --nic net-id=e0afdf0f-a081-48ab-935b-67694d15e7fb --user_data=conpaas_director.rc director-squeeze
# associate floating IPs to a VM
nova floating-ip-associate fc353186-8d2c-46e4-afe7-2e1b125d29f5 10.13.0.102
# download user data
wget http://169.254.169.254/2008-02-01/user-data
# create image out of instance
nova image-create myServer myImage
# create image
glance image-create --name=conpaas --is-public=true --container-format=bare --disk-format=raw < conpaas.img
# add keypair
nova keypair-add test > /nutshell/test.pem
# container ineternet
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment