In this exercise, you will launch an application's component service as a non-public, tenant instance, and verify that the component is functioning correctly.
Outcomes
You should be able to launch, verify, and delete 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-launch start
Procedure 4.3. Instructions
This guided exercise is in two parts. In part 1 you use the CLI to verify OpenStack components and create an instance, and in part 2 you use the Dashboard to review the instance and OpenStack components used.
On workstation, as the developer1 user, verify the OpenStack flavor and image components.
On workstation, source the /home/student/developer1-finance-rc user environment file.
[student@workstation ~]$ source ~/developer1-finance-rc
[student@workstation ~(developer1-finance)]$Use the openstack flavor list command to list the available flavors. Limit the output to the flavor name and ID. Confirm that a flavor named default exists.
[student@workstation ~(developer1-finance)]$openstack flavor list -c ID -c Name+--------------------------------------+--------------------+ | ID | Name | +--------------------------------------+--------------------+ | 1300bcd3-d252-45fb-953b-8cd250dbc860 | default-swap | | 61b3e917-1e97-47cf-84e2-1c8a173ecd26 | default-extra-disk | | 8ff1eecb-15b4-4f32-bb99-4dec999a78c7 |default| +--------------------------------------+--------------------+
Use the openstack image list command to list the available images. Ensure that the status for rhel8 is active.
[student@workstation ~(developer1-finance)]$openstack image list+--------------------------------------+-----------+--------+ | ID | Name | Status | +--------------------------------------+-----------+--------+ ...output omitted... | 2b4db644-96a3-4cd9-a6be-024618a14c71 |rhel8|active| | da22a79b-5425-424c-9b06-86bf56fd9090 | rhel8-db | active | | 642e5661-0754-41bf-9906-7d34eda53050 | rhel8-web | active | +--------------------------------------+-----------+--------+
Launch a new instance named finance-server3 using existing resources. Verify that the instance is running.
Create a new instance called finance-server3. Use the rhel8 image and the default flavor.
[student@workstation ~(developer1-finance)]$openstack server create \>--image rhel8 \>--flavor default \>--wait finance-server3Multiple possible networks found, use a Network ID to be more specific. (HTTP 409) (Request-ID: req-70dc92d9-13a0-4b18-91a0-372bdd6d1d74) [student@workstation ~(developer1-finance)]$
Note the error produced. Use the openstack network list command to list all available networks. Limit the output to the network ID and name. You can see from the output that multiple networks are available.
[student@workstation ~(developer1-finance)]$ openstack network list -c ID -c Name
+--------------------------------------+---------------------+
| ID | Name |
+--------------------------------------+---------------------+
| 1433baea-e20d-4321-937f-511a2d934e3d | finance-network1 |
| 4e37dea5-9694-4f7b-b0d8-99bdfd97dd41 | finance-network2 |
| ec2be8e9-8d0e-400d-9c35-b8479bb38a2e | provider-storage |
| ef95203b-7c9f-46c0-b328-e51aa7729798 | provider-datacentre |
| f48bc111-39d2-4f0b-8788-30ad499c5498 | provider1-103 |
+--------------------------------------+---------------------+Re-create finance-server3 using finance-network2, the rhel8 image, and the default flavor.
Confirm that the instance status is running. Establish that the correct flavor, image, and network are used.
[student@workstation ~(developer1-finance)]$openstack server create \>--image rhel8 \>--flavor default \>--nic net-id=finance-network2 \>--wait finance-server3+-----------------------------+----------------------------------------+ | Field | Value | +-----------------------------+----------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-STS:power_state|Running| | OS-EXT-STS:task_state | None | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | 2020-05-12T09:01:31.000000 | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | |addresses|finance-network2=192.168.2.140| | adminPass | 7KDuUWwXKJae | | config_drive | | | created | 2020-05-12T09:00:55Z | |flavor|default(8ff1...8c7) | | hostId | 353d7...381fa5aa8a3bc0ebac0a1b | | id | 39b1...7e6 | |image|rhel8(2b4d...c71) | | key_name | None | |name|finance-server3| | progress | 0 | | project_id | 4a08af8fda6a4609ad293613e0e637e3 | | properties | | | security_groups | name='default' | | status | ACTIVE | | updated | 2020-05-12T09:01:32Z | | user_id | b3bf7...fd45d45a1470bce0adcce1a5c3570 | | volumes_attached | | +-----------------------------+----------------------------------------+
Use the Dashboard to perform the following steps.
Log in to the Dashboard using developer1 as the user name, Example as the domain, and redhat as the password. Find and review the finance-server3 instance.
Log in to the Dashboard using developer1 as the user name, Example as the domain, and redhat as the password.
Click at the upper right of the window, and confirm that the current project is set to finance.
Navigate to → and then click . In the page, confirm that is set to default, is set to 2GB, and is set to two.
Confirm that the image name is rhel8. Click rhel8. Confirm that is set to 10, and that is set to 2048.
Navigate to → . Confirm that finance-server3 is attached to finance-network2.
Delete finance-server3. Navigate to → . Select finance-server3 and then click . Click to confirm.
This concludes the guided exercise.