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

Define 3 new SSM parameters to store health check endpoints #171

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

nikki-t
Copy link
Collaborator

@nikki-t nikki-t commented Jul 17, 2024

Purpose

  • Expose the SPS endpoints for Airflow UI, API, and OGC API.
  • Endpoints must be defined as SSM parameters with a specific format.

SSM Parameter names must start with: /unity/${project}/${venue}/component/

SSM Parameter endpoint format

{
    "componentName": "Airflow UI",
    "healthCheckUrl": "https:/....",
    "landingPageUrl": "https://..."
}

Proposed Changes

  • [ADD] SSM parameters: /unity/unity/dev/component/airflow-ui, /unity/unity/dev/component/airflow-api, /unity/unity/dev/component/ogc-api

Issues

Testing

Deployed to unity-venue-dev and reviewed SSM Parameters. The following parameters were created:

Screenshot 2024-07-17 at 08 25 41

Reviewed the content of each new parameter and confirmed that SSM parameter string can be loaded into correctly formatted JSON:

# Airflow UI: 
{
  "componentName": "Airflow UI",
  "healthCheckUrl": "http://k8s-airflow-airflowi-xxx.com:5000/health",
  "landingPageUrl": "http://k8s-airflow-airflowi-xxx.com:5000"
}

# Airflow API: 
{
  "componentName": "Airflow API",
  "healthCheckUrl": "http://k8s-airflow-airflowi-xxx.com:5000/api/v1/health",
  "landingPageUrl": "http://k8s-airflow-airflowi-xxx.com:5000/api/v1"
}

# OGC API: 
{
  "componentName": "OGC API",
  "healthCheckUrl": "http://k8s-airflow-ogcproce-xxx.com:5001/health",
  "landingPageUrl": "http://k8s-airflow-ogcproce-xxx.com:5001"
}

Note: URLs are shortened for readability.

@LucaCinquini
Copy link
Collaborator

@nikki-t : this is great, but I now have a doubt: in the syntax specification, should:
/unity/${project}/${venue}/component/
be instead:
/unity/${project}/${venue}/${component}/

where in our case ${component}="sps"?

@galenatjpl can you please clarify?

@LucaCinquini
Copy link
Collaborator

As for the Gitbook documentation, we list there the endpoints of unity-test-venue (at least for now), so no need to update. But one thing to do is to update the Git variables that are used in the smoke and integration tests:
https://github.com/unity-sds/unity-sps/settings/variables/actions
every time we redeploy to unity-venue-dev, unity-venue-test, etc.

@nikki-t
Copy link
Collaborator Author

nikki-t commented Jul 17, 2024

@LucaCinquini - Sounds good on the GitBook and I will wait for clarification on the component part of the SSM parameter name.

Do you want to include the health check endpoints in the Git variables in addition to the regular endpoint URLs? And if so do should we do this programmatically or manually?

@LucaCinquini
Copy link
Collaborator

We probably don't need to do that now. Those variables are there to parametrize the smoke tests, which are already configured to use the URLs in that form.

@galenatjpl
Copy link
Collaborator

@LucaCinquini @nikki-t per the question above,
it should be
/unity/${project}/${venue}/component/${componentName}

This is consistent with the guidance here:

https://unity-sds.gitbook.io/docs/developer-docs/common-services/docs/users-guide/deployment/deployment-concepts-and-infrastructure/unity-ssm-parameters/ssm-parameter-naming-requirements-and-conventions

So the way Nikki had if screen-shotted above, looks good to me.

@galenatjpl
Copy link
Collaborator

@LucaCinquini @nikki-t, that being said, if you think that we should be including ${serviceArea} in the path somewhere (e.g. "sps"), then we can discuss more. I think that's not necessary though.

@LucaCinquini
Copy link
Collaborator

Ok, thanks @galenatjpl
@nikki-t : I will approve the PR, please merge it afterwards.

@nikki-t nikki-t merged commit 0eeeb35 into develop Jul 17, 2024
2 checks passed
@nikki-t nikki-t deleted the 127-expose-health-check-endpoints branch July 17, 2024 20:07
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.

3 participants