openstack安装

#!/bin/bash

######
vi  /etc/security/limits.conf
*         hard    nofile      600000
*         soft     nofile      600000
root    hard    nofile      600000
root    soft     nofile      600000
########
setenforce 0
#hostnamectl set-hostname "openstack.example.com"
#vi /etc/sysconfig/selinux set SELINUX=permissive
systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager.service 
systemctl stop NetworkManager
systemctl enable network
systemctl start network

echo 'centos' >/etc/yum/vars/contentdir
yum -y install yum-utils wget openstack-selinux 
yum -y update
yum -y install centos-release-openstack-queens
yum -y update
yum -y install openstack-packstack

# RDO install
packstack --allinone --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ml2-type-drivers=vxlan,flat

##
## Modify /etc/sysconfig/network-script/ifcfg-br-ex
## means make br-ex switch to the Flat mode network interface.
##
#DEVICE=br-ex
#DEVICETYPE=ovs
#TYPE=OVSBridge
#BOOTPROTO=static
#IPADDR=192.168.122.212 # Old eth0 IP since we want the network restart to not 
                       # kill the connection, otherwise pick something outside your dhcp range
#NETMASK=255.255.255.0  # your netmask
#GATEWAY=192.168.122.1  # your gateway
#DNS1=192.168.122.1     # your nameserver
#ONBOOT=yes

## 
## Modify ifcfg-eno1 
## means set eno1 bridge the br-ex ovs
##
#DEVICE=eno1
#TYPE=OVSPort
#DEVICETYPE=ovs
#OVS_BRIDGE=br-ex
#ONBOOT=yes

##
## Restart network
##
# service network restart

##
## Create externel network with Neutron
##
# . keystonerc_admin
# neutron net-create external_network --provider:network_type flat --provider:physical_network extnet  --router:external


##
## Create subnet for external network
##
# neutron subnet-create --name public_subnet --enable_dhcp=False --allocation-pool=start=192.168.122.10,end=192.168.122.20 --gateway=192.168.122.1 external_network 192.168.122.0/24


##
## Create new Project => User
## 
# Login web to create new project and user.

##
## Create tanent Router to connect external 
##  External_net <= router1
## Login web to do this
## 
# neutron router-create router1
# neutron router-gateway-set router1 external_network


##
## Creat tanent private network -> private subnet, it will be DHCPed to each instanace
## Login web to do this
##
# neutron net-create private_network
# neutron subnet-create --name private_subnet private_network 192.168.100.0/24

##
## Connect the router1 with private subnet
##
# Login web to do this

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值