Last active
December 13, 2016 19:46
-
-
Save etoews/6557924 to your computer and use it in GitHub Desktop.
DevStack Workshop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh root@<ip-address> | |
apt-get install -y git | |
git clone https://github.com/openstack-dev/devstack.git -b stable/grizzly devstack/ | |
cd devstack/ | |
curl -sO https://gist.github.com/everett-toews/6235684/raw/531ef32f7f55fdb5af56f01c4155e52416a18c51/localrc | |
nano localrc | |
./stack.sh | |
# Wait...time for Q&A | |
# Go to the dashboard http://<ip-address> | |
# Username: demo | |
# Password: devstack | |
source /opt/stack/python-novaclient/tools/nova.bash_completion | |
source openrc demo demo | |
nova list | |
nova secgroup-create test test | |
nova secgroup-add-rule test TCP 22 22 0.0.0.0/0 | |
nova keypair-add test > test.pem | |
chmod 400 test.pem | |
nova image-list | |
nova flavor-list | |
nova boot --flavor 1 --image <image-id> --key-name test --security-groups test test-vm | |
nova list | |
ssh -i test.pem [email protected] | |
ls -al | |
exit | |
# Go to the Rackspace Python SDK (pyrax) at http://developer.rackspace.com/#python | |
sudo pip install pyrax | |
sudo pip install bpython | |
# To get the tenant id, paste it over <tenant-id> below | |
source openrc admin admin | |
keystone tenant-get demo | |
sudo nano ~/.pyrax.cfg | |
[private] | |
identity_type = keystone | |
region = RegionOne | |
auth_endpoint = http://localhost:5000/v2.0/ | |
tenant_id = <tenant-id> | |
debug = True | |
bpython | |
import pyrax | |
pyrax.set_credentials("demo", "devstack") | |
pyrax.cloudservers.list() | |
pyrax.cloudservers.list_images() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There was a question about what image id to use, you might edit the nova image-list command to avoid confusion:
nova image-list|egrep -v "ramdisk|kernel"
You could even use awk to strip the output to just the ID itself, using something like
nova image-list|egrep -v "ramdisk|kernel"|awk -F" '{print $2}'