diff --git a/demo2-instance-with-init-script.py b/demo2-instance-with-init-script.py index 2af17cf..b22c87e 100644 --- a/demo2-instance-with-init-script.py +++ b/demo2-instance-with-init-script.py @@ -1,13 +1,22 @@ import getpass -import libcloud.security import os from libcloud.compute.providers import get_driver from libcloud.compute.types import Provider -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' -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" @@ -26,20 +35,11 @@ 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: auth_password = os.environ["OS_PASSWORD"] else: auth_password = getpass.getpass("Enter your OpenStack password:") + # auth_password = "demo" ########################################################################### # @@ -47,8 +47,6 @@ def main(): # ########################################################################### - libcloud.security.VERIFY_SSL_CERT = False - provider = get_driver(Provider.OPENSTACK) conn = provider(auth_username, auth_password, diff --git a/demo3-microservice.py b/demo3-microservice.py index f19a443..193cc10 100644 --- a/demo3-microservice.py +++ b/demo3-microservice.py @@ -1,7 +1,6 @@ import getpass import os -import libcloud.security from libcloud.compute.providers import get_driver from libcloud.compute.types import Provider @@ -9,10 +8,19 @@ from libcloud.compute.types import Provider # services: nova, glance, neutron # 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' -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" @@ -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: auth_password = os.environ["OS_PASSWORD"] else: @@ -52,8 +50,6 @@ def main(): # ########################################################################### - libcloud.security.VERIFY_SSL_CERT = False - provider = get_driver(Provider.OPENSTACK) conn = provider(auth_username, auth_password, diff --git a/demo4-scale-out.py b/demo4-scale-out.py index af36f1f..53b61e7 100644 --- a/demo4-scale-out.py +++ b/demo4-scale-out.py @@ -10,10 +10,19 @@ from libcloud.compute.types import Provider # services: nova, glance, neutron # resources: 2 instances (m1.small), 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' -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" @@ -32,16 +41,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: auth_password = os.environ["OS_PASSWORD"] else: