COA exam simulation

Select the sections you want to make visible:

Identity

Go to identity > project, get project id from old admin-openrc.sh, replace tentant id with project admin id to build admin credential file and demo credential file and finally source it: source demorc.sh

openstack domain create domain1 --description "domain 1"

openstack domain list

openstack project create domain1_project1 --domain domain1

openstack project list

openstack user create domain1_admin --email "admin@domain1.com" --domain domain1 --password-prompt

openstack user list --domain domain1

openstack role add --user domain1_admin --domain domain1 admin

openstack user create domain1_user1 --email "user1@domain1.com" --domain domain1 --password-prompt

openstack user list --domain domain1

Compute

nova keypair-add key1 key1.pem
chmod 600 key1.pem
nova keypair-list

. admin_rc.sh
nova flavor-lis
nova flavor-create m1.extra_tiny auto 64 0 1 --rxtx-factor 1.0

openstack project list
nova flavor-access-add m1.extra_tiny


Additional commands:
nova flavor-list
nova flavor-delete {flavorid}

nova secgroup-list
nova secgroup-list-rules default
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-add-rule default tcp 80 80 0.0.0.0/0
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0

nova boot instance2 --image cirros-0.3.4-x86_64-uec --flavor m1.tiny --key-name key1 --security-group default

Get the instance IP address from nova list command:
ssh -i key1.pem ubuntu@{ip}

nova image-create {instance2} {instance2-snapshot}
nova delete {instance2}

Glance

glance image-create --progress --name ubuntu-trusty --file trusty-server-cloudimg-amd64-disk1.img --disk-format qcow2 --container-format bare
nova boot u2 --image ubuntu-trusty --flavor m1.small --key-name key1 --security-group default

Cinder

Instance snapshots

Make sure, you have a key and the appropriate ICMP and SSH rules in place:

nova keypair-add key1 > key1.pem
chmod 600 key1.pem
nova keypair-list

nova secgroup-list
nova secgroup-list-rules new_secgroup
nova secgroup-add-rule new_secgroup tcp 22 22 0.0.0.0/0
nova secgroup-add-rule new_secgroup icmp -1 -1 0.0.0.0/0
nova boot --image cirros-0.3.4-x86_64-uec --flavor m1.tiny --key_name key1 instance1

ssh -i key1.pem cirros@{ip}
touch testfile.txt

nova image-create {snapshot-id} {snapshot-of-instance1}
nova delete {instance1-id}
nova boot --flavor m1.tiny --key key1 --security-groups new-secgroup --snapshot {snapshot} {instance2-from-instance1}

Volume backup

cinder create --display-name {demo-volume1} {1}
cinder list

nova boot --image cirros-0.3.4-x86_64-uec --flavor m1.tiny --key_name key1 instance3
nova list --security-groups default

nova volume-attach {253619cf-127c-46a1-a2aa-a273cedf6a85} {d-847c-fde00ea96649} /dev/vdb
nova volume-detach {253619cf-127c-46a1-a2aa-a273cedf6a85} {2429b44b- cc42-4ebd-847c-fde00ea96649}

cinder backup-show
cinder backup-list
cinder backup-create {vol-id}

cinder delete {vol-id}
cinder backup-restore {vol-id}
cinder backup-delete {backup-vol-id}
nova volume-detach {253619cf-127c-46a1-a2aa-a273cedf6a85 2429b44b} {cc42-4ebd-847c-fde00ea96649} /dev/vdb

Volume encryption


cinder create --display-name 'encrypted volume' --volume-type LUKS 1
cinder list

chmod 600 key1.pem
nova keypair-add key1 > key1.pem
nova keypair-list

Security rule
nova secgroup-create new_secgroup "comments"
nova secgroup-add-rule new_secgroup tcp 22 22 0.0.0.0/0
nova secgroup-add-rule new_secgroup icmp -1 -1 0.0.0.0/0

nova boot --image cirros-0.3.4-x86_64-uec --flavor m1.tiny --key_name key1 --security-group new_secgroup instance4

nova list
ssh -i {ssh-key.pem} cirros@X.X.X.X
nova volume-attach {253619cf-127c-46a1-a2aa-a273cedf6a85} {2429b44b-cc42-4ebd-847c-fde00ea96649} /dev/vdb

touch /mnt/vdb/testfile.txt
sync && sleep 2

On the block storage node directory {/dev/stack-volumes/volume-}
strings {/dev/stack-volumes/volume-*} | grep {"testfile.txt"}
Because the volume is encrypted, you shouldn't be able to see the file.