SANDBOX DIY for Virt–Manager

advertisement
PLUMgrid ONS
PLUMgrid Sandbox DIY–Laptop Version
Version 2
7/21/16
0
SANDBOX DIY GUIDE
Table of Contents
SECTION 1: INTRODUCTION ...............................................................................................................2
SECTION 2: SANDBOX DIY FOR VIRT–MANAGER (UBUNTU ENVIRONMENT) .........................................3
PREREQUISITES.............................................................................................................................................. 3
Recommended requirements ................................................................................................................ 3
Software requirements ......................................................................................................................... 3
HOW TO INSTALL .......................................................................................................................................... 4
SECTION 3: SANDBOX DIY FOR VIRTUALBOX (MAC OS/WINDOWS) ................................................... 22
PREREQUISITES............................................................................................................................................ 22
Recommended requirements .............................................................................................................. 22
HOW TO INSTALL ........................................................................................................................................ 23
APPENDIX: TROUBLESHOOTING ....................................................................................................... 35
CONTACT US .................................................................................................................................... 36
pg. 1
SANDBOX DIY GUIDE
Section 1: Introduction
The latest installment in PLUMgrid’s Sandbox Ignition Project "Sandbox DIY" allows you to harness the
power of a Devstack environment integrated with PLUMgrid ONS. The guide that follows enables you to
setup your own Devstack environment on your personal machine. You will be able to interface with an
OpenStack environment using Horizon, Openstack's built-in dashboard. You will also be able to
configure advanced networking functions using PLUMgrid Console. An addition to the latest Sandbox DIY
is that you can experience our newly introduced monitoring tool, "CloudApex".
SANDBOX DIY for Virt–Manager (Ubuntu Environment)
SANDBOX DIY for VirtualBox (MAC OS/ Windows Environment)
pg. 2
SANDBOX DIY GUIDE
Section 2: SANDBOX
Environment)
DIY
for
Virt–Manager
(Ubuntu
Prerequisites
1. Ensure the machine has the following resources free to be allocated to the VM:
Recommended requirements



RAM: 8GB
CPU: 4 cores
Storage: 30GB
Software requirements


Virt-manager
QEMU (>= 1.5), check with kvm --version
Run the command below to install the above mentioned requirements:
apt-get install kvm virt-manager
2.
Download the PLUMgrid Sandbox DIY virt-manager image:
$ wget http://52.35.2.34/images/5.0/plumgrid_diy_qcow2.tar.gz
3. Untar the downloaded file:
$ tar xvzf plumgrid_diy_qcow2.tar.gz
pg. 3
SANDBOX DIY GUIDE
How To Install
Follow the steps below to setup Sandbox DIY on your machine:
1. Open terminal on your host machine and enter the following command to open virt-manager:
sudo virt-manager
2. Right click on (QEMU) and select Details from the list as shown in figure below:
Figure 1 Right click on QEMU and select details
3. Navigate to Virtual Networks tab and click on
to add network (Figure 2):
pg. 4
SANDBOX DIY GUIDE
Figure 2 Click on + to add network
4. In the window that follows, click on Forward to proceed (Figure 3)
pg. 5
SANDBOX DIY GUIDE
Figure 3 Click Forward
5. Enter Network name as per your discretion (Figure 4). In this example, network name is set as
net1. Click on Forward to proceed:
pg. 6
SANDBOX DIY GUIDE
Figure 4 Enter network name and click Forward to proceed
6. Enter network address: 10.0.2.0/24 as shown in the Figure 5. This is the pre-configured network
address for the VM’s management network. Click on Forward to proceed.
pg. 7
SANDBOX DIY GUIDE
Figure 5 Enter network address and click Forward to proceed
✍
Note: Ensure that the network (10.0.2.0) is not already in use by any other network on
the host machine
7. Uncheck Enable DHCP and click on Forward to proceed (Figure 6).
pg. 8
SANDBOX DIY GUIDE
Figure 6 Uncheck Enable DHCP. Click Forward to proceed
8. Set the following properties to connect the VM to the physical network (Figure 7):
a. Select Forwarding to physical network
b. Destination: Any physical device
c. Mode: NAT
Click on Forward to proceed.
pg. 9
SANDBOX DIY GUIDE
Figure 7 Set parameters to connect to physical network
9. Confirm details and click on Finish to proceed and return to the Virtual Machine Manager home
window (Figure 8):
pg. 10
SANDBOX DIY GUIDE
Figure 8 Confirm details and click Finish
10. In the Virtual Machine Manager home window, click on
new virtual machine (Figure 9).
in the top left corner to create a
pg. 11
SANDBOX DIY GUIDE
Figure 9 Create a new virtual machine
11. Enter name for the virtual machine (Figure 10). You can set this at your discretion. In this
example, this has been set as plumstack. Choose Import existing disk image for installing
operating system. Click
to proceed.
pg. 12
SANDBOX DIY GUIDE
Figure 10 Enter name for VM. Select Import existing disk image. Click Forward.
12. Browse to provide the existing storage path (Figure 11):
pg. 13
SANDBOX DIY GUIDE
Figure 11 Provide the existing storage path
Click Forward
13. Enter the following settings for the VM (Figure 12):
a. Memory (RAM): 8192 MB
b. CPUs: 4
Click on Forward to proceed:
pg. 14
SANDBOX DIY GUIDE
Figure 12 Enter memory and CPU settings
14. Check Customize configuration before install (Figure 13). Click on Advanced options to
configure network for VM and select Virtual network ‘net1’:NAT from the drop down list of
available networks. Click on “Finish” to create the VM:
pg. 15
SANDBOX DIY GUIDE
Figure 13 Select network and click Finish
15. Navigate to Disk 1→Advanced options →Storage format and select qcow2 from the drop down
menu. Click on Apply. (Figure 14)
pg. 16
SANDBOX DIY GUIDE
Figure 14 Select qcow2 for storage format
16. Click on
to begin installation of VM.
17. Once the VM boots up, login into the VM by using the following credentials:
Username: plumgrid
Password: plumgrid
pg. 17
SANDBOX DIY GUIDE
18. Open Terminal and run the following command:
$ tail -f /home/plumgrid/devstack-startup.log
✍
Note: Wait for some time while PLUMgrid services are being checked
19. When you see a log message “PLUMgrid Services check Complete” as in the above figure, then
move to “devstack” directory and run rejoin script as follows:
$ cd devstack/
$./rejoin-stack.sh
pg. 18
SANDBOX DIY GUIDE
Note:
✍
1. You can safely ignore any warnings that you see while the script progresses.
Give it 1 minute to bring up all services and then continue using OpenStack.
2. The script keeps on running for the entire duration for which the sandbox is used. In
case the instance is stopped and started again, the user will have to re run the
rejoin-stack.sh script in the devstack folder of the DIY VM.
20. Enter http://10.0.2.10 in the browser to access the OpenStack Dashboard. Log into the
Dashboard by using the following credentials:
Username: admin
Password: plumgrid
Figure 15 Login to OpenStack Horizon
pg. 19
SANDBOX DIY GUIDE
21. To access PLUMgrid Console enter https://10.0.2.250 in the browser. Log into PLUMgrid Console
by entering the credentials below:
Username: plumgrid
Password: plumgrid
✍
Note: Ignore any warning messages related to security exceptions.
Figure 16 Login to PLUMgrid Console
pg. 20
SANDBOX DIY GUIDE
22. To access PLUMgrid CloudApex UI enter https://10.0.2.250/cloudApex/ in the browser. Log into
the CloudApex Console by entering the following credentials (Figure 17):
Username: plumgrid
Password:plumgrid
✍
Note: The cloudApex in the URL is case sensitive.
Figure 17 Login to Cloud Apex
✍
Note: All the UIs mentioned above can also be accessed from a browser on the
host machine (applicable to virt-manager image only)
The Sandbox DIY VM is now ready to be used, please proceed to the Hands-on guide for further
usage information.
pg. 21
SANDBOX DIY GUIDE
Section 3: SANDBOX DIY for VirtualBox (MAC OS/Windows)
This section is for MAC OS/Windows environments.
Prerequisites
1. Virtualbox is installed on the host machine.
2. Ensure that the machine has the following resources free to be allocated to the VM:
Recommended requirements



RAM: 8GB
CPU: 4 cores
Storage: 30 GB
3. Download plumgrid_diy_vdi.tar.gz to obtain the plumgrid_diy_laptop.vdi from the link:
http://52.35.2.34/images/5.0/plumgrid_diy_vdi.tar.gz
4. Untar the downloaded file:
$ tar xvzf plumgrid_diy_vdi.tar.gz
pg. 22
SANDBOX DIY GUIDE
How To Install
Follow the steps below to setup Sandbox DIY on your machine:
1. Open the VirtualBox on your host machine and click
(Figure 18):
Figure 18 Create a Virtual Machine
2. Enter the details below as shown in Figure 19:
a. Enter name for the virtual machine. You can set this at your discretion. In this example, this has
been set as plumstack.
b. OS Type:
 Operating System: Linux
 Version: Ubuntu 64bit
Click Continue
pg. 23
SANDBOX DIY GUIDE
Figure 19 VM Name and OS Type
3. Select the amount of RAM (Figure 20):
Minimum RAM: 8GB
Recommended RAM: 12GB
pg. 24
SANDBOX DIY GUIDE
Figure 20 Select amount of RAM
Click Continue
4. Select “Use Existing Hard Disk” and browse to the location where you downloaded the image
(Figure 21).
pg. 25
SANDBOX DIY GUIDE
Figure 21 Use existing virtual hard disk
Click Create
pg. 26
SANDBOX DIY GUIDE
5. Select the VM you just created and click on “Settings” as shown in Figure 22:
Figure 22 Click on Settings
6. Go to System → Processor and select 4 cores. Enable Extended Features
pg. 27
SANDBOX DIY GUIDE
Figure 23 Provide processors
7. Go to Network. Use the NAT mode for Adapter1. For Adapter 1, check Enable Network adapter
checkbox.
Set Attached to: NAT
pg. 28
SANDBOX DIY GUIDE
Figure 24 Enable Network adapter
8. Now go to main window, select the VM and click on “Start” to power on the VM.
Login to the VM using:
Username: plumgrid
Password: plumgrid
pg. 29
SANDBOX DIY GUIDE
Figure 25 Login to VM
7. Open Terminal and enter the following command:
$ tail -f /home/plumgrid/devstack-startup.log
Wait for some time while PLUMgrid services are being checked:
pg. 30
SANDBOX DIY GUIDE
9. When you see a log message “PLUMgrid Services check Complete” as in the above figure, then
move to “devstack” directory and run rejoin script as follows:
$ cd devstack/
$./rejoin-stack.sh
Note:
✍
1. Note: You can safely ignore any warnings that you see while the script
progresses. Give it 1 minute to bring up all services and then continue using
OpenStack.
2. The script keeps on running for the entire duration for which the sandbox is used. In
case the instance is stopped and started again, the user will have to re run the
rejoin-stack.sh script in the devstack folder of the DIY VM.
10. Enter http://10.0.2.10 in the browser to access the OpenStack Dashboard. Log into the Dashboard
by using the following credentials:
Username: admin
Password: plumgrid
pg. 31
SANDBOX DIY GUIDE
Figure 26 Login to OpenStack Horizon
11. To access PLUMgrid Console enter https://10.0.2.250 in the browser. Ignore the warning message.
Log into PLUMgrid Console by entering the credentials below:
Username: plumgrid
Password: plumgrid
pg. 32
SANDBOX DIY GUIDE
Figure 27 Login to PLUMgrid Console
12. To access CloudApex Console enter https://10.0.2.250/cloudApex/ in the browser. Log into
CloudApex Console by entering the credentials below:
Username: plumgrid
Password: plumgrid
✍
Note: The cloudApex in the URL is case sensitive.
pg. 33
SANDBOX DIY GUIDE
Figure 28 Login to Cloud Apex
Congragulations! The Sandbox DIY VM is now ready to be used, please proceed to the Handson guide for further usage information
pg. 34
SANDBOX DIY GUIDE
Appendix: Troubleshooting
In cases where the host has lower resources, slow/unresponsive behavior can be seen for Sandbox DIY
VM, follow the steps below:
1. Reboot the VM:
$ sudo reboot
2. To check the status of the devstack enviroment after the VM boots, run this command:
$ tail -f /home/plumgrid/devstack -startup.log
3. Move to “devstack” directory and re run rejoin script as follows:
$ cd devstack
$ ./rejoin -script.sh
pg. 35
SANDBOX DIY GUIDE
Contact Us
For customer support queries and comments about this guide, please email support@plumgrid.com
pg. 36
Download