Jul 202014
 

Hello OSCON! Here are the 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 –image –nic net-id=
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

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

 Posted by at 9:56 pm

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>