Add documentation on Cleanup options#2623
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2623 +/- ##
==========================================
- Coverage 79.08% 79.08% -0.01%
==========================================
Files 661 661
Lines 51995 51995
Branches 734 734
==========================================
- Hits 41120 41119 -1
- Misses 10795 10796 +1
Partials 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I added a bunch of help on the individual commands that might be helpful. ❯ ./openc3.sh cleanup --help
Usage: ./openc3.sh cleanup [local] [force]
Remove all COSMOS Core docker volumes and data.
WARNING: This is a destructive operation that removes ALL COSMOS Core data!
Arguments:
local Also remove local plugin files in plugins/DEFAULT/
force Skip confirmation prompt
Examples:
./openc3.sh cleanup # Remove volumes (with confirmation)
./openc3.sh cleanup force # Remove volumes (no confirmation)
./openc3.sh cleanup local # Remove volumes and local plugins
./openc3.sh cleanup local force # Remove volumes and local plugins (no confirmation)
Options:
-h, --help Show this help message
❯ ./openc3.sh stop --help
Usage: ./openc3.sh stop
Stop all COSMOS Core containers gracefully.
This command:
1. Stops operator, script-runner-api, and cmd-tlm-api containers
2. Waits 5 seconds
3. Runs docker compose down with 30 second timeout
Options:
-h, --help Show this help message
❯ ./openc3.sh run --help
Usage: ./openc3.sh run
Run all COSMOS Core containers in detached mode.
Containers will start in the background using docker compose up -d.
After starting, check status with:
docker compose ps # Show running containers
docker compose logs -f # Follow all logs
docker compose logs -f SERVICE # Follow specific service logs
Access COSMOS Core:
http://localhost:2900 # COSMOS Core web interface
Common services:
openc3-operator Main orchestration service
openc3-cosmos-cmd-tlm-api Command/Telemetry API
openc3-cosmos-script-runner-api Script execution service
openc3-redis Redis database
openc3-minio Object storage
Options:
-h, --help Show this help message |
mcosgriff
left a comment
There was a problem hiding this comment.
--help added to those commands could be useful
jmthomas
left a comment
There was a problem hiding this comment.
This is awesome but reminds me that we don't really have a page for the base openc3.sh commands: start, stop, build, run. You've documented cleanup and basically stop and run but I almost feel like this whole section should be part of https://docs.openc3.com/docs/getting-started/cli and maybe we reference it here? Thoughts?
|
|
||
| #### To remove Docker networks, volumes, data, and Local Mode changes | ||
|
|
||
| If you're running COSMOS in Local Mode, you may notice that modified files and newly created files are added to your host machine, under the `plugins` directory in your repository. Files are synced between server and local file system, which eliminates the need for rebuilding & re-uploading a plugin for development. If you want these local changes to also be cleaned up, run the following: |
There was a problem hiding this comment.
Link "Local Mode" to the page https://docs.openc3.com/docs/guides/local-mode and change the text to "If you're running COSMOS with Local Mode ...". It's not really a mode per say and that can be confusing to people. Like I'm in not in Local Mode what mode am I in? Remote Mode?
| docker images | grep openc3inc | awk '{print $3}' | xargs docker rmi | ||
| ``` | ||
|
|
||
| Or to remove all unused Docker images: |
There was a problem hiding this comment.
Might want to add this:
:::warning Docker image prune -a removes all unused images
With -a flag: The command docker image prune -a is more aggressive and removes all unused images, meaning any image that is not currently associated with a running or stopped container. Use this with caution, as it might remove base images you want to keep.
:::
|
Actually it looks like we do document One other thing I noticed: The existing page has ALL CAPS headers. Yours are camelcase which I prefer and I believe matches all the rest of our docs. Please update the existing page to be camelcase. |
closes #2601