This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix symlink/env issues, enable ssh-agent & destroy
I was on the wrong path when I was working on this last night. I found a better way of ensuring that the symlink target is correctly assigned: using the os.path.join function instead of the abspath/relpath functions. This fixes the symlink logic for terraform_files. After that, I was researching the docker run `--env` flag, I discovered this line in the official docker docs: > [I]f no `=` is provided, then that variable's current value is passed > through I just have to pass in the names of the secret vars, and docker should pull them in. Until I found this particular solution, I spent many commits trying to debug this problem. Because ssh-agent and other ssh-related code has to be run often in the docker containers, I moved the needed invocations to a separate script, docker_ssh.sh. This will make docker run invocations shorter. Because I prepended this to the build-cluster command, I removed ssh keygen logic from build-cluster. We need ssh keys to be symlinked for launch and testing, but we don't want to run the whole setup script each time. Assuming that the keys have already been generated from a run of docker_setup.py, all that function does is symlink them. The destroy steps need to be executed in the docker container as well, even though I have not been able to get to this point in my testing.
- Loading branch information
Showing
4 changed files
with
26 additions
and
15 deletions.
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
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
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
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,5 @@ | ||
set -e | ||
|
||
python2 -c "import docker_setup; docker_setup.link_or_generate_ssh_keys()" | ||
eval $(ssh-agent) | ||
ssh-add |