Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ tools/marvin/marvin/cloudstackAPI/
tools/marvin/build/
tools/cli/build/
*.jar
!.mvn/wrapper/maven-wrapper.jar
*.war
*.mar
*.iso
Expand Down
1 change: 1 addition & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom
Empty file added .mvn/maven.config
Empty file.
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
65 changes: 33 additions & 32 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,40 @@ Install tools and dependencies used for development:
$ yum install git ant ant-devel java-1.6.0-openjdk java-1.6.0-openjdk-devel
mysql mysql-server mkisofs gcc python MySQL-python openssh-clients wget

# yum -y update
# yum -y install java-1.7.0-openjdk
# yum -y install java-1.7.0-openjdk-devel
# yum -y install mysql-server
# yum -y install git
# yum -y install genisoimage
$ yum -y update
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not valid. the prompt you could run yum from on most syustems would be '#'

$ yum -y install java-1.7.0-openjdk
$ yum -y install java-1.7.0-openjdk-devel
$ yum -y install mysql-server
$ yum -y install git
$ yum -y install genisoimage

Set up Maven (3.0.5):

# wget http://www.us.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
# tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /usr/local
# cd /usr/local
# ln -s apache-maven-3.0.5 maven
# echo export M2_HOME=/usr/local/maven >> ~/.bashrc # or .zshrc or .profile
# echo export PATH=/usr/local/maven/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile
# source ~/.bashrc
$ wget http://www.us.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
$ tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /usr/local
$ cd /usr/local
$ ln -s apache-maven-3.0.5 maven
$ echo export M2_HOME=/usr/local/maven >> ~/.bashrc # or .zshrc or .profile
$ echo export PATH=/usr/local/maven/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile
$ source ~/.bashrc

*N.B.* Since 4.0.11 we're using [Maven Wrapper](https://github.com/takari/maven-wrapper) and you don't need to install Maven on dev/CI machine.

Start the MySQL service:

$ service mysqld start

### Using jenv and/or pyenv for Version Management

CloudStack is built using Java and Python. To make selection of these tools versions more consistent and ease installation for developers, optional support for [jenv](http://www.jenv.be/) and [pyenv](https://github.com/yyuu/pyenv) with [virtualenv]|(https://github.com/yyuu/pyenv-virtualenv) is provided. jenv installation instructions are available here and pyenv installation instructions are available here. For users of [oh-my-zsh](http://ohmyz.sh/) there is a pyenv plugin available to trigger configuration of pyenv in a shell session.
CloudStack is built using Java and Python. To make selection of these tools versions more consistent and ease installation for developers, optional support for [jenv](http://www.jenv.be/) and [pyenv](https://github.com/yyuu/pyenv) with [virtualenv](https://github.com/yyuu/pyenv-virtualenv) is provided. jenv installation instructions are available here and pyenv installation instructions are available here. For users of [oh-my-zsh](http://ohmyz.sh/) there is a pyenv plugin available to trigger configuration of pyenv in a shell session.

Following installation, execute the following commands to configure jenv and pyenv for use with CloudStack development:

'''
# pyenv install 2.7.11 # Install Python 2.7.11
# pyenv virtualenv 2.7.11 cloudstack # Create a cloidstack virtualenv using Python 2.7.11
# pip install -r <root CloudStack source tree>/requirements.txt # Install cloudstack Python dependencies
# jenv add <path to JDK 1.7 installation> # Add Java7 to jenv
'''
$ pyenv install 2.7.11 # Install Python 2.7.11
$ pyenv virtualenv 2.7.11 cloudstack # Create a cloidstack virtualenv using Python 2.7.11
$ pip install -r <root CloudStack source tree>/requirements.txt # Install cloudstack Python dependencies
$ jenv add <path to JDK 1.7 installation> # Add Java7 to jenv


*N.B.* If you are running Linux, you may need to install additional packages to allow pyenv to build Python.

Expand All @@ -72,19 +73,19 @@ To checkout a specific branch, for example 4.4, do:

Clean and build:

$ mvn clean install -P systemvm,developer
$ ./mvnw clean install -P systemvm,developer

Clear old database (if any) and deploy the database schema:

$ mvn -P developer -pl developer -Ddeploydb
$ ./mvnw -P developer -pl developer -Ddeploydb

Export the following variable if you need to run and debug the management server:

$ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

Start the management server:

$ mvn -pl :cloud-client-ui jetty:run
$ ./mvnw -pl :cloud-client-ui jetty:run

If this works, you've successfully setup a single server Apache CloudStack installation.

Expand Down Expand Up @@ -112,7 +113,7 @@ releases of CloudStack

To build all non redistributable components, add the noredist flag to the build command:

$ mvn clean install -P systemvm,developer -Dnoredist
$ ./mvnw clean install -P systemvm,developer -Dnoredist

## Packaging and Installation

Expand All @@ -122,12 +123,12 @@ Before packaging, please make sure you go through the "Building" section above.

To create debs install the following extra packages:

# apt-get -y install python-mysqldb
# apt-get -y install debhelper
$ apt-get -y install python-mysqldb
$ apt-get -y install debhelper

Then:

$ mvn -P deps # -D noredist, for noredist as described in the "Building" section above
$ ./mvnw -P deps # -D noredist, for noredist as described in the "Building" section above
$ dpkg-buildpackage -uc -us

All the deb packages will be located one level down.
Expand All @@ -136,11 +137,11 @@ All the deb packages will be located one level down.

To create rpms, install the following extra packages:

# yum -y install rpm-build
# yum -y install ws-commons-util
# yum -y instal gcc
# yum -y install glibc-devel
# yum -y install MySQL-python
$ yum -y install rpm-build
$ yum -y install ws-commons-util
$ yum -y instal gcc
$ yum -y install glibc-devel
$ yum -y install MySQL-python

Then:

Expand Down
12 changes: 6 additions & 6 deletions deps/install-non-oss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@

# From https://devcentral.f5.com
# Version: unknown
mvn install:install-file -Dfile=cloud-iControl.jar -DgroupId=com.cloud.com.f5 -DartifactId=icontrol -Dversion=1.0 -Dpackaging=jar
../mvnw install:install-file -Dfile=cloud-iControl.jar -DgroupId=com.cloud.com.f5 -DartifactId=icontrol -Dversion=1.0 -Dpackaging=jar

# From Citrix
# Version: unknown
mvn install:install-file -Dfile=cloud-netscaler-sdx.jar -DgroupId=com.cloud.com.citrix -DartifactId=netscaler-sdx -Dversion=1.0 -Dpackaging=jar
../mvnw install:install-file -Dfile=cloud-netscaler-sdx.jar -DgroupId=com.cloud.com.citrix -DartifactId=netscaler-sdx -Dversion=1.0 -Dpackaging=jar

# From http://support.netapp.com/ (not available online, contact your support representative)
# Version: 4.0
if [ -e cloud-manageontap.jar ]; then mv cloud-manageontap.jar manageontap.jar; fi
mvn install:install-file -Dfile=manageontap.jar -DgroupId=com.cloud.com.netapp -DartifactId=manageontap -Dversion=4.0 -Dpackaging=jar
../mvnw install:install-file -Dfile=manageontap.jar -DgroupId=com.cloud.com.netapp -DartifactId=manageontap -Dversion=4.0 -Dpackaging=jar

# From https://my.vmware.com/group/vmware/get-download?downloadGroup=VSP510-WEBSDK-510
# Version: 5.1, Release-date: 2012-09-10, Build: 774886
mvn install:install-file -Dfile=vim25_51.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim25 -Dversion=5.1 -Dpackaging=jar
../mvnw install:install-file -Dfile=vim25_51.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim25 -Dversion=5.1 -Dpackaging=jar

# From https://my.vmware.com/group/vmware/get-download?downloadGroup=WEBSDK550
mvn install:install-file -Dfile=vim25_55.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim25 -Dversion=5.5 -Dpackaging=jar
../mvnw install:install-file -Dfile=vim25_55.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim25 -Dversion=5.5 -Dpackaging=jar

# From https://my.vmware.com VMware-vSphere-SDK-6.0.0-3634981.zip
mvn install:install-file -Dfile=vim25_60.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim25 -Dversion=6.0 -Dpackaging=jar
../mvnw install:install-file -Dfile=vim25_60.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim25 -Dversion=6.0 -Dpackaging=jar
227 changes: 227 additions & 0 deletions mvnw

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading