准备工作:

  • Mirantis Fuel OpenStack安装文件(ISO格式)

  • Virtual Box Scripts

  • Cygwin及相关组件

  • Virtual Box安装文件及扩展文件


下载地址:


安装Virtual Box及扩展包

安装Virtual Box比较简单,直接根据提示进行安装即可,步骤忽略。

安装Virtual Box扩展包的方法:在Virtual Box界面,选择管理-全局设定-扩展界面,选择添加安装并选择Virtual Box扩展包文件即可。

PS:注意扩展包一定要与Virtual Box版本一致。

wKioL1dbptzD0fUbAAAwNAHqFEM658.png

安装Cygwin及组件

双机下载的Cygwin安装包,在安装至选择下载站点界面时,尽量选择国内的下载站点以加快下载速度。

wKioL1dbpZ7xCvVrAAAr3uqhHTU821.png

在包选择界面输入expect并将单击搜索结果中的记录是指状态边为install

wKiom1dbpJHTODJ7AAAmjSZ37VQ489.png

然后进行包安装界面,安装完毕后点击上一步,然后依次选择openssh、procps、xxd三个软件包,然后完成安装。

wKioL1dbphDw2gshAAAgcUJtUQQ592.png

部署openstack环境

如果前面步骤顺利的话,部署openstack一般会比较简单。将openstack的Virtual box script文件包解压(最好解压到C盘),然后将fuel openstack文件(ISO格式)放到脚本文件夹下的\virtualbox\iso目录。


运行Cygwin工具,并将工作路径切换到

cd /cygdrive/c/vbox-scripts-8.0-mu-1/virtualbox/


执行安装程序

sh launch.sh


PS:一共有launch.sh、aunch_8GB.sh、launch_16GB.sh三个安装文件,请根据自己电脑的配置进行选择,也可以先运行config.sh脚本先配置虚机的配置参数,再运行launch.sh脚本,具体参考https://docs.mirantis.com/openstack/fuel/fuel-8.0/quickstart-guide.html#installing-mirantis-openstack-using-the-mirantis-virtualbox-scripts


安装过程为自动执行(含自动检验环境、自动创建虚机网络、自动创建虚机并完成部署),大约需要30分钟(依赖于自己电脑配置)。


openstack环境检验

安装完毕后,根据界面提示在浏览器打开下面的地址

wKiom1dbqD_ha3CEAAA3Hpyt6QY842.png

web界面默认的用户名和密码均为admin

wKiom1dbqEDwP3sYAAB_M2qRtsE201.png

至此,fuel部署完成,后续是利用fuel部署openstack环境的步骤。


附1:安装界面打印(版本7)

Administrator@A23136070 /cygdrive/c/vbox-scripts-7.0/virtualbox
$ sh launch.sh
Checking for 'free'... OK
Checking for 'expect'... OK
If you run this script under Cygwin, you may have to add path to VirtualBox directory to your PATH.
Usually it is enough to run "export PATH=$PATH:"/cygdrive/c/Program Files/Oracle/VirtualBox"
Checking for "VBoxManage"... OK
Checking for VirtualBox Extension Pack... OK
Checking for Mirantis OpenStack ISO p_w_picpath... OK
Going to use Mirantis OpenStack ISO file iso/MirantisOpenStack-7.0.iso
Checking if SSH client installed... OK
Checking if ipconfig or ifconfig installed... OK
Setup is done.
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #2...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #3...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #4...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Creating host-only interface
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #2 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #2...
Configuring IP address 10.20.0.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #2...
+ VBoxManage hostonlyif ipconfig 'VirtualBox Host-Only Ethernet Adapter #2' --ip 10.20.0.1 --netmask 255.255.255.0
+ set +x
Verifying interface VirtualBox Host-Only Ethernet Adapter #2 has IP 10.20.0.1 and mask 255.255.255.0 properly set.
OK.
Creating host-only interface
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #3 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #3...
Configuring IP address 172.16.0.254 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #3...
+ VBoxManage hostonlyif ipconfig 'VirtualBox Host-Only Ethernet Adapter #3' --ip 172.16.0.254 --netmask 255.255.255.0
+ set +x
Verifying interface VirtualBox Host-Only Ethernet Adapter #3 has IP 172.16.0.254 and mask 255.255.255.0 properly set.
OK.
Creating host-only interface
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #4 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #4...
Configuring IP address 172.16.1.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #4...
+ VBoxManage hostonlyif ipconfig 'VirtualBox Host-Only Ethernet Adapter #4' --ip 172.16.1.1 --netmask 255.255.255.0
+ set +x
Verifying interface VirtualBox Host-Only Ethernet Adapter #4 has IP 172.16.1.1 and mask 255.255.255.0 properly set.
OK.
Virtual machine 'fuel-master' is created and registered.
UUID: 33207018-c9d7-4222-967f-9877d545d060
Settings file: 'D:\VMs\fuel-master\fuel-master.vbox'
Adding hostonly adapter to fuel-master and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-master, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: bb04f877-9579-4ae1-8473-c9a735703eb8
Adding serial numbers of disks to fuel-master...
Adding hostonly adapter to fuel-master and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding NAT adapter to fuel-master for outbound network access through the host system...
Waiting for VM "fuel-master" to power on...
VM "fuel-master" has been successfully started.
Waiting for product VM to install. Please do NOT abort the script...
Checking for internet connectivity on the host system... FAIL
############################################################
# WARNING: some of the Fuel features will not be supported #
#          because there is no Internet connectivity       #
############################################################
Checking local DNS configuration... /etc/resolv.conf does not contain a nameserver. Using 8.8.8.8 for DNS.
Enabling outbound network/internet access for the product VM...
Waiting until the network services are restarted...
FAIL
############################################################
# WARNING: some of the Fuel features will not be supported #
#          because there is no Internet connectivity       #
############################################################
Master node has been installed.
Virtual machine 'fuel-slave-1' is created and registered.
UUID: d086ecbb-47b5-4537-894b-ea0430235313
Settings file: 'D:\VMs\fuel-slave-1\fuel-slave-1.vbox'
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: fb7ce950-1295-4b58-8387-b65017c92ee4
Adding serial numbers of disks to fuel-slave-1...
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 3e053bc2-2495-4d63-b61b-44b60bbb11e9
Adding serial numbers of disks to fuel-slave-1...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 431cd2aa-0f07-4864-9943-fc4a8445b6d0
Adding serial numbers of disks to fuel-slave-1...
Waiting for VM "fuel-slave-1" to power on...
VM "fuel-slave-1" has been successfully started.
Virtual machine 'fuel-slave-2' is created and registered.
UUID: 3b6089d2-863f-4d60-be73-6d1c98a79fb3
Settings file: 'D:\VMs\fuel-slave-2\fuel-slave-2.vbox'
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: e6220313-1e5c-4cfb-9625-c4309ab81f72
Adding serial numbers of disks to fuel-slave-2...
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 48bea890-63f9-451a-a828-31fc298e8ae2
Adding serial numbers of disks to fuel-slave-2...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 3a5ab4b3-ce8a-452b-a3ef-a1b1a0bcba3e
Adding serial numbers of disks to fuel-slave-2...
Waiting for VM "fuel-slave-2" to power on...
VM "fuel-slave-2" has been successfully started.
Virtual machine 'fuel-slave-3' is created and registered.
UUID: 544d2774-bb46-482c-9354-f4579d8ec42f
Settings file: 'D:\VMs\fuel-slave-3\fuel-slave-3.vbox'
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 52a9342e-34a6-46ac-ba98-14f007773d08
Adding serial numbers of disks to fuel-slave-3...
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 55fcce35-13ef-4e90-b30d-00a6d02bca1c
Adding serial numbers of disks to fuel-slave-3...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 7ccc2083-227d-4677-bf99-3376b6133de8
Adding serial numbers of disks to fuel-slave-3...
Waiting for VM "fuel-slave-3" to power on...
VM "fuel-slave-3" has been successfully started.
Slave nodes have been created. They will boot over PXE and get discovered by the master node.
To access master node, please point your browser to:
    http://10.20.0.2:8000/
The default username and password is admin:admin

附2:安装界面打印(版本8)

Administrator@A23136070 /cygdrive/c/vbox-scripts-8.0-mu-1/virtualbox
$ sh launch.sh
Prepare the host system...
Checking for 'free'... OK
Checking for 'expect'... OK
Checking for 'xxd'... OK
Checking for "VBoxManage"... OK
Checking for VirtualBox Extension Pack... OK
Checking for VirtualBox iPXE firmware...SKIP
VirtualBox iPXE firmware is not found. Used standard firmware from the VirtualBox Extension Pack.
Checking for Mirantis OpenStack ISO p_w_picpath... OK
Going to use Mirantis OpenStack ISO file iso/MirantisOpenStack-8.0.iso
Checking if SSH client installed... OK
Checking if ipconfig or ifconfig installed... OK
Done.
Check available memory on the host system...
Done.
Сlean previous installation if exists...
Done.
Deleting old interfaces if exists...
Done.
Creating host-only interface...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #2 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #2...
Configuring IP address 10.20.0.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #2...
Verifying interface VirtualBox Host-Only Ethernet Adapter #2 has IP 10.20.0.1 and mask 255.255.255.0 properly set.
OK.
Creating host-only interface...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #3 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #3...
Configuring IP address 172.16.0.254 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #3...
Verifying interface VirtualBox Host-Only Ethernet Adapter #3 has IP 172.16.0.254 and mask 255.255.255.0 properly set.
OK.
Creating host-only interface...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface VirtualBox Host-Only Ethernet Adapter #4 was successfully created
Disabling DHCP server on interface: VirtualBox Host-Only Ethernet Adapter #4...
Configuring IP address 172.16.1.1 and network mask 255.255.255.0 on interface: VirtualBox Host-Only Ethernet Adapter #4...
Verifying interface VirtualBox Host-Only Ethernet Adapter #4 has IP 172.16.1.1 and mask 255.255.255.0 properly set.
OK.
Virtual machine 'fuel-master' is created and registered.
UUID: f633e7d0-523d-42bf-b542-939db284934f
Settings file: 'D:\VMs\fuel-master\fuel-master.vbox'
Adding hostonly adapter to fuel-master and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-master, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: ba25dcd4-2acb-47a0-b0e3-61c975161f5f
Adding serial numbers of disks to fuel-master...
Adding hostonly adapter to fuel-master and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding NAT adapter to fuel-master for outbound network access through the host system...
Waiting for VM "fuel-master" to power on...
VM "fuel-master" has been successfully started.
Waiting for product VM to download files. Please do NOT abort the script... OK
Checking for internet connectivity on the host system... FAIL
############################################################
# WARNING: some of the Fuel features will not be supported #
#          because there is no Internet connectivity       #
############################################################
Checking local DNS configuration... /etc/resolv.conf does not contain a nameserver. Using 8.8.8.8 for DNS.
Enabling outbound network/internet access for the product VM... OK
Waiting until the network services are restarted... FAIL
############################################################
# WARNING: some of the Fuel features will not be supported #
#          because there is no Internet connectivity       #
############################################################
Waiting for product VM to install. Please do NOT abort the script... OK
Master node has been installed.
Virtual machine 'fuel-slave-1' is created and registered.
UUID: f007664b-d706-4666-8f1f-3c55fb7296ea
Settings file: 'D:\VMs\fuel-slave-1\fuel-slave-1.vbox'
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 0cfeac5e-26e2-4c36-aa17-8687d2e4ce07
Adding serial numbers of disks to fuel-slave-1...
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-1 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 2026f819-d843-4633-96ac-721e4e5dbfce
Adding serial numbers of disks to fuel-slave-1...
Adding disk to fuel-slave-1, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: cb00d081-6654-408a-9e11-cd0fecbf9b2b
Adding serial numbers of disks to fuel-slave-1...
Waiting for VM "fuel-slave-1" to power on...
VM "fuel-slave-1" has been successfully started.
Virtual machine 'fuel-slave-2' is created and registered.
UUID: 48d832c1-6f3d-4362-91ee-91ce07f03c66
Settings file: 'D:\VMs\fuel-slave-2\fuel-slave-2.vbox'
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: de07d288-ae1f-486f-bf0e-6dc979742bdd
Adding serial numbers of disks to fuel-slave-2...
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-2 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 24d4688f-c71d-4042-ae23-3240a13d94c9
Adding serial numbers of disks to fuel-slave-2...
Adding disk to fuel-slave-2, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 3f92c896-7c8d-4784-91f1-07a65f212aaa
Adding serial numbers of disks to fuel-slave-2...
Waiting for VM "fuel-slave-2" to power on...
VM "fuel-slave-2" has been successfully started.
Virtual machine 'fuel-slave-3' is created and registered.
UUID: 7d046487-6e7f-419c-a48e-c9c2f6b16b0d
Settings file: 'D:\VMs\fuel-slave-3\fuel-slave-3.vbox'
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #2...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 33a963f5-7049-43fc-8235-0ad5854abc43
Adding serial numbers of disks to fuel-slave-3...
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #3...
Adding hostonly adapter to fuel-slave-3 and bridging with host NIC VirtualBox Host-Only Ethernet Adapter #4...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 30be8af7-a99f-4846-88f8-0dc6df025b9f
Adding serial numbers of disks to fuel-slave-3...
Adding disk to fuel-slave-3, with size 65535 Mb...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk p_w_picpath created. UUID: 2058eed9-74c7-4a86-a0dd-4c2c447e48bb
Adding serial numbers of disks to fuel-slave-3...
Waiting for VM "fuel-slave-3" to power on...
VM "fuel-slave-3" has been successfully started.
Slave nodes have been created. They will boot over PXE and get discovered by the master node.
To access master node, please point your browser to:
    http://10.20.0.2:8000/
The default username and password is admin:admin

附3:删除环境需要运行sh clean.sh

Administrator@A23136070 /cygdrive/c/vbox-scripts-8.0-mu-1/virtualbox
$ sh clean.sh
Prepare the host system...
Checking for 'free'... OK
Checking for 'expect'... OK
Checking for 'xxd'... OK
Checking for "VBoxManage"... OK
Checking for VirtualBox Extension Pack... OK
Checking if SSH client installed... OK
Checking if ipconfig or ifconfig installed... OK
Done.
Сlean previous installation if exists...
Found existing VM: fuel-master. Deleting it...
Stopping Virtual Machine fuel-master...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting existing virtual machine fuel-master...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Found existing VM: fuel-slave-1. Deleting it...
Stopping Virtual Machine fuel-slave-1...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting existing virtual machine fuel-slave-1...
0%...10%...20%...
Progress state: VBOX_E_INVALID_OBJECT_STATE
VBoxManage.exe: error: Machine delete failed
VBoxManage.exe: error: Medium 'D:\VMs\fuel-slave-1\fuel-slave-1_0.vdi' is locked for reading by another task
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Medium, interface IMedium
VBoxManage.exe: error: Context: "int __cdecl handleUnregisterVM(struct HandlerArg *)" at line 166 of file VBoxManageMisc.cpp
Found existing VM: fuel-slave-2. Deleting it...
Stopping Virtual Machine fuel-slave-2...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting existing virtual machine fuel-slave-2...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Found existing VM: fuel-slave-3. Deleting it...
Stopping Virtual Machine fuel-slave-3...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting existing virtual machine fuel-slave-3...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Done.
Deleting old interfaces if exists...
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #4...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #3...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Deleting host-only interface: VirtualBox Host-Only Ethernet Adapter #2...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Done.