题目:https://download.zhoufengjie.cn/document/os/linuxos/www.zhoufengjie.cn-RHCA210-Openstack-exam.txt
练习参考:https://download.zhoufengjie.cn/document/os/linuxos/www.zhoufengjie.cn-RHCA210-Openstack-result.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
Q1:Configure tenants and users Create the following OpenStack projects: Engineering Production Create the following OpenStack users: Robert should be a member of Engineering and should be an administrator.The email address for Robert should be Robert@domain1.example.com. George should be a member of Engineering. The email address for George should be George@domain1.example.com. William should be a member of Production and should be an administrator.The email address for William should be William@domain1.example.com. John should be a member of Production. The email address for John should be John@domain1.example.com. The password for all user accounts must be redhat. Q2:Create resources Create the resources necessary to deploy server instances. Create a public virtual machine flavor using the following attributes: Flavor name:m1.petite Virtual machine RAM: 1024MB CPUs: 1 Add the image located at http://rhgls.domain1.example.com/OpenStack/small.img(http://materials.example.com/osp-small.qcow2) to the Glance Image Service.This image should be named web.The image format is QCOW2 and the image should be available to everyone. Create the following security groups for project Engineering: The group named ssh should allow access to port 22 and ICMP ping from the Internet The group named web should allow access to port 80 from the Internet. Create a key pair named webkey in the project Engineering. This key pair should be stored in the file /home/stack/webkey.pem on director.domain1.example.com Q3:Configure networking Configure networking for Engineering according to the following requirements: The project has a network named private.This network should have a subnet named internal that uses the network address 192.168.122.0/24. The project has a network named public. This network should have a subnet named external that uses the network address 172.24.1.0/24(172.25.250.0/24). Both networks are attached to a router, ex210-router so that instances in this project can access the public network. Q4:Launch an instance Launch an instance named webserver according to the following requirements: The instance uses the Engineering project The instance uses the web image The instance uses a m1.petite flavor virtual machine The instance is connected to the private network The instance uses the following security groups ssh web The instance uses the key named webkey Q5:Configure SSH access Associate a floating IP in the subnet 172.24.1.0/24(172.25.250.0/24) to the instance webserver . The floating IP should be accessible via SSH from other hosts using the webkey key pair and the user cloud-user Q6:Create a block storage volume Create a block storage volume named storage that is 2Gb in size in the Engineering project. Q7:Attach block storage Attach the block storage volume named storage to webserver as /dev/vdb. Q8:Snapshot a storage volume Create a block storage snapshot named strgsnap that is a snapshot of storage in the project Engineering Q9:Create a Heat stack [使用上面創建的image鏡像finance,创建heat stack(materials下提供了一个yaml模板,只读,需要复制出来,内容格式不对flavor顶格了,应该有两个空格,跟其他对齐,key_nam少了一个e,所>有参数自己添加default值名称也不对,脚本需要添加一个unix组heatgroup)] Use the command line interface to create a Heat template in the project Engineering. The Heat template will be broken and you will need to fix any errors to successfully launch the instance. Do the following to the Heat template: Fix the template so that it successfully works Add a UNIX group called stackgroup to the instance Once you have configured the template,create an environment file and launch the Heat stack with the as follows: Stack Name: HeatStack Heat Template: use materials/web_server.yaml on director.domain1.example.com(http://materials.example.com/heat/finance-app1.yaml) Project/Tenant: Engineering Public Network: public Private Network: private Private Subnet: internal Key Name: webkey Flavor: m1.petite Image: web Q10:Customize an existing image and launch a VM Modify the existing image osp-exam-server.qcow2 that is located under /root on director.domain1.example.com so that: The package httpd is installed and its relative service is enabled The webroot /var/www/html has an index.html file that contains the words Klaatu barada nikto The image contains a new user sheila with no password Upload the image into OpenStack with the name web-server.You should specify the following as part of the upload: Minimum memory usage 1024 MiB Minimum disk size 10 GiB Create a flavor named m1.web that corresponds to the resource limits specified when uploading the image Once the image has been uploaded launch an instance in the Engineering project,named custom-web-server that uses the flavor m1.web and associate a floating IP in the subnet 172.24.1.0/24 to the instance. Once the instance has been started, it should be possible to browse the floating IP address with a web client and see the phraseKlaatu barada nikto. It must also be possible to ssh to the instance using a PEM key named webtest.pem. This key should be stored in the file /home/stack/webkey.pem on director.domain1.example.com Q11:Create a messaging queue Configure the undercloud director.domain1.example.com message broker in the following way: A user ash with password redhat is able to create, manipulate and query RabbitMQ queues and exchanges A new queue named openstack-exam.queue exists. Once the user and queue have been configured, use the user ash to push the message Gimme some sugar, baby to the queue openstack-exam.queue Note: additional commands that may be necessary to perform this task can be found under /usr/local/bin on director.domain1.example.com Q12:Create a Swift container Create a Swift container named warehouse in project Engineering which can be used by Robert to store files. Place a copy of http://host.domain1.example.com/conf_data.tgz into the container. The new object should have the same filename as the original. Q13:Deploy a second compute node Deploy a second compute node on your overcloud using the following resources: The JSON file that contains the definition for the second compute node located at /home/stack/materials/instackenv_add.json(http://materials.example.com/instackenv-onenode.json) The Heat templates used to deploy the overcloud,located at /home/stack/templates The command used to deploy the overcloud, located at /home/stack/overcloud_install.sh After executing openstack overcloud deploy, the command will overwrite /home/stack/overcloudrc file with an incorrect password.You must update overcloudrc with the correct password after deploying the second compute node.. The password is redhat. ######################################### shell:openstack overcloud deploy --templates ~/templates --ntp-server 172.24.9.254 --control-scal --compute-scal 1 --ceph-storage-scal 1 --control-flavor contor --comute-flavor compute --ceph-storage-flavor ceph-storage --neutron-tunnel-types vxlan --neutron-network ...... #change --compute-scal 2 #delete --contorl-flavor,--compute-flavor,--ceph-storage-flavor ######################################### Q14:Launch an instance on second compute Launch an instance named fileserver according to the following requirements: The instance uses the Engineering tenant The instance uses the web image The instance use a new flavor,which you must create,named m1.file that defines a VM with 512MB memory The instance is connected to the private network The instance uses the following security groups ssh web The instance uses the key named webkey The instance runs on compute1 that was deployed in a separate exam task Q15:Move an instance Move the instance custom-web-server to the second compute host that you configured for this exam. Both compute nodes have sufficient resources to run required instances. Q16:Display statistics using Ceilometer Use Ceilometer from the command line to list all resources from Ceilometer and save the list to the file /home/stack/ceilometer.log |