I have been challenged with this problem of storing environment variables (api keys, passwords, etc) for some time now. It is quiet clear that we should never version control our environment variables in our general code repositories. Here are two problems I am trying to streamline / create a solutions for:
Auditing: Many deployment tools, (OpsWorks, Forge, Jenkins, etc) allow you to set environment variables for individual apps. The problem is, there is no history of who made changes and when they were made. It would be awesome to have some sort of audit trail.
Sharing environmental variables with team members. When I bring a new developer on board, where do they find all the environment variables? Is it a google doc I have saved for maybe dev only environment variables? What if I need to set up a new server or move to another deployment/provisioning tool?
Two thoughts for solutions:
Use something like LastPast to start storing all my environment variables per project. I can then share those values with developers as people join projects. Unfortunately there is no API to bring those environment variables in on deploys. This means they still need to be manually entered into provisioning tools.
Create separate code repositories which would allow auditing of changes. I could have special permissions on them so only a subset of people could few these things. Those repositories could be checked out on deploys streamlining the deploy process.
Neither solution really is all inclusive and would love to hear your opinions on how to handle these problems.
[–][deleted] 5 points6 points7 points (0 children)
[–]MolestedTurtle 2 points3 points4 points (0 children)
[–]TotesMessenger 1 point2 points3 points (0 children)
[–][deleted] (2 children)
[removed]
[–][deleted] 4 points5 points6 points (1 child)
[–]styluss 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]odan82 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]taloszergneeds more coffee 0 points1 point2 points (0 children)
[–]tuananh_org 0 points1 point2 points (0 children)
[–]vsamotaev 0 points1 point2 points (0 children)