1、 必须双网卡,虚拟机一个用NAT模式,一个用仅主机模式,虚拟机最小安装, ????? 其中一台做controller节点,另一台做compte节点,但是compute的/目录必须大于controller节点 ????? 装系统的时候设置自定义磁盘——》帮我选择-->/home 移除 把 /扩展 “/”小的做controller节点 ????? 安装、设置密码即可 注:net模式的网卡不用,用仅主机的模式网卡用 ?????? #SecureCR 连接
双桥接网卡实现过程中注意事项: 1.双桥接模式openstack创建的路由器接口内网关 要与外部网络((ext-net))子网内(int-net)固定网关一致
2、进系统第一步:通过ip a 命令查看网卡 ?? ??????????? 改IP? (两台机器) ?? ?[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33 ?? ?BOOTPROTO=static ?? ?ONBOOT=yes ?? ?IPADDR=192.168.100.10 ?? ?NETMASK=255.255.255.0 ?? ?[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33 ?? ?
???? 第二步:改主机名? (两台机器) ?? ?[root@localhost ~]# hostnamectl set-hostname controller?? #controller主机名 ?? ?[root@localhost ~]# hostnamectl set-hostname compute
???? 第三步:关闭防火墙和selinux? (两台机器) ?? ?[root@controller ~]# systemctl stop firewalld???????? ? ?? ?[root@controller ~]# systemctl stop firewalld???? ? ?? ?[root@controller ~]# vi /etc/sysconfig/selinux ?? ?SELINUX=permissive ?? ?[root@controller ~]# setenforce 0
???? 第四步:用CRT传镜像,iaas平台所需镜像为:Centos7_1804 、chinaskills_cloud_iaas.iso
?????? (以上镜像和软件可从此处获取:
链接:https://pan.baidu.com/s/1BxX12EeO6YdOddJkJmJoIQ 提取码:zmi3
)
???? 第五步:改主机映射:? (同一网段两个地址) ?? ?[root@controller ~]# vi /etc/hosts ?? ?192.168.100.10? controller ?? ?192.168.100.20? compute ?? ?[root@compute ~]# vi /etc/hosts ?? ?192.168.100.10? controller ?? ?192.168.100.20?? compute ???? 第六步:挂载镜像:将上传的镜像挂载到/opt目录下的自己建的目录上? ? ?? ?[root@controller ~]# mkdir /opt/centos ?? ?[root@controller ~]# mkdir /opt/iaas ?? ?[root@controller ~]# mount /CentOS-7-x86_64-DVD-1511.iso /opt/centos/ ?? ???????? mount: /dev/loop0 is write-protected, mounting read-only ?? ?[root@controller ~]# mount /XianDian-IaaS-v2.2.iso /opt/iaas/ ?? ??????? mount: /dev/loop1 is write-protected, mounting read-only ?? ?修改yum源?? #(1) ?? ?[root@controller ~]# mv /etc/yum.repos.d/CentOS-*?? /media/ ?? ?[root@controller ~]#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/iaas-repo ?? ?gpgcheck=0 ?? ?enabled=1 ?? ?[root@controller ~]# yum clean all ?? ?[root@controller ~]# yum list ?? ?安装ftp服务 ?? ?[root@controller ~]# yum install vsftpd ?? ?[root@controller ~]# vi /etc/vsftpd/vsftpd.conf ?? ?anon_root=/opt ?? ?[root@controller ~]# systemctl start vsftpd ?? ? ?????? ??? ?#(2) ?? ?[root@compute ~]# mv /etc/yum.repos.d/CentOS-* /media/ ?? ?[root@compute ~]# cat /etc/yum.repos.d/ftp.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 ?? ?
第七步:两台主机安装iaas-xiandian 包 ?? ?yum install iaas-xiandian ?? ?vi /etc/xiandian/openrc.sh ?? ?#注意keystone下有一个域名=demo;网卡名为第二块网卡名、去注释 ?? ?scp /etc/xiandian/openrc.sh? root@compute:/etc/xiandian/
##Controller Server Manager IP. example:x.x.x.x HOST_IP=192.168.100.10
##Controller HOST Password. example:000000 HOST_PASS=000000
##Controller Server hostname. example:controller HOST_NAME=controller
##Compute Node Manager IP. example:x.x.x.x HOST_IP_NODE=192.168.100.20
ADMIN_PASS=000000 ##Compute HOST Password. example:000000 HOST_PASS_NODE=000000
##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=
##--------------------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
##Tunnel Network Interface. example:x.x.x.x INTERFACE_IP=192.168.100.10??? 注: 在那个节点上就是那个节点的IP地址
##External Network Interface. example:eth1 INTERFACE_NAME=ens34
##External Network The Physical Adapter. example:provider Physical_NAME=provider
##First Vlan ID in VLAN RANGE for VLAN Network. exmaple:101 minvlan=100
##Last Vlan ID in VLAN RANGE for VLAN Network. example:200 maxvlan=200
第八步:跑脚本!! ??????????????? 1、[root@controller ~]# iaas-pre-host.sh???????????????? #两个都跑 ? ??? ?2、[root@controller ~]# iaas-install-mysql.sh??????? ? ? ? ? ? ? #只controller跑 ?? ?3、[root@controller ~]# iaas-install-keystone.sh????????????????? #只controller跑 ?? ?4、[root@controller ~]# iaas-install-glance.sh?? ? ? ? ???????????? #只controller跑 ?? ?5、[root@controller ~]# iaas-install-nova-controller.sh????????? #只controller跑 ?? ????? [root@compute ~]# iaas-install-nova-compute.sh??????????? #只compute跑 ?? ?6、[root@controller ~]# iaas-install-neutron-controller.sh?? ?? #只controller跑 ?? ????? [root@compute ~]# iaas-install-neutron-compute.sh ? ? ?? #只compute跑 ?? ?7、[root@controller ~]# iaas-install-dashboard.sh
?? ?8、先登录界面 192.168.100.10/dashboard
?? ?9、整合资源 vi /etc/xiandian/openrc.sh ?? ??? ?##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 ?? ????? [root@controller ~]# iaas-install-nova-compute.sh ?? ? ?? ? 10.10.109.203 admin 000000
第九步:建立实例 ?? ?在图形化界面中 ?? ?把访问&安全中的规则改?????????? ICMP TCP UDP ?? ?创建网络ext-net?? ?int-net ?? ?在ext-net中创建子网ext-subnet ? ?? ?在int-net中创建子网int-subnet ?? ?创建路由、在路由中创建接口 ?? ?[root@controller ~]# source /etc/keystone/admin-openrc.sh? # ?? ?[root@controller ~]# glance image-create --name 'centos7' --disk-format qcow2 --container-format bare --progress < /opt/iaas/images/CentOS_7.2_x86_64_XD.qcow2 #上传镜像 disk-format 磁盘格式、container-format bare 使用本地的资源存储? --progress 是显示进度 ???
|