Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Anchor
howto1
howto1
HOWTO: maven workflow for QuickCloud

Wiki Markup\[At present QuickCloud on DevCloud2 does not use any DHCP services\]
1. Get the DevCloud2 VM up and running.
2. Mount the secondary storage export from the DevCloud2 on to your laptop:

Code Block
export SS_MOUNT= mount-point-for-sec-storage e.g., /users/myhome/secondary-storage
mkdir $SS_MOUNT
mount -t nfs 192.168.56.10:/opt/storage/secondary $SS_MOUNT
mount -t nfs -o resvport 192.168.56.10:/opt/storage/secondary $SS_MOUNT #Mac OS X

3. Checkout the 'quickcloud2master' branch and build it and run it

Code Block
git checkout quickcloud2master
mvn -P developer,systemvm  clean install -Dquickcloud
mvn -P developer -pl developer,tools/devcloud -Ddeploydb
mvn -pl :cloud-client-ui jetty:run

...

Code Block
echo "mount.path=/users/myhome/secondary-storage" >> conf/agent.properties
mvn exec:java 

In the console-proxy terminal,

Code Block
 
echo "paths.pid=." > conf/environment.properties
mvn exec:java -Pquickcloud

...

Edit conf/agent.properties and add

Code Block
zone=1
# eth1ip needed only if you have one network adapter, or you need to the service to use a specific private ip address.
eth1ip=<ip address available to service> # should offer similar functionality to systemvm private ip address
#or actual zone id from management server database table datacenter
host=<ip of management server>
guid=<some guid> #use uuidgen to generate a guidSecondary.1
instance=SecondaryStorage
resource=org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource 
#resource=com.cloud.storage.resource.PremiumSecondaryStorageResource for VMWare
mount.path=<value of $SS_MOUNT>
secondary.storage.vm=false

If the user running these services is not able to write to /var/run/, create an environment.properties file in conf

Code Block
echo "paths.pid=." > conf/environment.properties

Run the secondary storage service:

Code Block

./secstorage.sh

5. Console Proxy Server:

Code Block
 cd /var/cloudstack/console
unzip systemvm.zip

Edit conf/agent.properties and add

Code Block
zone=1
# #oror actual zone id from management server database table datacenter
host=<ip of management server>
guid=<some other guid> #use uuidgen to generate a guidConsoleProxy.1

If the user running these services is not able to write to /var/run/, create an environment.properties file in conf

Code Block
echo "paths.pid=." > conf/environment.properties

Run the console proxy service:

...

6. Set Console Proxy "public" IP
The console proxy service has to be made available at a "public" ip. Tell the management server the value of this ip by adding

...

Edit the applicationContext.xml in the web app (WEB-INF/classes), . You need to change the consoleProxyManagerImpl line to

Code Block
<bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.StaticConsoleProxyManager" />

A quick way to do this is using sed. E.g. if you start your dev server using 'mvn -pl :cloud-clien-ui jetty:run', the project will create an applicationContext.xml ./client/tomcatconf/applicationContext.xml.in, so use

Code Block

sed -e 's/com.cloud.consoleproxy.ConsoleProxyManagerImpl/com.cloud.consoleproxy.StaticConsoleProxyManager/g' ./client/tomcatconf/applicationContext.xml.in -i

7. Restart the management server
6 8. Open the GUI, create a zone etc, and deploy a VM. you should be able to view the console and log in.and add your secondary storage nfs://$NFS_IP/$NFS_EXPORT
9. Disable secondary storage and console proxy vms in the zone:

Code Block

INSERT INTO `data_center_details` (`dc_id`, `name`, `value`) VALUES
	(<zone id>, 'enable.consoleproxy.vm', 'False');
INSERT INTO `data_center_details` (`dc_id`, `name`, `value`) VALUES
	(<zone id), 'enable.secstorage.vm', 'False');

Alternatively, use CloudStack cloudmonkey CLI

Code Block

updateZone id=1 details[0].key=enable.consoleproxy.vm details[0].value='False' details[1].key=enable.secstorage.vm details[1].value='False'

10. Run the console proxy service:

Code Block

cd /var/cloudstack/console
./consoleproxy.sh

Run the secondary storage service:

Code Block

cd /var/cloudstack/secondary
./secstorage.sh