| Dean Troyer | 0986a7b | 2014-10-29 22:08:13 -0500 | [diff] [blame] | 1 | ===================== | 
 | 2 | eucarc - EC2 Settings | 
 | 3 | ===================== | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 4 |  | 
 | 5 | ``eucarc`` creates EC2 credentials for the current user as defined by | 
 | 6 | ``OS_TENANT_NAME:OS_USERNAME``. ``eucarc`` sources ``openrc`` at the | 
 | 7 | beginning (which in turn sources ``stackrc`` and ``localrc``) in order | 
 | 8 | to set credentials to create EC2 credentials in Keystone. | 
 | 9 |  | 
 | 10 | EC2\_URL | 
 | 11 |     Set the EC2 url for euca2ools. The endpoint is extracted from the | 
 | 12 |     service catalog for ``OS_TENANT_NAME:OS_USERNAME``. | 
 | 13 |  | 
 | 14 |     :: | 
 | 15 |  | 
 | 16 |         EC2_URL=$(keystone catalog --service ec2 | awk '/ publicURL / { print $4 }') | 
 | 17 |  | 
 | 18 | S3\_URL | 
 | 19 |     Set the S3 endpoint for euca2ools. The endpoint is extracted from | 
 | 20 |     the service catalog for ``OS_TENANT_NAME:OS_USERNAME``. | 
 | 21 |  | 
 | 22 |     :: | 
 | 23 |  | 
 | 24 |         export S3_URL=$(keystone catalog --service s3 | awk '/ publicURL / { print $4 }') | 
 | 25 |  | 
 | 26 | EC2\_ACCESS\_KEY, EC2\_SECRET\_KEY | 
 | 27 |     Create EC2 credentials for the current tenant:user in Keystone. | 
 | 28 |  | 
 | 29 |     :: | 
 | 30 |  | 
 | 31 |         CREDS=$(keystone ec2-credentials-create) | 
 | 32 |         export EC2_ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }') | 
 | 33 |         export EC2_SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }') | 
 | 34 |  | 
 | 35 | Certificates for Bundling | 
 | 36 |     Euca2ools requires certificate files to enable bundle uploading. The | 
 | 37 |     exercise script ``exercises/bundle.sh`` demonstrated retrieving | 
 | 38 |     certificates using the Nova CLI. | 
 | 39 |  | 
 | 40 |     :: | 
 | 41 |  | 
 | 42 |         EC2_PRIVATE_KEY=pk.pem | 
 | 43 |         EC2_CERT=cert.pem | 
 | 44 |         NOVA_CERT=cacert.pem | 
 | 45 |         EUCALYPTUS_CERT=${NOVA_CERT} |