So my first step was to install and run Apache cloudstack in my pc. We have several ways to do that.
1. Follow this documentation and install apache cloudstack in your local machine.
2. Follow this documentation in order to use building from source method.
3. Follow this post in order to use devcloud.
4. Use this vagrant script to automatic configuration(using vagrant and virtualbox).
If you are a beginner to cloudstack I recommend 1st way for you(In order to get basic knowledge about configuration). But if you need to configure cloudstack automatically you can choose the 4th way. I prefer to use the 4th way because, that is the easiest method. So in this post, I'll discuss about the 4th way.
These are the steps for automatic configuration of cloudstack (For ubuntu):
1. If you need to get the latest source of the auto configuration script clone this git repository. https://github.com/imduffy15/devcloud4
NOTE: In case if they have changed the script, the following steps will not be worked. So If you would like to follow the steps I recommend below download this zip file and extract it instead of the git repository.
2. . Download and Install VirtualBox - (https://www.virtualbox.org/wiki/Downloads)
3 . Download and install Vagrant - (https://www.vagrantup.com/downloads.html)
4. Install vagrant plugins:
Navigate to the cloned repository and run this command.
bash scripts/vagrant_prep.sh vbox
5. If you would like to use basic networking add one host only adapter in virtualbox with these configuration.
vboxnet0
- IPv4 IP address of 192.168.56.1
- Subnet of 255.255.255.0
- DHCP server disabled
6. If you would like to use advanced networking add another two host only adapters in virtualbox with these configuration.
vboxnet1
- IPv4 IP address of 192.168.57.1
- Subnet of 255.255.255.0
- DHCP server disabled
vboxnet2
- IPv4 IP address of 192.168.58.1
- Subnet of 255.255.255.0
- DHCP server disabled
7. If you choose basic networking , navigate to the basic folder in cloned repository and run the following command.
vagrant up
8. If you choose advanced networking , navigate to the advanced folder in cloned repository and run the following command.
vagrant up
9. Clone the cloudstack repository.
git clone https://github.com/apache/cloudstack.git
Navigate to cloudstack repository and run following commands.
10. Download vhd-util:
wget http://download.cloud.com.s3.amazonaws.com/tools/vhd-util -P scripts/vm/hypervisor/xenserver/
chmod +x scripts/vm/hypervisor/xenserver/vhd-util
11.Compile cloudstack using following command (you need to have java and maven installed before run this command).
mvn -P developer,systemvm clean install -DskipTests=true
12. Deploy cloudstack database using following command.
mvn -P developer -pl developer,tools/devcloud -Ddeploydb
13. Start cloudstack using following command.
mvn -pl :cloud-client-ui jetty:run
14. Install Marvin. (You need to have python pip installed before run this command)
pip install tools/marvin/dist/Marvin-0.1.0.tar.gz
15. Deploy cloudstack infrastructure.
Navigate to the first git repository you cloned(in step 1).
If you choose basic networking run this command.
python -m marvin.deployDataCenter -i basic/basic.json
if you choose advanced networking run this command.
python -m marvin.deployDataCenter -i advanced/advanced.json
16. Using your browser navigate to cloudstak UI.
ex: http://localhost:8080/client
If every thing went smoothly you have to wait some time before start instances. Go to the templates tab in cloudstack UI and click on the tinylinux template. If that template is in ready state you can start instances. Let's meet on the next post which discuss errors I got when I install cloudstack and solutions.
NOTE: In case if they have changed the script, the following steps will not be worked. So If you would like to follow the steps I recommend below download this zip file and extract it instead of the git repository.
2. . Download and Install VirtualBox - (https://www.virtualbox.org/wiki/Downloads)
3 . Download and install Vagrant - (https://www.vagrantup.com/downloads.html)
4. Install vagrant plugins:
Navigate to the cloned repository and run this command.
bash scripts/vagrant_prep.sh vbox
5. If you would like to use basic networking add one host only adapter in virtualbox with these configuration.
vboxnet0
- IPv4 IP address of 192.168.56.1
- Subnet of 255.255.255.0
- DHCP server disabled
6. If you would like to use advanced networking add another two host only adapters in virtualbox with these configuration.
vboxnet1
- IPv4 IP address of 192.168.57.1
- Subnet of 255.255.255.0
- DHCP server disabled
vboxnet2
- IPv4 IP address of 192.168.58.1
- Subnet of 255.255.255.0
- DHCP server disabled
7. If you choose basic networking , navigate to the basic folder in cloned repository and run the following command.
vagrant up
8. If you choose advanced networking , navigate to the advanced folder in cloned repository and run the following command.
vagrant up
9. Clone the cloudstack repository.
git clone https://github.com/apache/cloudstack.git
Navigate to cloudstack repository and run following commands.
10. Download vhd-util:
wget http://download.cloud.com.s3.amazonaws.com/tools/vhd-util -P scripts/vm/hypervisor/xenserver/
chmod +x scripts/vm/hypervisor/xenserver/vhd-util
11.Compile cloudstack using following command (you need to have java and maven installed before run this command).
mvn -P developer,systemvm clean install -DskipTests=true
12. Deploy cloudstack database using following command.
mvn -P developer -pl developer,tools/devcloud -Ddeploydb
13. Start cloudstack using following command.
mvn -pl :cloud-client-ui jetty:run
14. Install Marvin. (You need to have python pip installed before run this command)
pip install tools/marvin/dist/Marvin-0.1.0.tar.gz
15. Deploy cloudstack infrastructure.
Navigate to the first git repository you cloned(in step 1).
If you choose basic networking run this command.
python -m marvin.deployDataCenter -i basic/basic.json
if you choose advanced networking run this command.
python -m marvin.deployDataCenter -i advanced/advanced.json
16. Using your browser navigate to cloudstak UI.
ex: http://localhost:8080/client
If every thing went smoothly you have to wait some time before start instances. Go to the templates tab in cloudstack UI and click on the tinylinux template. If that template is in ready state you can start instances. Let's meet on the next post which discuss errors I got when I install cloudstack and solutions.
0 comments:
Post a Comment