Skip to content
Snippets Groups Projects

Migrate to agent based k8s integration

Merged Kamal Dodiya requested to merge migration-agent into master
3 unresolved threads

Description

This PR is to migrate k8s integration to agent based integration for deploying to k8s cluster. The task is to migrate whatever we have now as it is without adding additional functionality.

Related JIRA Issue(s)

https://www.ebi.ac.uk/panda/jira/browse/ENSWBSITES-2495

Review App URL(s)

None

Knowledge Base

Gitlab Agent : https://docs.gitlab.com/ee/user/clusters/agent/

YAML Anchors: https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html

Example(s)

Pipeline with example showing the dev context https://gitlab.ebi.ac.uk/ensembl-web/ensembl_search_hub/-/pipelines/504135

Dependencies

None

Edited by Kamal Dodiya

Merge request reports

Pipeline #503178 passed

Pipeline passed for 2597f53b on migration-agent

Merged by Kamal DodiyaKamal Dodiya 9 months ago (Mar 25, 2024 2:26pm UTC)

Loading

Pipeline #505166 passed

Pipeline passed for e1cef18b on master

5 environments impacted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
22 22 Docker:
23 23 extends: .build
24 24
25 # Production beta.ensembl.org
26 Prod:WP40:HL:
25 # Production : beta.ensembl.org
26 Prod:
27 27 extends: .deploy
28 28 <<: *deploy-rules
  • What do the magic chars << * do and how does it differ from array notation (extends: - deploy - depoy-rules)?

    Edited by Andres Veidenberg
  • The above recommends using the extends array over yaml magic chars. Here is combination of both. Is it itentional?

    Edited by Andres Veidenberg
  • The extends is extending deploy template. which largely remains as it is across different. With YAML anchors you can have additional conditions. Say for staging we want to deploy from dev branch ( I know here it is not the case). Or for review we want to add branching rules.

    So Its composition of multiple things with extends you will have to well defined template. You can achieve same thing with extends but then you will need to have multilevel extends.

    Again purpose of this PR is to have agent based integration.

  • I commented on this code part because it was not clear to me what and why was done here. You can add branch rules with extends (see example here) which is clearer and recommended approach.

    I'll approve this MR but please consider switching to extends array (see the first comment in this thread).

  • @andres Yes, Agree. We will have to make it consistent across all the API but I would rather do it in the separate PR than here. I will add this to the list of Backend Priority. Also, its fair to say that if we plan to move to GitOps or something entire deploy section would be irrelevant. That is why I suggested its a good thing but needs its own dedicated task/discission. Thanks

    Edited by Kamal Dodiya
  • Please register or sign in to reply
  • 14 14 - if: '$CI_DEPLOY_FREEZE == null && $CI_COMMIT_BRANCH == "master"'
    15 15 when: always
    16 16
    17 17 .deploy-template-branches: &deploy-rules-branches
    • This template doesn't seem to be used anywhere. Can you add a job for deploying feature branches to review apps to have an example of how is it done with the agent-based system? Thanks!

      Edited by Andres Veidenberg
    • I think this should be in separate PR. The purpose here is to migrate k8s integration to use gitlab agent. Setting up review in itself is a topic which will need wider discussion and come up with strategy how do we want to deploy review branches.

    • Please register or sign in to reply
  • The ci pipeline only built the docker image. Can you test the deployment jobs?

  • Kamal Dodiya changed the description

    changed the description

  • Andres Veidenberg approved this merge request

    approved this merge request

  • Mehrnaz Charkhchi approved this merge request

    approved this merge request

  • Andrey Azov approved this merge request

    approved this merge request

  • merged

  • Kamal Dodiya mentioned in commit e1cef18b

    mentioned in commit e1cef18b

  • Please register or sign in to reply