赞
踩
1.安装虚拟机配置如上图
2.时区、网卡不需要其他设置
3.镜像以CentOS官网中为主
本篇文章中虚拟机的密码统一为:1
重启网卡
service network restart
永久关闭防火墙(重启服务器防火墙不会重新开启)
systemctl disable firewalld
rm -rf /etc/yum.repos.d/*
[root@localhost ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.10.10 controller
192.168.10.20 compute
按照表格中的IP修改对应的主机IP
名称 | ip |
---|---|
conterller | 192.168.10.10 |
compute | 192.168.10.20 |
[controller]
[root@localhost ~]# hostnamectl set-hostname controller
[root@localhost ~]# bash
[root@controller ~]#
[compute]
[root@localhost ~]# hostnamectl set-hostname controller
[root@localhost ~]# bash
[root@compute ~]#
不管什么方法将宿主机中的镜像上传至controller节点就可以
镜像↓
创建文件夹
[root@controller /]# mkdir /opt/centos7
[root@controller /]# mkdir /opt/iaas
挂载第一个镜像
[root@controller /]# mount -o loop CentOS-7-x86_64-DVD-2009.iso /mnt/
mount: /dev/loop0 写保护,将以只读方式挂载
[root@controller /]# cp -rvf /mnt/* /opt/centos7/
[root@controller /]# umount /mnt/
挂载第二个镜像
[root@controller /]# mount -o loop chinaskills_cloud_iaas.iso /mnt/
mount: /dev/loop0 写保护,将以只读方式挂载
[root@controller /]# cp -rvf /mnt/* /opt/iaas/
[root@controller /]# umount /mnt/
[centos7]
name=centos7
enabled=1
gpgcheck=0
baseurl=file:///opt/centos7
[iaas]
name=iaas
enabled=1
gpgcheck=0
baseurl=file:///opt/iaas/iaas-repo
安装vsftpd软件
[root@controller /]# yum install vsftpd -y
修改vsftpd的配置文件 将 引号内的文本追加到vsftpd.conf
[root@controller /]# echo "anon_root=/opt" >> /etc/vsftpd/vsftpd.conf
开启服务设置为开机自启动
[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.
更新yum源
yum repolist
[root@controller ~]# yum install iaas-xiandian -y
[root@compute ~]# yum install iaas-xiandian -y
vi /etc/xiandian/openrc.sh
文件内容:部署OpenStack的核心内容
#--------------------system Config--------------------## ##Controller Server Manager IP. example:x.x.x.x HOST_IP=192.168.10.10 ##Controller HOST Password. example:000000 HOST_PASS=1 ##Controller Server hostname. example:controller HOST_NAME=controller ##Compute Node Manager IP. example:x.x.x.x HOST_IP_NODE=192.168.10.20 ##Compute HOST Password. example:000000 HOST_PASS_NODE=1 ##Compute Node hostname. example:compute HOST_NAME_NODE=compute ##--------------------Chrony Config-------------------## ##Controller network segment IP. example:x.x.0.0/16(x.x.x.0/24) network_segment_IP=192.168.0.0/16 ##--------------------Rabbit Config ------------------## ##user for rabbit. example:openstack RABBIT_USER=openstack ##Password for rabbit user .example:000000 RABBIT_PASS=1 ##--------------------MySQL Config---------------------## #Password for MySQL root user . exmaple:000000 DB_PASS=1 ##--------------------Keystone Config------------------## ##Password for Keystore admin user. exmaple:000000 DOMAIN_NAME=demo ADMIN_PASS=1 DEMO_PASS=1 ##Password for Mysql keystore user. exmaple:000000 KEYSTONE_DBPASS=1 ##--------------------Glance Config--------------------## ##Password for Mysql glance user. exmaple:000000 GLANCE_DBPASS=1 ##Password for Keystore glance user. exmaple:000000 GLANCE_PASS=1 ##--------------------Nova Config----------------------## ##Password for Mysql nova user. exmaple:000000 NOVA_DBPASS=1 ##Password for Keystore nova user. exmaple:000000 NOVA_PASS=1 ##--------------------Neturon Config-------------------## ##Password for Mysql neutron user. exmaple:000000 NEUTRON_DBPASS=1 ##Password for Keystore neutron user. exmaple:000000 NEUTRON_PASS=1 ##metadata secret for neutron. exmaple:000000 METADATA_SECRET=1 #注意此处的IP 设置为虚拟机本机IP 在controller中为192.168.10.10 compute中为192.168.10.20 ##Tunnel Network Interface. example:x.x.x.x INTERFACE_IP=192.168.10.10 ##External Network Interface. example:eth1 INTERFACE_NAME=ens33 ##External Network The Physical Adapter. example:provider Physical_NAME=provider ##First Vlan ID in VLAN RANGE for VLAN Network. exmaple:101 minvlan=1 ##Last Vlan ID in VLAN RANGE for VLAN Network. example:200 maxvlan=400 ##--------------------Cinder Config--------------------## ##Password for Mysql cinder user. exmaple:000000 CINDER_DBPASS=1 ##Password for Keystore cinder user. exmaple:000000 CINDER_PASS=1 ##Cinder Block Disk. example:md126p3 BLOCK_DISK=sda1 ##--------------------Swift Config---------------------## ##Password for Keystore swift user. exmaple:000000 SWIFT_PASS=1 ##The NODE Object Disk for Swift. example:md126p4. OBJECT_DISK=sda1 ##The NODE IP for Swift Storage Network. example:x.x.x.x. STORAGE_LOCAL_NET_IP=192.168.10.10 ##--------------------Heat Config----------------------## ##Password for Mysql heat user. exmaple:000000 HEAT_DBPASS=1 ##Password for Keystore heat user. exmaple:000000 HEAT_PASS=1 ##--------------------Zun Config-----------------------## ##Password for Mysql Zun user. exmaple:000000 ZUN_DBPASS=1 ##Password for Keystore Zun user. exmaple:000000 ZUN_PASS=1 ##Password for Mysql Kuryr user. exmaple:000000 KURYR_DBPASS=1 ##Password for Keystore Kuryr user. exmaple:000000 KURYR_PASS=1 ##--------------------Ceilometer Config----------------## ##Password for Gnocchi ceilometer user. exmaple:000000 CEILOMETER_DBPASS=1 ##Password for Keystore ceilometer user. exmaple:000000 CEILOMETER_PASS=1 ##--------------------AODH Config----------------## ##Password for Mysql AODH user. exmaple:000000 AODH_DBPASS=1 ##Password for Keystore AODH user. exmaple:000000 AODH_PASS=1 ##--------------------Barbican Config----------------## ##Password for Mysql Barbican user. exmaple:000000 BARBICAN_DBPASS=1 ##Password for Keystore Barbican user. exmaple:000000 BARBICAN_PASS=1
各个主机执行文件
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-dashboard.sh
iaas-install-cinder-controller.sh
iaas-install-swift-controller.sh
iaas-install-nova-compute.sh
iaas-install-neutron-compute.sh
iaas-install-cinder-compute.sh
iaas-install-swift-compute.sh
域 demo
用户名 admin
密码 1
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。