#9362 Testdays - Onboarding to infra OpenShift
Opened a month ago by frantisekz. Modified 24 days ago

We (Fedora QE) would like to host our Testdays app ( https://testdays.fedorainfracloud.org/ ) on the infrastructure OpenShift cluster. The app is important for Fedora Quality and Community Engagement.

It used to run on fedorainfracloud, then on Communishift and is currently deployed on temporary server (which is constantly overloaded and not designated for production).

The applications itself is a flask app, using postgresql and resultsdb as results storage. I've made changes to the app to support running on OpenShift, I am really not sure if it is the best practice, but that can be reworked based on feedback.

When running on OpenShift, it gets following information from env (both resultsdb and testdays require similar information):

POSTGRESQL_USER, POSTGRESQL_PASSWORD, POSTGRESQL_DATABASE

Username, password, database name. I've linked this from postgresql pod through configmap.

POSTGRESQL_SERVICE_HOST, POSTGRESQL_SERVICE_PORT

Host and port of the database. This was available for pod running testdays out of the box, without any config, I am not sure this is the case in infra cluster?

SECRET_KEY

Used for flask. I've filled this one manually by the output of "python -c 'import secrets; print(secrets.token_hex())'"

RESULTSDB_URL

URL to the pod with resultsdb. I believe this was available as resultsdb pod was running in the same project.

OPENSHIFT_PROD
Indicates that the app should execute container codepath for confgiruation from env.

Apart from "RESULTSDB_URL", both testdays and resultsdb need the same information from env.

I've tried to put something for deployment, but I have no idea how can I test it locally. There are playbooks and deploymentconfigs taken from OpenShift demo ( https://learn.openshift.com/introduction/cluster-access/ ) and cleaned up a little bit. Building is done from resultsdb/testdays repositories through Dockerfiles present there.

I don't have much experience with OpenShift, I was able to set up testdays on communshift through web ui but I am lost a little bit here, so I'll be thankful for any help/mentoring and getting this up and running :)

Current WIP is here: https://pagure.io/fork/frantisekz/fedora-infra/ansible/commits/testdays_oc

Repositories and branches:

https://pagure.io/fedora-qa/testdays-web/ : branch develop

https://pagure.io/taskotron/resultsdb : branch openshift_WIP


Metadata Update from @smooge:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: dev, medium-gain, medium-trouble, ops

a month ago

Dev to get items working and ops for any work in ansible (probably done by dev)

does it send fedora-messaging messages?

does it send fedora-messaging messages?

No, it does not.

Alright, so we have the application up and running on staging. It's set up with its database on db01.stg for now.

curl http://localhost:8080/events on the pod itself works fine.

We need to:
- finish the routing and set up the DNS
- upload the current DB in db01.stg
- test some :)

  • finish the routing and set up the DNS

I've started on this but apparently not enough :(

$ curl https://testdays.stg.fedoraproject.org/ -I |grep loca
location: https://testdays-testdays.apps.os.fedorainfracloud.org
  • upload the current DB in db01.stg

I've uploaded this based on the dump provided by @frantisekz.

Note: I've only done the testdays part btw, I didn't do the resultsdb part.

Login to comment on this ticket.

Metadata
Boards 2
ops Status: In Progress
dev Status: In Progress