[FOLIO-2240] SPIKE: figure out how to share templates in folio-tools/folio-ansible Created: 06/Sep/19  Updated: 03/Jun/20  Resolved: 19/Sep/19

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Ian Hardy Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: ci, platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to FOLIO-2292 Add support to folio-ansible for sett... Open
relates to FOLIO-2185 SPIKE: how to maintain resource deplo... Closed
Sprint: CP: sprint 72
Story Points: 3
Development Team: Core: Platform

 Description   

Folio ansible and folio-tools both have ways to create kubernetes module deployment yaml. The utility in folio-tools (md2kubeyaml) is meant to be shared w/the community while folio-ansible (roles/module-kubernetes) is used in CI.

Ideally, these should share the templates used for generating k8s deployment yaml (or even code if that's practical).



 Comments   
Comment by Wayne Schneider [ 06/Sep/19 ]

Possibilities:

  • Include folio-tools as a submodule of folio-ansible
  • Publish md2kubeyaml with templates as a Python package to install with Pip
  • Have the module-kubernetes role clone the folio-tools repository on the control host
  • Point to templates as URLs on Github
Comment by Ian Hardy [ 10/Sep/19 ]

I'd like to eliminate the python package option. Seems like updates will likely be driven from the ansible side more ofthen than not and I wouldn't want people to have to release a python package to make an update to these templates.

Leaning towards having the module-kubernetes role clone folio-tools when it runs rather than adding a submodule.

Comment by Ian Hardy [ 19/Sep/19 ]

Use ansible's git module w/clone depth=1 to save bandwidth, for example:

    git:
      repo: 'https://github.com/folio-org/folio-tools'
      version: folio-2240-testing
      depth: 1
      dest: /home/ian/projects/folio-2240/folio-tools-clone

Couldn't figure out how to do sparse checkout of a directory in less than 4 tasks, so I think just cloning the whole repo w/depth set to one is preferable.

Comment by Ian Hardy [ 19/Sep/19 ]

Other changes necessary to folio-ansible to share this code:

  • In the module-deployment.yml.j2 template, use the module descriptor instead of the module item variable (simply changing module_item to module_descriptor works since the md has already been set as a variable)
  • set env_from_secret to true as the default in folio ansible (this will create the db connection secret).
Generated at Thu Feb 08 23:19:14 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.