7. openrc 與 eucarc

openrc 與 eucarc

 

 

openrc - OpenStack command-line tools onfigures

 

OS_TENANT_NAME=demo
OS_USERNAME=demo
OS_PASSWORD=secrete

# Authenticating against an OpenStack cloud using Keystone returns a Token and Service Catalog.
# The catalog contains the endpoints for all services the user/tenant has access to - including Nova, Glance, Keystone and Swift.

OS_AUTH_URL=http://$SERVICE_HOST:5000/v2.0

 

DEBUG

export KEYSTONECLIENT_DEBUG=1
export NOVACLIENT_DEBUG=1

 


eucarc - EC2 credentials

EC2_URL
    Set the EC2 url for euca2ools. The endpoint is extracted from the service catalog for OS_TENANT_NAME:OS_USERNAME.

    EC2_URL=$(keystone catalog --service ec2 | awk '/ publicURL / { print $4 }')
    

EC2_ACCESS_KEY, EC2_SECRET_KEY
    Create EC2 credentials for the current tenant:user in Keystone.

    CREDS=$(keystone ec2-credentials-create)
    export EC2_ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }')
    export EC2_SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }')

 

 

Creative Commons license icon Creative Commons license icon