Skip to content

Instantly share code, notes, and snippets.

@chmouel
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chmouel/78f0edf8d4bdd63538a2 to your computer and use it in GitHub Desktop.
Save chmouel/78f0edf8d4bdd63538a2 to your computer and use it in GitHub Desktop.
Nova+Docker playbook

Setup VM

I am using my own scripts from http://github.com/chmouel/rise-mystack but you can obv just pre-setup your vm the way you want. I am using Fedora20 (but 21 should work as well)*

./rise.sh ssh vm

Preconfigure nova-docker

mkdir -p /opt/stack cd /opt/stack git gh-clone stackforge/nova-docker

cd nova-docker sudo yum -y install python-pip sudo python setup.py install

./contrib/devstack/prepare_devstack.sh

Launch Devstack

cd /opt/stack/devstack

tmux ./stack.sh

ANSWER QUESTIONS BY JUST PRESSING ENTER MULTIPLE TIME and…… WAIIIITTTT

Demos!

Test if docker is properly configured grep docker /etc/nova/nova.conf grep docker /etc/glance/glance-api.conf

Image properly imported glance image-list docker images

Add your keypair nova keypair-add –pub-key ~/.ssh/authorized_keys keyp nova boot –image cirros –flavor 1 –security-groups default –key-name keyp dockerstack nova list Wait until this is running docker ps ssh cirros@10.0.0.2

[APPLAUSE]

Import new image!

cd ~/devstack docker pull tutum/centos:latest docker save tutum/centos:latest|glance image-create –container-format=docker –disk-format=raw –name tutum/centos glance image-list

nova boot –image centos –flavor 1 –security-groups default –key-name keyp centos-docker

nova list docker ps

nova console-log centos-docker cat /etc/redhat-release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment