r/devops • u/analogj • Apr 06 '18
tools for interacting with/maintaining configs for multiple Bastion/Jumphosts
We have a globally distributed application, with different shards living in different datacenters/regions. Each datacenter is protected by a group of jumphost/bastions
In addition, as part of our development process we maintain multiple environments, all running different versions of our application, ie. dev, testing, performance, staging, production.
Each of these environments may have one or more shards.
As you can see, the number of bastion servers can grow significantly, pretty quickly.
We have in-house scripts that generate ssh config files following our custom conventions, but everything is hardcoded and specific to our deployment. The scripts also have a cli "ui" that makes it easy to select the correct stack, and it then chooses the associated ssh config file and opens the tunnel.
Is this a problem that you guys have as well? Are there existing tools for maintaining ssh configs for multiple environments & bastions?
If not, I'm considering creating an open source, naming-convention agnostic tool that will let you manage your ssh configs/tunnels without any assumptions.
Anyone interested in helping out/providing their use-cases?
3
u/JR_Ray DevOps and Emerging Technology Apr 06 '18
There are a couple of open source tools to manage the entirety of the SSH process, like teleport, but in your case I would look at something like Chef + Vault. I also see no reason not to manage your workstations w/ Chef. You could also look at a pure templating engine like mustache..
3
u/Ok_Sheepherder Apr 06 '18
Sounds like a job for config managment. Chef, salt, ansible, or puppet
4
u/nuncio-tc Apr 06 '18
What you are looking for is a Configuration Management tool.
My vote would go for Chef, but Ansible, Puppet and SaltStack are also options.
1
u/par_texx Apr 06 '18
We use a program called FMPP to handle different configurations of a style of host.
1
u/joffuk Apr 06 '18
SSH have a product called Universal Key Manager which is normally used to manage your SSH keys and show you what you have out there and what they can access as well as let you rotate / request new keys.
One of the other things it does is manage your ssh config files from a central console so you can tag a group of servers as prod and assign a config and when you update the config it will push it out to the hosts to make sure they are always up to date.
It might be a bit overkill but the 3 years I spent working with it and supporting it were enjoyable as it just worked, the only downside is from what I can remember it did come with a hefty cost but I would recommend getting a trial or reading up on it as it may be what you are after.
1
u/TheTalkWalk Apr 07 '18
So, Correct me if I am wrong.
You are trying to have some intelligent way to keep local ssh config files and organize them in a palatable way.
With the primary issue of mapping the order of the files to allow you to TELEPORT to a machine. For some reason or another. (ansible cms)
There are a number of solutions, but the best would be a bastion management utility. https://gravitational.com/teleport/
You could also spin up Akers ash. (a bit overkill)
Or you could use https://www.sshkeybox.com/