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

ci(docker compose & helm chart): test configuration in CI #1881

Merged
merged 82 commits into from
Jan 30, 2024

Conversation

iainsproat
Copy link
Contributor

@iainsproat iainsproat commented Nov 21, 2023

Description & motivation

Ensuring validity & quality of the Helm Chart and the Docker Compose file required manual testing. This was prone to error and could be omitted accidentally.

This PR includes automated tests to deploy the Speckle Docker Compose files and the Speckle Helm Charts. These have to be manually triggered in PRs but not in main branch or tagged commits.

Nix is used to install required dependencies in CircleCI.
Tilt is used to manage the kubernetes & helm chart installations; this provides confirmation (exit with 0) when all components are successfully deployed.

This also provides a means of locally live rebuilding Docker images and deploying them for testing. Run yarn dev:kind:helm:up

NOTE: in the helm chart, the preview service, file import service, monitoring, and webhook service are scaled down to 0 replicas. This is to save resources when deployed to CircleCI, but can be scaled up locally by amending the speckle-server.values.yaml file.

Changes:

  • New CircleCI jobs, which can be ran after manual approval, to deploy:
    • Docker Compose
    • Helm Chart
  • New CircleCI approval step; skipped in main branch or tagged commits.
  • The helm chart provides a mechanism for the image reference of each deployment to be individually controlled. This allows tilt to generate and inject unique image references for each deployment when live building.

To-do before merge:

  • Should deploy the built containers, which is currently not the case
    • Load the built images into the kind registry
    • Amend the Helm Chart to pull those images
  • Should run the Helm Chart test
    • Change to specklepy to allow configurable certificate verification needs to be merged feat(client): configurable certificate verification specklepy#320
    • The version of specklepy needs to be bumped in speckle-server tests
    • speckle-server tests and its helm chart needs to be updated to allow certificate verification to be configurable

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

@iainsproat iainsproat changed the title ci(docker compose): test configuration in CI ci(docker compose & helm chart): test configuration in CI Nov 23, 2023
@iainsproat iainsproat marked this pull request as ready for review November 23, 2023 10:14
Copy link

@iainsproat
Copy link
Contributor Author

Probably never deploys because of:

speckle-serv… │ [event: pod speckle-server/speckle-webhook-service-67949d9f48-tcdt8] 0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod.
speckle-serv… │ [event: pod speckle-server/speckle-preview-service-5f779767d4-hcr5c] 0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod.

We should disable those.

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c979c97) 68.76% compared to head (ef567a8) 68.76%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1881   +/-   ##
=======================================
  Coverage   68.76%   68.76%           
=======================================
  Files         213      213           
  Lines        8269     8269           
  Branches      981      981           
=======================================
  Hits         5686     5686           
  Misses       2306     2306           
  Partials      277      277           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iainsproat iainsproat merged commit 185d845 into main Jan 30, 2024
25 of 35 checks passed
@iainsproat iainsproat deleted the iain/test-docker-compose branch January 30, 2024 15:21
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