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

Update setup-services.py to include images & volumes subtleties #651

Merged
merged 4 commits into from
Apr 28, 2022

Conversation

lsetiawan
Copy link
Member

This PR makes --tear-down to also clean up images and volumes.

@emiliom
Copy link
Collaborator

emiliom commented Apr 26, 2022

Make this optional? Often I tear-down to not have active containers, but I'd like to have the ability to restart from the images w/o downloading everything (deploy) again.

@leewujung leewujung added this to the 0.6.0 milestone Apr 27, 2022
@leewujung leewujung requested a review from emiliom April 27, 2022 21:21
@lsetiawan lsetiawan self-assigned this Apr 28, 2022
@lsetiawan
Copy link
Member Author

Just to add more details on this PR:

  1. The issue of volumes blowing was because every time someone runs --deploy docker-compose will recreate the container, and specifically, the minio container will create NEW volume reference with a random id, which allocates space within the host machine. Now in the docker-compose.yaml. I've added a specific volume for the minio service called echopype_miniodata. This would then only create this volume one time, and it will not be recreated again, unless it gets deleted from running --tear-down.
  2. Now --deploy can be paired with --no-pull, which skips pulling the latest images for both minio and http, by default it will pull.
  3. Last, there's now --images flag that can be paired during --tear-down to also delete the docker images during tear down. By default, the images will be kept around. However, now the volumes for the docker containers will be removed during tear down.

@emiliom
Copy link
Collaborator

emiliom commented Apr 28, 2022

  1. Now --deploy can be paired with --no-pull, which skips pulling the latest images for both minio and http, by default it will pull.

Perfect

  1. Last, there's now --images flag that can be paired during --tear-down to also delete the docker images during tear down. By default, the images will be kept around. However, now the volumes for the docker containers will be removed during tear down.

Perfect

Co-authored-by: Don Setiawan <landungs@uw.edu>
@emiliom
Copy link
Collaborator

emiliom commented Apr 28, 2022

I've looked at the changes in the PR and confirmed that your description of what has changed matches what we had discussed. I'm not going to run this locally to test it, though. I'm good with your own local tests and what happens once the PR is merged, next time the CI tests are run. I'll test it locally the next time I pull the merged changes and have to run the test suite.

@lsetiawan lsetiawan changed the title Teardown include images and volumes Update setup-services.py to include images & volumes subtleties Apr 28, 2022
@lsetiawan lsetiawan merged commit 522666f into OSOceanAcoustics:dev Apr 28, 2022
@lsetiawan lsetiawan deleted the cleanup branch April 28, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add more subtleties about local testing and docker in Contributing docs page
3 participants