安装先电OPENSTACK
一、安装环境准备
1、CentOS-7-x86_64-DVD-1511.iso
2、XianDian-IaaS-v2.2.iso
二、虚拟机安装
1、安装controller
(安装过程也踩了很多坑,其中也向王大佬请教了很多问题,在此衷心感谢。ip地址可以根据自己的习惯设置,我的是由于之前安装hadoop分配到102,这里为了方便记就从103开始)
(1)文件下面选择:新建虚拟机按照下图所示创建
(2)下一步
(3)选择合适版本
(4)设置名称和位置
(5)根据电脑选择
(6)我这里分配了5G
(7)下一步
由于校园网分配Ip可能不一样,我这里是设置了一台NAT一台主机,注意顺序,后面配置过程有网卡分区,要记住自己的
(8)默认
(9)注意选择虚拟化引擎项
(10)两个CD第一个选择Centos,第二个选择XianDian
(11)启动虚拟机
稍等一会就好了~~~~
(12)设置语言为英语
(13)选择时区上海
(14)该项选择disable,关闭dump
(15)DESTINATION项进去选择第一块硬盘
(16)选择我要配置分区,之后Done
(17)选择自动分配分区,由于开始设置了60G,这里我选择将home删除,将余下得全部分配给/
(18)配置网络
第一块的网卡和第二块需要注意,对应到后面配置文件,一定要看好!!!
根据自己情况配置
第二块
到此controller安装完毕
2、安装compute
(1)前面部分和controller一样,详细见上面部分
(2)compute有三个磁盘均分配50G,两个CD/DVD和两个网络
CD/DVD一个也OK
(3)选择第一个磁盘进行自动分配
(4)配置网络
三、环境准备
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)过程记录
网络配置
修改如下
static,yes项
检查下
配置域名解析如下
ping下外网百度
controller
防火墙关闭
配置selinux
安装vsftpd
过程记录
搭建ftp服务器,开启设置自启动,添加匿名访问目录
资源管理器里面查看光驱挂载,浏览器查看不了的话去我的电脑windows资源管理器下查看
挂载iso文件
查看centos和iaas的索引
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)过程记录
配置网络
60的网络
配置域名解析
设置主机名
查看下配置好没
配置selinux
防火墙设置
四、准备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配置文件
创建repo文件,清除缓存,验证yum源
查看下yum的list
安装Xiandian
五、安装先电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过程记录
编辑环境变量
根据实际情况配置!!!!,内外网注意下,还有空白分区名也是根据自己的实际分区情况
iaas-pre-host.sh
iaas-install-mysql.sh
iaas-install-keystone.sh
iaas-install-glance.sh
iaas-install-nova-controller.sh
iaas-install-neutron-controller.sh
iaas-install-neutron-controller-gre.sh
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文件
清除缓存,验证yum源
安装xiandian
分区
创建分区
显示分区情况
各项参数
iaas-pre-host.sh
iaas-install-nova-compute.sh
iaas-install-neutron-compute.sh
六、问题处理
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/