I feel like this has been done, demonstrated, but I couldn’t find
anything on it.
Flow:
Provision a box
At some point in the run, pull a branch from github (master, tag, etc)
Restart service if changed
By using a GitHub deploy key, I can automate this for prod, sure.
But if I’m using Vagrant, and I want to restrict access to the deploy
key, is there a known way for me to specify “use a user’s ssh-agent
forwarded ssh key instead”.
Our solution is to use a new deploy key for every run and then clean them
up later with a batch job. However, this doesn't really solve the problem,
just makes it so that now the valuable thing is your Github API key. Unsure
if there is a good way to use a the hosts ssh-agent from Vagrant, though
you may be able to hack something together with a Vagrant plugin.
I feel like this has been done, demonstrated, but I couldn't find
anything on it.
Flow:
Provision a box
At some point in the run, pull a branch from github (master, tag, etc)
Restart service if changed
By using a GitHub deploy key, I can automate this for prod, sure.
But if I'm using Vagrant, and I want to restrict access to the deploy
key, is there a known way for me to specify "use a user's ssh-agent
forwarded ssh key instead".
I haven't tried this, but you can specify JSON data in your Vagrantfile.
If your deploy process gets your deploy key from an attribute, you can
override that in the Vagrantfile. And, since a Vagrantfile is just ruby,
you could get that key from just reading in a user's SSH public key file.
Something like
Vagrant.configure("2") do |config|
config.vm.provision "chef_server" do |chef|
# ...
I feel like this has been done, demonstrated, but I couldn't find
anything on it.
Flow:
Provision a box
At some point in the run, pull a branch from github (master, tag, etc)
Restart service if changed
By using a GitHub deploy key, I can automate this for prod, sure.
But if I'm using Vagrant, and I want to restrict access to the deploy
key, is there a known way for me to specify "use a user's ssh-agent
forwarded ssh key instead".
I feel like this has been done, demonstrated, but I couldn't find
anything on it.
Flow:
Provision a box
At some point in the run, pull a branch from github (master, tag, etc)
Restart service if changed
By using a GitHub deploy key, I can automate this for prod, sure.
But if I'm using Vagrant, and I want to restrict access to the deploy
key, is there a known way for me to specify "use a user's ssh-agent
forwarded ssh key instead".