0% found this document useful (0 votes)
46 views10 pages

COA Exam Simulation: Time Left: 0

The document provides instructions for completing tasks in the Identity, Compute, Glance, Cinder, and Volume snapshots sections of an OpenStack exam. The tasks include creating domains, projects, users and roles in Identity; launching instances, creating flavors and snapshots in Compute; uploading and using images in Glance; creating volumes and instance snapshots from volumes in Cinder; and taking volume snapshots in Volume Snapshots. The document contains over 50 individual tasks to be completed.

Uploaded by

Subramanya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views10 pages

COA Exam Simulation: Time Left: 0

The document provides instructions for completing tasks in the Identity, Compute, Glance, Cinder, and Volume snapshots sections of an OpenStack exam. The tasks include creating domains, projects, users and roles in Identity; launching instances, creating flavors and snapshots in Compute; uploading and using images in Glance; creating volumes and instance snapshots from volumes in Cinder; and taking volume snapshots in Volume Snapshots. The document contains over 50 individual tasks to be completed.

Uploaded by

Subramanya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

6/21/22, 4:49 AM hpnouri.free.

fr/coa/

Progress
COA exam simulation
Select the sections you want to make visible:
Completed tasks 0 / 53
Keystone
Time left: 0
Compute 
2

Glance

30

Cinder
Play
Pause
Reset
Swift
Heat

Identity

1.

Having an old rc file and without downloading rc file from project > Access and security
> API access >, make sure to build rc file for both tenants admin & demo

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

2.

Create a domain named "domain1"

openstack domain create domain1 --description "domain 1"

openstack domain list

3.

Create a project named "domain1_project1" within the domain "domain1"

openstack project create domain1_project1 --domain domain1

openstack project list

4.

Create a user "domain1_admin" in the domain "domain1"

hpnouri.free.fr/coa/ 1/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

openstack user create domain1_admin --email "[email protected]" --domain


domain1 --
Progress
password-prompt

openstack user list --domain domain1

Completed tasks 0 / 53
Time left: 0
5.

2
Assign domain scope "admin" role to user "domain1_admin" 

30

Play
Pause
Reset
6.

Create a regular user within the domain "domain1"

Compute

1.

From demo account, generate a public keypair named mypubkey1 for use with
openstack instances

nova keypair-add key1 key1.pem

chmod 600 key1.pem

nova keypair-list

2.

From admin account, create a new flavor named m1.extra_tiny with:


RAM: 64mb
Root disk size: 0
cpu: 1

. admin_rc.sh

nova flavor-lis

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

3.

Allow the tenant (project) "demo" to access the flavor

4.

hpnouri.free.fr/coa/ 2/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

Add new rules to the default security group "default" to allow access instances from
internet through SSH, http and ICMP. Progress

5.

Completed tasks 0 / 53
Provision the following instance:
Time left: 0
image: cirros-0.3.4-x86_64-uec

flavor:
2 m1.tiny 
keypair: key1 
security
30 group: default 
Play
Pause
Reset

6.

Log to the machine console using the keypair key1

7.

Create a snapshot named "instance2-snapshot" from the running image instance2

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

nova delete {instance2}

Glance

1.

Retrieve Ubuntu cloud image file from the following link:


https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-
disk1.img (https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-
amd64-disk1.img)

2.

Create an image named "ubuntu-trusty" from the downoaded image file

3.

Start an instance named "u1" from the following parameters:


image: "ubuntu-trusty"
flavor: m1.small
key: key1
security group: default

hpnouri.free.fr/coa/ 3/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

Progress

Cinder

Instance snapshots Completed tasks 0 / 53


Time left: 0

2

1.
30 

Create an instance "instance1" from cirros-0.3.4-x86_64-uec image
Play
Pause
Reset
image: cirros-0.3.4-x86_64-uec
flavor: m1.tiny
keypair: key1
security group: new-secgroup

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

2.

nside the home directory of "instance2" create a file testfile.txt

ssh -i key1.pem cirros@{ip}

touch testfile.txt

3.

Take a snapshot of instance "instance2", name it "snapshot-of-instance2"

nova image-create {snapshot-id} {snapshot-of-instance1}

4.

Terminate the instance "instance2"

nova delete {instance1-id}

hpnouri.free.fr/coa/ 4/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

5.
Progress
Create an instance from "snapshot-of-instance2" and name it "instance-from-
snapshot"

nova boot --flavor m1.tiny --key Completed tasks 0 / 53new-secgroup --snapshot


{snapshot}
key1 --security-groups
Time left: 0
{instance2-from-instance1}

2


30
6.

Play
Pause
Reset
Inside the home directory of "instance-from-snapshot" verify the presence of the
file "testfile.txt"

Volume snapshots

1.

Create a new empty volume "vol1" of a 1GB size

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

2.

Create an instance "instance1" from cirros-0.3.4-x86_64-uec image


image: cirros-0.3.4-x86_64-uec
flavor: m1.tiny
keypair: key1
security group: new-secgroup

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 --security-groups
new-secgroup instance1

3.

hpnouri.free.fr/coa/ 5/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

Attach the created image "vol1" to the instance "instance1" and mount it to
/mnt/vdb Progress

nova volume-attach <instance-id> <vol-id> /dev/vdb`

ssh -i key1.pem [email protected]

sudo fdisk /dev/vdb


Completed tasks 0 / 53
Time left: 0
sudo mount /dev/vdb /mnt

2


30

4.
Play
Pause
Reset
inside the attached volume (/mnt/vdb) create a file testfile.txt

touch /mnt/vdb/testfile.txt

sync && sleep 2

5.

On the blockstorage node /dev/stack-volumes/volume-*

strings /dev/stack-volumes/volume-* | grep "testfile.txt"

6.

Detach the volume "vol1" from the instance "instance1"

7.

Take a snapshot of "vol1", name it "snapshot-of-vol1"

cinder snapshot-create --name {snapshot-name} {vol-id}

cinder list

cinder snapshot-list

8.

Create a volume from the snapshot

cinder create --snapshot-id {snapshot-id} --name {new-vol}

cinder list

9.

hpnouri.free.fr/coa/ 6/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

Reattach the first volume "vol1" to the instance "instance1"


Progress

nova volume-attach {instance-id} {vol-id}

Completed tasks 0 / 53
10.

Time left: 0

Delete 
2 the previously created file "testfile.txt"


30

11.
Play
Pause
Reset
detach the colume "vol1" from the instance "instance1"

nova volume-detach {instance-id} {vol-id} /dev/vdb

12.

Attach the created volume "new-vol" to the instance "instance1"

nova volume-attach {instance-id} {vol-id}

13.

Inside the attached volume verify the presence of the file "testfile.txt"

Volume backup

1.

Create a new empty volume "vol2" of a 1GB size

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

cinder list

2.

Create an instance "instance3"


image: cirros-0.3.4-x86_64-uec
flavor: m1.tiny
keypair: key1
security group: default
 

hpnouri.free.fr/coa/ 7/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

nova boot --image cirros-0.3.4-x86_64-uec --flavor m1.tiny --key_name


key1 instance3

Progress
nova list --security-groups default

Completed tasks 0 / 53
3.
left: 0
Time
Attach the volume "vol2" it to the instance "instance3" 
2


nova30volume-attach {253619cf-127c-46a1-a2aa-a273cedf6a85} {d-847c-fde00ea96649}

/dev/vdb
Play
Pause
Reset

4.

Inside the home directory of the mounted partition inside "instance3" create a file
testfile.txt

5.

Detach the volume from the running instance

nova volume-detach {253619cf-127c-46a1-a2aa-a273cedf6a85} {2429b44b- cc42-4ebd-847c-


fde00ea96649}

6.

Backup the volume "vol2" into a volume "vol2-backup"

cinder backup-show

cinder backup-list

cinder backup-create {vol-id}

7.

Remove the original volume "vol2"

cinder delete {vol-id}

8.

Restore the backed up volume "vol2-backup"

cinder backup-restore {vol-id}

hpnouri.free.fr/coa/ 8/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

9.
Progress
Delete the backup volume "vol2-backup"

cinder backup-delete {backup-vol-id}


Completed tasks 0 / 53
Time left: 0

2
10.

Attach 
30 it to the running instance "instance3"

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

11.

iInside the mounted partition, make sure the file "testfile.txt" exists

Volume encryption

Create the encrypted volume "encrypted-vol" (LUKS volume) of 1GB size

2.

Create an instance "instance4"

3.

Attach the encrypted volume to the machine

4.

Create a file "testfile.txt" and syncronize the operations

5.

Test encrypted volume

hpnouri.free.fr/coa/ 9/10
6/21/22, 4:49 AM hpnouri.free.fr/coa/

Heat Orchestration Progress

1.

Define a HOT template "basic1.yml" withtasks


Completed only 0the
/ 53following parameters
Time left: 0
flavor: m1.tiny
image: cirros-0.3.4-x86_64-uec  
2

https://github.com/AJNOURI/COA/blob/master/heat-stuff/basic-stack1.md 
30
(https://github.com/AJNOURI/COA/blob/master/heat-stuff/basic-stack1.md)
Play
Pause
Reset

2.

Start the stack defined in the HOT template "basic.yml"

COA exam prep - (AJ NOURI 2016)

 (https://github.com/AJNOURI/ajnouri.github.io/tree/master/coa)

hpnouri.free.fr/coa/ 10/10

You might also like