Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}
h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
.tabSelected{color:[[ColorPalette::PrimaryDark]];
background:[[ColorPalette::TertiaryPale]];
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-top:1px solid [[ColorPalette::TertiaryLight]];
border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}
#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.tiddler .defaultCommand {font-weight:bold;}
.shadow .title {color:[[ColorPalette::TertiaryDark]];}
.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}
.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}
.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}
.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}
.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}
.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
.imageLink, #displayArea .imageLink {background:transparent;}
.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}
#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity=60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#mainMenu .tiddlyLinkExisting,
#mainMenu .tiddlyLinkNonExisting,
#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0px; top:0px;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}
#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#contentWrapper {display:block;}
#splashScreen {display:none;}
#displayArea {margin:1em 17em 0 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}
.fieldsetFix {border:0; padding:0; margin:1px 0px;}
.sparkline {line-height:1em;}
.sparktick {outline:0;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser
Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])
<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]
----
Also see [[AdvancedOptions]]
---------------------------------------------------------------------
FOR ANT USERS
---------------------------------------------------------------------
If you are using Ant directly instead of using waf, these instructions apply to you:
in this document, the example instructions are based on local source repository rooted at c:\root. You are free to locate it to anywhere you'd like to.
3.1 Setup developer build type
1) Go to c:\cloud\java\build directory
2) Copy file build-cloud.properties.template to file build-cloud.properties, then modify some of the parameters to match your local setup. The template properties file should have content as
debug=true
debuglevel=lines,vars,source
tomcat.home=$TOMCAT_HOME --> change to your local Tomcat root directory such as c:/apache-tomcat-6.0.18
debug.jvmarg=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
deprecation=off
build.type=developer
target.compat.version=1.5
source.compat.version=1.5
branding.name=default
3) Make sure the following Environment variables and Path are set:
set enviroment variables:
CATALINA_HOME:
JAVA_HOME:
CLOUD_HOME:
MYSQL_HOME:
update the path to include
MYSQL_HOME\bin
4) Clone a full directory tree of C:\cloud\java\build\deploy\production to C:\cloud\java\build\deploy\developer
You can use Windows Explorer to copy the directory tree over. Please note, during your daily development process, whenever you see updates in C:\cloud\java\build\deploy\production, be sure to sync it into C:\cloud\java\build\deploy\developer.
3.2 Common build instructions
After you have setup the build type, you are ready to perform build and run Management Server alone locally.
cd java
python waf configure build install
More at Build system.
Will install the management server and its requisites to the appropriate place (your Tomcat instance on Windows, /usr/local on Linux). It will also install the agent to /usr/local/cloud/agent (this will change in the future).
4. Database and Server deployment
After a successful management server build (database deployment scripts use some of the artifacts from build process), you can use database deployment script to deploy and initialize the database. You can find the deployment scripts in C:/cloud/java/build/deploy/db. deploy-db.sh is used to create, populate your DB instance. Please take a look at content of deploy-db.sh for more details
Before you run the scripts, you should edit C:/cloud/java/build/deploy/developer/db/server-setup-dev.xml to allocate Public and Private IP ranges for your development setup. Ensure that the ranges you pick are unallocated to others.
Customized VM templates to be populated are in C:/cloud/java/build/deploy/developer/db/templates-dev.sql Edit this file to customize the templates to your needs.
Deploy the DB by running
./deploy-db.sh ../developer/db/server-setup-dev.xml ../developer/db/templates-dev.xml
4.1. Management Server Deployment
ant build-server
Build Management Server
ant deploy-server
Deploy Management Server software to Tomcat environment
ant debug
Start Management Server in debug mode. The JVM debug options can be found in cloud-build.properties
ant run
Start Management Server in normal mode.
5. Agent deployment
After a successful build process, you should be able to find build artifacts at distribution directory, in this example case, for developer build type, the artifacts locate at c:\cloud\java\dist\developer, particularly, if you have run
ant package-agent build command, you should see the agent software be packaged in a single file named agent.zip under c:\cloud\java\dist\developer, together with the agent deployment script deploy-agent.sh.
5.1 Agent Type
Agent software can be deployed and configured to serve with different roles at run time. In current implementation, there are 3 types of agent configuration, respectively called as Computing Server, Routing Server and Storage Server.
* When agent software is configured to run as Computing server, it is responsible to host user VMs. Agent software should be running in Xen Dom0 system on computer server machine.
* When agent software is configured to run as Routing Server, it is responsible to host routing VMs for user virtual network and console proxy system VMs. Routing server serves as the bridge to outside network, the machine that agent software is running should have at least two network interfaces, one towards outside network, one participates the internal VMOps management network. Like computer server, agent software on routing server should also be running in Xen Dom0 system.
* When agent software is configured to run as Storage server, it is responsible to provide storage service for all VMs. The storage service is based on ZFS running on a Solaris system, agent software on storage server is therefore running under Solaris (actually a Solaris VM), Dom0 systems on computing server and routing server can access the storage service through iScsi initiator. The storage volume will be eventually mounted on Dom0 system and make available to DomU VMs through our agent software.
5.2 Resource sharing
All developers can share the same set of agent server machines for development, to make this possible, the concept of instance appears in various places
* VM names. VM names are structual names, it contains a instance section that can identify VMs from different VMOps cloud instances. VMOps cloud instance name is configured in server configuration parameter AgentManager/instance.name
* iScsi initiator mount point. For Computing servers and Routing servers, the mount point can distinguish the mounted DomU VM images from different agent deployments. The mount location can be specified in agent.properties file with a name-value pair named mount.parent
* iScsi target allocation point. For storage servers, this allocation point can distinguish the storage allocation from different storage agent deployments. The allocation point can be specified in agent.properties file with a name-value pair named parent
5.4 Deploy agent software
Before running the deployment scripts, first copy the build artifacts agent.zip and deploy-agent.sh to your personal development directory on agent server machines. By our current convention, you can create your personal development directory that usually locates at /root/your name. In following example, the agent package and deployment scripts are copied to test0.lab.vmops.com and the deployment script file has been marked as executible.
On build machine,
scp agent.zip root@test0:/root/your name
scp deploy-agent.sh root@test0:/root/your name
On agent server machine
chmod +x deploy-agent.sh
5.4.1 Deploy agent on computing server
deploy-agent.sh -d /root/<your name>/agent -h <management server IP> -t computing -m expert
5.4.2 Deploy agent on routing server
deploy-agent.sh -d /root/<your name>/agent -h <management server IP> -t routing -m expert
5.4.3 Deploy agent on storage server
deploy-agent.sh -d /root/<your name>/agent -h <management server IP> -t storage -m expert
5.5 Configure agent
After you have deployed the agent software, you should configure the agent by editing the agent.properties file under /root/<your name>/agent/conf directory on each of the Routing, Computing and Storage servers. Add/Edit following properties. The rest are defaults that get populated by the agent at runtime.
workers=3
host=<replace with your management server IP>
port=8250
pod=<replace with your pod id>
zone=<replace with your zone id>
instance=<your unique instance name>
developer=true
Following is a sample agent.properties file for Routing server
workers=3
id=1
port=8250
pod=RC
storage=comstar
zone=RC
type=routing
private.network.nic=xenbr0
instance=RC
public.network.nic=xenbr1
developer=true
host=192.168.1.138
5.5 Running agent
Edit /root/<ryour name>/agent/conf/log4j-cloud.xml to update the location of logs to somewhere under /root/<your name>
Once you have deployed and configured the agent software, you are ready to launch it. Under the agent root directory (in our example, /root/<your name>/agent. there is a scrip file named run.sh, you can use it to launch the agent.
Launch agent in detached background process
nohup ./run.sh &
Launch agent in interactive mode
./run.sh
Launch agent in debug mode, for example, following command makes JVM listen at TCP port 8787
./run.sh -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
If agent is launched in debug mode, you may use Eclipse IDE to remotely debug it, please note, when you are sharing agent server machine with others, choose a TCP port that is not in use by someone else.
Please also note that, run.sh also searches for /etc/cloud directory for agent.properties, make sure it uses the correct agent.properties file!
5.5. Stopping the Agents
the pid of the agent process is in /var/run/agent.<Instance>.pid
To Stop the agent:
kill <pid of agent>
!Fedora / CentOS
# [[Install the build dependencies|waf installrpmdeps]] with {{{./waf installrpmdeps}}} in the source directory.
# As a non-root user, run the command {{{./waf rpm}}} in the source directory.
Once this command is done, the packages will be built in the directory {{{artifacts/rpmbuild}}}.
!Ubuntu
# [[Install the build dependencies|waf installdebdeps]] with {{{./waf installdebdeps}}} in the source directory.
# As a non-root user, run the command {{{./waf deb}}} in the source directory.
Once this command is done, the packages will be built in the directory {{{artifacts/debbuild}}}.
!Obtain the source for the CloudStack
If you aren't reading this from a local copy of the source code, see [[Obtaining the source]].
!Prepare your development environment
See [[Preparing your development environment]].
!Configure the build on the builder machine
As non-root, run the command {{{./waf configure}}}. See [[waf configure]] to discover configuration options for that command.
!Build the CloudStack on the builder machine
As non-root, run the command {{{./waf build}}}. See [[waf build]] for an explanation.
!Install the CloudStack on the target systems
On each machine where you intend to run a CloudStack component:
# upload the entire source code tree after compilation, //ensuring that the source ends up in the same path as the machine in which you compiled it//,
## {{{rsync}}} is [[usually very handy|Using rsync to quickly transport the source tree to another machine]] for this
# in that newly uploaded directory of the target machine, run the command {{{./waf install}}} //as root//.
Consult [[waf install]] for information on installation.
!Changing the [[configuration|waf configure]] process
See file {{{wscript_configure}}}.
!Changing the [[build|waf build]] and [[install|waf install]] processes
!!Changing / adding / removing JAR targets
You generally need to add a new {{{compile-xyz}}} target following the model of the existing ones, and add that target to the list of dependencies of the other pertinent targets. See [[How waf uses ant]] and the ant build project files within the {{{build/}}} folder.
We have some old ant information that you might find useful: AntInformation.
!!Other changes
See file {{{wscript_build}}}.
!Changing packaging
!!Fedora / """CentOS""" packaging
See {{{cloud.spec}}} in the source directory.
!!Ubuntu packaging
See the files in the {{{debian/}}} folder.
The Cloud.com CloudStack is an open source software product that enables the deployment, management, and configuration of multi-tier and multi-tenant infrastructure cloud services by enterprises and service providers.
Start here if you want to learn the essentials to extend, modify and enhance the CloudStack. This assumes that you've already familiarized yourself with CloudStack concepts, installation and configuration using the [[Getting started|Welcome]] instructions.
* [[Obtain the source|Obtaining the source]]
* [[Prepare your environment|Preparing your development environment]]
* [[Get acquainted with the development lifecycle|Your development lifecycle]]
* [[Familiarize yourself with our development conventions|Development conventions]]
Extra developer information:
* [[What is this waf thing?|waf]]
* [[How to change the build, install and packaging processes|Changing the build, install and packaging processes]]
* [[How to integrate with Eclipse]]
* [[Starting over]]
* [[Making a source release|waf dist]]
!Importing the projects in the source
#Open Eclipse
#Select //Import projects//
#Point it to the source directory and import all the projects within it
!Management Server execution
To run the Management Server from Eclipse, set up an External Tool of the Program variety. Put the path to the {{{waf}}} binary in the Location of the window, and the source directory as Working Directory. Then specify {{{install --preserve-config run}}} as arguments. You can now use the Run button in Eclipse to execute the Management Server directly from Eclipse. You can replace run with debug if you want to run the Management Server with the Debugging Proxy turned on.
!Agent or Console Proxy execution
To run the Agent or Console Proxy from Eclipse, set up an External Tool of the Program variety just like in the Management Server case. In there, however, specify {{{install --preserve-config run_agent}}} or {{{install --preserve-config run_console_proxy}}} as arguments instead. Remember that you need to [[set sudo up|Setting sudo up for passwordless root]] to not ask you for a password and not require a TTY, otherwise sudo -- implicitly called by [[waf run_agent]] or [[waf run_console_proxy]] -- will refuse to work.
By now, you have probably noticed that we do, indeed, ship ant build files in the CloudStack. During the build process, waf calls ant directly to build the Java portions of our stack, and it uses the resulting JAR files to perform the installation.
Any ant target added to the ant project files will automatically be detected -- if it is named {{{compile-xyz}}} waf will know it builds a JAR file and knows to use / install that JAR file. In general, this means you only need to add the JAR file to the appropriate packaging manifests ({{{cloud.spec}}} and {{{debian/{name-of-package}.install}}}).
The reason we do this rather than use the native waf capabilities for building Java projects is simple: by using ant, we can leverage the support built-in for ant in [[Eclipse|How to integrate with Eclipse]] and many other """IDEs""". Another reason to do this is because Java developers are familiar with ant, so adding a new JAR file or modifying what gets built into the existing JAR files is facilitated for Java developers.
The CloudStack build system installs files on a variety of paths, each
one of which is selectable when building from source.
* {{{$PREFIX}}}:
** the default prefix where the entire stack is installed
** defaults to /usr/local on source builds
** defaults to /usr on package builds
* {{{$SYSCONFDIR/cloud}}}:
** the prefix for CloudStack configuration files
** defaults to $PREFIX/etc/cloud on source builds
** defaults to /etc/cloud on package builds
* {{{$SYSCONFDIR/init.d}}}:
** the prefix for CloudStack initscripts
** defaults to $PREFIX/etc/init.d on source builds
** defaults to /etc/init.d on package builds
* {{{$BINDIR}}}:
** the CloudStack installs programs there
** defaults to $PREFIX/bin on source builds
** defaults to /usr/bin on package builds
* {{{$LIBEXECDIR}}}:
** the CloudStack installs service runners there
** defaults to $PREFIX/libexec on source builds
** defaults to /usr/libexec on package builds (/usr/bin on Ubuntu)
These instructions cover the installation of the entire CloudStack. If you want to install only specific components, be sure to modify the example commands given here sensibly, so that only the desired packages get installed
!Fedora / CentOS
After building packages, they will be available in the directory {{{artifacts/rpmbuild}}}. You can install them by executing {{{rpm -ivh artifacts/rpmbuild/RPMS/*/*.rpm}}} from the source directory, as root.
!Ubuntu
After building packages, they will be available in {{{artifacts/debbuild}}}. A {{{sudo dpkg -i artifacts/debbuild/*.deb}}} should suffice to install them.
You have three options. Choose one:
# [[Installing the CloudStack from the official package repositories]].<br>This is the recommended (and quickest) way to run a stable release of your CloudStack cloud. The advantages of using this method are that these packages has been tested by (awesome) Cloud.com engineers, you can easily [[update to new CloudStack releases|Updating the CloudStack software]] later on, dependencies are taken care of automatically for you, and you can verify the integrity of the installed files using your system's package manager.
# [[Building distribution packages]] from the source, then [[installing them|Installing distribution packages built by you]].<br>This is the recommended way to run your CloudStack cloud from unstable sources. The advantages of using this method are that dependencies are taken care of automatically for you, and you can verify the integrity of the installed files using your system's package manager.
# [[Building from the source and installing directly from there]].<br>This option is suitable for you if you want to develop the CloudStack or you have an unsupported distribution. It is also the recommended way to run your CloudStack cloud if you intend to customize or reconfigure the source, if you intend to port the CloudStack to another distribution, or if you intend to run the CloudStack on a distribution for which packages are not built by us.
!Fedora
!!Add the CloudStack repository to your operating system
{{{
cd /etc/yum.repos.d/
wget http://download.cloud.com/foss/fedora/cloud.repo
}}}
!!Install the component you want
* Management Server: {{{yum install cloud-client}}}
* Agent: {{{yum install cloud-agent}}}
* Console Proxy: {{{yum install cloud-console-proxy}}}
!CentOS
!!Add the CloudStack repository to your operating system
{{{
cd /etc/yum.repos.d/
wget http://download.cloud.com/foss/centos/cloud.repo
}}}
!!Install the component you want
* Management Server: {{{yum install cloud-client}}}
* Agent: {{{yum install cloud-agent}}}
* Console Proxy: {{{yum install cloud-console-proxy}}}
!Ubuntu
!!Add the CloudStack repository to your operating system
Add the following line to {{{/etc/apt/sources.list}}}:
{{{
deb http://download.cloud.com/apt/ubuntu/stable/oss ./
}}}
!!Install the component you want
* Management Server: {{{aptitude install cloud-client}}}
* Agent: {{{aptitude install cloud-agent}}}
* Console Proxy: {{{aptitude install cloud-console-proxy}}}
Copyright:
<Copyright (C) 2009-2010 Cloud.com.>
License:
This program is dual-licensed.
For the free software portions: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. These portions -- clearly marked throughout the program sources -- are also distributed under the Cloud.com Software License 1.1.
For the proprietary portions: these portions are made available to you on the terms of the Cloud.com Software License 1.1.
This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
[[Welcome]]
[[Using this wiki]]
[[Getting started|Welcome]]
[[Developer info|Hacking on the CloudStack]]
[[Cloud.com|http://cloud.com/]]
[[Our community|http://cloud.com/community]]
[[Forums|http://cloud.com/community/forum]]
[[Report a bug|http://bugs.cloud.com/enter_bug.cgi]]
If you are reading this file directly from a local copy of the source code in your machine, hmmm, well, you can skip this.
Otherwise, there are two options to obtain the source code for the CloudStack:
!Getting a stable release
Download the latest tarball from the [[Cloud.com downloads section|http://cloud.com/community/downloads]].
!Getting the latest, bleeding-edge code
Use [[Git]] to clone the following URL:
{{{
git clone http://git.cloud.com/cloudstack-oss
}}}
This will create a folder called {{{cloudstack-oss}}} in your current folder.
!Browsing the source code online
You can browse the CloudStack source code through [[our CGit Web interface|http://git.cloud.com/cloudstack-oss]].
!Install the build dependencies on the machine where you will compile the CloudStack
!!Fedora / CentOS
The command [[waf installrpmdeps]] issued from the source tree gets it done.
!!Ubuntu
The command [[waf installdebdeps]] issues from the source tree gets it done.
!!Other distributions
See [[CloudStack build dependencies]]
!Install the run-time dependencies on the machines where you will run the CloudStack
See [[CloudStack run-time dependencies]].
Every time you run {{{./waf install}}} to deploy changed code, waf will install configuration files once again. This can be a nuisance if you are developing the stack.
There are, however, two ways to get around this.
!Append {{{--preserve-config}}} to executions of {{{./waf install}}}
{{{./waf install}}} has an option {{{--preserve-config}}}. If you pass this option when installing, configuration files are never overwritten.
This option is useful when you have modified source files and you need to deploy them on a system that already has the CloudStack installed and configured, but you do //not// want to overwrite the existing configuration of the CloudStack.
If, however, you have reconfigured and rebuilt the source since the last time you did ./waf install, then you are advised to replace the configuration files and set the components up again, because some configuration files in the source use identifiers that may have changed during the last {{{./waf configure}}}. So, if this is your case, check out the next technique.
!Override configuration files in the source tree
Every configuration file can be overridden in the source without touching the original.
# Look for the specific config file {{{X}}} (or {{{X.in}}}) in the source, then
# create an {{{override/}}} folder in the folder that contains {{{X}}}, then
# place a file named {{{X}}} (or {{{X.in}}}) inside {{{override/}}}, then
# put the desired contents inside {{{X}}} (or {{{X.in}}})
Now, every time you run {{{./waf install}}}, the file that will be installed is {{{path/to/override/X.in}}}, instead of {{{path/to/X.in}}}.
This option is useful if you are developing the CloudStack and constantly reinstalling it. It guarantees that every time you install the CloudStack, the installation will have the correct configuration straight from your source tree and will be ready to run.
It is not technically possible to run the CloudStack components directly from the source tree. That, however, is fine -- each component can be run independently from the install directory. Here are instructions to do that, [[after you've set the desired component up|Setting the CloudStack components up]].
!Management Server
# Execute {{{./waf run}}} as your current user [[(more info)|waf run]].<br>Alternatively, you can use {{{./waf debug}}} and this will [[run with debugging enabled|waf debug]].
!Agent (Linux-only):
# Execute {{{./waf run_agent}}} [[(more info)|waf run_agent]]<br>This will implicitly launch {{{sudo}}} and require your root password unless you have set {{{sudo}}} up [[not to ask for it|Setting sudo up for passwordless root]] (advisable).
!Console Proxy (Linux-only):
# Execute {{{./waf run_console_proxy}}} [[(more info)|waf run_console_proxy]]<br>This will implicitly launch {{{sudo}}} and require your root password unless you have set {{{sudo}}} up [[not to ask for it|Setting sudo up for passwordless root]] (advisable).
When building a source distribution ([[waf dist]]), or distribution packages ([[waf deb]] / [[waf rpm]]), waf will automatically detect the relevant source code control information if the git command is present on the machine where waf is run, and it will write the information to a file called {{{sccs-info}}} inside the source tarball. Packages and [[waf install]] will install this file into {{{$DOCDIR/sccs-info}}.
If this source code control information cannot be calculated, then the old {{{sccs-info}}} file is preserved -- if it existed -- across [[dist|waf dist]] runs if it exists, and if it did not exist before, the fact that the source could not be properly tracked down to a repository is noted in the file.
#Comment option {{{Defaults requiretty}}} in {{{/etc/sudoers}}}
# Add a line {{{yourusername: ALL=(ALL) NOPASSWD: ALL}}} with your username instead of {{{yourusername}}}
''Warning'': this can be ''insecure'' as it leaves your computer open to root access to whomever touches your console or logs in as your user.
Agent setup requires some system configuration changes, but is fully automated for your benefit. To set up your Agent, just run {{{$BINDIR/cloud-setup-agent}}}. It will ask you some questions about the zone and pod it will run on, and then set it up to start on boot.
The configuration files for the Agent live in {{{agent/conf}}} and get deployed to {{{$SYSCONFDIR/cloud/agent}}}.
!Management Server
Set up the management server database:
# either run {{{./waf deploydb_kvm}}} for a [[quick development-type database setup|waf deploydb]], or
# run {{{$BINDIR/cloud-setup-databases}}} to [[set up the Management Server database in production mode|Setting the Management Server up]]
!Agent (Linux-only)
[[Set the Agent up|Setting the Agent up]] with {{{$BINDIR/cloud-setup-agent}}}.
!Console Proxy (Linux-only):
[[Set the Console Proxy up|Setting the Console Proxy up]] with {{{$BINDIR/cloud-setup-console-proxy}}}.
Please consult the [[Installation Guide|http://cloud.com/community/cloudstack-21-community-edition-installation-guide]] to find out how to configure each component of the CloudStack. Refer to the [[Installation paths]] document for information on where to find the programs, initscripts and configuration files mentioned in the Installation Guide (paths may vary).
Console Proxy setup is fully automated for your benefit. To set up your Console Proxy, just run {{{$BINDIR/cloud-setup-console-proxy}}}. It will ask you some questions about the zone and pod it will run on, and then set it up to start on boot.
The configuration files for the Console Proxy live in {{{console-proxy/conf.dom0}}} and get deployed to {{{$SYSCONFDIR/cloud/console-proxy}}}.
Management Server setup is fully automated for your benefit. To set up your Management Server, just run {{{$BINDIR/cloud-setup-databases}}} with the appropriate command-line options (you can invoke {{{cloud-setup-databases}}} without parameters to get documentation on its options). This will deploy the database and adjust the Management Server configuration files to use that database.
The configuration files for the Management Server live in {{{client/tomcatconf}}} and get deployed to {{{$SYSCONFDIR/cloud/client}}}.
[[Cloud.com|http://cloud.com/]] """CloudStack"""
Here, you'll discover how the source is laid out, what happens to the sources, and where they get installed in target systems. Refer to the [[Installation paths]] and [[Token substitution of configure-time variables]] documents to find out about the tokens and paths used below.
* {{{deps/*jar}}}
** installed in {{{@JAVADIR@/}}}
* {{{thirdparty/*jar}}}
** installed in {{{@PREMIUMJAVADIR@/}}}
* {{{scripts/*}}}
** @token identifiers are substituted
** auto-installed in {{{@AGENTLIBDIR@/scripts}}}
* {{{patches/<virttech>/*}}}
** @token identifiers are substituted
** tarred up in a file called {{{patch-<virttech>.tgz}}} (the name is only used in the artifacts directory)
** tarball auto-installed as {{{@AGENTLIBDIR@/scripts/vm/hypervisor/<virttech>/patch.tgz}}}
* {{{<project>/src/**/*java}}}
** runs through [[ant|How waf uses ant]]
** turns into {{{cloud-<project>.jar}}}
** installed in{{{ @JAVADIR@/}}}
* {{{<project>/bindir/*}}}
** if the file ends in .in, @token identifiers are substituted
** auto-installed in {{{@BINDIR@/}}}
* {{{<project>/libexec/*}}}
** if the file ends in .in, @token identifiers are substituted
** auto-installed in {{{@LIBEXECDIR@/}}}
* {{{<project>/tomcatconf/*}}}
** if the file ends in .in, @token identifiers are substituted
** auto-installed in {{{@MSCONF@/}}}
* {{{<project>/db/*}}}
** auto-installed in {{{@SETUPDATADIR@/}}}
* {{{<project>/<distro>/SOMEDIRECTORY}}}
** if the file ends in .in, token identifiers are substituted
** auto-installed only in specific {{{<distro>}}}, in {{{@SOMEDIRECTORY@/}}} (that is, the uppercase directory name is taken to be an identifier and substituted dynamically for the path that it represents).
* {{{plugins/<project>/src/**/*java}}}
** runs through ant
** turns into {{{cloud-<project>.jar}}}
** installed in {{{@PLUGINJAVADIR@/}}}
** will automatically appear in the management server classpath at runtime
* {{{vendor/<vendor>/tomcatconf/*}}}
** if the file ends in .in, @token identifiers from ./waf showconfig are substituted
** auto-installed in {{{@MSCONF@/vendor/<vendor>}}}
** gets listed first in the management server classpath, so any files there will override files in {{{@MSCONF@}}}
With your help, by being disciplined -- e.g. thinking about where to add a file, avoiding special cases -- and your suggestions (new classes of files? we can install them!), we can make this source standards guide grow, with the ultimate goal of making it easier to just add files and have them magically be installed in the right places.
You shouldn't have to. But:
# To clean build products: [[waf clean]].
# To clean the entire artifacts directory and configure-time variables: [[waf distclean]].
# To uninstall: refer to the source section of [[Uninstalling the CloudStack]].
The prerelease mechanism ({{{--prerelease=BRANCHNAME}}} argument to [[./waf deb|waf deb]] or [[./waf rpm|waf rpm]]) allows developers and builders to build packages with pre-release Release tags. The Release tags are constructed in such a way that both the build number and the branch name is included, so developers can push these packages to repositories and upgrade them using yum or aptitude without having to delete packages manually and install packages manually every time a new build is done. Any package built with the prerelease mechanism gets a standard X.Y.Z version number -- and, due to the way that the prerelease Release tags are concocted, always upgrades any older prerelease package already present on any system. The prerelease mechanism must never be used to create packages that are intended to be released as stable software to the general public.
Relevant distribution documentation:
* http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
* http://fedoraproject.org/wiki/PackageNamingGuidelines#Pre-Release_packages
!How the [[build number|waf build]] is treated when the prerelease mechanism is enabled
The build number gets appended to the Release tag of the package.
In short:
#Files with an extension of {{{.in}}} and files in the {{conf}}, {{tomcatconf}}, {{bindir}}, {{libexec}} and similar directories within the source have tokens {{{@SOMETOKEN@}}} automatically substituted for the corresponding [[configure variable|waf configure]].
#Files in the {{{scripts/}}} folder have the token {{@VERSION@}} replaced by the version of the CloudStack upon installation.
#There is a more detailed layout of how tokens are used in the document [[Source layout guide]].
!For installations done using distribution packages
If you installed the CloudStack using distribution packages, use your operating system package manager to remove the CloudStack packages. Examples follow:
!!Fedora / CentOS
{{{
rpm -qa | grep ^cloud- | xargs rpm -e
}}}
will erase the CloudStack packages, but will not erase any modified configuration files, cache files or log files. If you want to remove them:
{{{
rm -rf /var/log/cloud /etc/cloud /var/cache/cloud
}}}
!!Ubuntu
{{{
aptitude purge '~ncloud'
}}}
will remove all cloud packages and purge configuration files.
{{{
aptitude remove
}}}
will remove packages and leave configuration files.
!For installations done from compiled source
{{{
./waf uninstall
}}}
issued from the source directory as root, will go through every single file that the install process installed, [[and remove it|waf uninstall]].
!If you installed the CloudStack using [[the official package repositories|Installing the CloudStack from the official package repositories]]
!!Fedora
{{{yum update}}}.
!!CentOS
{{{yum update}}}.
!!Ubuntu
{{{
aptitude update
aptitude safe-upgrade
}}}
!If you installed from the source, or packages built from the source
#Download the latest CloudStack release
#Follow the same procedure you used to install the CloudStack the first time
You can use {{{rsync}}} to very quickly deploy a tree of files into another machine.
Let's assume that you have your source tree in {{{/home/joe/cloud-2.3.4}}}. To take that tree to another machine:
{{{
rsync -avzx --delete /home/joe/cloud-2.3.4/ root@othermachine:/home/joe/cloud-2.3.4/
}}}
(assuming, of course, the existence of {{{/home/joe}}} in {{{othermachine}}})
This wiki is organized by bite-size topics called //tiddlers//, heavily linked between each other. Normally, you can browse through each topic -- the topic opens up in a new section of this window -- or you can use the search mechanism at the top of the right sidebar. The right sidebar also contains a list of all the tiddlers in this document.
!Yes, you can edit it
If you have a local copy of this file, you can edit it. We encourage you to [[send us your edited file through our bug tracker|http://bugs.cloud.com/enter_bug.cgi]] so we can merge your enhancements!
#Enter your username for signing your edits: <<option txtUserName>>. This will be stored in a cookie on your browser.
#Set your options to the right of this page. I personally prefer to keep AutoSave enabled so I don't have to think about saving the file. If you have not saved your changes to the wiki yet, this wiki will warn you to save when you close it.
#Be warned that your browser may ask for authorization to save this file on disk. It's a scary dialog box, but it's perfectly safe -- go ahead.
#Learn the wiki [[formatting style|http://tiddlywiki.org/wiki/TiddlyWiki_Markup]].
#Double-click on the text of a tiddler to modify it. Hit //done// at the top of the tiddler once you're done.
#Add your tiddlers:
##To do so, create a link {{{[[Your article name|Hyperlink title]]}}}in an existing tiddler, save it, and then click the italicized link.
##As a principle: //keep the tiddlers bite-sized and rely heavily on hyperlinking to make them useful to the readers!// This practice also makes merging the file into the source code that much easier and reduces the opportunity for merge conflicts.
##Don't repeat yourself! If you foresee that a particular chunk of text will be reused in different contexts, put it in a //separate// tiddler and link to that tiddler from the appropriate places.
##The All and More tabs in the right sidebar lets you find tiddler names to link to, and also orphan tiddlers (tiddlers that nobody links to) or missing tiddlers (nonexistent tiddlers that are linked somewhere).
#Fundamental tiddlers in this wiki:
##[[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
##[[MainMenu]]: The menu (usually on the left)
##[[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
waf supports an intelligent cache mechanism (disabled by default). waf can resurrect compiled code if the source files that produced it have not changed. waf will use advanced checksums to prevent stale object files from being resurrected.
To activate it, just set an environment variable {{{WAFCACHE}}} to point to a directory (that you must create) where waf will store the result of compiled files.
Hello, and thanks for your interest in the [[Cloud.com|http://cloud.com/]] CloudStackâ„¢! The Cloud.com CloudStackâ„¢ is Open Source Software that allows organizations to build Infrastructure as a Service (Iaas) clouds. Working with server, storage, and networking equipment of your choice, the CloudStack provides a turn-key software stack that dramatically simplifies the process of deploying and managing a cloud.
!Get started with the CloudStack right now
We've prepared comprehensive instructions to help you.
# First, review the [[Installation Guide|http://cloud.com/community/cloudstack-21-community-edition-installation-guide]] sections titled //Overview// and //Prerequisites//.
#Then, [[install the CloudStack components you want|Installing the CloudStack]] on your target machines.
# After you're done installing, see [[Setting the CloudStack up]] to configure and run it.
And, in the unlikely case you would want to uninstall the CloudStack, the document [[Uninstalling the CloudStack]] has you covered.
!Be part of the [[Cloud.com community|http://cloud.com/community/]]!
We are more than happy to have you ask us questions, hack our source code, and receive your contributions.
* To get started developing with the CloudStack, please read [[Hacking on the CloudStack]] for more information.
* If you are reading this from a copy of the source code in your machine, [[you can edit this document too|Using this wiki]], then share your changes with us.
* Come to [[our forums|http://cloud.com/community/forum]], [[sign up|http://cloud.com/community/user/register]] as a member, and post there. We engineers lurk there to answer your questions.
* If you find bugs, please [[register|http://bugs.cloud.com/createaccount.cgi]] on [[our bug tracker|http://bugs.cloud.com/]] and [[file a report|http://bugs.cloud.com/enter_bug.cgi]].
* If you have patches or files to send us get in touch with us at [[info@cloud.com|mailto:info@cloud.com]] or file them as attachments in our bug tracker above.
!Contact us!
Cloud.com's contact information is:
>20400 Stevens Creek Blvd
>Suite 390
>Cupertino, CA 95014
>Tel: +1 (888) 384-0962
!Legal information
//Unless otherwise specified// by Cloud.com, Inc., or in the sources themselves, [[this software is OSI certified Open Source Software distributed under the GNU General Public License, version 3|License statement]]. OSI Certified is a certification mark of the Open Source Initiative. The software powering this documentation is """BSD-licensed""" and obtained from [[TiddlyWiki.com|http://tiddlywiki.com/]].
This is the typical lifecycle that you would follow when hacking on a CloudStack component, assuming that your [[development environment has been set up|Preparing your development environment]]:
# [[Configure|waf configure]] the source code<br>{{{./waf configure --prefix=/home/youruser/cloudstack}}}
# [[Build|waf build]] and [[install|waf install]] the CloudStack
## {{{./waf install}}}
## [[How to perform these tasks from Eclipse|How to integrate with Eclipse]]
# [[Set the CloudStack component up|Setting the CloudStack components up]]
# [[Run the CloudStack component|Running a CloudStack component from source]]
# Hack on the code
# Build and install the CloudStack again, [[preserving your existing configuration|Preserving the CloudStack configuration across source reinstalls]]<br>{{{./waf install --preserve-config}}}
#{{{GOTO 4}}}
See [[Setting sudo up for passwordless root]].
[[waf|http://code.google.com/p/waf/]] is a self-contained, advanced build system written by Thomas Nagy, in the spirit of SCons or the GNU autotools suite.
* To run waf on Linux / Mac: {{{./waf [...commands...]}}}
* To run waf on Windows: {{{waf.bat [...commands...]}}}
{{{./waf --help}}} should be your first discovery point to find out both the configure-time options and the different processes that you can run using waf.
!Where to learn more about waf
* The first and foremost reference material: [[the waf book|http://freehackers.org/~tnagy/wafbook/index.html]].
* http://code.google.com/p/waf/wiki/CodeSnippets
* http://code.google.com/p/waf/w/list
* http://code.google.com/p/waf/wiki/FAQ
!Why does the CloudStack use waf?
The CloudStack uses waf to build itself. waf is a relative newcomer to the build system world; it borrows concepts from SCons and other later-generation build systems:
# waf is very flexible and rich; unlike other build systems, it covers the entire life cycle, from compilation to installation to uninstallation. it also supports [[dist|waf dist]] (create source tarball), distcheck (check that the source tarball compiles and installs), autoconf-like checks for dependencies at compilation time, and more. With waf, there is no need to maintain fragile shell scripts to do these tasks -- all of these tasks are already built-in and configurable in a descriptive rather than imperative fashion.
# waf is self-contained. A single file, distributed with the project, enables everything to be built, with only a dependency on Python or Jython, both of which are freely available and shipped in all Linux computers.
# waf also supports building projects written in multiple languages (in the case of the CloudStack, we build from C, Java and Python).
# Since waf is written in Python, the entire library of the Python language is available to use in the build process.
!What happens when waf runs?
When you run waf, this happens behind the scenes:
# When you run waf for the first time, it unpacks itself to a hidden directory {{{.waf-1.X.Y.MD5SUM}}}, including the main program and all the Python libraries it provides and needs.
# Immediately after unpacking itself, waf reads the {{{wscript}}} file at the root of the source directory. After parsing this file and loading the functions defined here, it reads {{{wscript_build}} and {{{wscript_configure}} (from which it builds a {{{build()}}} and a {{{configure()}}} function dynamically)
# After loading the build scripts as explained above, waf calls the functions you specified in the command line as commands
So, for example, {{{./waf configure build install}}} will:
* call [[configure()|waf configure]] from {{{wscript_configure}}},
* call [[build()|waf build]] loaded from the contents of {{{wscript_build}}},
* call [[build()|waf build]] once more but with {{{Options.is_install = True}}}.
As part of build(), waf invokes ant to build the Java portion of our stack.
!If you have waf, why are there ant project files in my source tree?
See [[How waf uses ant]].
{{{
./waf build
}}}
!What does this do?
This compiles every file that requires compilation or substitution. The artifacts of this compilation end up, unless otherwise specified, in {{{artifacts/default}}}
!When / why should I run this?
You run this command once after you've [[configured the source|waf configure]], and to trigger compilation of any modifications you have made. However, if you plan on installing your modifications, you can just run [[waf install]] directly -- install implicitly builds.
!How does this work?
This runs the contents of {{{wscript_build}}}, which takes care of discovering and describing what needs to be built, which build products / sources need to be installed, and where they should be installed. In detail:
# It compiles source code to object code, calling the C compiler, Python compiler, and [[invoking several ant targets|How waf uses ant]].
# It [[substitutes configure-time variables|Token substitution of configure-time variables]] in the files that require token substitution.
# It creates packages for those components that require packaging.
# It creates the [[SCCS info]] file that you can use to track the provenance of an installation.
!Viewing a progress bar when building
Append the {{{--progress}}} option to {{{./waf build}}}.
!Accelerating builds
See [[WAFCACHE]].
The commands [[waf deb]] and [[waf rpm]] take advantage of the waf cache.
!Debugging the build process
#Almost everything that gets built has a target name. [[waf list_targets]] will list the target names.
#{{{./waf build -vvvvv}}} will give you //a lot of debugging information// on what waf is doing.
!Specifying a build number
Normally, the build number is auto-detected from the [[source code control system|SCCS info]]. You can override it by passing the parameter {{{--build-number}}} when building. The build number is used internally in the JAR files to construct the {{{Implementation-Version}}} property of the metafile manifest included in the JAR file.
The commands [[waf deb]] and [[waf rpm]] also support the {{{--build-number}}} build-time option.
{{{
./waf clean
}}}
Makes an inventory of all build products in {{{artifacts/default}}}, and removes them.
Contrast to [[waf distclean]].
{{{
./waf configure --prefix=/directory/that/you/have/write/permission/to
}}}
!What does this do?
This runs the file {{{wscript_configure}}}, which takes care of setting the variables and options that waf will use for compilation and installation, including the installation directory|Installation paths {{{PREFIX}}} and many other installation paths. Some of these variables refer to the [[paths where waf will install|Installation paths]] different types of files; some other variables refer to defaults or values that will get [[compiled / substituted in the object code|Token substitution of configure-time variables]]. Some of these settings are //auto-detected// based on the platform you're compiling the code on.
!When / why should I run this?
You run this command //once//, in preparation to building the stack, or every time you need to change a configure-time variable. Once you find an acceptable set of configure-time variables, you should not need to run {{{configure}}} again.
!What happens if I don't run it?
For convenience reasons, if you forget to configure the source, waf will autoconfigure itself and select some sensible default configuration options. By default, {{{PREFIX}}} is {{{/usr/local}}}, but you can set it e.g. to {{{/home/youruser/cloudstack}}} if you plan to do a non-root install. Be ware that you can later install the stack as a regular user, but most components need to //run// as root.
!What variables / options exist for configure?
In general: refer to the output of {{{./waf configure --help}}}.
Specific, useful options:
* {{{--no-dep-check}}}: will skip dependency checks for java packages needed to compile (saves 20 seconds when redoing the configure)
* {{{--with-db-user}}}, {{{--with-db-pw}}}, {{{--with-db-host}}}: informs the build system of the """MySQL""" configuration needed to be able to run [[waf deploydb]]
After configuration, the configure variables will be available inside the file {{{artifacts/c4che/build.default.py}}} and you will be able to list them with [[waf showconfig]].
{{{
./waf deb
}}}
[[builds Debian packages|Building distribution packages]] of the CloudStack.
This command supports [[the prerelease mechanism|The prerelease mechanism]] and [[custom build numbers|waf build]]. It also supports [[accelerated builds|WAFCACHE]], so if you've already compiled your source tree once with the waf cache enabled, creating packages will be orders of magnitude faster.
{{{
./waf deploydb_kvm
}}}
!What does this do?
This command runs the function {{{deploydb}}} in {{{wscript}}}, with a paramenter {{{"kvm"}}}. The function uses the MySQL client to recreate / deploy the database schema and default initialized data for the Cloud.com Management Server. The credentials and database host this command will use are the ones specified at [[configure time|waf configure]] with the options {{{--with-db-user}}}, {{{--with-db-pw}} and {{{--with-db-host}}}.
''Warning'': This function will //destroy// any existing Cloud.com databases on the target host.
{{{
./waf dist
}}}
Creates a source distribution (bzip2-compressed tarball) of the CloudStack in the source directory. [[SCCS info]] is automatically determined by {{{dist}}} and included in the tarball.
{{{
./waf distclean
}}}
Completely nukes the {{{artifacts}}} directory, thereby eliminating all build products and [[waf configuration|waf configure]].
Contrast to [[waf clean]].
{{{
./waf install
}}}
!When / why should I run this?
You run this command when you want to install the CloudStack to the directories specified in the [[configuration|waf configure]].
''Warning'': each time you do {{{./waf install}}}, the configuration files in the installation directory are ''overwritten''. Consult the document [[Preserving the CloudStack configuration across source reinstalls]] for techniques to prevent this.
If you are going to install for production, //you should run this process as root//; that guarantees that the proper permissions and file ownerships are set on certain secure files. If, conversely, you only want to install the stack as your own user and in a directory that you have write permission, it's fine to run {{{./waf install}}} as your own user.
!What does this do?
This runs the contents of {{{wscript_build}}}, with an option variable {{{Options.is_install = True}}}. When this variable is set, waf will, in addition to compiling whatever needs compilation, install the files described in {{{wscript_build}}}.
!{{{--destdir}}}
When installing, you may specify the {{{--destdir=/example/dir}}} option. This will cause the installation of files to be performed relative to the {{{/example/dir}}} specified as argument to the option. By way of example, if waf would install the file {{{/usr/bin/cloud-setup-databases}}}, the file would actually be installed in {{{/example/dir/usr/bin/cloud-setup-databases}}}; and so on for all installed files.
This option is implicitly used in the packaging commands [[waf deb]] and [[waf rpm]].
{{{
./waf installdebdeps
}}}
Parses the build dependency list for DEB packaging and uses aptitude (through [[sudo]]) to install them on your system.
{{{
./waf viewdebdeps
}}}
Shows a [[list of dependencies|waf viewdebdeps]].
{{{
./waf installrpmdeps
}}}
Parses the build dependency list for RPM packaging and uses yum (through [[sudo]]) to install them on your system.
{{{
./waf viewrpmdeps
}}}
Shows a [[list of dependencies|waf viewrpmdeps]].
{{{
./waf list_targets
}}}
prints out a list of all known build targets.
You can then run
{{{
./waf build --targets=targetname
}}}
to build only that specific {{{targetname}}}.
{{{
./waf rpm
}}}
[[builds Fedora or CentOS packages|Building distribution packages]] of the CloudStack.
This command supports [[the prerelease mechanism|The prerelease mechanism]] and [[custom build numbers|waf build]]. It also supports [[accelerated builds|WAFCACHE]], so if you've already compiled your source tree once with the waf cache enabled, creating packages will be orders of magnitude faster.
{{{
./waf run
}}}
!What does this do?
This command starts the Management Server.
More specifically, what it does is create an environment for the Apache Tomcat server, pre-configured during {{{./waf install}}}, and then start it in the foreground, to run the Management Server servlets and components. When the Tomcat server starts, the management server is running and you can visit it by opening http://localhost:8080/
Once it's running, you can log on as administrator with the user combination {{{admin}}} / {{{password}}}
!Run with debugging enabled
If you are developing the CloudStack, it is useful to be able to latch onto the Management Server process with your debugger. To do that:
{{{
./waf debug
}}}
If you prefer the process to be stopped during startup and to have it continue only when your debugger has attached itself:
{{{
./waf debug --debug-suspend
}}}
{{{
./waf run_agent
}}}
Runs the Agent as root by using {{{sudo}}} to invoke it.
{{{
./waf run_console_proxy
}}}
Runs the Console Proxy as root by using {{{sudo}}} to invoke it.
{{{
./waf showconfig
}}}
Displays a summary of the values for each configure-time variable.
{{{
./waf uninstall
}}}
Makes a listing of all the files and directories that would be installed, then removes them from the installation directory.
This command supports the {{{--destdir}}} option as documented in [[waf install]].
See [[waf installdebdeps]].
See [[waf installrpmdeps]].