Allow euca-upload-bundle to work with devstack
* modifies stack.sh to run nova-cert and nova-objectstore
* adds exercises/bundle.sh to test for bundling
* requires https://review.openstack.org/#change,3200
Change-Id: I850891948fbdfdf5890225f94df755e5dbc733d0
diff --git a/openrc b/openrc
index 0f327d2..9c94141 100644
--- a/openrc
+++ b/openrc
@@ -49,6 +49,20 @@
# Secret key is set in the initial keystone data to the admin password
export EC2_SECRET_KEY=${ADMIN_PASSWORD:-secrete}
+# Euca2ools Certificate stuff for uploading bundles
+# You can get your certs using ./tools/get_certs.sh
+NOVARC=$(readlink -f "${BASH_SOURCE:-${0}}" 2>/dev/null) ||
+ NOVARC=$(python -c 'import os,sys; print os.path.abspath(os.path.realpath(sys.argv[1]))' "${BASH_SOURCE:-${0}}")
+NOVA_KEY_DIR=${NOVARC%/*}
+export S3_URL=http://$SERVICE_HOST:3333
+export EC2_USER_ID=42 # nova does not use user id, but bundling requires it
+export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
+export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
+export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
+export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set
+alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
+alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
+
# set log level to DEBUG (helps debug issues)
# export NOVACLIENT_DEBUG=1