Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud-computing-msc-ai-examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Rieger
cloud-computing-msc-ai-examples
Commits
661b125e
Commit
661b125e
authored
Apr 20, 2022
by
Sebastian Rieger
Browse files
Options
Downloads
Patches
Plain Diff
removed domain name from conn init, as we currently only use the default domain anyway
parent
1800b6af
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
demo1-getting-started.py
+5
-6
5 additions, 6 deletions
demo1-getting-started.py
demo2-instance-with-init-script.py
+3
-3
3 additions, 3 deletions
demo2-instance-with-init-script.py
demo3-microservice.py
+3
-3
3 additions, 3 deletions
demo3-microservice.py
with
11 additions
and
12 deletions
demo1-getting-started.py
+
5
−
6
View file @
661b125e
...
@@ -37,7 +37,7 @@ ubuntu_image_name = "Ubuntu 18.04 - Bionic Beaver - 64-bit - Cloud Based Image"
...
@@ -37,7 +37,7 @@ ubuntu_image_name = "Ubuntu 18.04 - Bionic Beaver - 64-bit - Cloud Based Image"
# default region
# default region
region_name
=
'
RegionOne
'
region_name
=
'
RegionOne
'
# domain to use, "default" for local accounts, "hsfulda" for RZ LDAP, e.g., using fdaiXXXX as auth_username
# domain to use, "default" for local accounts, "hsfulda" for RZ LDAP, e.g., using fdaiXXXX as auth_username
domain_name
=
"
default
"
#
domain_name = "default"
def
main
():
def
main
():
...
@@ -46,8 +46,7 @@ def main():
...
@@ -46,8 +46,7 @@ def main():
auth_password
=
"
demo
"
auth_password
=
"
demo
"
# instantiate a connection to the OpenStack private cloud
# instantiate a connection to the OpenStack private cloud
# make sure to include ex_domain_name and ex_force_auth_version='3.x_password', as they are needed in our
# make sure to include ex_force_auth_version='3.x_password', as needed in our environment
# environment
provider
=
get_driver
(
Provider
.
OPENSTACK
)
provider
=
get_driver
(
Provider
.
OPENSTACK
)
print
(
"
Opening connection to %s as %s...
"
%
(
auth_url
,
auth_username
))
print
(
"
Opening connection to %s as %s...
"
%
(
auth_url
,
auth_username
))
...
@@ -57,13 +56,13 @@ def main():
...
@@ -57,13 +56,13 @@ def main():
ex_force_auth_url
=
auth_url
,
ex_force_auth_url
=
auth_url
,
ex_force_auth_version
=
'
3.x_password
'
,
ex_force_auth_version
=
'
3.x_password
'
,
ex_tenant_name
=
project_name
,
ex_tenant_name
=
project_name
,
ex_force_service_region
=
region_name
,
ex_force_service_region
=
region_name
)
ex_domain_name
=
domain_name
)
#
ex_domain_name=domain_name)
print
(
"
Getting images and selecting desired one...
"
)
print
(
"
Getting images and selecting desired one...
"
)
print
(
"
=========================================================================
"
)
print
(
"
=========================================================================
"
)
# get a list of images offered in the cloud context (e.g. Ubuntu
14.04, Ubuntu 16
.04, cirros, ...)
# get a list of images offered in the cloud context (e.g. Ubuntu
20
.04, cirros, ...)
images
=
conn
.
list_images
()
images
=
conn
.
list_images
()
image
=
''
image
=
''
for
img
in
images
:
for
img
in
images
:
...
...
This diff is collapsed.
Click to expand it.
demo2-instance-with-init-script.py
+
3
−
3
View file @
661b125e
...
@@ -36,7 +36,7 @@ flavor_name = 'm1.small'
...
@@ -36,7 +36,7 @@ flavor_name = 'm1.small'
# default region
# default region
region_name
=
'
RegionOne
'
region_name
=
'
RegionOne
'
# domain to use, "default" for local accounts, "hsfulda" for RZ LDAP, e.g., using fdaiXXXX as auth_username
# domain to use, "default" for local accounts, "hsfulda" for RZ LDAP, e.g., using fdaiXXXX as auth_username
domain_name
=
"
default
"
#
domain_name = "default"
def
main
():
def
main
():
...
@@ -64,8 +64,8 @@ def main():
...
@@ -64,8 +64,8 @@ def main():
ex_force_auth_url
=
auth_url
,
ex_force_auth_url
=
auth_url
,
ex_force_auth_version
=
'
3.x_password
'
,
ex_force_auth_version
=
'
3.x_password
'
,
ex_tenant_name
=
project_name
,
ex_tenant_name
=
project_name
,
ex_force_service_region
=
region_name
,
ex_force_service_region
=
region_name
)
ex_domain_name
=
domain_name
)
#
ex_domain_name=domain_name)
###########################################################################
###########################################################################
#
#
...
...
This diff is collapsed.
Click to expand it.
demo3-microservice.py
+
3
−
3
View file @
661b125e
...
@@ -40,7 +40,7 @@ flavor_name = 'm1.small'
...
@@ -40,7 +40,7 @@ flavor_name = 'm1.small'
# default region
# default region
region_name
=
'
RegionOne
'
region_name
=
'
RegionOne
'
# domain to use, "default" for local accounts, "hsfulda" for RZ LDAP, e.g., using fdaiXXXX as auth_username
# domain to use, "default" for local accounts, "hsfulda" for RZ LDAP, e.g., using fdaiXXXX as auth_username
domain_name
=
"
default
"
#
domain_name = "default"
def
main
():
def
main
():
...
@@ -68,8 +68,8 @@ def main():
...
@@ -68,8 +68,8 @@ def main():
ex_force_auth_url
=
auth_url
,
ex_force_auth_url
=
auth_url
,
ex_force_auth_version
=
'
3.x_password
'
,
ex_force_auth_version
=
'
3.x_password
'
,
ex_tenant_name
=
project_name
,
ex_tenant_name
=
project_name
,
ex_force_service_region
=
region_name
,
ex_force_service_region
=
region_name
)
ex_domain_name
=
domain_name
)
#
ex_domain_name=domain_name)
###########################################################################
###########################################################################
#
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment