|
@ -1,7 +1,6 @@ |
|
|
import getpass |
|
|
import getpass |
|
|
import os |
|
|
import os |
|
|
|
|
|
|
|
|
import libcloud.security |
|
|
|
|
|
from libcloud.compute.providers import get_driver |
|
|
from libcloud.compute.providers import get_driver |
|
|
from libcloud.compute.types import Provider |
|
|
from libcloud.compute.types import Provider |
|
|
|
|
|
|
|
@ -9,10 +8,19 @@ from libcloud.compute.types import Provider |
|
|
# services: nova, glance, neutron |
|
|
# services: nova, glance, neutron |
|
|
# resources: 2 instances, 2 floating ips (1 keypair, 2 security groups) |
|
|
# resources: 2 instances, 2 floating ips (1 keypair, 2 security groups) |
|
|
|
|
|
|
|
|
# HS-Fulda Private Cloud |
|
|
|
|
|
auth_url = 'https://192.168.72.40:5000' |
|
|
|
|
|
|
|
|
# Please use 1-25 for X in username, project etc., as coordinated in the lab sessions |
|
|
|
|
|
|
|
|
|
|
|
# web service endpoint of the private cloud infrastructure |
|
|
|
|
|
auth_url = 'https://private-cloud2.informatik.hs-fulda.de:5000' |
|
|
|
|
|
# your username in OpenStack |
|
|
|
|
|
auth_username = 'CloudCompX' |
|
|
|
|
|
# your project in OpenStack |
|
|
|
|
|
project_name = 'CloudCompGrpX' |
|
|
|
|
|
|
|
|
|
|
|
# default region |
|
|
region_name = 'RegionOne' |
|
|
region_name = 'RegionOne' |
|
|
domain_name = "hsfulda" |
|
|
|
|
|
|
|
|
# domain to use, "default" for local accounts, "hsfulda" for LDAP of DVZ, e.g., using fdaiXXXX as auth_username |
|
|
|
|
|
domain_name = "default" |
|
|
|
|
|
|
|
|
ubuntu_image_name = "Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image" |
|
|
ubuntu_image_name = "Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image" |
|
|
|
|
|
|
|
@ -31,16 +39,6 @@ def main(): |
|
|
# |
|
|
# |
|
|
########################################################################### |
|
|
########################################################################### |
|
|
|
|
|
|
|
|
if "OS_PROJECT_NAME" in os.environ: |
|
|
|
|
|
project_name = os.environ["OS_PROJECT_NAME"] |
|
|
|
|
|
else: |
|
|
|
|
|
project_name = input("Enter your OpenStack project:") |
|
|
|
|
|
|
|
|
|
|
|
if "OS_USERNAME" in os.environ: |
|
|
|
|
|
auth_username = os.environ["OS_USERNAME"] |
|
|
|
|
|
else: |
|
|
|
|
|
auth_username = input("Enter your OpenStack username:") |
|
|
|
|
|
|
|
|
|
|
|
if "OS_PASSWORD" in os.environ: |
|
|
if "OS_PASSWORD" in os.environ: |
|
|
auth_password = os.environ["OS_PASSWORD"] |
|
|
auth_password = os.environ["OS_PASSWORD"] |
|
|
else: |
|
|
else: |
|
@ -52,8 +50,6 @@ def main(): |
|
|
# |
|
|
# |
|
|
########################################################################### |
|
|
########################################################################### |
|
|
|
|
|
|
|
|
libcloud.security.VERIFY_SSL_CERT = False |
|
|
|
|
|
|
|
|
|
|
|
provider = get_driver(Provider.OPENSTACK) |
|
|
provider = get_driver(Provider.OPENSTACK) |
|
|
conn = provider(auth_username, |
|
|
conn = provider(auth_username, |
|
|
auth_password, |
|
|
auth_password, |
|
|