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 'quickcloudmaster' branch and build it and run it

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

...

Code Block
mvn -P developer -pl tools/devcloud -DquickcloudDdeployquick

4. Open two more terminals. In the first terminal

...

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
echo "developer=true" >> conf/agent.properties
mvn exec:java -Pquickcloud

6. Open the GUI and deploy a VM. Although the VM won't get an IP, you should be able to view the console and log in and set an ip.

Anchor
howto2
howto2
HOWTO:

...

Using standalone Secondary Storage and Console Proxy Servers in production

0. The following assumes you are working on the same server as the management server, but equivalently you can set up another VM/server for the purpose of running these system services. This will also work with DevCloud2.
1. Mount the secondary storage export from your NFS server on to a mount point on your (management) server. Ensure that the user that runs the secondary storage service is able to write and read this filesystem. Wiki Markup\[At present QuickCloud does not use any DHCP services\] 0. The following assumes you are working on the same server as the management server, but equivalently you can set up another VM/server for the purpose of running these system services. This will also work with DevCloud2. 1. Mount the secondary storage export from your NFS server on to a mount point on your (management) server

Code Block
export SS_MOUNT= mount-point-for-sec-storage e.g., /var/mount/secondary-storage
mount -t nfs $NFS_IP:$NFS_EXPORT $SS_MOUNT #use your favorite NFS mount options

...

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 guid=Secondary.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

Run the secondary storage service: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./secstorage.shpid=." > conf/environment.properties

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 guid

Run the console proxy service:

Code Block

./consoleproxy.sh

...

=ConsoleProxy.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

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

Code Block

INSERT INTO `configuration` (`category`, `instance`, `component`, `name`, `value`, `description`) VALUES
	('Console Proxy', 'DEFAULT', 'AgentManager', 'consoleproxy.static.publicIp', '<public ip>', 'Console proxy public ip');

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
8. Open the GUI, create a zone 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