-
Notifications
You must be signed in to change notification settings - Fork 17
Fix Minor Stuff #27
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
Merged
Merged
Fix Minor Stuff #27
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
53b066b
Fix mosquitto chown noise
Apehaenger fa01501
Container shell prefix moved to open_mower_ros
Apehaenger 24d484c
🔧 chore(dockge): improve service reliability
Apehaenger 97808fd
Merge branch 'fix/mosquitto-chown-noise' into fix/container-shell-prefix
Apehaenger 7f119b7
Clarify ESC_TYPE var
Apehaenger 737317f
✨ feat(docker): add docker image preloading service
Apehaenger cdea03d
Update README
Apehaenger 0627075
Update WHATSNEW
Apehaenger 4d550be
2nd boot speedup by moving bundled image gunzip to image build
Apehaenger a5b8fc7
Update stage-openmower/30-docker/00-run.sh
Apehaenger a889bb0
Update stage-openmower/30-docker/00-run-chroot.sh
Apehaenger fdb4efe
Update stage-openmower/30-docker/00-run.sh
Apehaenger 88e31d8
Give enough time to load before timeout
Apehaenger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| STAGE_DIR="$(dirname "$0")" | ||
|
|
||
| install -m 0644 -D "$STAGE_DIR/files/etc/systemd/system/docker-preload-images.service" "$ROOTFS_DIR/etc/systemd/system/docker-preload-images.service" | ||
|
|
||
| # Install bundled docker images | ||
| install -d -m 0755 "$ROOTFS_DIR/opt/docker-images" | ||
| cp -a "$STAGE_DIR/files/opt/docker-images/." "$ROOTFS_DIR/opt/docker-images/" | ||
|
|
||
| # Reassemble split files into their base | ||
| DEST="$ROOTFS_DIR/opt/docker-images" | ||
| if compgen -G "$DEST"/*.tar.gz.part* > /dev/null; then | ||
| # Build unique list of basenames without the .partNN suffix | ||
| for base in $(for f in "$DEST"/*.tar.gz.part*; do echo "${f%.part*}"; done | sort -u); do | ||
| rm -f "${base}" | ||
| for p in $(ls -1 "${base}".part* 2>/dev/null | sort -V); do | ||
| cat "$p" >> "${base}" | ||
| done | ||
| rm -f "${base}".part* | ||
| done | ||
| fi | ||
|
|
||
| # Uncompress all .tar.gz files to .tar. OS image gets ZIPped anyway but preload service only needs docker load them | ||
| for gz in "$DEST"/*.tar.gz; do | ||
| [ -e "$gz" ] || break | ||
| gunzip -f "$gz" | ||
| done |
21 changes: 21 additions & 0 deletions
21
stage-openmower/30-docker/files/etc/systemd/system/docker-preload-images.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [Unit] | ||
| Description=Preload bundled Docker images (*.tar) into local Docker | ||
| After=docker.service | ||
| Requires=docker.service | ||
| Before=dockge.service webterminal.service | ||
| ConditionDirectoryNotEmpty=/opt/docker-images | ||
|
|
||
| [Service] | ||
| Type=oneshot | ||
| TimeoutStartSec=4min | ||
| ExecStart=/bin/sh -e -c '\ | ||
| dir=/opt/docker-images; \ | ||
| # Load all .tar and delete on success \ | ||
| for tar in "$dir"/*.tar; do \ | ||
| [ -e "$tar" ] || break; \ | ||
| if docker load -i "$tar"; then rm -f "$tar"; fi; \ | ||
| done \ | ||
| ' | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+43.3 MB
stage-openmower/30-docker/files/opt/docker-images/dockge.tar.gz.part04
Binary file not shown.
Binary file not shown.
9 changes: 6 additions & 3 deletions
9
stage-openmower/32-dockge/files/etc/systemd/system/dockge.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,20 @@ | ||
| [Unit] | ||
| Description=Dockge | ||
| Wants=network-online.target docker.service | ||
| After=network-online.target docker.service | ||
| Wants=network-online.target docker.service docker-preload-images.service time-sync.target | ||
| After=network-online.target docker.service docker-preload-images.service time-sync.target | ||
| StartLimitIntervalSec=10min | ||
| StartLimitBurst=10 | ||
|
|
||
| [Service] | ||
| Type=oneshot | ||
| WorkingDirectory=/opt/dockge | ||
| RemainAfterExit=yes | ||
| TimeoutStartSec=10min | ||
| ExecStartPre=/bin/sh -c 'H="$(hostname -f 2>/dev/null || hostname || cat /etc/hostname)"; EF="/opt/stacks/openmower/.env"; if [ -f "$EF" ]; then if grep -qE "^[[:space:]]*HOSTNAME[[:space:]]*=" "$EF"; then sed -i -E "s|^[[:space:]]*HOSTNAME[[:space:]]*=.*|HOSTNAME=$H|g" "$EF"; else echo "HOSTNAME=$H" >> "$EF"; fi; fi' | ||
| ExecStartPre=/usr/bin/docker compose pull --quiet | ||
| ExecStart=/usr/bin/docker compose up -d | ||
| ExecStop=/usr/bin/docker compose down | ||
| Restart=on-failure | ||
| RestartSec=30s | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target |
5 changes: 2 additions & 3 deletions
5
stage-openmower/35-webterminal/files/etc/systemd/system/webterminal.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.