The documentation illustrates how to use different execution engines of Umbrella to execute
a complex CMS application.

#parrot execution engine test command.
umbrella \
--spec cms_complex.umbrella \
--meta http://ccl.cse.nd.edu/software/umbrella/database/packages.json \
--localdir /tmp/umbrella_test/ \
--output "/tmp/sim_job=/tmp/umbrella_test/parrot_cms_complex_output" \
--sandbox_mode parrot \
--log umbrella.log \
--cvmfs_http_proxy http://cache01.hep.wisc.edu:3128 \
run

#Docker execution engine test command. Don't do the docker test under your afs, it will fail due to the ACL of your afs.
umbrella \
--spec cms_complex.umbrella \
--meta http://ccl.cse.nd.edu/software/umbrella/database/packages.json \
--localdir /tmp/umbrella_test/ \
--output "/tmp/sim_job=/tmp/umbrella_test/docker_cms_complex_output" \
--sandbox_mode docker \
--log umbrella.log \
--cvmfs_http_proxy http://cache01.hep.wisc.edu:3128 \
run

umbrella \
--spec cms_complex.umbrella \
--meta http://ccl.cse.nd.edu/software/umbrella/database/packages.json \
--localdir /tmp/umbrella_test/ \
--output "/tmp/sim_job=/tmp/umbrella_test/ec2_cms_complex_output" \
--sandbox_mode ec2 \
--ec2_sshkey ~/bin/feb272015.pem \
--ec2_key feb272015 \
--ec2_instance_type m3.medium \
--ec2_log umbrella.log.ec2 \
--log umbrella.log \
--cvmfs_http_proxy http://cache01.hep.wisc.edu:3128 \
run

#The interaction between Umbrella and OSF uses the requests package which is not included in Python by default. Please install requests first.
#upload the dependencies to OSF.
umbrella \
--spec cms_complex_S.umbrella \
--localdir /tmp/umbrella_test/ \
--log umbrella.log \
--osf_user <osf_username> \
--osf_pass <osf_password> \
--osf_userid <osf_userid> \
upload osf <osf_project_name> <public_or_private> <target_specpath>

#run the appliction using an umbrella spec with all the deps from osf
umbrella \
--spec cms_complex_S_osf.umbrella \
--localdir /tmp/umbrella_test/ \
--output "/tmp/sim_job=/tmp/umbrella_test/parrot_cms_complex_S_osf_output" \
--sandbox_mode parrot \
--log umbrella.log \
--cvmfs_http_proxy http://cache01.hep.wisc.edu:3128 \
run

#The interaction between Umbrella and the Amazon S3 uses the boto3 package which is not included in Python by default. Please install boto3 first.
#upload the dependencies to S3.
umbrella \
--spec cms_complex_S.umbrella \
--localdir /tmp/umbrella_test/ \
--log umbrella.log \
upload s3 cvmfs_cms_app public-read s3.umbrella

#run the appliction using an umbrella spec with all the deps from s3
umbrella \
--spec cms_complex_S_s3.umbrella \
--localdir /tmp/umbrella_test/ \
--output "/tmp/sim_job=/tmp/umbrella_test/parrot_cms_complex_S_s3_output" \
--sandbox_mode parrot \
--log umbrella.log \
--cvmfs_http_proxy http://cache01.hep.wisc.edu:3128 \
run
