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

Add script to quickly set up a build slave using Docker #5

Merged
merged 1 commit into from
Feb 23, 2017
Merged

Add script to quickly set up a build slave using Docker #5

merged 1 commit into from
Feb 23, 2017

Conversation

3noch
Copy link
Contributor

@3noch 3noch commented Feb 22, 2017

I'm sure there's a lot of room for improvement, but it's a start. I'm happy to make changes.

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"
Copy link
Contributor Author

@3noch 3noch Feb 22, 2017

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.

Copy link
Owner

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.

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"
Copy link
Owner

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope!

# -- 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"
Copy link
Owner

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)

Copy link
Contributor Author

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.

@3noch
Copy link
Contributor Author

3noch commented Feb 23, 2017

I made those changes and rebased.

@3noch
Copy link
Contributor Author

3noch commented Feb 23, 2017

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)

@LnL7 LnL7 merged commit e71b5a9 into LnL7:master Feb 23, 2017
@3noch
Copy link
Contributor Author

3noch commented Feb 23, 2017

Thanks!

@3noch 3noch deleted the build-slave-script branch February 23, 2017 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants