You are reading the wright guide, if you want to setup an environment to contribute to CloudUnit development.
- Linux Ubuntu/Debian
- Git / Java 1.8
- VirtualBox 5.0.4+ (www.virtualbox.org) - install before Vagrant
- Vagrant 1.8+ (www.vagrantup.com)
- Maven 3+ (maven.apache.org)
- You have to configure a local dns (see further) to send any requests from your host to VM (IP fixed at 192.168.50.4)
- You use your favorite idea (intellij, Eclipse) to develop the maven project cloudunit
- The backend is a spring application exposing a REST API
- The frontend is an AngularJS 1.4 consuming the backend API from Spring Java
- You run the project with an embedded tomcat via maven tasks (tomcat:run). No need to install Tomcat locally.
- Mysql is included into vagrantbox so no need to install it locally.
cloudunit/cu-manager : Maven project for backend ui
cloudunit/cu-manager-ui : Maven project for web ui
cloudunit/cu-cli : Maven project for Spring Shell CLI
cloudunit/cu-compose : Shell scripts for administration
cloudunit/cu-services : Docker images
[Linux Host] sudo apt-get install ruby-dev
[Linux Host] sudo vagrant plugin install vagrant-reload
[Linux Host] sudo vagrant plugin install vagrant-vbguest
[Linux Host] cd $HOME && git clone https://github.com/Treeptik/cloudunit.git
Follow these instructions :
Installation Node 5.x :
[Linux Host] curl -sL https://deb.nodesource.com/setup_5.x | sudo bash -
[Linux Host] sudo apt-get install nodejs
[Linux Host] sudo npm install -g grunt grunt-cli bower
[Linux Host] cd $HOME/cloudunit/cu-manager-ui && npm install
[Linux Host] cd $HOME/cloudunit/cu-manager-ui && bower install
Warning because this step could take a long time!
If your machine has 16 GB Memory
[Linux Host] cd $HOME/cloudunit/cu-vagrant
[Linux Host] ./mediumbox.sh
Otherwise your machine has 8 GB Memory
[Linux Host] cd $HOME/cloudunit/cu-vagrant
[Linux Host] ./smallbox.sh
[Linux Host] cd $HOME/cloudunit
[Linux Host] mvn clean install -DskipTests
[Linux Host] cd $HOME/cloudunit/cu-vagrant
[Linux Host] vagrant ssh
[VagrantBox] cd cloudunit/cu-compose && ./reset-dev.sh [ press y ]
In your favorite IDE, select Import in File menu then Existing Maven project the directory cloudunit
Open the project with your favorite IDE into root directory and add cloudunit as Maven Project.
Create a new maven task with working directory as cloudunit/cu-manager
Use this option with maven : clean compile tomcat7:run -DskipTests -Dspring.profiles.active=vagrant
For Eclipse :
For Intellij :
Outside the vagrand box
[Linux Host] cd $HOME/cloudunit/cu-manager-ui && grunt serve
Open http://0.0.0.0:9000 and you can use default password and login
login: johndoe
password: abc2015
All questions and answers about dev tasks
[Linux Host] vagrant ssh
[VagrantBox] cd cloudunit/cu-compose && ./reset-dev.sh
Update your sources, build the images and reninit the database :
[Linux Host] vagrant ssh dev
[VagrantBox] cd cloudunit/cu-compose && ./build-services.sh all
[VagrantBox] cd cloudunit/cu-compose && ./reset-dev.sh
First of all, you have to install Google Chrome. Then, start the application (see step 6) in parallel.
[Linux Host] cd $HOME/cloudunit/cu-manager-ui
[Linux Host] grunt test
Outside the vagrand box
[Linux Host] cd $HOME/cloudunit
[Linux Host] mvn clean install -DskipTests
[Linux Host] cd $HOME/cloudunit/cu-manager
[Linux Host] mvn clean compile tomcat7:run -DskipTests -Dspring.profiles.active=vagrant