Skip to content

[New Feature]: Create DAG to execute the Application Package generator #275

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

Closed
LucaCinquini opened this issue Jan 21, 2025 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request U-SPS

Comments

@LucaCinquini
Copy link
Collaborator

LucaCinquini commented Jan 21, 2025

PM Ticket Reference: unity-sds/unity-app-build-trigger#2

Description:

Convert App Builds system into a docker container runnable in Airflow - Allows user to provide tokens, credentials. See Status of builds. Etc. Initial version should be what we're doing today. enhancements (future) should include pointing to an eCR repository, non-docker repo, etc. Needs Documentation. Should this be its own DAG that can run 'faster' than the cwl operators (e.g. SPOT instances).

Acceptance Criteria:

Docker Container Conversion: The App Builds system must be successfully converted into a Docker container.
Airflow Integration: Ensure the Docker container runs smoothly within the Airflow environment.
Validation and Testing: The Docker container and its integration with Airflow must be thoroughly validated and tested to ensure it operates without errors.
Documentation: Provide detailed documentation on the app-pack process, including steps taken, and configurations applied

Dependencies:
From U-ADS: Docker container to execute the Application Package Generation, together with complete documentation.

@LucaCinquini
Copy link
Collaborator Author

Goal (restated): follow James’s manual instructions to create a Docker container and DAG that will replace the automatic build system on GitLab (invoked via the Unity-py API)

As discussed in meeting with @mcduffie , the following steps will be required:

  • Preliminary: publish the repos: “unity-app-generator” and “unity-pack-generator” to PyPI
  • Build a Docker container that executes the following steps, run manually on laptop
    • build_ogc_app init
    • build_ogc_app build_docker --no_owner
    • build_ogc_app push_docker to GitHub
  • Build a DAG to execute that Docker container via UI
  • Update the current Lambda to invoke the DAG. The Lambda is invoked via the existing Unity API.
  • Future optional: add a Github Action to push automatically push any changes to the “unity-app-generator” and “unity-pack-generator” repositories to PyPI

References:

@grallewellyn
Copy link
Contributor

grallewellyn commented Apr 9, 2025

I completed this ticket. Here are some notes about it:

DockerHub and Dockstore credentials are being stored in AWS SSM parameter store. I uploaded for Unity-venue-dev, Unity-venue-test and Unity-venue-ops

For Unity-venue-ops, I added the access tokens as a secure string because this seemed to be following the convention that ops was already doing. I don’t access the parameters any differently, but costs might apply: AWS Systems Manager Parameter Store - AWS Systems Manager If we don’t want to store tokens as secure strings, we should discuss that

These DockerHub and Dockstore accounts were created with the email mdps.dockerhub at jpl.nasa.gov which is our new shared dev team email

I published the Docker image that we are using in the DAG to our jplmdps account: https://hub.docker.com/r/jplmdps/unity-app-gen

I tested the generated process.cwl file with a CWL DAG Modular

My code for the Dockerfile is here: unity-sds/unity-app-generator#31 and my code for the DAG is here: #390

Note that the Dockerfile will need to change when we want to deploy and start using v1.1.0 of unity app generator and app pack generator (needs to be deployed on pip when changes to these packages are finished)

The logs are not displaying any sensitive data such as DockerHub and Dockerstore tokens

We can add "Application Package Generator DAG" as an option for users and close this ticket once my PRs are merged:
unity-sds/unity-app-generator#31
#390

@mcduffie
Copy link

mcduffie commented Apr 9, 2025

I don't see the DAG file at the URL in the comment above. Also shouldn't the DAG file live in the SPS repo?

@grallewellyn
Copy link
Contributor

Sorry, I originally had the DAG there then realized it makes more sense in the SPS repo so made the PR for it there: #390
I went back and modified all the comments on issues related to this ticket which were referencing just the Dockerfile

@github-project-automation github-project-automation bot moved this from In Progress to Done in Unity Project Board Apr 22, 2025
@LucaCinquini LucaCinquini changed the title [New Feature] Create DAG to execute the Application Package generator [New Feature]: Create DAG to execute the Application Package generator May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request U-SPS
Projects
Status: Done
Development

No branches or pull requests

4 participants