-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add script to quickly set up a build slave using Docker #5
Conversation
start-docker-nix-build-slave
Outdated
echo ">>> Downloading SSH credentials for the docker machine" | ||
rm -f "$ssh_id_file" "$ssh_id_file.pub" | ||
curl https://raw.githubusercontent.com/LnL7/nix-docker/master/ssh/insecure_rsa > "$ssh_id_file" | ||
curl https://raw.githubusercontent.com/LnL7/nix-docker/master/ssh/insecure_rsa.pub > "$ssh_id_file.pub" |
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.
Since this is part of the repo, it could conceivably use these from the local repo. However, as is, this script can be downloaded with curl and run. That might be a pretty desirable feature.
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.
I guess that depends on how this would be used, this has the advantage that people don't need to have the entire repository locally.
start-docker-nix-build-slave
Outdated
echo "## Usage: source $0" | ||
echo "##" | ||
echo "## Note: if you experience issues, you can clean up the build slave artifacts and start over by:" | ||
echo "## 1. rm -r ~./$working_dir_name" |
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.
is that .
supposed to be there?
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.
Nope!
start-docker-nix-build-slave
Outdated
# -- Download SSH credentials for docker machine -- | ||
echo ">>> Downloading SSH credentials for the docker machine" | ||
rm -f "$ssh_id_file" "$ssh_id_file.pub" | ||
curl https://raw.githubusercontent.com/LnL7/nix-docker/master/ssh/insecure_rsa > "$ssh_id_file" |
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.
Using curl -fsSL <url> -o <file>
will hide the curl output if nothing fails (downloading shouldn't take long)
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.
Great idea. I'll add that.
I made those changes and rebased. |
Indeed, this actually works, which is pretty neat: source <(curl https://raw.githubusercontent.com/grafted-in/nix-docker/build-slave-script/start-docker-nix-build-slave) |
Thanks! |
I'm sure there's a lot of room for improvement, but it's a start. I'm happy to make changes.