Last active
August 29, 2015 14:09
-
-
Save thcipriani/8aa2e2bbf31ee89fcb79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
printf "Enter OpenStack cloud password: " | |
read pass | |
# With the addition of Keystone, to use an openstack cloud you should | |
# authenticate against keystone, which returns a **Token** and **Service | |
# Catalog**. The catalog contains the endpoint for all services the | |
# user/tenant has access to - including nova, glance, keystone, swift. | |
# | |
# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We | |
# will use the 1.1 *compute api* | |
export OS_AUTH_URL=http://192.168.5.23:5000/v2.0 | |
# With the addition of Keystone we have standardized on the term **tenant** | |
# as the entity that owns the resources. | |
export OS_TENANT_ID=b230c60900764a02980bf7918189fc36 | |
#export OS_TENANT_NAME="${1:-IT}" | |
export OS_TENANT_NAME="admin" | |
echo "Using project '${1:-IT}'" | |
if ! keystone token-get &>/dev/null; then | |
# In addition to the owning entity (tenant), openstack stores the entity | |
# performing the action as the **user**. | |
export OS_USERNAME=erik.hallqvist@sparkfun.com | |
export OS_PASSWORD=$pass | |
fi | |
image_id='3ae28814-48ea-43c7-a683-223a556b0923' | |
nova boot "jenkins-test-$(date +%s)" --image $image_id --flavor m1.small --key-name 'Erik' --nic net-id=45d50b83-a31e-45d5-b6b1-b8ffd9ba8eb6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment