Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookiecutter Template Branch Customizable + zoo-calrissian-runner dependency update #67

Merged
merged 4 commits into from
Sep 19, 2023

Conversation

bbrauzzi
Copy link
Contributor

@bbrauzzi bbrauzzi commented Sep 14, 2023

zoo-project-dru: Cookiecutter Template Branch Customizable

Overview

This pull request enhances the zoo-project-dru Helm chart values by allowing the specification of a Git branch when setting the cookiecutter template URL. This addition offers flexibility in choosing the branch from which to clone the cookiecutter template. If no branch is specified, it will default to 'master'.
For instance:

cookiecutter:
  templateUrl: https://github.com/EOEPCA/proc-service-template.git
  templateBranch: zoo-project-dru

Changes Made

DeployProcess.py

(zoo-project/zoo-services/utils/open-api/dru/DeployProcess.py):

  • Added a new method named _get_conf_value_if_exists that retrieves a configuration value and returns None if the configuration does not exist.
  • Introduced a line calling the new method to fetch the template branch.
  • Updated the git clone command to set the branch if the templateBranch configuration property is specified.

Testing

Testing Plan

To verify this feature:

  1. Build the ZooProject-DRU on Minikube's Docker registry:
eval $(minikube docker-env)
docker build . -f docker/dru/Dockerfile -t zoo-project/zoo-project-dru:template-branch-feature --no-cache
  1. In zoo-project-dru/values_minikube.yaml of the zoo-project-dru Helm chart, set the tag of the new Docker image:
zoofpm:
  image:
    repository: zoo-project/zoo-project-dru
    pullPolicy: IfNotPresent
    tag: template-branch-feature

zookernel:
  image:
    repository: zoo-project/zoo-project-dru
    pullPolicy: IfNotPresent
    tag: template-branch-feature
  1. Update or add the cookiecutter section in zoo-project-dru/values_minikube.yaml by specifying the branch:
cookiecutter:
  templateUrl: https://github.com/EOEPCA/proc-service-template.git
  templateBranch: zoo-project-dru
  1. Deploy the zoo-project-dru Helm chart:
helm upgrade --install zoo-project-dru zoo-project-dru/ -f zoo-project-dru/values_minikube.yaml -n zp --create-namespace
  1. Deploy a service.

  2. Access the zoofpm pod, navigate to the deployed services folder, and confirm that the service deployed in the previous step was generated using the cookiecutter template from the 'zoo-project-dru' branch.

zoo-project-dru: Update of zoo-calrissian-runner dependency

Zoo-calrissian-runner version 0.1.8 has better support for inputs passed by the zoo-kernel, in particular for those of type array.

Related Issue / Discussion

ZOO-Project/charts#7

Additional Information

Contributions and Licensing

(as per https://zoo-project.github.io/docs/contribute/howto.html#licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to ZOO-Project. I confirm that my contributions to ZOO-Project will be compatible with the ZOO-Project license guidelines at the time of contribution.
  • I have already previously agreed to the ZOO-Project Contributions and Licensing Guidelines

@gfenoy gfenoy merged commit 4404e6d into ZOO-Project:main Sep 19, 2023
1 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants