cloud computing examples hochschule fulda
Find a file
2025-07-20 20:29:58 +03:00
.idea Merge branch 'master' of gogs.informatik.hs-fulda.de:srieger/cloud-computing-msc-ai-examples 2019-07-02 22:15:45 +02:00
example-projects updated certificate, image name and AUTH_URL of new charmed openstack deployment, changed old GOGS repo to new git-ce.rwth-aachen.de repo 2025-04-13 10:18:37 +02:00
faafo Revert "version 2 for today" 2025-07-20 01:44:27 +03:00
terraform updated certificate, image name and AUTH_URL of new charmed openstack deployment, changed old GOGS repo to new git-ce.rwth-aachen.de repo 2025-04-13 10:18:37 +02:00
.demo2-instance-with-init-script.py.swp Added README.md 2025-07-20 20:29:58 +03:00
.gitignore moved terraform lab1 example back to deprecated floating ip assignment as new implementation does not set port id 2024-05-21 12:29:23 +02:00
CloudComp-example-openrc updated certificate, image name and AUTH_URL of new charmed openstack deployment, changed old GOGS repo to new git-ce.rwth-aachen.de repo 2025-04-13 10:18:37 +02:00
clouds-example.yaml updated certificate, image name and AUTH_URL of new charmed openstack deployment, changed old GOGS repo to new git-ce.rwth-aachen.de repo 2025-04-13 10:18:37 +02:00
demo1-getting-started.py yash's first commit added delete selected command 2025-04-30 16:09:50 +05:30
demo2-instance-with-init-script.py change demo script 2025-04-30 13:08:45 +03:00
demo3-microservice.py Change demo3 script to also use our repository 2025-07-20 19:35:35 +03:00
demo4-1-scale-out.py Change demo4-1 and demo4-2 to also use our repository 2025-07-20 19:41:26 +03:00
demo4-2-scale-out-add-worker.py Change demo4-1 and demo4-2 to also use our repository 2025-07-20 19:41:26 +03:00
demo5-1-durable-storage.py Converted all these files from python 2 to python 3 syntax usong 2to3 library (demo3-microservices.py,demo4-scale-out-add-worker.py,demo4-scale-out.py,demo5-1-durable-storage.py,demo5-2-backup-fractals.py,destroy-all-demo-instances.py) 2023-08-07 11:40:03 +05:00
demo5-2-backup-fractals.py Converted all these files from python 2 to python 3 syntax usong 2to3 library (demo3-microservices.py,demo4-scale-out-add-worker.py,demo4-scale-out.py,demo5-1-durable-storage.py,demo5-2-backup-fractals.py,destroy-all-demo-instances.py) 2023-08-07 11:40:03 +05:00
destroy-all-demo-instances.py Have a consistent naming scheme 2025-04-16 10:22:38 +02:00
README.md Added README.md 2025-07-20 20:29:58 +03:00
root-ca.crt updated certificate, image name and AUTH_URL of new charmed openstack deployment, changed old GOGS repo to new git-ce.rwth-aachen.de repo 2025-04-13 10:18:37 +02:00

Cloud Computing Project Submission

Group Number 2

Members:

  • Emin Arslan 1581975, fd0003933
  • Yash Sharma 1573145, fd0003398
  • Sagarkumar Dipakbhai Rokad 1566440, fd0003372
  • Abhimanyu Rajesh Kanase 1569090, fd0003385

First Task

First we understood the architecture of the faafo application and commands. Then we changed the repository link in the install script for faafo to point to Emin's custom git repository. This was necessary because the demo deployment scripts pull from the remote repository when installing faafo on an instance and local changes are ignored.

After that, we added a few custom commands to the faafo command line tool. First we added a delete-all command, which deletes all fractals. Second, we added a delete-selected command, which takes a list of fractal UUIDs and deletes all of them. By adding these custom commands we achived a greater understanding of the faafo command line tool so that we can add more commands as needed in the future. We also added help messages for the new commands to provide a better user experience.

List of changed files for task 1:

  • faafo/contrib/install.sh (changed repository link)
  • demo2-instance-with-init-script.py (changed repository link)
  • demo3-microservice.py (changed repository link)
  • demo4-1-scale-out.py (changed repository link)
  • demo4-2-scale-out-add-worker.py (changed repository link)
  • faafo/bin/faafo (added commands)

Second Task

The faafo application as given stores all image data, including the image file itself in an SQL database. For the second task we changed the faafo API and worker programs (faafo/faafo/api/service.py and faafo/faafo/worker/service.py) to store the image file in OpenStack object storage. Other data about the image will still be stored in the database.

We changed the API server such that it will no longer store the image as a blob in the database. Instead, only a URL to the object containing the image data is stored, and the API retreives this data when the image is requested.

Upon first running the API, a new container with the name "fractals" will be created under our account. This container will hold all generated fractal image files.

OpenStack authentication is currently performed by a pre-generated application credential. In the first attempts we used password authentication directly. In a real deployment, it would be best to instead have the deployment script automatically generate a new set of application credentials for the API and workers to use.

OpenStack authentication using libcloud was a difficult roadblock. For a long while we were stuck on this issue, as the example given in the documentation did not work for us. We were eventually able to fix this by forcing v3 authentication directly and using the base URL instead of the one given by OpenStack. Here is the code example that worked for us:

from libcloud.storage.types import Provider
from libcloud.storage.providers import get_driver
import libcloud.security
libcloud.security.VERIFY_SSL_CERT = False

cls = get_driver(Provider.OPENSTACK_SWIFT)
# Use these parameters for v3 authentication
driver = cls(
    'CloudComp2', # username
    'demo', # password
    ex_force_auth_url='https://10.32.4.29:5000/', # NOT https://10.32.4.29:5000/v3
    ex_force_auth_version='3.x_password', # '3.x_appcred' for application credentials
    ex_tenant_name='CloudComp2',
    ex_domain_name='default'
)

print(driver.list_containers())

This code sample uses username and password directly for authentication. Our submitted faafo application instead uses application credentials to authenticate. In this case we had to change ex_force_auth_version to '3.x_appcred'.

We tried deploying using the demo2, demo3, demo4-1 and demo4-2 deployment scripts. All of these deployments were successful and made use of OpenStack object storage correctly, showing that the application in its current state is scalable.

List of changed files for task 2:

  • faafo/faafo/api/service.py
  • faafo/faafo/worker/service.py

A more detailed breakdown of what exact changes were made to which file can be found in our git repository history.