金鱼哥RHCA回忆录:CL210红帽OpenStack平台架构--章节实验
🎹 个人简介:大家好,我是 金鱼哥,CSDN运维领域新星创作者,华为云·云享专家,阿里云社区·专家博主
📚个人资质:CCNA、HCNP、CSNA(网络分析师),软考初级、中级网络工程师、RHCSA、RHCE、RHCA、RHCI、ITIL😜
💬格言:努力不一定成功,但要想成功就必须努力🔥🎈支持我:可点赞👍、可收藏⭐️、可留言📝
-
在director节点上,验证底层云的网络和服务。
-
在director节点上,查找overcloud节点的IP地址。列出网络并显示ctlplane子网的详细信息。打开undercloud.conf文件并查看DHCP配置。
-
在所有四个overcloud节点上,使用docker命令来显示OpenStack服务
-
使用docker命令停止nova_api容器。检查容器的状态,然后重新启动它。确保容器返回健康状态。5. 在controller0和compute0节点上,查看etho、vlan和br-ex接口。列出OVS网桥。列出br-ex和br-trunk上的OVS接口。
-
在workstation,加载源~/operator1-production-rc认证文件。使用下表中的属性在production项目中创建一个实例。确保服务器的状态为ACTIVE。在provider-datacentre网络上创建一个浮动IP地址,并将其附加到实例。
[student@workstation ~]$ lab architecture-lab setup
📑1. 在director节点上,验证undercloud的网络和服务。
(undercloud) [stack@director ~]$ openstack network list
+--------------------------------------+--------------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+--------------+--------------------------------------+
| 2c9cee9a-e797-462e-ba76-efaa564b7b7f | ctlplane | 45dce459-6e9d-40dc-a4d5-ef2e91de6ec7 |
| 352efe55-3af2-4e26-abf6-6f2d388c6a1a | storage | f8b997e4-f5f5-46ac-92a2-079340aa0dde |
| 37a81453-9f5e-415d-90e5-14bdb1858806 | management | 243a4564-e344-4d80-9eeb-972287a4b8ae |
| 444ad6f9-7ad8-43d6-a825-37ff9cbc63c5 | external | 1653cf28-1da7-4bb7-b060-872a0da6c0d1 |
| 60c574f1-cb7d-4f37-8dd6-4f76a2d0218c | internal_api | 30e75947-64c2-4961-9b49-67b066e54fe8 |
| 7029b988-a1a2-405d-9809-d051c8a726d8 | storage_mgmt | be6d8ef9-ea6a-436f-a1f7-2d085336667c |
| d1cc495b-dda5-4c0e-812a-bd79708716d4 | tenant | d551f63e-d144-4c0a-8a1b-8892aa40ae78 |
+--------------------------------------+--------------+--------------------------------------+
(undercloud) [stack@director ~]$ ip addr | grep -E 'br-ctlplane|eth1'
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 172.25.250.200/24 brd 172.25.250.255 scope global noprefixroute eth1
6: br-ctlplane: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.25.249.200/24 brd 172.25.249.255 scope global br-ctlplane
inet 172.25.249.202/32 scope global br-ctlplane
inet 172.25.249.201/32 scope global br-ctlplane
(undercloud) [stack@director ~]$ openstack compute service list
+----+----------------+--------------------------+----------+---------+-------+----------------------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+----------------+--------------------------+----------+---------+-------+----------------------------+
| 1 | nova-conductor | director.lab.example.com | internal | enabled | up | 2020-10-15T15:00:47.000000 |
| 2 | nova-scheduler | director.lab.example.com | internal | enabled | up | 2020-10-15T15:00:49.000000 |
| 5 | nova-compute | director.lab.example.com | nova | enabled | up | 2020-10-15T15:00:45.000000 |
+----+----------------+--------------------------+----------+---------+-------+----------------------------+
(undercloud) [stack@director ~]$ openstack compute service list -c Binary -c Host -c Status -c State
+----------------+--------------------------+---------+-------+
| Binary | Host | Status | State |
+----------------+--------------------------+---------+-------+
| nova-conductor | director.lab.example.com | enabled | up |
| nova-scheduler | director.lab.example.com | enabled | up |
| nova-compute | director.lab.example.com | enabled | up |
+----------------+--------------------------+---------+-------+
(undercloud) [stack@director ~]$ openstack catalog list -c Name -c Endpoints
......
📑2. 在director节点上,查找overcloud节点的IP地址。列出网络并显示ctlplane子网的详细信息。打开undercloud.conf文件并查看DHCP配置。
(undercloud) [stack@director ~]$ openstack server list -c Name -c Networks
+-------------+------------------------+
| Name | Networks |
+-------------+------------------------+
| compute1 | ctlplane=172.25.249.55 |
| compute0 | ctlplane=172.25.249.54 |
| computehci0 | ctlplane=172.25.249.59 |
| controller0 | ctlplane=172.25.249.57 |
| ceph0 | ctlplane=172.25.249.58 |
+-------------+------------------------+
(undercloud) [stack@director ~]$ openstack network list -c Name -c Subnets
+--------------+--------------------------------------+
| Name | Subnets |
+--------------+--------------------------------------+
| ctlplane | 45dce459-6e9d-40dc-a4d5-ef2e91de6ec7 |
| storage | f8b997e4-f5f5-46ac-92a2-079340aa0dde |
| management | 243a4564-e344-4d80-9eeb-972287a4b8ae |
| external | 1653cf28-1da7-4bb7-b060-872a0da6c0d1 |
| internal_api | 30e75947-64c2-4961-9b49-67b066e54fe8 |
| storage_mgmt | be6d8ef9-ea6a-436f-a1f7-2d085336667c |
| tenant | d551f63e-d144-4c0a-8a1b-8892aa40ae78 |
+--------------+--------------------------------------+
(undercloud) [stack@director ~]$ openstack subnet show 45dce459-6e9d-40dc-a4d5-ef2e91de6ec7
+-------------------+------------------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------------------+
| allocation_pools | 172.25.249.51-172.25.249.59 |
| cidr | 172.25.249.0/24 |
| created_at | 2018-10-23T13:02:21Z |
| description | |
| dns_nameservers | 172.25.250.254 |
| enable_dhcp | True |
| gateway_ip | 172.25.249.200 |
| host_routes | destination='169.254.169.254/32', gateway='172.25.249.200' |
| id | 45dce459-6e9d-40dc-a4d5-ef2e91de6ec7 |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | ctlplane-subnet |
| network_id | 2c9cee9a-e797-462e-ba76-efaa564b7b7f |
| project_id | f50fbd0341134b97a5a735cca5d6255c |
| revision_number | 1 |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
| tags | |
| updated_at | 2018-10-23T13:45:37Z |
+-------------------+------------------------------------------------------------+
(undercloud) [stack@director ~]$ grep '^dhcp_' undercloud.conf
dhcp_start = 172.25.249.51
dhcp_end = 172.25.249.59
注意:所有overcloud节点IP地址都在ctlplane子网的分配池中。ctlplane子网在undercloud.conf文件中确认。overcloud节点通过ctlplane子网的allocation_pools选项获得IP地址。
📑3. 在所有四个overcloud节点上,使用docker命令来显示OpenStack服务
[root@controller0 ~]# docker ps --format="table {{.Names}}\t{{.Status}}"
NAMES STATUS
openstack-cinder-volume-docker-0 Up 32 hours
ovn-dbs-bundle-docker-0 Up 32 hours
ceph-mds-controller0 Up 32 hours
ceph-mon-controller0 Up 32 hours
ceph-mgr-controller0 Up 32 hours
haproxy-bundle-docker-0 Up 32 hours
redis-bundle-docker-0 Up 32 hours
galera-bundle-docker-0 Up 32 hours
rabbitmq-bundle-docker-0 Up 32 hours
gnocchi_api Up 32 hours
gnocchi_metricd Up 32 hours
octavia_health_manager Up 32 hours (healthy)
panko_api Up 32 hours (healthy)
octavia_api Up 32 hours
nova_metadata Up 32 hours
nova_api Up 32 hours (healthy)
octavia_housekeeping Up 32 hours (unhealthy)
glance_api Up 32 hours (healthy)
swift_proxy Up 32 hours (healthy)
octavia_worker Up 32 hours (healthy)
ovn_controller Up 32 hours
heat_api_cfn Up 32 hours (healthy)
neutron_api Up 32 hours (healthy)
aodh_listener Up 32 hours (healthy)
swift_container_auditor Up 32 hours
heat_api_cron Up 32 hours
swift_object_expirer Up 32 hours
swift_object_updater Up 32 hours
swift_container_replicator Up 32 hours
swift_account_auditor Up 32 hours
manila_api Up 32 hours
cinder_api_cron Up 32 hours
logrotate_crond Up 32 hours
swift_account_server Up 32 hours (healthy)
cinder_scheduler Up 32 hours (healthy)
swift_object_replicator Up 32 hours
swift_container_server Up 32 hours (healthy)
heat_engine Up 32 hours (healthy)
aodh_api Up 32 hours
nova_vnc_proxy Up 32 hours (healthy)
ceilometer_agent_notification Up 32 hours (healthy)
manila_scheduler Up 32 hours (healthy)
swift_account_reaper Up 32 hours
nova_consoleauth Up 32 hours (healthy)
nova_api_cron Up 32 hours
aodh_notifier Up 32 hours (healthy)
ceilometer_agent_central Up 32 hours (healthy)
swift_account_replicator Up 32 hours
swift_object_auditor Up 32 hours
heat_api Up 32 hours (healthy)
cinder_api Up 32 hours
swift_object_server Up 32 hours (healthy)
nova_conductor Up 32 hours (healthy)
aodh_evaluator Up 32 hours (healthy)
swift_container_updater Up 32 hours
keystone_cron Up 32 hours
keystone Up 3 hours (healthy)
iscsid Up 32 hours
nova_placement Up 32 hours
horizon Up 28 hours
clustercheck Up 32 hours
memcached Up 32 hours
[root@compute0 ~]# docker ps --format="table {{.Names}}\t{{.Status}}"
NAMES STATUS
ovn_controller Up 32 hours
ovn_metadata_agent Up 32 hours (healthy)
logrotate_crond Up 32 hours
nova_compute Up 32 hours (healthy)
nova_migration_target Up 32 hours
ceilometer_agent_compute Up 32 hours
iscsid Up 32 hours
nova_libvirt Up 32 hours
nova_virtlogd Up 32 hours
[root@computehci0 ~]# docker ps --format="table {{.Names}}\t{{.Status}}"
NAMES STATUS
ceph-osd-computehci0-vdc Up 32 hours
ceph-osd-computehci0-vdb Up 32 hours
ceph-osd-computehci0-vdd Up 32 hours
ovn_metadata_agent Up 32 hours (healthy)
ovn_controller Up 32 hours
nova_compute Up 32 hours (healthy)
logrotate_crond Up 32 hours
ceilometer_agent_compute Up 32 hours
nova_migration_target Up 32 hours
iscsid Up 32 hours
nova_libvirt Up 32 hours
nova_virtlogd Up 32 hours
[root@ceph0 ~]# docker ps --format="table {{.Names}}\t{{.Status}}"
NAMES STATUS
ceph-osd-ceph0-vdc Up 32 hours
ceph-osd-ceph0-vdb Up 32 hours
ceph-osd-ceph0-vdd Up 32 hours
logrotate_crond Up 32 hours
📑4. 使用docker命令停止nova_api容器。检查容器的状态,然后重新启动它。确保容器返回健康状态。
[root@controller0 ~]# docker stop nova_api
nova_api
Broadcast message from systemd-journald@controller0 (Thu 2020-10-15 15:26:26 UTC):
haproxy[27942]: proxy nova_osapi has no server available!
Message from syslogd@controller0 at Oct 15 15:26:26 ...
haproxy[9]:proxy nova_osapi has no server available!
[root@controller0 ~]# docker start nova_api
nova_api
[root@controller0 ~]# docker ps --format="table {{.Names}}\t{{.Status}}" | grep nova_api
nova_api Up About a minute (healthy)
nova_api_cron Up 32 hours
📑5. 在controller0和compute0节点上,查看etho、vlan和br-ex接口。列出OVS网桥。列出br-ex和br-trunk上的OVS接口。
[root@controller0 ~]# ip addr | grep -E 'eth0|vlan|br-ex'
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 172.25.249.57/24 brd 172.25.249.255 scope global eth0
inet 172.25.249.50/32 brd 172.25.249.255 scope global eth0
13: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.25.250.1/24 brd 172.25.250.255 scope global br-ex
inet 172.25.250.50/32 brd 172.25.250.255 scope global br-ex
14: vlan40: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.4.1/24 brd 172.24.4.255 scope global vlan40
inet 172.24.4.50/32 brd 172.24.4.255 scope global vlan40
15: vlan10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.1.1/24 brd 172.24.1.255 scope global vlan10
inet 172.24.1.51/32 brd 172.24.1.255 scope global vlan10
inet 172.24.1.50/32 brd 172.24.1.255 scope global vlan10
16: vlan20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.2.1/24 brd 172.24.2.255 scope global vlan20
17: vlan30: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.3.1/24 brd 172.24.3.255 scope global vlan30
inet 172.24.3.50/32 brd 172.24.3.255 scope global vlan30
18: vlan50: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.5.1/24 brd 172.24.5.255 scope global vlan50
[root@controller0 ~]# ovs-vsctl list-br
br-eth3
br-eth4
br-ex
br-int
br-trunk
[root@controller0 ~]# ovs-vsctl list-ifaces br-trunk
eth1
vlan10
vlan20
vlan30
vlan40
vlan50
[root@controller0 ~]# ovs-vsctl list-ifaces br-ex
eth2
patch-provnet-fc5472ee-98d9-4f6b-9bc9-544ca18aefb3-to-br-int
[root@compute0 ~]# ip addr | grep -E 'eth0|vlan|eth2'
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 172.25.249.54/24 brd 172.25.249.255 scope global eth0
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP group default qlen 1000
14: vlan10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.1.2/24 brd 172.24.1.255 scope global vlan10
15: vlan20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.2.2/24 brd 172.24.2.255 scope global vlan20
16: vlan30: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.3.2/24 brd 172.24.3.255 scope global vlan30
17: vlan50: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
inet 172.24.5.2/24 brd 172.24.5.255 scope global vlan50
[root@compute0 ~]# ovs-vsctl list-br
br-eth3
br-eth4
br-ex
br-int
br-trunk
[root@compute0 ~]# ovs-vsctl list-ifaces br-trunk
eth1
vlan10
vlan20
vlan30
vlan50
📑6. 在workstation,加载源~/operator1-production-rc认证文件。使用下表中的属性在production项目中创建一个实例。确保服务器的状态为ACTIVE。在provider-datacentre网络上创建一个浮动IP地址,并将其附加到实例。
[student@workstation ~(operator1-production)]$ openstack server create --flavor default --key-name example-keypair --nic net-id=production-network1 --security-group default --image production-rhel7 production-server1 --wait
+-----------------------------+------------------------------------------------------------------+
| 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-10-16T14:39:06.000000 |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | production-network1=192.168.1.10 |
| adminPass | xNhULJxtZn4m |
| config_drive | |
| created | 2020-10-16T14:34:35Z |
| flavor | default (e04380ed-b027-4a72-a697-4307bc014b6c) |
| hostId | 0e79b8aaaf2efd191b1666446b5ee623aa403d474e8c199f8811250d |
| id | 6f18c718-dd21-4a80-9b89-b224cb26021a |
| image | production-rhel7 (5fa51da8-c711-463a-91ed-f0c2fa232798) |
| key_name | example-keypair |
| name | production-server1 |
| progress | 0 |
| project_id | 294ad7735e6646d7bb908e32de8582c3 |
| properties | |
| security_groups | name='default' |
| status | ACTIVE |
| updated | 2020-10-16T14:39:07Z |
| user_id | ac8f19029cdf35fa7083687862bf1235d5a10f5b98632be09d323616c640985e |
| volumes_attached | |
+-----------------------------+------------------------------------------------------------------+
[student@workstation ~(operator1-production)]$ openstack server list
+--------------------------------------+--------------------+--------+----------------------------------+------------------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+--------------------+--------+----------------------------------+------------------+---------+
| 6f18c718-dd21-4a80-9b89-b224cb26021a | production-server1 | ACTIVE | production-network1=192.168.1.10 | production-rhel7 | default |
+--------------------------------------+--------------------+--------+----------------------------------+------------------+---------+
[student@workstation ~(operator1-production)]$ openstack floating ip create provider-datacentre
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2020-10-16T15:11:17Z |
| description | |
| fixed_ip_address | None |
| floating_ip_address | 172.25.250.101 |
| floating_network_id | fc5472ee-98d9-4f6b-9bc9-544ca18aefb3 |
| id | dc7299cb-466a-4285-9b73-8c8e6a578e77 |
| name | 172.25.250.101 |
| port_id | None |
| project_id | 294ad7735e6646d7bb908e32de8582c3 |
| qos_policy_id | None |
| revision_number | 0 |
| router_id | None |
| status | DOWN |
| subnet_id | None |
| updated_at | 2020-10-16T15:11:17Z |
+---------------------+--------------------------------------+
[student@workstation ~(operator1-production)]$ openstack server add floating ip production-server1 172.25.250.101
[student@workstation ~(operator1-production)]$ ping 172.25.250.101
PING 172.25.250.101 (172.25.250.101) 56(84) bytes of data.
64 bytes from 172.25.250.101: icmp_seq=1 ttl=63 time=12.3 ms
64 bytes from 172.25.250.101: icmp_seq=2 ttl=63 time=3.34 ms
64 bytes from 172.25.250.101: icmp_seq=3 ttl=63 time=8.18 ms
[student@workstation ~(operator1-production)]$ ssh cloud-user@172.25.250.101
Warning: Permanently added '172.25.250.101' (ECDSA) to the list of known hosts.
[cloud-user@production-server1 ~]$ ping 172.25.250.254
PING 172.25.250.254 (172.25.250.254) 56(84) bytes of data.
64 bytes from 172.25.250.254: icmp_seq=1 ttl=63 time=28.0 msPING 172.25.250.254
📑实验评分
[student@workstation ~(operator1-production)]$ lab architecture-lab grade
Grading lab on workstation:
. Checking that production-server1 has been launched.......... PASS
Overall lab grade.............................................. PASS
📑清除实验
[student@workstation ~(operator1-production)]$ lab architecture-lab cleanup
💡总结
-
当今的企业云是使用多个相互连接的云结构构建的。undercloud是用于构建和管理生产云的供应和管理云。Red Hat OpenStack平台Director是Red Hat OpenStack平台的底层。
-
企业生产云称为overcloud。Underclouds和overclouds使用相同的技术,但是管理不同的工作负载。底层管理云基础设施,上层管理生产和租户工作负载。
-
物理云和虚拟云中使用了常见的开放技术。智能平台管理接口(IPMI)是用于控制节点的电源管理技术。虚拟网络计算(VNC)是一种远程访问技术,用于访问已部署的实例控制台。
-
自省过程具有发现要部署节点的技术特征。通过使用这些特征,overcloud部署可以自动将部署角色分配给特定节点。
-
编排流程为每个节点的硬件和软件定义特定的配置。所提供的默认模板涵盖了大多数常见用例和设计。
-
红帽OpenStack平台的最新版本使用容器来运行服务。systemd命令已被弃用,并已被docker命令替换。日志文件现在位于/var/log/containers/service中,配置文件现在位于/var/lib/configdata/puppet-generated/service/etc/service中。只有在容器配置文件中所做的更改在重新启动服务时才会持久。
RHCA认证需要经历5门的学习与考试,还是需要花不少时间去学习与备考的,好好加油,可以噶🤪。
以上就是【金鱼哥】对 第一章 红帽OpenStack平台架构–章节实验 的简述和讲解。希望能对看到此文章的小伙伴有所帮助。
💾红帽认证专栏系列:
RHCSA专栏:戏说 RHCSA 认证
RHCE专栏:戏说 RHCE 认证
此文章收录在RHCA专栏:RHCA 回忆录
如果这篇【文章】有帮助到你,希望可以给【金鱼哥】点个赞👍,创作不易,相比官方的陈述,我更喜欢用【通俗易懂】的文笔去讲解每一个知识点。
如果有对【运维技术】感兴趣,也欢迎关注❤️❤️❤️ 【金鱼哥】❤️❤️❤️,我将会给你带来巨大的【收获与惊喜】💕💕!
- 点赞
- 收藏
- 关注作者
评论(0)