drm-panic-frontend: Add deployment #3283

Merged
kevin merged 1 commit from jexposit/ansible:add-drm-panic-frontend into main 2026-06-02 20:51:29 +00:00
Contributor

Hi!

This MR includes the required changes to deploy the DRM Panic Frontend.

For more details, please check infra/tickets#13254

WIP because:

  • This is the first time in my life I work with Ansible. I copy & pasted the code from "asknot" and adapted it, but I'd appreciate a review from somebody with experience
  • route_host: I'm not sure which URL should I pick
  • project_appowners: Again, I'm not sure if I should be in the list or if I missed an admin

To support this deployment, in the DRM Panic Frontend repo, I added a Dockerfile:
https://github.com/JoseExposito/drm-panic-frontend/pull/2

I'm not sure if it meets with the expectations to be deployed in your infra or you have other requirements, like selecting a different base image.

Thanks a lot in advance for your feedback.

Hi! This MR includes the required changes to deploy the DRM Panic Frontend. For more details, please check https://forge.fedoraproject.org/infra/tickets/issues/13254 WIP because: - This is the first time in my life I work with Ansible. I copy & pasted the code from "asknot" and adapted it, but I'd appreciate a review from somebody with experience - `route_host`: I'm not sure which URL should I pick - `project_appowners`: Again, I'm not sure if I should be in the list or if I missed an admin To support this deployment, in the DRM Panic Frontend repo, I added a Dockerfile: https://github.com/JoseExposito/drm-panic-frontend/pull/2 I'm not sure if it meets with the expectations to be deployed in your infra or you have other requirements, like selecting a different base image. Thanks a lot in advance for your feedback.
drm-panic-frontend: Add deployment
All checks were successful
Linter / yamllint (pull_request) Successful in 24s
Linter / ansible-lint (pull_request) Successful in 45s
AI Code Review / ai-review (pull_request_target) Has been skipped
af683bdeae
Owner

@jexposit wrote in #3283 (comment):

  • route_host: I'm not sure which URL should I pick

route_host for staging should be drm-panic.stg.fedoraproject.org and I recommend going with something like coreos-cincinnati project

  - role: openshift/route
    route_app: coreos-cincinnati
    route_name: coreos-updates
    route_host: "updates.coreos{{ env_suffix }}.fedoraproject.org"
    route_serviceport: coreos-cincinnati-updates
    route_servicename: coreos-cincinnati
  • project_appowners: Again, I'm not sure if I should be in the list or if I missed an admin

project_appowners define people who are owner of the project in OpenShift. You should be there as the person who is maintaining the deployment. You don't need to include me or other admins as we have the access anyway.

@jexposit wrote in https://forge.fedoraproject.org/infra/ansible/pulls/3283#issue-113084: > * `route_host`: I'm not sure which URL should I pick `route_host` for staging should be `drm-panic.stg.fedoraproject.org` and I recommend going with something like coreos-cincinnati project ``` - role: openshift/route route_app: coreos-cincinnati route_name: coreos-updates route_host: "updates.coreos{{ env_suffix }}.fedoraproject.org" route_serviceport: coreos-cincinnati-updates route_servicename: coreos-cincinnati ``` > * `project_appowners`: Again, I'm not sure if I should be in the list or if I missed an admin `project_appowners` define people who are owner of the project in OpenShift. You should be there as the person who is maintaining the deployment. You don't need to include me or other admins as we have the access anyway.
Author
Contributor

Thanks a lot for your review @zlopez !

I update the MR with the following changes:

  • project_appowners: Only myself
  • route_host: Set to drm-panic{{ env_suffix }}.fedoraproject.org. env_suffix is .stg in stage and empty string in production, so it generates the desired URLs.

To make it easier to review the changes, I pushed a second time rebasing on top of main and removed the "WIP" tag.

Thanks a lot for your review @zlopez ! I update the MR with the following changes: - `project_appowners`: Only myself - `route_host`: Set to `drm-panic{{ env_suffix }}.fedoraproject.org`. `env_suffix` is `.stg` in stage and empty string in production, so it generates the desired URLs. To make it easier to review the changes, I pushed a second time rebasing on top of main and removed the "WIP" tag.
jexposit force-pushed add-drm-panic-frontend from af683bdeae
All checks were successful
Linter / yamllint (pull_request) Successful in 24s
Linter / ansible-lint (pull_request) Successful in 45s
AI Code Review / ai-review (pull_request_target) Has been skipped
to c350d2c435
Some checks failed
Linter / yamllint (pull_request) Successful in 26s
Linter / ansible-lint (pull_request) Has been cancelled
2026-04-17 08:15:14 +00:00
Compare
jexposit changed title from WIP: drm-panic-frontend: Add deployment to drm-panic-frontend: Add deployment 2026-04-17 08:15:47 +00:00
jexposit force-pushed add-drm-panic-frontend from c350d2c435
Some checks failed
Linter / yamllint (pull_request) Successful in 26s
Linter / ansible-lint (pull_request) Has been cancelled
to c7277a6711
All checks were successful
Linter / yamllint (pull_request) Successful in 25s
Linter / ansible-lint (pull_request) Successful in 45s
2026-04-17 08:16:40 +00:00
Compare
zlopez left a comment

One more thing I found.

One more thing I found.
@ -0,0 +47,4 @@
route_servicename: drm-panic-frontend
when: env == "staging"
- role: openshift/route
Owner

You don't need second openshift/route role as they are now idenitical.

You don't need second openshift/route role as they are now idenitical.
Author
Contributor

Good point. I dropped the second openshift/route and the "when" condition so it applies to both environments.

Good point. I dropped the second openshift/route and the "when" condition so it applies to both environments.
jexposit force-pushed add-drm-panic-frontend from c7277a6711
All checks were successful
Linter / yamllint (pull_request) Successful in 25s
Linter / ansible-lint (pull_request) Successful in 45s
to b092d97256
All checks were successful
Linter / yamllint (pull_request) Successful in 25s
Linter / ansible-lint (pull_request) Successful in 45s
2026-04-17 15:09:48 +00:00
Compare
Author
Contributor

Hi @zlopez

I'll be away from keyboard the last 3 weeks of May. Once I'm back, we'll have ~1 month before Fedora 45 is branched to include the kernel side changes, i.e., change the DRM Panic configuration to point to drm-panic.fedoraproject.org.

I was wondering, is "drm-panic.fedoraproject.org" going to be the final URL? If so, it'd be nice to start evaluating the required changes on the kernel. With people going on summer PTO, I would prefer to start looking into this sooner rather than latter.

Hi @zlopez I'll be away from keyboard the last 3 weeks of May. Once I'm back, we'll have ~1 month before Fedora 45 is branched to include the kernel side changes, i.e., change the DRM Panic configuration to point to drm-panic.fedoraproject.org. I was wondering, is "drm-panic.fedoraproject.org" going to be the final URL? If so, it'd be nice to start evaluating the required changes on the kernel. With people going on summer PTO, I would prefer to start looking into this sooner rather than latter.
Owner

@jexposit
The freeze will end today probably, but I will be out tomorrow and on Friday. We can start looking into this next week. But I think the URL can stay, if you don't want to change something.

@jexposit The freeze will end today probably, but I will be out tomorrow and on Friday. We can start looking into this next week. But I think the URL can stay, if you don't want to change something.
Author
Contributor

Cool! Lets comment on this next week. No changes required from my side.

Cool! Lets comment on this next week. No changes required from my side.
Author
Contributor

Following-up a bit on this topic, the kernel MR was created by Jocelyn here:
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/4510

It is in draft until this is merged and we can test the end result.

Following-up a bit on this topic, the kernel MR was created by Jocelyn here: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/4510 It is in draft until this is merged and we can test the end result.
First-time contributor

The kernel-ark MR is now merged:
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/4510

But the QR code now redirect to https://drm-panic.fedoraproject.org, which doesn't exist yet.

The kernel-ark MR is now merged: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/4510 But the QR code now redirect to https://drm-panic.fedoraproject.org, which doesn't exist yet.
Author
Contributor

@zlopez I think all the pieces are in place but the frontend itself. Let me know if there is something missing before we can merge this.

@zlopez I think all the pieces are in place but the frontend itself. Let me know if there is something missing before we can merge this.
Owner

a few comments:

  • it's probibly best to just deploy this for staging at first. So, remove the os_control hosts keeping only os_control_stg
  • drm-panic{{ env_suffix }}.fedoraproject.org will need to be added to dns

Otherwise looks fine to me.

a few comments: - it's probibly best to just deploy this for staging at first. So, remove the os_control hosts keeping only os_control_stg - drm-panic{{ env_suffix }}.fedoraproject.org will need to be added to dns Otherwise looks fine to me.
jexposit force-pushed add-drm-panic-frontend from b092d97256
All checks were successful
Linter / yamllint (pull_request) Successful in 25s
Linter / ansible-lint (pull_request) Successful in 45s
to b3b48bc8fa
Some checks failed
Linter / ansible-lint (pull_request) Has been cancelled
Linter / yamllint (pull_request) Has been cancelled
2026-06-02 05:28:48 +00:00
Compare
jexposit force-pushed add-drm-panic-frontend from b3b48bc8fa
Some checks failed
Linter / ansible-lint (pull_request) Has been cancelled
Linter / yamllint (pull_request) Has been cancelled
to be4649d54a
All checks were successful
Linter / yamllint (pull_request) Successful in 26s
Linter / ansible-lint (pull_request) Successful in 1m28s
AI Code Review / ai-review (pull_request_target) Successful in 27s
2026-06-02 05:29:28 +00:00
Compare
Author
Contributor

Thanks @kevin, I pushed the suggested change to deploy the frontend in staging only. To make the review process easier, the first push contains the change and the second one is a rebase on top of main.

drm-panic{{ env_suffix }}.fedoraproject.org will need to be added to dns

Is that change handled in this repo? I couldn't find the right place to include this change.

Thanks @kevin, I pushed the suggested change to deploy the frontend in staging only. To make the review process easier, the first push contains the change and the second one is a rebase on top of main. > drm-panic{{ env_suffix }}.fedoraproject.org will need to be added to dns Is that change handled in this repo? I couldn't find the right place to include this change.
Owner

DNS is in another repo. I can handle adding those hosts...

Lets give this a go in staging.

DNS is in another repo. I can handle adding those hosts... Lets give this a go in staging.

AI Code Review

Detailed Code Review

The configuration correctly implements the staging-first deployment strategy requested during the review discussions. The use of standard Fedora infrastructure variables, particularly env_suffix in the routing layer, appropriately DRYs up the code and future-proofs it for production deployment.

The OpenShift objects (Service, ImageStream, BuildConfig, and Deployment) are correctly wired together. The BuildConfig correctly references the GitHub repository and dynamically selects the target branch based on the environment. One minor area for improvement is adding resource boundaries to the Deployment spec to ensure the pod doesn't consume unbounded resources on the OpenShift nodes.

📂 File Reviews

📄 `roles/openshift-apps/drm-panic-frontend/files/deployment.yml` - Kubernetes Deployment specification for the frontend.
  • Minor [Suggestion]: The deployment is missing container resource requests and limits. Adding these is considered a Kubernetes/OpenShift best practice to ensure fair scheduling and prevent a single container from causing OOM (Out of Memory) issues on the worker nodes.
    • Suggestion: Add a resources block defining reasonable memory and CPU limits based on expected consumption.
      containers:
      - name: drm-panic-frontend
        image: image-registry.openshift-image-registry.svc:5000/drm-panic-frontend/drm-panic-frontend:latest
        ports:
        - containerPort: 8080
        resources:
          requests:
            memory: "64Mi"
            cpu: "50m"
          limits:
            memory: "128Mi"
            cpu: "100m"

✅ Summary

  • Overall Assessment: The deployment logic is sound, correctly restricts to the staging environment as discussed, and has no critical bugs or security risks identified. Review complete.
  • Minor Suggestions:
    • Consider adding resource requests and limits (cpu, memory) to the container specification in deployment.yml to improve OpenShift scheduling and cluster stability.

🤖 AI Code Review | Generated with ai-code-review | Model: gemini-3.1-pro-preview

⚠️ AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.

## AI Code Review ### Detailed Code Review The configuration correctly implements the staging-first deployment strategy requested during the review discussions. The use of standard Fedora infrastructure variables, particularly `env_suffix` in the routing layer, appropriately DRYs up the code and future-proofs it for production deployment. The OpenShift objects (Service, ImageStream, BuildConfig, and Deployment) are correctly wired together. The BuildConfig correctly references the GitHub repository and dynamically selects the target branch based on the environment. One minor area for improvement is adding resource boundaries to the Deployment spec to ensure the pod doesn't consume unbounded resources on the OpenShift nodes. #### 📂 File Reviews <details> <summary><strong>📄 `roles/openshift-apps/drm-panic-frontend/files/deployment.yml`</strong> - Kubernetes Deployment specification for the frontend.</summary> - **Minor** [Suggestion]: The deployment is missing container resource requests and limits. Adding these is considered a Kubernetes/OpenShift best practice to ensure fair scheduling and prevent a single container from causing OOM (Out of Memory) issues on the worker nodes. - *Suggestion:* Add a `resources` block defining reasonable memory and CPU limits based on expected consumption. ```` containers: - name: drm-panic-frontend image: image-registry.openshift-image-registry.svc:5000/drm-panic-frontend/drm-panic-frontend:latest ports: - containerPort: 8080 resources: requests: memory: "64Mi" cpu: "50m" limits: memory: "128Mi" cpu: "100m" ```` </details> ### ✅ Summary - **Overall Assessment:** The deployment logic is sound, correctly restricts to the staging environment as discussed, and has no critical bugs or security risks identified. Review complete. - **Minor Suggestions:** - Consider adding resource requests and limits (cpu, memory) to the container specification in `deployment.yml` to improve OpenShift scheduling and cluster stability. --- 🤖 **AI Code Review** | Generated with [ai-code-review](https://gitlab.com/redhat/edge/ci-cd/ai-code-review) | **Model:** `gemini-3.1-pro-preview` ⚠️ *AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.*
kevin merged commit 6a1a255d9f into main 2026-06-02 20:51:29 +00:00
Owner
And it's up: https://drm-panic.stg.fedoraproject.org/
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
infra/ansible!3283
No description provided.