搭建OpenStack

systemctl stop firewalld.service && systemctl disable firewalld.service && iptables -F &&setenforce 0

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

setenforce 0

hostnamectl set-hostname controller

bash
systemctl stop firewalld.service && systemctl disable firewalld.service && iptables -F &&setenforce 0

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

setenforce 0

hostnamectl set-hostname compute

bash
cat>> /etc/hosts<<eof
192.168.10.10   controller
192.168.10.20   compute
eof

scp /etc/hosts compute:/etc/hosts
mkdir /opt/{iaas,centos}

cat>> /etc/fstab<<eof
/dev/cdrom					           /opt/centos     iso9660         defaults        0 0
/opt/XianDian-IaaS-v2.2.iso             /opt/iaas       iso9660         defaults        0 0
eof

mount -a 
rm -rf /etc/yum.repos.d/CentOS-*
cat>> /etc/yum.repos.d/local.repo<<eof
[Base]
name = Base
baseurl = file:///opt/centos
enable = 1
gpgcheck = 0
[Iaas]
name = Iaas
baseurl = file:///opt/iaas/iaas-repo
enable = 1
gpgcheck = 0
eof
yum install vsftpd vim iaas-xiandian -y
cat >>/etc/vsftpd/vsftpd.conf<<eof
anon_root=/opt
eof

systemctl restart vsftpd && systemctl enable vsftpd
rm -rf /etc/yum.repos.d/CentOS-*
cat>> /etc/yum.repos.d/local.repo<<eof
[Base]
name = Base
baseurl = ftp://controller/centos
enable = 1
gpgcheck = 0
[Iaas]
name = Iaas
baseurl = ftp://controller/iaas/iaas-repo
enable  =1
gpgcheck = 0
eof

yum install vim iaas-xiandian -y
sed -i s/.// /etc/xiandian/openrc.sh
#--------------------system Config--------------------##
#Controller Server Manager IP. example:x.x.x.x
HOST_IP=192.168.10.10

#Controller Server hostname. example:controller
HOST_NAME=controller

#Compute Node Manager IP. example:x.x.x.x
HOST_IP_NODE=192.168.10.20

#Compute Node hostname. example:compute
HOST_NAME_NODE=compute

#--------------------Rabbit Config ------------------##
#user for rabbit. example:openstack
RABBIT_USER=openstack

#Password for rabbit user .example:000000
RABBIT_PASS=000000

#--------------------MySQL Config---------------------##
#Password for MySQL root user . exmaple:000000
DB_PASS=000000

#--------------------Keystone Config------------------##
#Password for Keystore admin user. exmaple:000000
DOMAIN_NAME=demo
ADMIN_PASS=000000
DEMO_PASS=000000

#Password for Mysql keystore user. exmaple:000000
KEYSTONE_DBPASS=000000

#--------------------Glance Config--------------------##
#Password for Mysql glance user. exmaple:000000
GLANCE_DBPASS=000000

#Password for Keystore glance user. exmaple:000000
GLANCE_PASS=000000

#--------------------Nova Config----------------------##
#Password for Mysql nova user. exmaple:000000
NOVA_DBPASS=000000

#Password for Keystore nova user. exmaple:000000
NOVA_PASS=000000

#--------------------Neturon Config-------------------##
#Password for Mysql neutron user. exmaple:000000
NEUTRON_DBPASS=000000

#Password for Keystore neutron user. exmaple:000000
NEUTRON_PASS=000000

#metadata secret for neutron. exmaple:000000
METADATA_SECRET=000000

#External Network Interface. example:eth1
INTERFACE_NAME=eth1

#First Vlan ID in VLAN RANGE for VLAN Network. exmaple:101
minvlan=

#Last Vlan ID in VLAN RANGE for VLAN Network. example:200
maxvlan=

#--------------------Cinder Config--------------------##
#Password for Mysql cinder user. exmaple:000000
CINDER_DBPASS=000000

#Password for Keystore cinder user. exmaple:000000
CINDER_PASS=000000

#Cinder Block Disk. example:md126p3
BLOCK_DISK=sdb

#--------------------Trove Config--------------------##
#Password for Mysql Trove User. exmaple:000000
TROVE_DBPASS=000000

#Password for Keystore Trove User. exmaple:000000
TROVE_PASS=000000

#--------------------Swift Config---------------------##
#Password for Keystore swift user. exmaple:000000
SWIFT_PASS=000000

#The NODE Object Disk for Swift. example:md126p4.
OBJECT_DISK=

#The NODE IP for Swift Storage Network. example:x.x.x.x.
STORAGE_LOCAL_NET_IP=192.168.10.20

#--------------------Heat Config----------------------##
#Password for Mysql heat user. exmaple:000000
HEAT_DBPASS=000000

#Password for Keystore heat user. exmaple:000000
HEAT_PASS=000000

#--------------------Ceilometer Config----------------##
#Password for Mysql ceilometer user. exmaple:000000
CEILOMETER_DBPASS=000000

#Password for Keystore ceilometer user. exmaple:000000
CEILOMETER_PASS=000000

#--------------------AODH Config----------------##
#Password for Mysql AODH user. exmaple:000000
AODH_DBPASS=000000

#Password for Keystore AODH user. exmaple:000000
AODH_PASS=000000

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

殇彧

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值