使用RDO Packstack在CentOS 8上安装版本为Victoria的openstack(下)

简介: 使用RDO Packstack在CentOS 8上安装版本为Victoria的openstack

步骤5:访问Horizon仪表板


[root@openstack ~]# cat keystonerc_admin 
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD='P@ssw0rd'
    export OS_REGION_NAME=RegionOne
    export OS_AUTH_URL=http://192.168.1.100:5000/v3
    export PS1='[\u@\h \W(keystone_admin)]\$ '
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
    [root@openstack ~]# 




步骤6:通过启动实例测试和验证OpenStack安装


在openstack中启动实例之前,首先必须创建网络,路由器和上传镜像。因此,让我们首先使用以下neutron命令在管理租户中创建外部网络。


[root@openstack ~]# source keystonerc_admin
[root@openstack ~(keystone_admin)]# neutron net-create external_network --provider:network_type flat --provider:physical_network extnet --router:external
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2020-11-11T08:21:32Z                 |
| description               |                                      |
| id                        | 4a1d7ce1-c992-49ec-925b-f6de4ff57631 |
| ipv4_address_scope        |                                      |
| ipv6_address_scope        |                                      |
| is_default                | False                                |
| mtu                       | 1500                                 |
| name                      | external_network                     |
| port_security_enabled     | True                                 |
| project_id                | 7f6b46bbf1e04095b9c4fda1aa04eb43     |
| provider:network_type     | flat                                 |
| provider:physical_network | extnet                               |
| provider:segmentation_id  |                                      |
| qos_policy_id             |                                      |
| revision_number           | 1                                    |
| router:external           | True                                 |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tags                      |                                      |
| tenant_id                 | 7f6b46bbf1e04095b9c4fda1aa04eb43     |
| updated_at                | 2020-11-11T08:21:32Z                 |
+---------------------------+--------------------------------------+
[root@openstack ~(keystone_admin)]# 


通过运行以下neutron命令,将您的flat网络的子网添加到外部网络


[root@openstack ~(keystone_admin)]# neutron subnet-create --name public_subnet --enable_dhcp=True --allocation-pool=start=192.168.1.210,end=192.168.1.230 --gateway=192.168.1.1 external_network 192.168.1.0/24
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new subnet:
+-------------------+----------------------------------------------------+
| Field             | Value                                              |
+-------------------+----------------------------------------------------+
| allocation_pools  | {"start": "192.168.1.210", "end": "192.168.1.230"} |
| cidr              | 192.168.1.0/24                                     |
| created_at        | 2020-11-11T08:22:29Z                               |
| description       |                                                    |
| dns_nameservers   |                                                    |
| enable_dhcp       | True                                               |
| gateway_ip        | 192.168.1.1                                        |
| host_routes       |                                                    |
| id                | 3cb4d034-5be7-40ef-99fc-69714dc2a108               |
| ip_version        | 4                                                  |
| ipv6_address_mode |                                                    |
| ipv6_ra_mode      |                                                    |
| name              | public_subnet                                      |
| network_id        | 4a1d7ce1-c992-49ec-925b-f6de4ff57631               |
| project_id        | 7f6b46bbf1e04095b9c4fda1aa04eb43                   |
| revision_number   | 0                                                  |
| service_types     |                                                    |
| subnetpool_id     |                                                    |
| tags              |                                                    |
| tenant_id         | 7f6b46bbf1e04095b9c4fda1aa04eb43                   |
| updated_at        | 2020-11-11T08:22:29Z                               |
+-------------------+----------------------------------------------------+
[root@openstack ~(keystone_admin)]# 


通过执行以下neutron命令创建路由器,并使用外部网络设置其网关


[root@openstack ~(keystone_admin)]# neutron router-create dev-router
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new router:
+-------------------------+--------------------------------------+
| Field                   | Value                                |
+-------------------------+--------------------------------------+
| admin_state_up          | True                                 |
| availability_zone_hints |                                      |
| availability_zones      |                                      |
| created_at              | 2020-11-11T08:23:51Z                 |
| description             |                                      |
| external_gateway_info   |                                      |
| id                      | de9e9bfe-5376-4d5f-9c4c-93c2913a9be4 |
| name                    | dev-router                           |
| project_id              | 7f6b46bbf1e04095b9c4fda1aa04eb43     |
| revision_number         | 1                                    |
| routes                  |                                      |
| status                  | ACTIVE                               |
| tags                    |                                      |
| tenant_id               | 7f6b46bbf1e04095b9c4fda1aa04eb43     |
| updated_at              | 2020-11-11T08:23:51Z                 |
+-------------------------+--------------------------------------+
[root@openstack ~(keystone_admin)]# neutron router-gateway-set dev-router external_network
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Set gateway for router dev-router
[root@openstack ~(keystone_admin)]# 


创建私有网络并将一个子网附加到该私有网络,运行以下neutron命令。


[root@openstack ~(keystone_admin)]# neutron net-create pvt_net
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2020-11-11T08:24:45Z                 |
| description               |                                      |
| id                        | 346f678f-b422-4490-aa84-d7f0a0077a85 |
| ipv4_address_scope        |                                      |
| ipv6_address_scope        |                                      |
| is_default                | False                                |
| mtu                       | 1442                                 |
| name                      | pvt_net                              |
| port_security_enabled     | True                                 |
| project_id                | 7f6b46bbf1e04095b9c4fda1aa04eb43     |
| provider:network_type     | geneve                               |
| provider:physical_network |                                      |
| provider:segmentation_id  | 10                                   |
| qos_policy_id             |                                      |
| revision_number           | 1                                    |
| router:external           | False                                |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tags                      |                                      |
| tenant_id                 | 7f6b46bbf1e04095b9c4fda1aa04eb43     |
| updated_at                | 2020-11-11T08:24:45Z                 |
+---------------------------+--------------------------------------+
[root@openstack ~(keystone_admin)]# neutron subnet-create --name pvt_subnet pvt_net 10.20.1.0/24
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new subnet:
+-------------------+----------------------------------------------+
| Field             | Value                                        |
+-------------------+----------------------------------------------+
| allocation_pools  | {"start": "10.20.1.2", "end": "10.20.1.254"} |
| cidr              | 10.20.1.0/24                                 |
| created_at        | 2020-11-11T08:24:56Z                         |
| description       |                                              |
| dns_nameservers   |                                              |
| enable_dhcp       | True                                         |
| gateway_ip        | 10.20.1.1                                    |
| host_routes       |                                              |
| id                | db78ad37-2f10-4e7f-8e58-27042a6f52b1         |
| ip_version        | 4                                            |
| ipv6_address_mode |                                              |
| ipv6_ra_mode      |                                              |
| name              | pvt_subnet                                   |
| network_id        | 346f678f-b422-4490-aa84-d7f0a0077a85         |
| project_id        | 7f6b46bbf1e04095b9c4fda1aa04eb43             |
| revision_number   | 0                                            |
| service_types     |                                              |
| subnetpool_id     |                                              |
| tags              |                                              |
| tenant_id         | 7f6b46bbf1e04095b9c4fda1aa04eb43             |
| updated_at        | 2020-11-11T08:24:56Z                         |
+-------------------+----------------------------------------------+
[root@openstack ~(keystone_admin)]# 


使用以下neutron命令将pvt_net接口添加到路由器“ dev_router ”。


[root@openstack ~(keystone_admin)]# neutron router-interface-add dev-router  pvt_subnet
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Added interface 3a56da05-5020-4c1a-a572-f8c4bb2dbd21 to router dev-router.
[root@openstack ~(keystone_admin)]# 


下载Cirros 镜像,然后上传到OpenStack中


[root@openstack ~]# source keystonerc_admin 
[root@openstack ~(keystone_admin)]# wget http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
[root@openstack ~(keystone_admin)]# openstack image create --disk-format qcow2 --container-format bare --public --file cirros-0.5.1-x86_64-disk.img  cirros
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field            | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum         | 1d3062cd89af34e419f7100277f38b2b                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| container_format | bare                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| created_at       | 2020-11-11T08:20:01Z                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| disk_format      | qcow2                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| file             | /v2/images/87d7f055-9699-4761-be83-d6f574c42488/file                                                                                                                                                                                                                                                                                                                                                                                                                        |
| id               | 87d7f055-9699-4761-be83-d6f574c42488                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| min_disk         | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| min_ram          | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| name             | cirros                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| owner            | 7f6b46bbf1e04095b9c4fda1aa04eb43                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| properties       | os_hash_algo='sha512', os_hash_value='553d220ed58cfee7dafe003c446a9f197ab5edf8ffc09396c74187cf83873c877e7ae041cb80f3b91489acf687183adcd689b53b38e3ddd22e627e7f98a09c46', os_hidden='False', owner_specified.openstack.md5='1d3062cd89af34e419f7100277f38b2b', owner_specified.openstack.object='images/cirros', owner_specified.openstack.sha256='c4110030e2edf06db87f5b6e4efc27300977683d53f040996d15dcc0ad49bb5a', self='/v2/images/87d7f055-9699-4761-be83-d6f574c42488' |
| protected        | False                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| schema           | /v2/schemas/image                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| size             | 16338944                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| status           | active                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| tags             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| updated_at       | 2020-11-11T08:20:02Z                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| visibility       | public                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[root@openstack ~(keystone_admin)]# 



创建虚拟机之前的最后一步,更新默认安全组,添加icmp和ssh入口规则,在网络选项卡下单击“安全组”,单击“管理规则”,然后单击“添加规则”。








相关文章
|
4天前
|
监控 Linux PHP
【02】客户端服务端C语言-go语言-web端PHP语言整合内容发布-优雅草网络设备监控系统-2月12日优雅草简化Centos stream8安装zabbix7教程-本搭建教程非docker搭建教程-优雅草solution
【02】客户端服务端C语言-go语言-web端PHP语言整合内容发布-优雅草网络设备监控系统-2月12日优雅草简化Centos stream8安装zabbix7教程-本搭建教程非docker搭建教程-优雅草solution
51 20
|
1月前
|
存储 分布式计算 Hadoop
Centos7.9安装kerberos
Centos7.9安装kerberos
82 25
|
27天前
|
存储 Shell 网络安全
Centos7.9安装openldap
Centos7.9安装openldap
52 16
|
28天前
|
数据可视化 Linux 应用服务中间件
Centos7.9安装phpldapadmin
Centos7.9安装phpldapadmin
56 15
|
1月前
|
网络协议 Java 应用服务中间件
centos7环境下tomcat8的安装与配置
本文介绍了在Linux环境下安装和配置Tomcat 8的详细步骤。首先,通过无网络条件下的文件交互软件(如Xftp 6或MobaXterm)下载并解压Tomcat安装包至指定路径,启动Tomcat服务并测试访问。接着,修改Tomcat端口号以避免冲突,并部署Java Web应用项目至Tomcat服务器。最后,调整Linux防火墙规则,确保外部可以正常访问部署的应用。关键步骤包括关闭或配置防火墙、添加必要的端口规则,确保Tomcat服务稳定运行。
|
2月前
|
运维 监控 安全
CentOS 7系统 OpenSSH和OpenSSL版本升级指南
本文详细介绍如何在CentOS 7系统上升级OpenSSH和OpenSSL至最新稳定版本(OpenSSH 9.6p1和OpenSSL 1.1.1w),解决多个已知安全漏洞(如CVE-2023-51767等)。涵盖环境说明、现存漏洞、升级准备、具体步骤及故障排查,确保服务器安全。建议先在测试环境验证,再应用于生产环境。
200 7
|
3月前
|
SQL 存储 Linux
从配置源到数据库初始化一步步教你在CentOS 7.9上安装SQL Server 2019
【11月更文挑战第16天】本文介绍了在 CentOS 7.9 上安装 SQL Server 2019 的详细步骤,包括配置系统源、安装 SQL Server 2019 软件包以及数据库初始化,确保 SQL Server 正常运行。
151 4
|
3月前
|
SQL 存储 Linux
从配置源到数据库初始化一步步教你在CentOS 7.9上安装SQL Server 2019
【11月更文挑战第8天】本文介绍了在 CentOS 7.9 上安装 SQL Server 2019 的详细步骤,包括系统准备、配置安装源、安装 SQL Server 软件包、运行安装程序、初始化数据库以及配置远程连接。通过这些步骤,您可以顺利地在 CentOS 系统上部署和使用 SQL Server 2019。
167 1
|
3月前
|
SQL 存储 Linux
从配置源到数据库初始化一步步教你在CentOS 7.9上安装SQL Server 2019
【11月更文挑战第7天】本文介绍了在 CentOS 7.9 上安装 SQL Server 2019 的详细步骤,包括系统要求检查与准备、配置安装源、安装 SQL Server 2019、配置 SQL Server 以及数据库初始化(可选)。通过这些步骤,你可以成功安装并初步配置 SQL Server 2019,进行简单的数据库操作。
|
3月前
|
存储 安全 Linux
VMware安装CentOS7
【11月更文挑战第11天】本文详细介绍了在 VMware 中安装 CentOS 7 的步骤,包括准备工作、创建虚拟机、配置虚拟机硬件和安装 CentOS 7。具体步骤涵盖下载 CentOS 7 镜像文件、安装 VMware 软件、创建和配置虚拟机硬件、启动虚拟机并进行安装设置,最终完成 CentOS 7 的安装。在安装过程中,需注意合理设置磁盘分区、软件选择和网络配置,以确保系统的性能和功能满足需求。
367 0