Cygwin will give you a unix like bash shell for your windows.
...
...
This step can be skipped if you made a symlink to python2.7.exe in the Cygwin installation. CloudStack includes portions of Python code. I know you just installed the Cygwin Python but some parts of the maven build process also require a "native" python installation as it won't be able to access the Cygwin installation.
Eclipse is available from http://www.eclipse.org/downloads/
OPTIONAL: CloudStack includes portions of Python code, which is best edited with the PyDev Eclipse plug-in
The M2E plug-in allows Eclipse to import CloudStack's pom.xml Thus, pom.xml files become a substitute for the .project files that Eclipse normally uses.
...
Verify the above by opening a cygwin terminal and using which to discover the location of java and javac. E.g.
Code Block |
---|
$ which java
/cyg/c/bin/Java/jdk1.7.0_25/bin/java
Administrator@cc-svr10 ~
$ which javac
/cyg/c/bin/Java/jdk1.7.0_25/bin/javac
|
This step can be skipped if you made a symlink to python2.7.exe in the Cygwin installation.
CloudStack includes portions of Python code. I know you just installed the Cygwin Python but some parts of the maven build process also require a "native" python installation as it won't be able to access the Cygwin installation.
Eclipse is available from http://www.eclipse.org/downloads/
OPTIONAL: CloudStack includes portions of Python code, which is best edited with the PyDev Eclipse plug-in
...
Add M2Eclipse
OPTIONAL: Install EGit to provide integration to git from Eclipse
For development purposes, you do not need Apache Tomcat. There are Maven scripts available to launch the management server in Jetty, which provides Tomcat functionality.
Apache Tomcat is the open source web server and servlet container that hosts CloudStack's management server.
You can download Tomcat from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.exe
Use C:\cstoosls\Tomcat6.0
insteadTo inform the Cygwin environment of where Tomcat is, update your Windows environment variables.
C:\cstoosls\Tomcat6.0
NB: Test your environment variables by opening a Cygwin shell and typing 'which Tomcat6'. This should return the path to the Tomcat executable.
Download the self-installing exe from http://dev.mysql.com/downloads/mysql/5.0.html#downloads
Download the self-installing exe for Python 2.7 from http://dev.mysql.com/downloads/connector/python/
...
The M2E plug-in allows Eclipse to import CloudStack's pom.xml Thus, pom.xml files become a substitute for the .project files that Eclipse normally uses.
Install M2E using Eclipse
Add M2Eclipse
OPTIONAL: Install EGit to provide integration to git from Eclipse
For development purposes, you do not need Apache Tomcat. There are Maven scripts available to launch the management server in Jetty, which provides Tomcat functionality.
Apache Tomcat is the open source web server and servlet container that hosts CloudStack's management server.
You can download Tomcat from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.exe
Use C:\cstoosls\Tomcat6.0
insteadTo inform the Cygwin environment of where Tomcat is, update your Windows environment variables.
C:\cstoosls\Tomcat6.0
NB: Test your environment variables by opening a Cygwin shell and typing 'which Tomcat6'. This should return the path to the Tomcat executable.
Download the self-installing exe from http://dev.mysql.com/downloads/mysql/5.0.html#downloads
Install varies depending on whether you are using Python2.7 distributed with Cygwin or Python2.7 installed via an MSI.
In both cases, go to the downloads page: http://dev.mysql.com/downloads/connector/python/#downloads
For .MSI, select Platform to be "Microsoft Windows", and use the ver. 2.7 MSI.
For Cygwin, it is easiest to use easy_install or pip (Source) E.g. .
Code Block |
---|
Administrator@cc-svr10 ~
$ easy_install mysql-connector-python
Searching for mysql-connector-python
Reading http://pypi.python.org/simple/mysql-connector-python/
Best match: mysql-connector-python 1.0.10
Downloading http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.10.zip
Processing mysql-connector-python-1.0.10.zip
Writing /tmp/easy_install-ZFHHNn/mysql-connector-python-1.0.10/setup.cfg
Running mysql-connector-python-1.0.10/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZFHHNn/mysql-connector-python-1.0.10/egg-dist-tmp-wICK6D
zip_safe flag not set; analyzing archive contents...
Adding mysql-connector-python 1.0.10 to easy-install.pth file
Installed /usr/lib/python2.7/site-packages/mysql_connector_python-1.0.10-py2.7.egg
Processing dependencies for mysql-connector-python
Finished processing dependencies for mysql-connector-python
|
A manual installation of Ant is only required for building CloudStack 4.0.
...
git clone
https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.gitGenerate ssh key in your $HOME directory (the CloudStack Management server will be looking for this at run time)
ssh-keygen -t rsa -q
...
-q
Ignore this step if you've already created a symlink under step #1. To check use 'which' to see if mkisofs is already available. E.g.
Code Block |
---|
Administrator@cc-svr10 ~
$ which mkisofs
/usr/bin/mkisofs
|
Cygwin's mkisofs is a soft link. These do not work with the build.
...
Password is assigned to DBROOTPW= in the build/replace.properties file.
E.g.
Code Block |
---|
...
$ cat build/ |
...
replace.properties |
...
DBUSER=cloud |
...
DBPW=cloud |
...
DBROOTPW= |
...
MSLOG=vmops.log |
...
APISERVERLOG=api.log |
...
DBHOST=localhost |
...
AGENTLOGDIR=logs |
...
AGENTLOG=logs/agent.log |
...
MSMNTDIR=/mnt |
...
COMPONENTS-SPEC=components-premium.xml |
...
|
To clean out existing artifacts, go to the cloudstack source folder and run:
...
To compile Apache CloudStack, go to the cloudstack source folder and run:
mvn install
mvn install -P developer,systemvm
To deploy the database:
mvn -P developer -pl developer -Ddeploydb
...
1) Problem: Log4j not properly configured
E.g.
Code Block |
---|
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.params.DefaultHttpParams).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
|
Workaround 1
Change name of config file. e.g.
Code Block |
---|
cp client/target/cloud-client-ui-4.2.0-SNAPSHOT/WEB-INF/classes/log4j{,-cloud}.xml
|
Workaround 2
Set CATALINA_BASE e.g.
Code Block | ||
---|---|---|
| ||
export CATALINA_BASE=X:/path/to/dir/contains/conf/log4j-cloud.xml |
X: is the windows disk label , PropertiesUtil will find : CATALINA_HOME or CATALINA_BASE .
2) Problem: Server will not start and throws following exception
...
Workaround:
This problem can arise when launching the server with too small of a heap. If you are launching using Maven, use MAVEN_OPTS to increase the stack size.
E.g.
Code Block |
---|
export MAVEN_OPTS="-XX:MaxPermSize=256m -Xmx1g"
mvn -pl :cloud-client-ui jetty:run
|
...
WARN utils.script.Script (main-) Exception: /usr/local/bin/bash
> > -c echo
> ~scvmm
> > java.io.IOException: Cannot run program "/usr/local/bin/bash":
> CreateProcess error=2, The system cannot find the file specified
> > at java.lang.ProcessBuilder.start(Unknown Source))
> > at com.cloud.utils.script.Script.execute(Script.java:184)
> >
> > ....
> > ....
> > ERROR cloud.servlet.CloudStartupServlet (main-) Exception starting
> management server
> > at com.cloud.utils.script.Script.execute(Script.java:184)
> >
> > ....
> > ....
> > ERROR cloud.servlet.CloudStartupServlet (main-) Exception starting
> management server
> > com.cloud.utils.exception.CloudRuntimeException: Cannot get home
> directory for account: scvmm
Workaround:
Skip key generation and cloudstack works fine.
This is done by setting developer=true in the configuration table, by running the following SQL statement in MySQL
exception.CloudRuntimeException: Cannot get home
> directory for account: scvmm
Workaround:
Skip key generation and cloudstack works fine.
This is done by setting developer property in the configuration table as follows, by running the following SQL statement in MySQL
Code Block |
---|
use cloud;
update configuration set value='false' where name='developer';
|
This changes the developer mode to false, which combined with a non 'cloud' username will skip the key generation.
Caveat: KVM stops working after this workaround. Any help from community on fixing KVM support as well is needed.
4) Problem: CloudStack not starting system VMs on local storage
By default system.vm.use.local.storage is set to false. If you want to use local storage, set it to true using the GUI. Alternatively, if the management server has started, you can update the database with the command below:
Code Block |
---|
Code Block |
use cloud; update configuration set value='falsetrue' where name='developersystem.vm.use.local.storage'; |
This changes the developer mode to false, which combined with a non 'cloud' username will skip the key generation.
Caveat: KVM stops working after this workaround. Any help from community on fixing KVM support as well is needed.
You will have to restart the management server if it is running.
54) Problem: Server will not start with Exception in thread Timer-2, Exception in thread Timer-1.
export MAVEN_OPTS="-Xmx2048m -XX:MaxPermSize=800m -Xmx2g -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
56) Problem: Eclipse becomes unresponsive with high resource utilization:
Go to Eclipse folder and Change following (towards the end) in .ini configuration file.
-vmargs
-Dosgi.
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms384m
-Xmx2048m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms384m
requiredJavaVersion=1.5
-Xms384m
-Xmx2048m
7) Problem : can not find sudo command
Workaround , create a bash file named as /bin/sudo with script content :
Code Block | ||
---|---|---|
| ||
#!/usr/bin/bash
cygstart --action=runas "$@" |
then chmod +x /bin/sudo
-Xmx2048m