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
Scripts to mirror databoxsystems from docker hub #154
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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,26 @@ | ||
# Mirror databoxsystems from docker hub | ||
|
||
When running demos and hack days there can be issues with external network connectivity. Instilling databox and the SDK requires around 3GB per install. | ||
|
||
These scripts will let you quickly set up a local mirror and distribute the image locally to the participants. | ||
|
||
## Create a local mirror of the databox registry | ||
|
||
First chose the machine you wish to use as a mirror and run | ||
|
||
``` | ||
docker run -d -p 5000:5000 --restart always --name registry registry:2 | ||
|
||
then | ||
|
||
./mirror 127.0.0.1:500 | ||
``` | ||
|
||
This will seed all the needed image in to a local registry. Your participants should than be instructed to install databox using the instructions. But before running databox-start they should run | ||
|
||
``` | ||
./scripts/scripts/registry/seedFromMirror [IP-AND-PORT-OF-YOUR-MIRROR] | ||
|
||
``` | ||
|
||
This will pre populate their local image caches with the images required from your local registry. |
This file contains 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,52 @@ | ||
#!/bin/bash | ||
|
||
|
||
if ! [ -x "$(command -v docker)" ]; then | ||
echo 1 "docker is not installed see https://docs.docker.com/engine/installation/" | ||
exit 1 | ||
fi | ||
|
||
|
||
usage() { | ||
echo $# | ||
echo "Please invoke this script with the IP of the local registry you want to mirror to." | ||
echo "Usage: mirror [registry host name and port]" | ||
echo "Flags:" | ||
echo "-h This help message" | ||
exit 1 | ||
} | ||
|
||
if [[ $# < 1 ]] || [[ "$1" == "-h" ]] # Must have more than 1 args. | ||
then | ||
usage | ||
fi | ||
|
||
clone () { | ||
docker pull $1 | ||
docker tag $1 $2 | ||
docker push $2 | ||
} | ||
|
||
clone databoxsystems/store-json $1/store-json | ||
clone databoxsystems/driver-os-monitor $1/driver-os-monitor | ||
clone databoxsystems/driver-twitter $1/driver-twitter | ||
clone databoxsystems/driver-sensingkit $1/driver-sensingkit | ||
clone databoxsystems/app-light-graph $1/app-light-graph | ||
clone databoxsystems/arbiter $1/arbiter | ||
clone databoxsystems/container-manager $1/container-manager | ||
clone databoxsystems/export-service $1/export-service | ||
clone databoxsystems/app-server $1/app-server | ||
clone databoxsystems/driver-google-takeout $1/driver-google-takeout | ||
clone databoxsystems/app-twitter-sentiment $1/app-twitter-sentiment | ||
clone databoxsystems/base-image-ocaml $1/base-image-ocaml | ||
clone databoxsystems/driver-phillips-hue $1/driver-phillips-hue | ||
clone databoxsystems/app-os-monitor $1/app-os-monitor | ||
clone databoxsystems/store-timeseries $1/store-timeseries | ||
clone databoxsystems/driver-tplink-smart-plug $1/driver-tplink-smart-plug | ||
clone node:alpine $1/node:alpine | ||
|
||
clone tlodge/databox-redis $1/databox-redis | ||
clone tlodge/databox-sdk $1/databox-sdk | ||
clone tlodge/databox-test-server $1/databox-test-server | ||
clone tlodge/databox-redis $1/databox-redis | ||
clone tlodge/mongo $1/mongo |
This file contains 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,51 @@ | ||
#!/bin/bash | ||
|
||
|
||
if ! [ -x "$(command -v docker)" ]; then | ||
echo 1 "docker is not installed see https://docs.docker.com/engine/installation/" | ||
exit 1 | ||
fi | ||
|
||
|
||
usage() { | ||
echo $# | ||
echo "Please invoke this script with the IP of the local registry you want pull from." | ||
echo "Usage: seedFromMirror [registry host name and port]" | ||
echo "Flags:" | ||
echo "-h This help message" | ||
exit 1 | ||
} | ||
|
||
if [[ $# < 1 ]] || [[ "$1" == "-h" ]] # Must have more than 1 args. | ||
then | ||
usage | ||
fi | ||
|
||
seed () { | ||
docker pull $2 | ||
docker tag $2 $1 | ||
} | ||
|
||
seed $1/store-json databoxsystems/store-json | ||
seed $1/driver-os-monitor databoxsystems/driver-os-monitor | ||
seed $1/driver-twitter databoxsystems/driver-twitter | ||
seed $1/driver-sensingkit databoxsystems/driver-sensingkit | ||
seed $1/app-light-graph databoxsystems/app-light-graph | ||
seed $1/arbiter databoxsystems/arbiter | ||
seed $1/container-manager databoxsystems/container-manager | ||
seed $1/export-service databoxsystems/export-service | ||
seed $1/app-server databoxsystems/app-server | ||
seed $1/driver-google-takeout databoxsystems/driver-google-takeout | ||
seed $1/app-twitter-sentiment databoxsystems/app-twitter-sentiment | ||
seed $1/base-image-ocaml databoxsystems/base-image-ocaml | ||
seed $1/driver-phillips-hue databoxsystems/driver-phillips-hue | ||
seed $1/app-os-monitor databoxsystems/app-os-monitor | ||
seed $1/store-timeseries databoxsystems/store-timeseries | ||
seed $1/driver-tplink-smart-plug databoxsystems/driver-tplink-smart-plug | ||
seed $1/node:alpine node:alpine | ||
|
||
seed $1/databox-redis tlodge/databox-redis | ||
seed $1/databox-sdk tlodge/databox-sdk | ||
seed $1/databox-test-server tlodge/databox-test-server | ||
seed $1/databox-redis tlodge/databox-redis | ||
seed $1/mongo tlodge/mongo | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would be nice to get @tlodge components moved under me-box (if they're core components anyway) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"instilling" -> "installing"