安装先电OPENSTACK

一、安装环境准备

1、CentOS-7-x86_64-DVD-1511.iso

2、XianDian-IaaS-v2.2.iso

二、虚拟机安装

1、安装controller

(安装过程也踩了很多坑,其中也向王大佬请教了很多问题,在此衷心感谢。ip地址可以根据自己的习惯设置,我的是由于之前安装hadoop分配到102,这里为了方便记就从103开始)
(1)文件下面选择:新建虚拟机按照下图所示创建

国内 openstack 白金会员名单 openstack 2021_centos

(2)下一步

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_02

(3)选择合适版本

国内 openstack 白金会员名单 openstack 2021_大数据_03

(4)设置名称和位置

国内 openstack 白金会员名单 openstack 2021_大数据_04

(5)根据电脑选择

国内 openstack 白金会员名单 openstack 2021_centos_05

(6)我这里分配了5G

国内 openstack 白金会员名单 openstack 2021_centos_06

(7)下一步
由于校园网分配Ip可能不一样,我这里是设置了一台NAT一台主机,注意顺序,后面配置过程有网卡分区,要记住自己的

国内 openstack 白金会员名单 openstack 2021_大数据_07

(8)默认

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_08

国内 openstack 白金会员名单 openstack 2021_centos_09


国内 openstack 白金会员名单 openstack 2021_云计算_10

国内 openstack 白金会员名单 openstack 2021_大数据_11

国内 openstack 白金会员名单 openstack 2021_云计算_12


国内 openstack 白金会员名单 openstack 2021_centos_13

(9)注意选择虚拟化引擎项

国内 openstack 白金会员名单 openstack 2021_centos_14

(10)两个CD第一个选择Centos,第二个选择XianDian

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_15


国内 openstack 白金会员名单 openstack 2021_IPV6_16

国内 openstack 白金会员名单 openstack 2021_centos_17

国内 openstack 白金会员名单 openstack 2021_大数据_18

(11)启动虚拟机

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_19

稍等一会就好了~~~~

国内 openstack 白金会员名单 openstack 2021_centos_20

(12)设置语言为英语

国内 openstack 白金会员名单 openstack 2021_centos_21

(13)选择时区上海
(14)该项选择disable,关闭dump

国内 openstack 白金会员名单 openstack 2021_centos_22

(15)DESTINATION项进去选择第一块硬盘

国内 openstack 白金会员名单 openstack 2021_云计算_23

(16)选择我要配置分区,之后Done

国内 openstack 白金会员名单 openstack 2021_大数据_24

(17)选择自动分配分区,由于开始设置了60G,这里我选择将home删除,将余下得全部分配给/

国内 openstack 白金会员名单 openstack 2021_centos_25


国内 openstack 白金会员名单 openstack 2021_centos_26

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_27

(18)配置网络
第一块的网卡和第二块需要注意,对应到后面配置文件,一定要看好!!!

国内 openstack 白金会员名单 openstack 2021_IPV6_28

根据自己情况配置

国内 openstack 白金会员名单 openstack 2021_云计算_29


国内 openstack 白金会员名单 openstack 2021_大数据_30

第二块

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_31


国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_32

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_33

到此controller安装完毕

2、安装compute

(1)前面部分和controller一样,详细见上面部分
(2)compute有三个磁盘均分配50G,两个CD/DVD和两个网络

国内 openstack 白金会员名单 openstack 2021_centos_34

CD/DVD一个也OK

国内 openstack 白金会员名单 openstack 2021_云计算_35

国内 openstack 白金会员名单 openstack 2021_centos_36


国内 openstack 白金会员名单 openstack 2021_IPV6_37


国内 openstack 白金会员名单 openstack 2021_IPV6_38

(3)选择第一个磁盘进行自动分配

国内 openstack 白金会员名单 openstack 2021_大数据_39


国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_40


国内 openstack 白金会员名单 openstack 2021_IPV6_41


国内 openstack 白金会员名单 openstack 2021_云计算_42

(4)配置网络

国内 openstack 白金会员名单 openstack 2021_centos_43


国内 openstack 白金会员名单 openstack 2021_云计算_44


国内 openstack 白金会员名单 openstack 2021_大数据_45


国内 openstack 白金会员名单 openstack 2021_大数据_46


国内 openstack 白金会员名单 openstack 2021_centos_47

三、环境准备

1、配置controller的网络环境

(1)代码部分
[root@controller ~]# mkdir repo
mkdir: cannot create directory ‘repo’: File exists
[root@controller ~]# rmdir repo
[root@controller ~]# mkdir repo
[root@controller ~]# cd /etc/sysconfig/network-scripts/
[root@controller network-scripts]# ll
[root@controller network-scripts]# vi ifcfg-eno16777736 

TYPE="Ethernet"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno16777736"
UUID="d69efd99-2f19-457e-8bfc-139bf23d5b9c"
DEVICE="eno16777736"
ONBOOT="yes"
IPADDR="192.168.1.103"
PREFIX="24"
GATEWAY="192.168.1.2"
DNS1="114.114.114.114"
DNS2="192.168.1.2"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_PRIVACY="no"

[root@controller network-scripts]# vi ifcfg-eno33554960 

TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eno33554960
UUID=b2890c42-6766-4d91-9a29-8fd0b6a65dbb
DEVICE=eno33554960
ONBOOT=yes
IPADDR=192.168.100.103
PREFIX=24
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no
~                                                            
[root@controller ~]# cp /etc/sysconfig/network-scripts/ifcfg-eno* /root/repo
[root@controller ~]# ls repo
ifcfg-eno1  ifcfg-eno16777736  ifcfg-eno33554960
[root@controller ~]# 


[root@controller ~]# ip a
[root@controller ~]# ping www.baidu.com
[root@controller ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.103  controller
192.168.1.104  compute


[root@controller ~]# ping controller
PING controller (192.168.1.103) 56(84) bytes of data.
64 bytes from controller (192.168.1.103): icmp_seq=1 ttl=64 time=0.028 ms
64 bytes from controller (192.168.1.103): icmp_seq=2 ttl=64 time=0.059 ms
64 bytes from controller (192.168.1.103): icmp_seq=3 ttl=64 time=0.047 ms
64 bytes from controller (192.168.1.103): icmp_seq=4 ttl=64 time=0.092 ms
^C
--- controller ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.028/0.056/0.092/0.024 ms
[root@controller ~]# reboot


[root@controller ~]# iptables -F
[root@controller ~]# iptables -X
[root@controller ~]# iptables -Z
[root@controller ~]# iptables-save

# Generated by iptables-save v1.4.21 on Tue Apr 13 14:58:55 2021
*nat
:PREROUTING ACCEPT [1:52]
:INPUT ACCEPT [1:52]
:OUTPUT ACCEPT [1:70]
:POSTROUTING ACCEPT [1:70]
:OUTPUT_direct - [0:0]
:POSTROUTING_ZONES - [0:0]
:POSTROUTING_ZONES_SOURCE - [0:0]
:POSTROUTING_direct - [0:0]
:POST_public - [0:0]
:POST_public_allow - [0:0]
:POST_public_deny - [0:0]
:POST_public_log - [0:0]
:PREROUTING_ZONES - [0:0]
:PREROUTING_ZONES_SOURCE - [0:0]
:PREROUTING_direct - [0:0]
:PRE_public - [0:0]
:PRE_public_allow - [0:0]
:PRE_public_deny - [0:0]
:PRE_public_log - [0:0]
-A PREROUTING -j PREROUTING_direct
-A PREROUTING -j PREROUTING_ZONES_SOURCE
-A PREROUTING -j PREROUTING_ZONES
-A OUTPUT -j OUTPUT_direct
-A POSTROUTING -j POSTROUTING_direct
-A POSTROUTING -j POSTROUTING_ZONES_SOURCE
-A POSTROUTING -j POSTROUTING_ZONES
-A POSTROUTING_ZONES -o eno33554960 -g POST_public
-A POSTROUTING_ZONES -o eno16777736 -g POST_public
-A POSTROUTING_ZONES -g POST_public
-A POST_public -j POST_public_log
-A POST_public -j POST_public_deny
-A POST_public -j POST_public_allow
-A PREROUTING_ZONES -i eno33554960 -g PRE_public
-A PREROUTING_ZONES -i eno16777736 -g PRE_public
-A PREROUTING_ZONES -g PRE_public
-A PRE_public -j PRE_public_log
-A PRE_public -j PRE_public_deny
-A PRE_public -j PRE_public_allow
COMMIT
# Completed on Tue Apr 13 14:58:55 2021
# Generated by iptables-save v1.4.21 on Tue Apr 13 14:58:55 2021
*mangle
:PREROUTING ACCEPT [77:6923]
:INPUT ACCEPT [77:6923]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [55:6489]
:POSTROUTING ACCEPT [55:6489]
:FORWARD_direct - [0:0]
:INPUT_direct - [0:0]
:OUTPUT_direct - [0:0]
:POSTROUTING_direct - [0:0]
:PREROUTING_ZONES - [0:0]
:PREROUTING_ZONES_SOURCE - [0:0]
:PREROUTING_direct - [0:0]
:PRE_public - [0:0]
:PRE_public_allow - [0:0]
:PRE_public_deny - [0:0]
:PRE_public_log - [0:0]
-A PREROUTING -j PREROUTING_direct
-A PREROUTING -j PREROUTING_ZONES_SOURCE
-A PREROUTING -j PREROUTING_ZONES
-A INPUT -j INPUT_direct
-A FORWARD -j FORWARD_direct
-A OUTPUT -j OUTPUT_direct
-A POSTROUTING -j POSTROUTING_direct
-A PREROUTING_ZONES -i eno33554960 -g PRE_public
-A PREROUTING_ZONES -i eno16777736 -g PRE_public
-A PREROUTING_ZONES -g PRE_public
-A PRE_public -j PRE_public_log
-A PRE_public -j PRE_public_deny
-A PRE_public -j PRE_public_allow
COMMIT
# Completed on Tue Apr 13 14:58:55 2021
# Generated by iptables-save v1.4.21 on Tue Apr 13 14:58:55 2021
*security
:INPUT ACCEPT [77:6923]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [55:6489]
:FORWARD_direct - [0:0]
:INPUT_direct - [0:0]
:OUTPUT_direct - [0:0]
-A INPUT -j INPUT_direct
-A FORWARD -j FORWARD_direct
-A OUTPUT -j OUTPUT_direct
COMMIT
# Completed on Tue Apr 13 14:58:55 2021
# Generated by iptables-save v1.4.21 on Tue Apr 13 14:58:55 2021
*raw
:PREROUTING ACCEPT [77:6923]
:OUTPUT ACCEPT [55:6489]
:OUTPUT_direct - [0:0]
:PREROUTING_direct - [0:0]
-A PREROUTING -j PREROUTING_direct
-A OUTPUT -j OUTPUT_direct
COMMIT
# Completed on Tue Apr 13 14:58:55 2021
# Generated by iptables-save v1.4.21 on Tue Apr 13 14:58:55 2021
*filter
:INPUT ACCEPT [24:1400]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [13:1084]
COMMIT
# Completed on Tue Apr 13 14:58:55 2021



[root@controller ~]# systemctl stop firewalld
[root@controller ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@controller ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Apr 13 14:57:09 controller systemd[1]: Starting firewalld - dynamic firewall daemon...
Apr 13 14:57:10 controller systemd[1]: Started firewalld - dynamic firewall daemon.
Apr 13 15:03:03 controller systemd[1]: Stopping firewalld - dynamic firewall daemon...
Apr 13 15:03:04 controller systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@controller ~]# 

[root@controller ~]# vi /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@controller ~]# reboot

[root@controller ~]# getenforce
Permissive
[root@controller ~]# yum install -y vsftpd
[root@controller ~]# vi /etc/vsftpd/vsftpd.conf
# Make sure, that one of the listen options is commented !!
listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
anon_root=/opt   #将根目录/opt座位缺省

[root@controller ~]# mkdir /opt/centos /opt/iaas /opt/mydr
[root@controller ~]# systemctl restart vsftpd
[root@controller ~]# systemctl enable vsftpd
Created symlink from /etc/systemd/system/multi-user.target.wants/vsftpd.service to /usr/lib/systemd/system/vsftpd.service.


[root@controller ~]# mount /dev/sr0 /opt/centos
mount: /dev/sr0 is write-protected, mounting read-only
[root@controller ~]# mount /dev/sr1 /opt/iaas
mount: /dev/sr1 is write-protected, mounting read-only
[root@controller ~]# vi /etc/fstab

#
# /etc/fstab
# Created by anaconda on Tue Apr 13 11:30:42 2021
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=e90c662d-bb17-4d9f-9269-9bb595312fb6 /boot                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0
/dev/sr0              /opt/centos        iso9660  defaults       0           0
/dev/sr1              /opt/iaas          iso9660  defaults       0           0
(2)过程记录
网络配置

国内 openstack 白金会员名单 openstack 2021_centos_48

修改如下

国内 openstack 白金会员名单 openstack 2021_IPV6_49

static,yes项

国内 openstack 白金会员名单 openstack 2021_centos_50


国内 openstack 白金会员名单 openstack 2021_云计算_51

检查下

国内 openstack 白金会员名单 openstack 2021_centos_52


国内 openstack 白金会员名单 openstack 2021_云计算_53

配置域名解析如下

国内 openstack 白金会员名单 openstack 2021_centos_54

ping下外网百度

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_55

controller

国内 openstack 白金会员名单 openstack 2021_云计算_56


国内 openstack 白金会员名单 openstack 2021_IPV6_57

防火墙关闭

国内 openstack 白金会员名单 openstack 2021_云计算_58

配置selinux

国内 openstack 白金会员名单 openstack 2021_IPV6_59


国内 openstack 白金会员名单 openstack 2021_云计算_60

安装vsftpd

国内 openstack 白金会员名单 openstack 2021_云计算_61

过程记录

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_62

搭建ftp服务器,开启设置自启动,添加匿名访问目录

国内 openstack 白金会员名单 openstack 2021_IPV6_63

资源管理器里面查看光驱挂载,浏览器查看不了的话去我的电脑windows资源管理器下查看

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_64

挂载iso文件

国内 openstack 白金会员名单 openstack 2021_大数据_65


国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_66

查看centos和iaas的索引

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_67


国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_68

2、配置compute

(1)代码部分
[root@compute ~]# ip a
[root@compute ~]# vi /etc/sysconfig/network-scripts/ifcfg-eno16777736 
[root@compute ~]# vi /etc/sysconfig/network-scripts/ifcfg-eno33554960 
[root@compute ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.103  controller
192.168.1.104  compute
[root@compute ~]# systemctl restart network
[root@compute ~]# ip a
    
[root@compute ~]# sftp controller   
The authenticity of host 'controller (192.168.1.103)' can't be established.
ECDSA key fingerprint is 0c:85:da:39:b1:41:76:0d:c9:7a:a3:aa:18:aa:ab:da.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'controller,192.168.1.103' (ECDSA) to the list of known hosts.
root@controller's password: 
Connected to controller.
sftp> ls
anaconda-ks.cfg    repo               
sftp> cd /opt
sftp> ls
centos  iaas    mydr    
sftp> 

[root@compute ~]# vi /etc/selinux/config 


# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@compute ~]# mkdir repo
[root@compute ~]# cp /etc/sysconfig/network-scripts/ifcfg-eno* repo
[root@compute ~]# ls repo
ifcfg-eno16777736  ifcfg-eno33554960
[root@compute ~]# iptables -F
[root@compute ~]# iptables -X
[root@compute ~]# iptables -Z
[root@compute ~]# iptables-save
[root@compute ~]# systemctl stop firewalld
[root@compute ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@compute ~]#
(2)过程记录
配置网络

国内 openstack 白金会员名单 openstack 2021_云计算_69

60的网络

国内 openstack 白金会员名单 openstack 2021_云计算_70

配置域名解析

国内 openstack 白金会员名单 openstack 2021_IPV6_71

设置主机名

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_72

查看下配置好没

国内 openstack 白金会员名单 openstack 2021_centos_73

配置selinux

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_74

国内 openstack 白金会员名单 openstack 2021_centos_75


国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_76

防火墙设置

国内 openstack 白金会员名单 openstack 2021_云计算_77

四、准备yum源

1、配置controller代码部分

[root@controller ~]# mv /etc/yum.repos.d/* repo
[root@controller ~]# ls repo
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo  ifcfg-eno16777736
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo  ifcfg-eno1         ifcfg-eno33554960
[root@controller ~]# ls /etc/yum.repos.d/
[root@controller ~]# 

[root@controller ~]# vi /etc/yum.repos.d/local.repo
[root@controller ~]# cat /etc/yum.repos.d/local.repo
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1

[iaas]
name=iaas
baseurl=file:///opt/iaas/iaas-repo
gpgcheck=0
enabled=1
[root@controller ~]# 

[root@controller ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: centos iaas
Cleaning up everything
Cleaning up list of fastest mirrors
[root@controller ~]# 

[root@controller ~]# yum list

[root@controller ~]# yum install -y iaas-xiandian

2、过程记录

删除yum配置文件

国内 openstack 白金会员名单 openstack 2021_centos_78

创建repo文件,清除缓存,验证yum源

国内 openstack 白金会员名单 openstack 2021_IPV6_79

查看下yum的list

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_80

安装Xiandian

国内 openstack 白金会员名单 openstack 2021_大数据_81

五、安装先电iaas

1、controller的配置

[root@controller ~]# rm /etc/xiandian/openrc.sh 
rm: remove regular file ‘/etc/xiandian/openrc.sh’? y
[root@controller ~]# ls /etc/xiandian/
lb-server.yaml  nginx_flat.yaml  nginx.yaml
[root@controller ~]# vi /etc/xiandian/openrc.sh

[root@controller ~]# iaas-pre-host.sh

[root@controller ~]# fdisk -l

Disk /dev/sda: 64.4 GB, 64424509440 bytes, 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000850e7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048   125829119    62401536   8e  Linux LVM

Disk /dev/mapper/centos-root: 58.7 GB, 58657341440 bytes, 114565120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 5234 MB, 5234491392 bytes, 10223616 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@controller ~]#
##--------------------system Config--------------------##
##Controller Server Manager IP. example:x.x.x.x
HOST_IP=192.168.1.103

##Controller Server hostname. example:controller
HOST_NAME=controller

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

##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=eno33554960

##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=sda1

##--------------------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=sda2

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

##--------------------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
[root@controller ~]# iaas-install-mysql.sh
    
[root@controller ~]# iaas-install-keystone.sh

[root@controller ~]# iaas-install-glance.sh

[root@controller ~]# iaas-install-nova-controller.sh
    
[root@controller ~]# iaas-install-neutron-controller.sh
    
[root@controller ~]# iaas-install-neutron-controller-gre.sh

2、controller过程记录

编辑环境变量

国内 openstack 白金会员名单 openstack 2021_IPV6_82

根据实际情况配置!!!!,内外网注意下,还有空白分区名也是根据自己的实际分区情况

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_83

iaas-pre-host.sh

国内 openstack 白金会员名单 openstack 2021_IPV6_84

iaas-install-mysql.sh

国内 openstack 白金会员名单 openstack 2021_IPV6_85

iaas-install-keystone.sh

国内 openstack 白金会员名单 openstack 2021_IPV6_86

iaas-install-glance.sh

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_87

iaas-install-nova-controller.sh

国内 openstack 白金会员名单 openstack 2021_IPV6_88

iaas-install-neutron-controller.sh

国内 openstack 白金会员名单 openstack 2021_centos_89

iaas-install-neutron-controller-gre.sh

国内 openstack 白金会员名单 openstack 2021_centos_90

3、compute的配置
[root@compute ~]# mv /etc/yum.repos.d/* repo
[root@compute ~]# ls repo
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo  ifcfg-eno33554960
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo  ifcfg-eno16777736
[root@compute ~]# ls /etc/yum.repos.d/
[root@compute ~]# 
[root@compute ~]# vi /etc/yum.repos.d/local.repo
[root@compute ~]# cat /etc/yum.repos.d/local.repo
[centos]
name=centos
baseurl=ftp://controller/centos
gpgcheck=0
enabled=1

[iaas]
name=iaas
baseurl=ftp://controller/iaas/iaas-repo
gpgcheck=0
enabled=1
[root@compute ~]#
[centos]
name=centos
baseurl=ftp://controller/centos
gpgcheck=0
enabled=1

[iaas]
name=iaas
baseurl=ftp://controller/iaas/iaas-repo
gpgcheck=0
enabled=1
[root@compute ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: centos iaas
Cleaning up everything
[root@compute ~]# yum list

[root@compute ~]# yum install -y iaas-xiandian
分区
[root@compute ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xd0c0dec9.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): 
Using default response p
Partition number (1-4, default 1): 
First sector (2048-104857599, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599): 
Using default value 104857599
Partition 1 of type Linux and of size 50 GiB is set
[root@compute ~]# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xad5d3294.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-104857599, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599): 
Using default value 104857599
Partition 1 of type Linux and of size 50 GiB is set
[root@compute ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   50G  0 disk 
├─sda1            8:1    0  500M  0 part /boot
└─sda2            8:2    0 49.5G  0 part 
  ├─centos-root 253:0    0 44.6G  0 lvm  /
  └─centos-swap 253:1    0  4.9G  0 lvm  [SWAP]
sdb               8:16   0   50G  0 disk 
sdc               8:32   0   50G  0 disk 
sr0              11:0    1    4G  0 rom  
sr1              11:1    1  2.7G  0 rom  
[root@compute ~]#
各项参数配置
[root@compute ~]# rm /etc/xiandian/openrc.sh 
rm: remove regular file ‘/etc/xiandian/openrc.sh’? y
[root@compute ~]# ls /etc/xiandian/
lb-server.yaml  nginx_flat.yaml  nginx.yaml
[root@compute ~]# vi /etc/xiandian/openrc.sh
##--------------------system Config--------------------##
##Controller Server Manager IP. example:x.x.x.x
HOST_IP=192.168.1.103

##Controller Server hostname. example:controller
HOST_NAME=controller

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

##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=eno33554960

##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   ##我的空分区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=sdc  ##我的空分区sdc

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

##--------------------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
[root@compute ~]# iaas-pre-host.sh
[root@compute ~]# iaas-install-nova-compute.sh
[root@compute ~]# iaas-install-neutron-compute.sh
[root@compute ~]# iaas-install-neutron-compute-gre.sh
[root@compute ~]#
4、compute过程记录
删除yum源配置文件,创建repo文件

国内 openstack 白金会员名单 openstack 2021_IPV6_91

清除缓存,验证yum源

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_92

安装xiandian

国内 openstack 白金会员名单 openstack 2021_IPV6_93

分区

国内 openstack 白金会员名单 openstack 2021_云计算_94

创建分区

国内 openstack 白金会员名单 openstack 2021_IPV6_95

显示分区情况

国内 openstack 白金会员名单 openstack 2021_大数据_96

各项参数

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_97

iaas-pre-host.sh

国内 openstack 白金会员名单 openstack 2021_国内 openstack 白金会员名单_98

iaas-install-nova-compute.sh

国内 openstack 白金会员名单 openstack 2021_大数据_99

iaas-install-neutron-compute.sh

国内 openstack 白金会员名单 openstack 2021_大数据_100


国内 openstack 白金会员名单 openstack 2021_云计算_101

六、问题处理

1、报错systemctl

vim /etc/vsftpd/vsftpd.conf #修改配置文件
[root@controller ~]# rpm -aq vsftpd  
vsftpd-3.0.2-28.el7.x86_64
[root@controller ~]# rpm -e vsftpd-3.0.2-28.el7.x86_64
warning: /etc/vsftpd/vsftpd.conf saved as /etc/vsftpd/vsftpd.conf.rpmsave
[root@controller ~]# /bin/systemctl stop  vsftpd.service
[root@controller ~]# rpm -aq vsftpd

2、访问不了

[root@controller ~]#  iaas-install-dashboard.sh
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package 1:openstack-dashboard-9.0.1-1.el7.centos.noarch already installed and latest version
Nothing to do
[root@controller ~]#

七、验证

1、登录(注:域demo, 用户名admin , 密码000000)

http://192.168.1.103/dashboard/auth/login/

检查防火墙规则,确保允许http服务相关端口通行,或者关闭防火墙。

国内 openstack 白金会员名单 openstack 2021_IPV6_102

国内 openstack 白金会员名单 openstack 2021_云计算_103

欢迎交流~~~~~