In this lab, you will launch multiple application components as non-public, tenant instances, and verify that the components are functioning correctly.
Outcomes
You should be able to:
Create an image.
Create a project network and a subnet.
Create a flavor.
Launch an instance.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command ensures that all resources required for the exercise are present.
[student@workstation ~]$ lab nonpublic-review start
Procedure 4.4. Instructions
Some of the following tasks require administrative privileges. The domain operator, operator1, has the appropriate privileges. Other tasks can be completed by the developer user, developer1. Both users are configured in the Production project.
Use the http://materials.example.com/osp-web.qcow2 file to create an image named rhel8-mail using the developer1 user credentials. Configure this image to be protected and to use 10 GB as the minimum disk size, and 2048 MB as the minimum amount of RAM.
On workstation, open a terminal and download the osp-web.qcow2 image file from the materials repository.
[student@workstation ~]$ wget http://materials.example.com/osp-web.qcow2
...output omitted...
2020-05-13 12:33:24 (213 MB/s) - 'osp-web.qcow2' saved [1412235264/1412235264]Source the /home/student/developer1-production-rc file to load the developer1 user credentials.
[student@workstation ~]$ source ~/developer1-production-rcCreate an image named rhel8-mail using the osp-web.qcow2 image file previously downloaded. Configure this image to be protected and to use 10 GB as the minimum disk size, and 2048 MB as the minimum amount of RAM.
[student@workstation ~(developer1-production)]$openstack image create \>--disk-format qcow2 \>--min-disk 10 \>--min-ram 2048 \>--protected \>--file osp-web.qcow2 \>rhel8-mail...output omitted...
Use the openstack image show --max-width command to view the rhel8-mail image.
[student@workstation ~(developer1-production)]$openstack image show \>rhel8-mail --max-width 80+------------------+-----------------------------------------------------------+ | Field | Value | +------------------+-----------------------------------------------------------+ | checksum | 01962f25c1a09cab786ab77fe143f523 | | container_format | bare | | created_at | 2020-05-13T12:45:28Z | |disk_format|qcow2| | file | /v2/images/6f7377a5-06f3-4f01-b1eb-751c6d35ad13/file | | id | 6f7377a5-06f3-4f01-b1eb-751c6d35ad13 | |min_disk|10| |min_ram|2048| |name|rhel8-mail| | owner | 4a08af8fda6a4609ad293613e0e637e3 | | properties | direct_url='rbd://63e5c992-81fb-11ea-bc11-52540001fac8/im | | | ages/6f7377a5-06f3-4f01-b1eb-751c6d35ad13/snap', | | | locations='[{'url': 'rbd://63e5c992-81fb-11ea-bc11-525400 | | | 01fac8/images/6f7377a5-06f3-4f01-b1eb-751c6d35ad13/snap', | | | 'metadata': { }}]', os_hash_algo='sha512', os_hash_value=' | | | 51bad92d5265db82e71f7917ecb69c598dfb7cc95c7b05876971686ad | | | dc91396dc900c050bc41ffc69799167d38efa2ec179dcaf6b4e5fe1f7 | | | 9c07c1b4781d03', os_hidden='False' | |protected|True| | schema | /v2/schemas/image | | size | 1412235264 | | status | active | | tags | | | updated_at | 2020-05-13T12:45:44Z | | virtual_size | None | | visibility | shared | +------------------+-----------------------------------------------------------+
Create a network named production-network2 using the developer1 user credentials. Create a subnet named production-subnet2 attached to production-network2. Use 192.168.2.0/24 as the range and 172.25.250.254 as the DNS name server.
Create a network named production-network2. By default, this network is created as an internal network.
[student@workstation ~(developer1-production)]$openstack network create \>production-network2...output omitted... [student@workstation ~(developer1-production)]$openstack network show \>production-network2 --max-width 80+---------------------------+--------------------------------------------------+ | Field | Value | +---------------------------+--------------------------------------------------+ | admin_state_up | UP | | availability_zone_hints | | | availability_zones | | | created_at | 2020-05-13T13:15:49Z | | description | | | dns_domain | | | id | 0264a903-a6f0-4a78-8733-2186a4e7e15b | | ipv4_address_scope | None | | ipv6_address_scope | None | | is_default | None | | is_vlan_transparent | None | | location | cloud='', project.domain_id=, | | | project.domain_name='Example', | | | project.id='4a08af8fda6a4609ad293613e0e637e3', | | | project.name='production', | | | region_name='regionOne', zone= | | mtu | 1442 | | name |production-network2| | port_security_enabled | True | | project_id | 4a08af8fda6a4609ad293613e0e637e3 | | provider:network_type | None | | provider:physical_network | None | | provider:segmentation_id | None | | qos_policy_id | None | | revision_number | 1 | | router:external |Internal| | segments | None | | shared | False | | status | ACTIVE | | subnets | | | tags | | | updated_at | 2020-05-13T13:15:49Z | +---------------------------+--------------------------------------------------+
Create a subnet named production-subnet2 on the production-network2 network. Use the 192.168.2.0/24 range and the 172.25.250.254 DNS name server for that subnet.
[student@workstation ~(developer1-production)]$openstack subnet create \>production-subnet2 \>--network production-network2 \>--dns-nameserver 172.25.250.254 \>--subnet-range 192.168.2.0/24...output omitted... [student@workstation ~(developer1-production)]$openstack subnet show \>production-subnet2 --max-width 80+-------------------+----------------------------------------------------------+ | Field | Value | +-------------------+----------------------------------------------------------+ | allocation_pools |192.168.2.2-192.168.2.254| | cidr |192.168.2.0/24| | created_at | 2020-05-13T13:21:38Z | | description | | | dns_nameservers |172.25.250.254| | enable_dhcp | True | | gateway_ip |192.168.2.1| | host_routes | | | id | ff64604f-3aa8-4ee3-b307-7533d5116e7d | | ip_version | 4 | | ipv6_address_mode | None | | ipv6_ra_mode | None | | location | cloud='', project.domain_id=, | | | project.domain_name='Example', | | | project.id='4a08af8fda6a4609ad293613e0e637e3', | | | project.name='production', region_name='regionOne', zone=| | name | production-subnet2 | | network_id | 0264a903-a6f0-4a78-8733-2186a4e7e15b | | prefix_length | None | | project_id | 4a08af8fda6a4609ad293613e0e637e3 | | revision_number | 0 | | segment_id | None | | service_types | | | subnetpool_id | None | | tags | | | updated_at | 2020-05-13T13:21:38Z | +-------------------+----------------------------------------------------------+
Create a flavor named mail-disk. Configure this flavor with a 10 GB root disk, 2048 MB of RAM, two VCPUs, a 5 GB ephemeral disk, a 1024 MB swap disk, and use 42 as the ID of the flavor.
Because creating a flavor must be done with an administrative account, source the operator1-production-rc file to load the operator1 user credentials.
[student@workstation ~(developer1-production)]$ source ~/operator1-production-rc
[student@workstation ~(operator1-production)]$Create a flavor named mail-disk with a 10 GB root disk, 2048 MB of RAM, two VCPUs, a 5 GB ephemeral disk, a 1024 MB swap disk, and use 42 as the ID of the flavor.
[student@workstation ~(operator1-production)]$openstack flavor create \>--id 42 \>--ram 2048 \>--disk 10 \>--vcpus 2 \>--ephemeral 5 \>--swap 1024 \>mail-disk+----------------------------+---------------+ | Field | Value | +----------------------------+---------------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral|5| |disk|10| |id|42| | name | mail-disk | | os-flavor-access:is_public | True | | properties | | |ram|2048| | rxtx_factor | 1.0 | | swap | 1024 | | vcpus | 2 | +----------------------------+---------------+
Configure the rhel8-mail image to be public.
Modify the rhel8-mail image visibility to be public. Become an administrative user by sourcing the operator1 credentials.
[student@workstation ~(operator1-production)]$openstack image set \>--public rhel8-mail
Verify that the rhel8-mail image visibility is now public.
[student@workstation ~(operator1-production)]$openstack image show \>rhel8-mail --max-width 80+------------------+-----------------------------------------------------------+ | Field | Value | +------------------+-----------------------------------------------------------+ | checksum | 01962f25c1a09cab786ab77fe143f523 | | container_format | bare | | created_at | 2020-05-13T12:45:28Z | | disk_format | qcow2 | | file | /v2/images/6f7377a5-06f3-4f01-b1eb-751c6d35ad13/file | | id | 6f7377a5-06f3-4f01-b1eb-751c6d35ad13 | | min_disk | 10 | | min_ram | 2048 | | name | rhel8-mail | | owner | 4a08af8fda6a4609ad293613e0e637e3 | | properties | direct_url='rbd://63e5c992-81fb-11ea-bc11-52540001fac8/im | | | ages/6f7377a5-06f3-4f01-b1eb-751c6d35ad13/snap', | | | locations='[{'url': 'rbd://63e5c992-81fb-11ea-bc11-525400 | | | 01fac8/images/6f7377a5-06f3-4f01-b1eb-751c6d35ad13/snap', | | | 'metadata': { }}]', os_hash_algo='sha512', os_hash_value=' | | | 51bad92d5265db82e71f7917ecb69c598dfb7cc95c7b05876971686ad | | | dc91396dc900c050bc41ffc69799167d38efa2ec179dcaf6b4e5fe1f7 | | | 9c07c1b4781d03', os_hidden='False' | | protected | True | | schema | /v2/schemas/image | | size | 1412235264 | | status | active | | tags | | | updated_at | 2020-05-14T11:07:13Z | | virtual_size | None | | visibility |public| +------------------+-----------------------------------------------------------+
Use the Dashboard to perform the following steps.
Use the Dashboard to inspect the image, network, subnet, and flavor created in the previous steps.
On workstation, open Firefox and navigate to http://dashboard.overcloud.example.com. Log in to the Dashboard using Example as the domain, operator1 as the user, and redhat as the password. Confirm that the selected project is production.
Navigate to → → .
Confirm that mail-disk has the correct configuration of a 10 GB root disk, 2048 MB of RAM, two VCPUs, a 5 GB ephemeral disk, and a 1024 MB swap disk.
Log out of the Dashboard.
Log in to the Dashboard using Example as the domain, developer1 as the user, and redhat as the password.
Click at the upper-right corner of the window, and then select .
Navigate to → → and then click .
Confirm that the image has the correct configuration.
Navigate to → → and then click .
Confirm that production-network2 has the correct configuration.
Launch an instance named production-server4 using the mail-disk flavor, the rhel8-mail image, and the production-network2 network.
Navigate to → → , and then click .
On the Details window, under , enter production-server4. On the tab, choose in the field. Set to No. On the section, click the up arrow for the rhel8-mail image. Click and then choose mail-disk by clicking the up arrow next to it. Select and then click the up arrow next to production-network2.
Click .
When the instance has a status of Active, click the instance name and then click . Confirm that the instance boots and has the correct server name. It may take a couple of minutes to complete the instance deployment.
This concludes the lab.