openstack前期准备

Posted Frankiee

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstack前期准备相关的知识,希望对你有一定的参考价值。

1. 两台虚拟机,安装Centos7系统
    两个网卡 -- 一个NAT模式,一个仅主机模式
    两个硬盘 -- 一个20GB,一个50GB
    内存 -- 主 2.6GB(根据自己的配置,大于2G即可)

                从 1.6 GB

2. 配置网络 (参照博文 ”Centos7 配置网络)

3. 关闭 selinux ,关闭iptables(两台机器都要操作)
//在Centos7 ,firewalld就是iptables

[[email protected] ~]# setenforce 0
[[email protected] ~]# vi /etc/selinux/config
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# systemctl disable firewalld
rm /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service
rm /etc/systemd/system/basic.target.wants/firewalld.service

4. 关闭NetworkManager(两台机器都要操作)

[[email protected] ~]# systemctl stop NetworkManager
[[email protected] ~]# 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生成随机字符串 */

(两台机器都安装)
[[email protected] ~]# yum install -y expect
[[email protected] ~]# 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 service  Czn3bF1hm
CEILOMETER_PASS    Password of Telemetry service user ceilometer  abquh12GU 
CINDER_DBPASS    Database password for the Block Storage service O3bwbpoZ3
CINDER_PASS    Password of Block Storage service user cinder  hf8LX9bow
DASH_DBPASS    Database password for the dashboard  5qBZxnn1g
DEMO_PASS    Password of user demo   9TtbgaA1q
GLANCE_DBPASS    Database password for Image service  Zznky4tP0
GLANCE_PASS    Password of Image service user glance   Wuyaf4cV6
HEAT_DBPASS    Database password for the Orchestration service  b7Fk5wjLg
HEAT_DOMAIN_PASS    Password of Orchestration domain  7Gotb3eoH
HEAT_PASS    Password of Orchestration service user heat  eqQ2jLgz0
KEYSTONE_DBPASS    Database password of Identity service  f6zx0gURv
NEUTRON_DBPASS    Database password for the Networking service   quidyOC50
NEUTRON_PASS    Password of Networking service user neutron  mdcGVl29i
NOVA_DBPASS    Database password for Compute service RYgv0rg7p
NOVA_PASS    Password of Compute service user nova  hsSNsqc43
RABBIT_PASS    Password of user guest of RabbitMQ  o3NXovnz5
SWIFT_PASS    Password of Object Storage service user swift  6ci5xWOdk
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
[[email protected] ~]# yum install -y chrony
[[email protected] ~]# vi /etc/chrony.conf
//add or change
allow 192.168.216.0/24    //ip网段
[[email protected] ~]# systemctl enable chronyd.service
[[email protected] ~]# systemctl start chronyd.service
[[email protected] ~]# ps aux|grep chronyd
chrony   10140  0.2  0.0  98552  1300 ?        S    15:07   0:00 /usr/sbin/chron                       yd
root     10148  0.0  0.0 112656   996 pts/0    S+   15:07   0:00 grep --color=au                       to chronyd



//slave
[[email protected] ~]# yum install -y chrony
[[email protected] ~]# vi /etc/chrony.conf
//add or change,其他的解释掉
server master iburst     //master为主名
[[email protected] ~]# systemctl enable chronyd.service
[[email protected] ~]# systemctl start chronyd.service
[[email protected] ~]# ps aux|grep chronyd
chrony   10639  0.1  0.0  98552  1296 ?        S    15:09   0:00 /usr/sbin/chron                       yd
root     10649  0.0  0.0 112656   996 pts/0    S+   15:09   0:00 grep --color=au                       to chronyd

 

以上是关于openstack前期准备的主要内容,如果未能解决你的问题,请参考以下文章

关于Cloud Computing IaaS 架构前期准备

Ubuntu系统上双节点部署OpenStack

6.24(openstack前期部署)

openstack-mitaka之块存储块存储节点安装

云计算HCIP实验-OpenStack搭建

云计算HCIP实验-OpenStack搭建