Skip to content

Instantly share code, notes, and snippets.

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 iahmad-khan/7400fddecf95e1eec8d78d1a787f20b2 to your computer and use it in GitHub Desktop.
Save iahmad-khan/7400fddecf95e1eec8d78d1a787f20b2 to your computer and use it in GitHub Desktop.
OSCON OpenStack Workshop Commands
cat ~/credentials/user
source ~/credentials/user
keystone discover
keystone catalog
keystone endpoint-get --service volume
keystone token-get --wrap 50
nova list
nova flavor-list
nova boot --image cirros-qcow2 --flavor 1 MyFirstInstance
nova show MyFirstInstance
nova console-log MyFirstInstance
neutron net-create private
neutron subnet-create --name private-subnet private 10.0.0.0/29
neutron net-list
neutron subnet-list
neutron net-show private
neutron subnet-show private-subnet
nova boot --flavor <flavor> --image <image> --nic net-id=<private-net-uuid> <name>
NIC=c314b394-462d-4b62-b733-8e627c32943c
nova boot --image cirros-qcow2 --flavor 1 --nic net-id=$NIC MySecondInstance
sudo ip netns exec qdhcp-$NIC ip a
sudo ip netns exec qdhcp-$NIC ping 10.0.0.2
nova secgroup-list-rules default
nova secgroup-add-rule <secgroup> <ip-proto> <from-port> <to-port> <cidr>
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-create my_group "allow ping and ssh"
nova secgroup-add-rule my_group icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule my_group tcp 22 22 0.0.0.0/0
nova add-secgroup MySecondInstance my_group
glance image-list
glance image-create --name "my_cirros_qcow2" --disk-format qcow2 --container-format bare --is-public False --file ~/images/cirros-0.3.2-x86_64-disk.img
glance image-show my_cirros_qcow2
cinder list
cinder type-list
cinder create 1 --display-name MyFirstVolume --volume-type SATA
nova boot --image cirros-qcow2 --flavor m1.tiny --nic net-id=$NIC MyVolumeInstance
VOLUME_ID=fc3f0bca-c59d-426d-84f5-1f614e3e9907
nova volume-attach MyVolumeInstance $VOLUME_ID auto
nova console-log MyVolumeInstance
sudo ip netns exec qdhcp-$NIC ssh cirros@10.0.0.4
if there is time, on instance:
sudo fdisk -l
sudo mkfs.ext3 /dev/vdb
sudo mkdir /extraspace
sudo mount /dev/vdb /extraspace
sudo touch /extraspace/helloworld.txt
sudo ls /extraspace
sudo umount /extraspace
nova volume-detach MyVolumeInstance $VOLUME_ID
source credentials/admin
swift stat
swift list
swift post mycontainer
echo "Hello OSCON!" > test.txt
swift upload mycontainer test.txt
swift download mycontainer test.txt -o -
swift stat mycontainer
swift list mycontainer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment