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

Terraform provider backed Juju model setup + associated charmed operators for API and backend #13

Merged
merged 105 commits into from
Jun 1, 2023

Conversation

mz2
Copy link
Collaborator

@mz2 mz2 commented May 24, 2023

Introduces K8s backed deployment methodology using charms and terraform that builds out a Juju model with the application:

  • Docker image publishing to ghcr.io/canonical/test-observer/api and ghcr.io/canonical/test-observer/frontend respectively.
  • A K8s charm for the backend.
  • A K8s charm for the frontend.
  • Terraform configuration that sets up a model with the entire system, with database, ingress (optionally SSL certs) included
  • README updates to cover all this.
  • Moves source code from src to test_observer so that import paths work and poetry build actually works (building a wheel was necessary in order to get dynamic versioning working).

Tested locally by multiple passes of setting up and tearing down the Juju model, reviewer should do the same following the steps in the README.

Copy link
Collaborator

@nadzyah nadzyah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some other minor comments. Also, please, make sure your changes don't rollback #14 PR

.github/workflows/release_charms.yml Show resolved Hide resolved
backend/charm/src/charm.py Show resolved Hide resolved
backend/test_observer/data_transfer_objects.py Outdated Show resolved Hide resolved
backend/test_observer/controllers/snap_manager.py Outdated Show resolved Hide resolved
backend/test_observer/controllers/snapcraft_mapping.py Outdated Show resolved Hide resolved
@omar-selo
Copy link
Collaborator

Note that pytest is failing. Imports need updating in tests directory

@mz2
Copy link
Collaborator Author

mz2 commented Jun 1, 2023

Note that pytest is failing. Imports need updating in tests directory

Yes, all sorts of things break I imagine. As I keep stressing, CI needs improvements now, obviously we cannot collaborate effectively without knowing when linting, formatting, testing, building different artefacts breaks. That goes to frontend, backend, charms that operate them. All of this is best done in subsequent PRs because this PR introduces changes that will conflict will anything you would do with main now.

@mz2
Copy link
Collaborator Author

mz2 commented Jun 1, 2023

Some other minor comments. Also, please, make sure your changes don't rollback #14 PR

To explain this the Nth time for posterity, the conflicts between main and this branch are down to there having been a number of PRs merged whilst this was in motion which move files under src around, and this branch moves src to a directory called test_observer to make poetry build successfully complete. Since this lead to import dependencies changing, things got messy with lots of merge conflicts, and this also motivates quickly getting this merged before action on other PRs, and focusing for a few days on CI improvements that make it clear when linting, formatting, testing, building kind of actions of any of the build outputs in this repo break... in follow-up PRs.

Copy link
Collaborator

@nadzyah nadzyah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of my concerns were addressed and resolved. Thanks for these changes!

@mz2 mz2 merged commit db258e0 into main Jun 1, 2023
@mz2 mz2 deleted the charm branch June 1, 2023 11:06
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