Versions Compared

Key

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

...

Code Block
gpg --verify apache-cloudstack-4cloudmonkey-5.31.0-src.tar.bz2.asc

This command should return "Good Signature".

Code Block
gpg --print-md MD5 apache-cloudstack-cloudmonkey-45.31.0-src.tar.bz2 | diff - apache-cloudstack-4cloudmonkey-5.31.0-src.tar.bz2.md5
gpg --print-md SHA512 apache-cloudstack-4cloudmonkey-5.31.0-src.tar.bz2 | diff - apache-cloudstack-cloudmonkey-45.31.0-src.tar.bz2.sha

Each of these commands should return no output. If there is any output from them, then there is a difference between the hash you generated locally and the hash that has been pulled from the server.

...

Code Block
mkdir /tmp/cloudstack-cloudmonkey/git
mkdir /tmp/cloudstack-cloudmonkey/tree

Pull down the git repo:

Code Block
git clone https://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey.git /tmp/cloudstack-cloudmonkey/git
cd /tmp/cloudstack-cloudmonkey/git
git archive --format=tar --prefix=/tmp/cloudstack-cloudmonkey/tree/ <commit-hash> | tar Pxf -

...

Code Block
cd /tmp/cloudstack-cloudmonkey
tar xvfj apache-cloudstack-cloudmonkey-45.31.0-src.tar.bz2

Compare the contents of the release artifact with the contents pulled from the repo:

Code Block
diff -r /tmp/cloudstack-cloudmonkey/apache-cloudstack-4cloudmonkey-5.31.0-src /tmp/cloudstack-cloudmonkey/tree

Nothing should be different.

Verify the Code's License Headers

There are no automated tools at the moment, but this should help:

Code Block
$ cd /tmp/cloudstack-cloudmonkey/apache-cloudstack-cloudmonkey-45.31.0-src
mvn$ head --projects='org.apache.cloudstack:cloudstack' org.apache.rat:apache-rat-plugin:0.8:check

The build should FAIL if there are any non-compliant files that are not specifically excluded from the ASF license header requirement. You can optionally review the target/rat.txt file after the run completes. If the build passes, RAT is saying that we are compliant and this test passes.

Compile and Start Management Server

Note: If you're on Ubuntu and using the PPA:natecarlson/maven3 (viz. Installing tools above), you've to use mvn3 instead of mvn, so mvn3 -P deps

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

Configure CloudStack management server

Note
Need to set router.version.check to false in the global configuration page, after management server is up to workaround a devcloud issue, and then restart management server.

Once the management server starts on your local machine, execute the following commands to bring up a basic zone using the devcloud2 VM:

Deploy DevCloud (make sure mysql-connector-python is installed and that the management server is running)

Code Block
$ mvn -P developer -pl tools/devcloud -Ddeploysvr

Or, if the above does not work, maybe you're running mvn in debug mode using some MAVEN_OPTS, try marvin:

Code Block
$ cd tools/devcloud; python ../marvin/marvin/deployDataCenter.py -i devcloud.cfg

The above will deploy a zone with settings defined in tools/devcloud/devcloud.cfg which sets some global settings and will take some time. After this, you should restart management server and destroy any system vms which may have started for the global settings to take effect.

Validate the UI

Access web UI: http://localhost:8080/client, and login with admin/password. You can tell if the SSVM has been started by navigating to the Infrastructure page, and clicking on System VMs.  There should be 2 listed, and their status needs to be displayed as "Started".

Add a new instance:

  • In the first step of "Add instance " wizard, select template,
  • In step 2, select "tiny Linux"
  • In step 3, select "tinyOffering"
  • In step 4, select "No thanks"
  • Skip step 5 and 6.
  • Launch VM

Test other functionality, to suite your tastes (and perhaps using non-DevCloud infrastructure.

Validate AWSAPI interface

In a separate terminal run:

Code Block
mvn -Pawsapi -pl :cloud-awsapi jetty:run

Via the UI:
1. Destroy any running instances
2. Rename the tinyoffering compute offering 'm1.small'

Then using the access key and secret key of your admin user run the following python script:

Code Block
#!/usr/bin/env python

import boto
import boto.ec2

accesskey="2IUSA5xylbsPSnBQFoWXKg3RvjHgsufcKhC1SeiCbeEc0obKwUlwJamB_gFmMJkFHYHTIafpUx0pHcfLvt-dzw"
secretkey="oxV5Dhhk5ufNowey7OVHgWxCBVS4deTl9qL0EqMthfPBuy3ScHPo2fifDxw1aXeL5cyH10hnLOKjyKphcXGeDA"
 
region = boto.ec2.regioninfo.RegionInfo(name="ROOT", endpoint="localhost")
conn = boto.connect_ec2(aws_access_key_id=accesskey, aws_secret_access_key=secretkey, is_secure=False, region=region, port=7080, path="/awsapi", api_version="2012-08-15")

images=conn.get_all_images()
print images

res = images[0].run(instance_type='m1.small',security_groups=['default'])
18 *.py */*.py

Verify that each file has the ASL

Run Some Tests

This assumes that you have a working CloudStack management server running that you can test against. Create a cloudmonkey config file along these lines (change as appropriate to your CloudStack installation)

Code Block
$ cd /tmp/cloudstack-cloudmonkey/ 
$ cat > test.cfg << EOF 
[core] 
cache_file = /tmp/cloudstack-cloudmonkey/cache 
log_file = /tmp/cloudstack-cloudmonkey/log 
asyncblock = true 
paramcompletion = false 
history_file = /tmp/cloudstack-cloudmonkey//history 
 
[ui] 
color = true 
prompt = >  
display = default 
 
[user] 
secretkey = 
apikey =  
username = admin 
password = password  
 
[server] 
path = /client/api 
host = localhost 
protocol = http 
port = 8080 
timeout = 3600 
expires = 300 
EOF

 

Start cloudmonkey

Code Block
$ cd /tmp/cloudstack-cloudmonkey/apache-cloudstack-cloudmonkey-5.1.0-src/cloudmonkey
$ python cloudmonkey.py -c ../../test.cfg
 

Make sure you see '5.1.0' in the welcome message.

Try some initial tests

Code Block
> list zones  
> list virtualmachines

Also make sure you try some asynchronous apis such as 'deploy virtualmachine'.

Edit the configuration file and enter valid values for the api key and secret key. Redo the testsIf the keys have changed, using the above script verbatim won't work. Make sure to update the keys.

End!

If we made it this far, the release has at least been reasonably "smoke tested".