Skip to content

Commit

Permalink
README: update
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Yadav <[email protected]>
  • Loading branch information
rohityadavcloud committed Feb 9, 2021
1 parent cd3e672 commit bd4be77
Showing 1 changed file with 44 additions and 34 deletions.
78 changes: 44 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,60 +13,70 @@ Notes:
please uninstall it before proceeding further.
- Default password for the root user is `P@ssword123`.

Setup NFS on /export (see setting up NFS), install mbx templates (mbxt) as
follows:
## Installation

mkdir -p /export
git clone https://github.com/shapeblue/mbx /export/monkeybox
cd /export/monkeybox/templates
# Download pre-built mbx templates
wget http://download.cloudstack.org/templates/mbx/kvm-centos7.qcow2
wget http://download.cloudstack.org/templates/mbx/vmware67u3.qcow2
wget http://download.cloudstack.org/templates/mbx/xcpng76.qcow2
wget http://download.cloudstack.org/templates/mbx/xenserver71.qcow2
wget http://download.cloudstack.org/templates/mbx/md5sum.txt
# After downloading run the md5sum check again the md5sum.txt
md5sum --check md5sum.txt
# Next setup mbx tool:
cd /export/monkeybox
sudo cp files/sudoer.mbx /etc/sudoers.d/mbx
# Enable mbx under $PATH, for bash:
echo export PATH="/export/monkeybox:$PATH" >> ~/.bashrc
# Enable mbx under $PATH, for zsh:
echo export PATH="/export/monkeybox:$PATH" >> ~/.zshrc
NFS server and KVM are prerequisites to using `mbx`.

Fixing permissions for libvirt-qemu:
### Install and setup NFS

sudo getfacl -e /export
sudo setfacl -m u:libvirt-qemu:rx /export
apt-get install nfs-kernel-server quota
echo "/export *(rw,async,no_root_squash,no_subtree_check)" > /etc/exports
mkdir -p /export/testing
exportfs -a
sed -i -e 's/^RPCMOUNTDOPTS="--manage-gids"$/RPCMOUNTDOPTS="-p 892 --manage-gids"/g' /etc/default/nfs-kernel-server
sed -i -e 's/^STATDOPTS=$/STATDOPTS="--port 662 --outgoing-port 2020"/g' /etc/default/nfs-common
echo "NEED_STATD=yes" >> /etc/default/nfs-common
sed -i -e 's/^RPCRQUOTADOPTS=$/RPCRQUOTADOPTS="-p 875"/g' /etc/default/quota
service nfs-kernel-server restart

### Install and setup KVM

## Install KVM on your Laptop
apt-get install qemu-kvm libvirt-daemon bridge-utils cpu-checker nfs-kernel-server quota
kvm-ok

Install KVM using following:
Fixing permissions for libvirt-qemu:

# apt-get install qemu-kvm libvirt-daemon bridge-utils cpu-checker
# kvm-ok
sudo getfacl -e /export
sudo setfacl -m u:libvirt-qemu:rx /export

Install Libvirt NSS for name resolution:

# apt-get install libnss-libvirt
apt-get install libnss-libvirt

Next, add the following so that `grep -w 'hosts:' /etc/nsswitch.conf` returns:
Next, add the following so that `grep -w 'hosts:' /etc/nsswitch.conf` returns:

files libvirt libvirt_guest dns mymachines

Install `virt-manager`, the virtual machine manager graphical tool to manage VMs
on your machine:

# apt-get install virt-manager
apt-get install virt-manager

![VM Manager](doc/images/virt-manager.png)

Note: you need to install/setup KVM only once.

Install docker for packaging: https://docs.docker.com/engine/install/ubuntu/

## Setup Network and Templates
### Install `mbx`

git clone https://github.com/shapeblue/mbx /export/monkeybox
cd /export/monkeybox/templates
# Download pre-built mbx templates
wget http://download.cloudstack.org/templates/mbx/kvm-centos7.qcow2
wget http://download.cloudstack.org/templates/mbx/vmware67u3.qcow2
wget http://download.cloudstack.org/templates/mbx/xcpng76.qcow2
wget http://download.cloudstack.org/templates/mbx/xenserver71.qcow2
wget http://download.cloudstack.org/templates/mbx/md5sum.txt
# After downloading run the md5sum check again the md5sum.txt
md5sum --check md5sum.txt
# Next setup mbx tool:
cd /export/monkeybox
sudo cp files/sudoer.mbx /etc/sudoers.d/mbx
# Enable mbx under $PATH, for bash:
echo export PATH="/export/monkeybox:$PATH" >> ~/.bashrc
# Enable mbx under $PATH, for zsh:
echo export PATH="/export/monkeybox:$PATH" >> ~/.zshrc

### Setup `mbx` Network

For our local dev-qa environment, we'll create a 172.20.0.0/16 virtual network
with NAT so VMs on this network are only accessible from the host/laptop but
Expand Down Expand Up @@ -237,7 +247,7 @@ locally to do local CloudStack development along side an IDE.

Run this:

$ sudo apt-get install openjdk-11-jdk maven python-mysql.connector libmysql-java mysql-server mysql-client bzip2 nfs-common uuid-runtime python-setuptools ipmitool genisoimage nfs-kernel-server quota
$ sudo apt-get install openjdk-11-jdk maven python-mysql.connector libmysql-java mysql-server mysql-client bzip2 nfs-common uuid-runtime python-setuptools ipmitool genisoimage

Setup IntelliJ (recommended) or any IDE of your choice. Get IntelliJ IDEA
community edition from:
Expand Down

0 comments on commit bd4be77

Please sign in to comment.