CloudStack 4.3 source Deployment +eclipse Remote Debugging

Source: Internet
Author: User
Tags python mysql git clone cloudstack

CloudStack 4.3 Source deployment system Environment

Create a virtual machine under VMware Workstation with Centos6.5 64bit

Installing the Software

1. Yum install git mysql mysql-server mkisofs gcc python mysql-python openssh-clients wget

2. Download maven and unzip to/root/maven directory

3. Download Ant and Unzip to/root/ant directory

4. Download Sun JDK 7 and unzip to/ROOT/JDK directory

5. Download Tomcat7 and unzip to/root/tomcat directory

6. Configure the volume/etc/profile file add variable configuration at the end of the file

Export  m2_home=/root/maven/apache-maven-3.2.1export path= $PATH: $M 2_home/binexport ant_home=/root/ant/ Apache-ant-1.9.4export path= $ANT _home/bin: $PATHexport tomcat_home=/root/tomcat/apache-tomcat-7.0.54export PATH=$ PATH: $TOMCAT _home/binexport java_home=/root/java/jdk1.7.0_60export path= $JAVA _home/bin: $PATHexport classpath=.:$ Java_home/lib/dt.jar: $JAVA _home/lib/tools.jar

Restart the virtual machine for the configured environment variable to take effect.

7. Install MySQL, configure MySQL: start mysql:service mysqld restart

Configure MySQL boot: chkconfig mysqlkd on

SOURCE download

Use git to download cloudstack 4.3 source code:git clone-b 4.3--recursivehttps://github.com/apache/cloudstack.git

Compile run

Enter the Cloudstack source directory and modify the database configuration Build/replace.properties

Dbuser=clouddbpw=clouddbrootpw=123456a? mslog=vmops.logapiserverlog=api.logdbhost=localhostagentlogdir=logsagentlog=logs/agent.logmsmntdir=/ mntcomponents-spec=components.xmlawsapilog=awsapi.logremotehost=localhostcommonlibdir=/root/workspace/ Cloudstack/client/target/cloud-client-ui-4.3.0-snapshot/web-inf/classes

Enter directory cloudstack source directory:

Perform:

1.mvn Clean

2, mvn-p deps download dependency

3. MVN Install

4.mvn-p DEVELOPER-DDEPLOYDB-PL Developer Initialization Database

5. Operation:MVN-PL client Jetty:run

The Cloudstack Management Server is in the running state.

Problems

1. If there is an out-of-memory situation, you can set Tomcat's JVM memory: export MAVEN_OPTS="-Xmx1024m -Xms256m -XX:PermSize=256m"
2. How to perform debug setup parameters export MAVEN_OPTS="-Xmx512m -Xms128m -XX:PermSize=128m -xdebug-xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

3, modify Cloudstack database address: Need to modify files: Cloudstack/utils/conf/db.properties and Cloudstack/tools/devcloud/devcloud.cfg and cloudstack/build/replace.properties

Eclipse Remote Debugging Prerequisites

1, using git clone-b 4.3--recursivehttps://github.com/apache/cloudstack.git Get the source code, about 400M

2, Eclipse installs M2E plug-in, Pydev plug-in, use jdk1.6

3, the remote machine has been in accordance with the above source code compilation run Start, wherein the maven_opts parameter is set to: Export maven_opts= "-xmx512m-xms128m-xx:permsize=128m-xdebug-xrunjdwp : Transport=dt_socket,address=8787,server=y,suspend=n "

Eclipse debugging

Eclipse imports the source code, and then executes MVN clean, as shown in:

Perform the Mvn-p deps as shown:

Perform the compilation as shown in:

For remote debugging:

This time you need to add the source code:

After you start, you can break the point for debugging.

Problems

Because the amount of code is too large, eclipse will have Java heap space errors, or GC frequent errors. You can give me the configuration I'm using by modifying the Eclipse.ini file:

OpenFile  --launcher. Xxmaxpermsize  256M  -showsplash  org.eclipse.platform  --launcher. Xxmaxpermsize  512m  --launcher.defaultaction  openFile  -vmargs  -dosgi.requiredjavaversion= 1.5  -xms1024m  -xmx2048m


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.