天天看点

云计算基础架构搭建

controller图形化安装

云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建

controller配置

修改ip

# cd /etc/sysconfig/network-scripts/
#vi ifcfg-eno16777736

IPADDR=192.168.100.10
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
#server network restart
           
云计算基础架构搭建
#hostnamectl set-hostname controller
#iptables –F
#iptables –X
#iptables –Z
#/usr/sbin/iptables-save
           
云计算基础架构搭建

挂载centos镜像

[[email protected] ~]# mkdir /opt/centos
[[email protected] ~]# mount -o loop /dev/cdrom /mnt/
[[email protected] ~]# cp -rf /mnt/* /opt/centos
[[email protected] ~]# umount /mnt/

           

挂载xiandian包

[[email protected] ~]# mount -o loop /dev/cdrom /mnt/
[[email protected] ~]# cp -rf /mnt  /opt
[[email protected] ~]# umount /mnt/
           
[[email protected] ~]# mv /etc/yum.repos.d/* /opt/
[[email protected] opt]# vi /etc/yum.repos.d/local.repo
[centos] 
name=centos 
baseurl=file:///opt/centos 
enabled=1 
gpgcheck=0 
[iaas] 
name=iaas
baseurl=file:///opt/iaas-repo 
enabled=1 
gpgcheck=0

           

安装xiandain服务

yum install -y iaas-xiandian -y
           

openrc.sh

vi /etc/xiandian/openrc.sh
           
##--------------------system Config--------------------##
##Controller Server Manager IP. example:x.x.x.x
HOST_IP=192.168.100.10
##Controller Server hostname. example:controller
HOST_NAME=controller
##Compute Node Manager IP. example:x.x.x.x
HOST_IP_NODE=192.168.100.20

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

##--------------------Trove Config--------------------##
##Password for Mysql Trove User. exmaple:000000
#TROVE_DBPASS=

##Password for Keystore Trove User. exmaple:000000
#TROVE_PASS=

##--------------------Swift Config---------------------##
##Password for Keystore swift user. exmaple:000000
SWIFT_PASS=000000

##The NODE Object Disk for Swift. example:md126p4.
OBJECT_DISK=vda4

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

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

           

iaas-pre-host

在控制节点上安装iaas-pre-host
[[email protected] ~]# iaas-pre-host.sh
重启设备会卡,单机关机并退出虚拟机,然后再次进入实验
[[email protected] ~]#reboot
           

数据库脚本

[[email protected] ~]iaas-install-mysql.sh
           

keystone脚本

[[email protected] ~]iaas-install-keystone.sh
           

glance镜像脚本服务

[[email protected] ~]iaas-install-glance.sh
           

nova计算服务脚本安装

[[email protected] ~]iaas-install-nova-controller.sh
           

Neutron网络服务

[[email protected] ~]iaas-install-neutron-controller.sh
[[email protected] ~]iaas-install-neutron-controller-gre.sh
           

安装dashboard

[[email protected] ~] iaas-install-dashboard.sh
           

compute图形化安装
云计算基础架构搭建

选择Done

云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建

compute配置

添加域名解析

IPADDR=192.168.100.20
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
           

修改ip地址

# cd /etc/sysconfig/network-scripts/
#vi ifcfg-eno16777736
IPADDR=192.168.100.20
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
#vi ifcfg-eno3 tab两下
IPADDR=192.168.200.20
NETMASK=255.255.255.0
GATEWAY=192.168.200.1
#server network restart
           
云计算基础架构搭建
云计算基础架构搭建
云计算基础架构搭建

配置环境配置防火墙规则

#hostnamectl set-hostname compute
#iptables –F
#iptables –X
#iptables –Z
#/usr/sbin/iptables-save
           
云计算基础架构搭建

在计算节点挂载镜像制作源路径

挂载centos镜像
[[email protected] ~]# mount -o loop /dev/cdrom /mnt
[[email protected] ~]# mkdir /opt/centos
[[email protected] ~]# cp -rf /mnt/* /opt/centos
[[email protected] ~]# umount /mnt
挂载先电镜像
[[email protected] ~]# mount -o loop /dev/cdrom /mnt
[[email protected] ~]# cp -rf /mnt/* /opt
[[email protected] ~]# umount /mnt/
[[email protected] ~]# 

           
[[email protected] ~]# mv /etc/yum.repos.d/* /opt/
[[email protected] opt]# vi /etc/yum.repos.d/local.repo
[centos] 
name=centos 
baseurl=file:///opt/centos 
gpgcheck=0
enabled=1  
[iaas] 
name=iaas
baseurl=file:///opt/iaas-repo 
gpgcheck=0
enabled=1 


           

计算节点anzhuangiaas-xaindian工具包

[email protected] ~]# yum install -y iaas-xiandian -y
           

编辑/etc/xiandian/openrc.sh(环境变量)

[[email protected] ~]# vi /etc/xiandian/openrc.sh 
[[email protected] ~]# cat /etc/xiandian/openrc.sh 
##--------------------system Config--------------------##
##Controller Server Manager IP. example:x.x.x.x
HOST_IP=192.168.100.20

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

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

##Compute Node hostname. example:compute
HOST_NAME_NODE=controller

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

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

##--------------------Trove Config--------------------##
##Password for Mysql Trove User. exmaple:000000
#TROVE_DBPASS=

##Password for Keystore Trove User. exmaple:000000
#TROVE_PASS=

##--------------------Swift Config---------------------##
##Password for Keystore swift user. exmaple:000000
SWIFT_PASS=000000

##The NODE Object Disk for Swift. example:md126p4.
OBJECT_DISK=vda4

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

##--------------------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
[[email protected] ~]# 

           

在计算节点上执行

iaas-pre-host.sh
reboot
如果没有反应,请重新刷新平台页面
           

部署平台安装平台

iaas-install-nova-compute.sh
iaas-install-neutron-compute.sh
iaas-install-neutron-compute-gre.sh

           

验证

打开 http://192.168.100.10/dashboard

或者

curl http://192.168.100.10/dashboard

demo
admin 
000000
           

参考命令

add show
           

继续阅读