kient88 发表于 2017-6-26 16:18:07

openstack前期准备

1. 两台虚拟机,安装Centos7系统
两个网卡 -- 一个NAT模式,一个仅主机模式
两个硬盘 -- 一个20GB,一个50GB
内存 -- 主 2.6GB(根据自己的配置,大于2G即可)
从 1.6 GB
2. 配置网络 (参照博文 ”Centos7 配置网络)
3. 关闭 selinux ,关闭iptables(两台机器都要操作)
//在Centos7 ,firewalld就是iptables

# setenforce 0
# vi /etc/selinux/config
# systemctl stop firewalld
# systemctl disable firewalld
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
4. 关闭NetworkManager(两台机器都要操作)
# systemctl stop NetworkManager
# systemctl disable NetworkManager
rm '/etc/systemd/system/multi-user.target.wants/NetworkManager.service'
rm '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'
rm '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service'



/* 定义密码 */
/* 在部署openstack过程 ,会有很多地方使用到密码 。
为了方便管理和安全,可以先定义好密码 ,利用mkpasswd生成随机字符串 */
(两台机器都安装)
# yum install -y expect
# mkpasswd -s 0      //生成随机字符串
/* 范本 */
Database password (no variable used)    Root password for the database   tn1Pi6Ytm
ADMIN_PASS    Password of user admin    3qiVpzU2x
CEILOMETER_DBPASS    Database password for the Telemetry serviceCzn3bF1hm
CEILOMETER_PASS    Password of Telemetry service user ceilometerabquh12GU
CINDER_DBPASS    Database password for the Block Storage service O3bwbpoZ3
CINDER_PASS    Password of Block Storage service user cinderhf8LX9bow
DASH_DBPASS    Database password for the dashboard5qBZxnn1g
DEMO_PASS    Password of user demo   9TtbgaA1q
GLANCE_DBPASS    Database password for Image serviceZznky4tP0
GLANCE_PASS    Password of Image service user glance   Wuyaf4cV6
HEAT_DBPASS    Database password for the Orchestration serviceb7Fk5wjLg
HEAT_DOMAIN_PASS    Password of Orchestration domain7Gotb3eoH
HEAT_PASS    Password of Orchestration service user heateqQ2jLgz0
KEYSTONE_DBPASS    Database password of Identity servicef6zx0gURv
NEUTRON_DBPASS    Database password for the Networking service   quidyOC50
NEUTRON_PASS    Password of Networking service user neutronmdcGVl29i
NOVA_DBPASS    Database password for Compute service RYgv0rg7p
NOVA_PASS    Password of Compute service user novahsSNsqc43
RABBIT_PASS    Password of user guest of RabbitMQo3NXovnz5
SWIFT_PASS    Password of Object Storage service user swift6ci5xWOdk
METADATA_SECRET      m8uhmQTu2



/* 设置主机名 */
1.两台机器,设置hostname
//方法
--〉1. hostname + 主机名
--〉2. vi /etc/hostname 让其永久生效
2. 编辑/etc/hosts
192.168.216.120 master
192.168.216.126 slave
/* 配置完后,
可以ping 一下hostname 看是否通 */



/* 同步时间 */
//master
# yum install -y chrony
# vi /etc/chrony.conf
//add or change
allow 192.168.216.0/24    //ip网段
# systemctl enable chronyd.service
# systemctl start chronyd.service
# ps aux|grep chronyd
chrony   101400.20.0985521300 ?      S    15:07   0:00 /usr/sbin/chron                     yd
root   101480.00.0 112656   996 pts/0    S+   15:07   0:00 grep --color=au                     to chronyd

//slave
# yum install -y chrony
# vi /etc/chrony.conf
//add or change,其他的解释掉
server master iburst   //master为主名
# systemctl enable chronyd.service
# systemctl start chronyd.service
# ps aux|grep chronyd
chrony   106390.10.0985521296 ?      S    15:09   0:00 /usr/sbin/chron                     yd
root   106490.00.0 112656   996 pts/0    S+   15:09   0:00 grep --color=au                     to chronyd
页: [1]
查看完整版本: openstack前期准备