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

Auto deployment #15

Open
joseph-palmer opened this issue Aug 23, 2023 · 2 comments
Open

Auto deployment #15

joseph-palmer opened this issue Aug 23, 2023 · 2 comments
Assignees

Comments

@joseph-palmer
Copy link
Contributor

When a new image is released by a new software release, users will not automatically get this update and will need to manually restart the app that has been updated.

We should provide a means of notifying users of a new update.

@joseph-palmer joseph-palmer self-assigned this Aug 23, 2023
@joseph-palmer
Copy link
Contributor Author

One way to do this for the API could be to add logic to the CLI that checks the version of the API in use against the latest docker image version by querying docker hub with wget -q -O - "https://hub.docker.com/v2/repositories/turingrc/rctab-api/tags" | grep -o '"name": *"[^"]*' | grep -o '[^"]*$'. If they don't match, we could alert the user from the CLI and could even trigger a restart of their API programmatically.

The function apps are more tricky because we don't, AFAIK, have a record anywhere of the version in use.

@joseph-palmer
Copy link
Contributor Author

joseph-palmer commented Aug 30, 2023

Proposal for the function apps

  1. In the API, add a database table called 'function-versions' that contains a single value.
  2. In the API, add an endpoint to fetch the function-versions value and an endpoint to post the function-versions value
  3. In one of the function apps, check the current version against the recorded version via the endpoint. If different, update the table 'function-versions'.
  4. In the CLI, add a check to fetch the function version from the endpoint and check it against the latest docker image, as we do with the API.

This will allow us to notify users via RCTab.

@Iain-S do you think would be an appropriate solution?

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

No branches or pull requests

1 participant