Upgrade to Pro — share decks privately, control downloads, hide ads and more …

oSC24 - Pagure CI integration with AWS CodePipe...

oSC24 - Pagure CI integration with AWS CodePipeline

Pagure is a lightweight git centered forge based on Python with a long usage history in the Fedora project. It's well known in the openSUSE project too with an instance on code.opensuse.org. I demonstrate in this talk the current state of the Pagure Plugin system. How I implemented AWS CodePipeline as additional CI type. And how this can serve as blueprint to optimize the Plugin system and add other CI types. I will share the current status of my work to run Pagure on Kubernetes. And some good-first-issues you can tackle if you want to contribute to Pagure.

Presented at openSUSE Conference 2024: https://events.opensuse.org/conferences/oSC24/program/proposals/4587

Dominik Wombacher

June 27, 2024
Tweet

More Decks by Dominik Wombacher

Other Decks in Technology

Transcript

  1. That’s me Linus loves Geeko • Passionate Engineer • Open

    source contributor • bugfixes / features • packager • maintainer • Dog person & Dad
  2. pagure? pagure! • First commit: 2014-03-14 17:03:48 UTC • Since

    then: • 9441 commits • 220 Contributors • Latest release: 5.14.1 (2024-05-24) • Major release 6.0: Q4 2024
  3. pagure? pagure! • Tech Stack • Python • Flask •

    Celery • libgit2 / pygit2 • Redis => Valkey • PostgreSQL / MariaDB
  4. pagure? pagure! • challenges • 2 years between 5.13.3 and

    5.14.1 • low amount of active contributors • technical depts • user experience
  5. pagure hooks • scope: projects • routes and ui •

    pre-defined structure • extends BaseHook • override methods
  6. Flask blueprints • scope: pagure • Env vars / config

    variables • PAGURE_PLUGINS_CONFIG • PLUGINS • Example: pagure-dist-git
  7. pagure CI hook • The plugin inside the plugin system

    • pagure/hooks/pagure_ci.py • Celery triggers the CI • pagure/lib/tasks_services.py • trigger_ci_build()
  8. build a new CI type • Remember: celery triggers the

    CI • You have to implement: • pagure/api/ci/<ci_type>.py • trigger_build()
  9. build a new CI type • What else? • pagure/api/ci/<ci_type>.py

    • @API.route() • Handling of incoming responses
  10. ongoing improvements • Done: • Make pagure CI more generic

    • Ongoing: • Make pagure CI easier extendable
  11. AWS CodePipeline ci type • Short Term credentials • EC2

    Instance Profiles • IAM for Service Accounts on k8s
  12. [WIP] pagure on k8s • Container • Python 3.9 venv

    • entrypoint scripts • Kubernetes • sample Deployment manifest
  13. pagure on k8s – next steps • Container • publish

    to quay.io • latest == master branch • release tags • Kubernetes • Helm chart
  14. Get started • Install and use pagure J • Read

    the source and docs • Most important: Local testing • Start with small improvements or fixes contributing