RDO部署openstack
1 初始化环境信息
1.1 selinux设置
[root@packstack ~]# vim /etc/selinux/config SELINUX=disabled
1.2 limit设置
vim /etc/security/limits.conf
* soft nofile 204800
* hard nofile 204800
* soft nproc 204800
* hard nproc 204800
1.3 修改loacale
vim /etc/environment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
1.4 防火墙/网络管理工具
dnf install network-scripts -y
systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
2 更新dnf源文件
2.1 victoria版本安装
环境信息:centos8 4c12G 双网卡模式(ens33(mgmt) ,ens37(provider)) 安装版本:victoria
dnf config-manager --enable powertools
dnf install -y centos-release-openstack-victoria
dnf update -y
dnf install -y openstack-packstack
2.2 train版本安装
环境信息:centos7 8c16G 双网卡模式(eth0(mgmt) ,eth1(provider)) 安装版本:train
yum install -y centos-release-openstack-train
yum update -y
yum install -y openstack-packstack
3 部署含openswitch的方式
3.1 victoria版本安装
packstack --allinone --os-neutron-l2-agent=openvswitch --os-neutron-ml2-mechanism-drivers=openvswitch --os-neutron-ml2-tenant-network-types=vxlan --os-neutron-ml2-type-drivers=vxlan,flat --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:ens37
3.2 train版本安装
packstack --allinone --os-neutron-l2-agent=openvswitch --os-neutron-ml2-mechanism-drivers=openvswitch --os-neutron-ml2-tenant-network-types=vxlan --os-neutron-ml2-type-drivers=vxlan,flat --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:eth1
4 设置provider网络
查看/etc/neutron/plugins/ml2/openvswitch_agent.ini 配置
4.1 设置网络,创建提供者网络
provider-physical-network的值要和/etc/neutron/plugins/ml2/openvswitch_agent.ini 配置 保持一致
openstack network create --external --share \
--provider-physical-network extnet --provider-network-type flat \
provider
openstack subnet create --network provider --subnet-range \
192.168.125.0/24 --allocation-pool start=192.168.125.10,end=192.168.125.110 \
--dns-nameserver 114.114.114.114 --gateway 192.168.125.2 provider-v4
4.2 设置路由
neutron router-create router1 (router1 必须替换为您的路由器名称)
neutron router-gateway-set $router_uuid $vlan_uuid
[root@localhost ~(keystone_admin)]# neutron router-list
[root@localhost ~(keystone_admin)]# neutron subnet-list
neutron router-gateway-set b119ab70-c8ad-48d7-88a0-39e2c6348ba9 498b63b4-f047-4a83-b6dc-eb52ad0c2e59
5 上传镜像
下载地址:http://download.cirros-cloud.net/0.5.2/
- 将 cirros-0.5.2-x86_64-disk.img上传到部署机器
- 导入镜像
openstack image create --file cirros-0.5.2-x86_64-disk.img --disk-format qcow2 --container-format bare --public cirros
|