使用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入口规则,在网络选项卡下单击“安全组”,单击“管理规则”,然后单击“添加规则”。








相关文章
|
17天前
|
应用服务中间件 Linux 网络安全
CentOS 7.4源码编译nginx1.12 并且隐藏nginx的版本
CentOS 7.4源码编译nginx1.12 并且隐藏nginx的版本
15 0
|
3天前
|
Linux
centos 6.5安装yum
centos 6.5安装yum
22 0
|
3天前
|
运维 网络协议 Linux
【运维系列】Centos7安装并配置PXE服务
PXE是Intel开发的预启动执行环境,允许工作站通过网络从远程服务器启动操作系统。它依赖DHCP分配IP,DNS服务分配主机名,TFTP提供引导程序,HTTP/FTP/NFS提供安装源。要部署PXE服务器,需关闭selinux和防火墙,安装dhcpd、httpd、tftp、xinetd及相关服务,配置引导文件和Centos7安装源。最后,通过syslinux安装引导文件,并创建pxelinux.cfg/default配置文件来定义启动参数。
15 0
|
3天前
|
运维 网络协议 Linux
【运维系列】Centos7安装并配置postfix服务
安装CentOS7的Postfix和Dovecot,配置Postfix的`main.cf`文件,包括修改完全域名、允许所有IP、启用邮箱等。然后,配置Dovecot的多个配置文件以启用auth服务和调整相关设置。重启Postfix和Dovecot,设置开机自启,并关闭防火墙进行测试。最后,创建邮箱账户并在Windows邮箱客户端中添加账户设置。
10 0
|
3天前
|
Linux 网络安全
Centos6.5安装并配置NFS服务
该内容描述了在Linux系统中设置NFS服务的步骤。首先挂载yum源,然后安装NFS服务,并编辑配置文件。接着,重启rpcbind和NFS服务,可能需要重复此过程以解决初始可能出现的问题。此外,关闭防火墙策略,并再次重启服务。最终,根目录被共享,特定IP网段被允许访问。
10 0
|
4天前
|
存储 Linux 网络安全
centos7使用yum网络安装
这些是使用Yum进行网络安装的基本步骤。根据你的需求,你可以重复步骤3和4来安装其他软件包。请注意,执行Yum操作需要root或具有sudo权限的用户。
16 1
|
10天前
|
关系型数据库 MySQL Linux
centos7安装mysql-带网盘安装包
centos7安装mysql-带网盘安装包
61 2
|
17天前
|
Linux
centos 查看服务器信息 版本cpu
centos 查看服务器信息 版本cpu
12 0
|
17天前
|
存储 Linux Shell
centos 部署docker容器 安装 、基本使用方法(一)
centos 部署docker容器 安装 、基本使用方法(一)
32 0
|
17天前
|
分布式计算 Hadoop Java
centos 部署Hadoop-3.0-高性能集群(一)安装
centos 部署Hadoop-3.0-高性能集群(一)安装
17 0