1. Environment
prepare in advance
1. install the operating system CentOS7, note left partition portion installed blank
2. questions require computing node and a control node arranged hostname
# hostnamectl set-hostname controller
3. dividing partition
#compute节点
[root@compute] # parted /dev/md126
(parted) mkpart swift 500G 600G //创建swift分区,从500G到600G
[root@compute] # mkfs.xfs /dev/md126p5 //格式化分区
4. Configure NIC
# Title two general requirements for the card
controller & compute two nodes need to be the operation
控制节点
网卡1 :192.168.100.10
网卡2 :192.168.200.10
计算节点
网卡1 :192.168.100.20
网卡2 :192.168.200.20
Modify the network card configuration file
vi /etc/sysconfig/network-scripts/ifcfg-eth0
修改以下参数
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.100.10
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
vi /etc/sysconfig/network-scripts/ifcfg-eth1
修改以下参数
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.200.10
NETMASK=255.255.255.0
第二张网卡(一定不能配置网关)
5. Configure the local source yum
- Image file uploading provided, mount (only needs to be done in the controller node)
#挂载CentOS系统iso文件 [root@controller ~]# mkdir /opt/{centos,iaas} //创建挂载点文件夹 [root@controller ~]# mount CentOS-7-x86_64-DVD-1511.iso /opt/centos [root@controller ~]# mount XianDian-IaaS-v2.1.iso /opt/iaas df -hT 查看挂载状态
- Modify yum source configuration
#控制节点的文件内容 [centos] name=centos baseurl=file:///opt/centos gpgcheck=0 enabled=1 [iaas] name=iaas baseurl=file:///opt/iaas-repo gpgcheck=0 enabled=1
# Compute nodes file content
[CentOS]
name = CentOS
BaseURL = FTP: //192.168.100.10/centos
gpgcheck = 0
Enabled =. 1
[IaaS]
name = IaaS
BaseURL = FTP: //192.168.100.10/iaas-repo
gpgcheck = 0
Enabled. 1 =
- 执行以下命令
```bash
#yum clean all
#yum update
6.controller node installation ftp
[root@controller ~]# yum install vsftpd –y
#在controller节点搭建ftp服务器,并把opt目录作为ftp目录的共享根目录(修改ftp配置文件)
[root@controller ~]# vi /etc/vsftpd/vsftpd.conf
#任意位置添加anon_root=/opt/
[root@controller ~]# systemctl start vsftpd
[root@controller ~]# systemctl enable vsftpd
#重启ftp并加入开机自启
7. Close the firewall (perform all nodes)
systemctl stop firewalld
systemctl disable firewalld
8. All nodes installed scripts package to provide electricity
yum install iaas-xiandian -y
we /etc/xiandian/openrc.sh
HOST_IP=192.168.100.10
HOST_NAME=controller
HOST_IP_NODE=192.168.100.20
HOST_NAME_NODE=compute
RABBIT_USER=openstack
RABBIT_PASS=000000
DB_PASS=000000
DOMAIN_NAME=demo(按题目要求写)
ADMIN_PASS=000000
DEMO_PASS=000000
KEYSTONE_DBPASS=000000
GLANCE_DBPASS=000000
GLANCE_PASS=000000
NOVA_DBPASS=000000
NOVA_PASS=000000
NEUTRON_DBPASS=000000
NEUTRON_PASS=000000
METADATA_SECRET=000000
INTERFACE_NAME=eth1(外网网卡名)
CINDER_DBPASS=000000
CINDER_PASS=000000
TROVE_DBPASS=000000
TROVE_PASS=000000
BLOCK_DISK=md126p4(空白分区名)
SWIFT_PASS=000000
OBJECT_DISK=md126p5(空白分区名)
STORAGE_LOCAL_NET_IP=192.168.100.20
HEAT_DBPASS=000000
HEAT_PASS=000000
CEILOMETER_DBPASS=000000
CEILOMETER_PASS=000000
AODH_DBPASS=000000
AODH_PASS=000000
9. All nodes perform pre-deployment script
iaas-pre-host.sh
10. Modify ntp time synchronization configuration
controller node
delete the default server configuration, add the following configuration
server 127.127.1.0
fudge 127.127.1.0 stratum 10
- controller node restart ntp service and add the boot from Kai
[root@controller ~]# systemctl start ntpd
[root@controller ~]# systemctl enable ntpd
- compute nodes execute the following command
[root@compute ~]# ntpdate controller
11. Restart all nodes in the server
#reboot
Installation Components openstack
1.controller node install mysql
[root@controller ~]# iaas-install-mysql.sh
2.controller node installation keystone Certification Services
[root@controller ~]# iaas-install-keystone.sh
3.controller mirror service node installation glance
[root@controller ~]# iaas-install-glance.sh
4. upload image (this step can be completed at a later Dashboard installation, web pages operation)
#加载配置文件
[root@controller ~]# source /etc/keystone/admin-openrc.sh
#创建镜像
[root@controller ~]# glance image-create --name "CentOS7.0" --disk-format qcow2 --container-format bare --progress < /opt/images/centos_7-x86_64_xiandian.qcow2
5. All nodes installed computing services Nova
#controller
[root@controller ~]# iaas-install-nova-controller.sh
#compute
[root@compute ~]# iaas-install-nova-compute.sh
6. All nodes installed neutron Network Services
#controller
[root@controller ~]# iaas-install-neutron-controller.sh
#compute
[root@compute ~]# iaas-install-neutron-compute.sh
The questions asked to select a specific network to install
#我们以gre网络为例,其余只需要执行对应脚本即可
#controller
[root@controller ~]# iaas-install-neutron-controller-gre.sh
#compute
[root@compute ~]# iaas-install-neutron-compute-gre.sh
8.controller node installation Dashboard Control Panel Services
[root@controller ~]# iaas-install-dashboard.sh
9. browser access controller node ip, login
- Create a network and cloud hosting, you can fill in the relevant parameters by subject
(1) Create a network administrator → Network → (ext-net) → create subnets (EXT-Subnet)
(2) Project → New → Network → routing routing Add → gateway and network adapter
(3) to calculate the project → → → access security management rules → Add rules (ICMP, TCP, UDP)
(4) to calculate the project → → → cloud hosting cloud hosting to create a floating IP bindings →