Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UCloud Web Qualification #3

Open
29 of 37 tasks
JV-conseil opened this issue Mar 13, 2023 · 0 comments
Open
29 of 37 tasks

UCloud Web Qualification #3

JV-conseil opened this issue Mar 13, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@JV-conseil
Copy link
Owner

JV-conseil commented Mar 13, 2023

Validate UCloud as a stable cloud service to serve Python Django v4.1.2 web app coupled with a PostgreSQL Server
Provided UCloud is up and running 👉 https://status.cloud.sdu.dk/

app-thalassa cloud sdu dk running in DEBUG=False with cache activated and collectstatic
app-thalassa.cloud.sdu.dk running in DEBUG=False with cache activated and collectstatic.

  • PostgreSQL Server v14.5 initialization.
  • PostgreSQL Server v14.5 New Database and User creation.
  • PostgreSQL Server v14.5 SSL set up pg_hba.conf
  • Django v4.1.2 access environment variables through os.environ.get("DBHOST")
  • Django v4.1.2 DEBUG=True
  • Django v4.1.2 SECURE_SSL_REDIRECT = True fails 👉 should not be declared in settings.py 🚫
  • Django v4.1.2 SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
  • Django v4.1.2 <> PostgreSQL Server v14.5 connection django.db.backends.postgresql
  • Django v4.1.2 <> PostgreSQL Server v14.5 SSL transactions SSLMODE=require
  • Django v4.1.2 makemigrations & migrate
  • Django v4.1.2 create_superuser
  • Django v4.1.2 CSRF_COOKIE_SECURE = True and CSRF_USE_SESSIONS = True
  • Django v4.1.2 DEBUG=False
  • Django v4.1.2 ALLOWED_HOSTS set to
    ['localhost', 'app-627236-0.cloud.sdu.dk', 'app-githubbing.cloud.sdu.dk']
  • Django v4.1.2 collectstatic
  • Django v4.1.2 serves static files through whitenoise
  • Django v4.1.2’s cache framework > Filesystem caching django.core.cache.backends.filebased.FileBasedCache
  • Django v4.1.2 <> PostgreSQL Server v14.5 ETL python manage.py xloader.
  • Django v4.1.2 run in pseudo UCloud localhost mode (see below 👀 ) https://app-{job-id}-0.cloud.sdu.dk.
  • Django v4.1.2 run with a Public link https://app-githubbing.cloud.sdu.dk.
  • UCloud app run over 24 hours ⏳
  • PostgreSQL Server v15.2 initialization.
  • PostgreSQL Server v15.2 New Database and User creation.
  • PostgreSQL Server v15.2 SSL set up pg_hba.conf
  • Django v4.1.2 <> PostgreSQL Server v15.2 connection django.db.backends.postgresql
  • Django v4.1.2 <> PostgreSQL Server v15.2 SSL transactions SSLMODE=require
  • Django v4.1.2 <> PostgreSQL Server v15.2 ETL python manage.py xloader

Issues

  • Public Link running only once then error 503 upstream connect error or disconnect/reset before headers. reset reason: connection termination 🙅 (Solved on 2023, March 24th).
  • Outdated Python 🐍 versions in containerized app.

End of March, 2023 👀

  • PostgreSQL server v14.5 version bump to v15.2
  • Django v4.1.2 version bump to v4.1.7
  • Python version bump to v3.11.2

TODO

  • Python 3.11.2 - Always run latest stable release of Python 🐍 in containerized app (at least Django).
  • PgBouncer - 1.18.0 Dec 12, 2022. Install, setup with PostgreSQL Server v15.2.
  • Custom Domain Name (DNS) instead of Public Links.
  • PenTest
  • ...

Pseudo UCloud localhost mode

Pseudo UCloud localhost mode = when Django app is running on https://app-{job-id}-0.cloud.sdu.dk interface with no Public link connected.

  1. Pseudo UCloud localhost execution is cookie restricted to the current browser session 👉 cannot be shared with another browser session; an error 403 is raised: same browser in Private mode will fail, another browser on the same computer will fail.
  2. Public link and Pseudo UCloud localhost mode are exclusive to one another.
  3. Public link resources cannot be shared among users 👉 one user has to launch a job and attach a Public link he "owns", he cannot attach a Public link created by another user.
  4. As an extra-check/validation, UCloud does check your Public link availability on creation for a similar one already existing created by someone else.

Containers overview

March 2022 with u1-standard-8 machine.

Environment set -eufo pipefail ${USER} Python 3.11.0 apt update Creation Age
Terminal Debian 0.9.0 3.6.8 ❌ 28/12/2022 75 days
Terminal Ubuntu 0.20.0 3.10.7 ❌ 960 sec 28/12/2022 75 days
Terminal Ubuntu 0.21.0
(Linux version 5.4.228.el8 Ubuntu 22.10)
3.10.7 ❌ 233 sec 21/03/2023 0 days
Terminal CentOS 0.8.0 3.6.8 ❌ 14/06/2022 272 days
PostgreSQL Server v14.5
(Linux v5.4.228.el8 Debian)
218 sec 12/10/2022 152 days
PostgreSQL Server v15.2
(Linux v5.4.228.el8 Debian 6.1.2023)
3.9.2 ❌ 24 sec 16/03/2023 4 days
Django v4.1.2 4.1.2
(Linux v5.4.228.el8 Debian)
962 sec 08/11/2022 125 days

Incident review

Health Page Status 👉 https://status.cloud.sdu.dk/

Year Incidents (nb)
2023 9
2022 18

Service Level Objective (SLO) for UCloud Compute >= 85% for Monthly Uptime Percentage.

Notes 📝

  • Aalborg (AAU) presentation of UCloud 🎓
@JV-conseil JV-conseil added the bug Something isn't working label Mar 13, 2023
@JV-conseil JV-conseil added this to the UCloud Web Qualification milestone Mar 13, 2023
@JV-conseil JV-conseil self-assigned this Mar 13, 2023
@JV-conseil JV-conseil added documentation Improvements or additions to documentation and removed bug Something isn't working labels Mar 13, 2023
@JV-conseil JV-conseil pinned this issue Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant