Infrastructure-as-code (IaC), often embodied by open source Terraform, is an essential ingredient to cloud and cloud-native strategies. But without the ability to scale, secure and manage IaC, you very quickly experience drift. Tim Davis, DevOps advocate with env0, pronounced “N zero”, discusses establishing a single source of truth and reigning in drift by updating and managing infrastructure as code. The video is below, followed by a transcript of the conversation.
Announcer: This is Digital Anarchist.
Mitch Ashley: I have the pleasure of being joined by Tim Davis. Tim is DevOps Advocate with env0, and so, weâre going to be getting into some infrastructure as code type discussions, so, looking forward to that. Welcome, Timâgood to be talking with you.
Tim Davis: Same for you, Mitch. Great to meet you. Thanks for having me.
Mitch Ashley: You, too. I love your cloud off to your right shoulder, by the way. [Laughter] Anyways, soâintroduce yourself, tell us a little bit about env0.
Tim Davis: Absolutely. So, I am the DevOps Advocate with env0. dnv0 is a TACoS platform, if you will, the Terraform Automation and Collaboration Software space. We really focus on infrastructure as code, automation, teams and governance, and other tools to help you with the life cycle of your infrastructure as code environments.
Mitch Ashley: Cool. Good. Well, you know, itâs a great conversation to have, because something that I observed always happens in our industry is, you create a new technology, itâs kinda easy to get started and starting to use, sometimes it isnât always easy, but the complexity comesâalright, how do I scale this? How do I do this across a larger development team or multiple development teams? How do I operate it? How do I secure it through the day two kinda stuff?
Tim Davis: Right.
Mitch Ashley: And I wouldnât be surprised if you told me the same is true for infrastructure as code, and in fact, I know that to be true.
Tim Davis: [Laughter] Exactly right.
Mitch Ashley: Letâs talk about that. What are some of the challenges once people get into doing infrastructure as code, particularly with Terraform? What are some of the challenges that you run into?
Tim Davis: Yeah, and most of those kind of lie around the visibility and kind of the control space of that. Infrastructure as code is great. It is a fantastic way of speeding up, kind of pushing yourself into the future for DevOps, getting into that real GitOps life cycle. But with that, you know, if it usually just starts out with either one developer or one infrastructure person that starts running it locally on their laptop and figuring it out, itâs great, it does what they want.
As soon as you start to scale that methodology and doing it locally to multiple people, thatâs when you start losing that visibility of, âWhere are my state files stored? Who just deployed something into the cloud? What variables might they have used for that?â
So, it really becomes kind of an, âI don’t know whoâs doing what in my cloud anymore.â
Mitch Ashley: Mm-hmm.
Tim Davis: So, really making sure that youâre staying on top of that, kinda centralizing everything to maintain that visibility is very important when youâre scaling it.
Mitch Ashley: Let me ask you, thenâis it fairly typical that within one software Dev team you have a person or sort of a close enough coordinated group of people that are doing the software as code, infrastructure as code. And then the confusion may exist as you start to go across multiple teams, or does it also occur within one team, just sometimes, itâs every developer for themselves and soâ
Tim Davis: Yep.
Mitch Ashley: – you could have a wild, wild West kinda situation before you know it.
Tim Davis: [Laughter] And the answer of that, of course, is yes, I mean, itâs all of the above. It could be even just two people on a small team that start to use these tools and they start to step on each otherâs toes by having deployments that kind of counteract each other. Or you have it where somebody is deploying out into the cloud using your infrastructure as code and somebody else is just going into the cloud and clicking around and deploying stuff manually where you get something called drift, where what the infrastructure as code says is out there isnât necessarily matching with whatâs actually there.
Mitch Ashley: Mm-hmm.
Tim Davis: So, it can be across a single team, multiple teamsâany time you really scale it past a single person on a laptop is really where you start to see those issues.
Mitch Ashley: Yeah, okay. Itâs a familiar problem, right?
Tim Davis: [Laughter] Thatâs exactly right.
Mitch Ashley: Weâve had this in other things, too. Well, what are some of the best practices or kind of good infrastructure as code hygiene to keep your worlds at least sane to start with so youâthe first question is always, âWhatâs there?â If you donât know whatâs there, thenâ
Tim Davis: Right.
Mitch Ashley: – everything is up for grabs, or you question everything because you just donât feel like you have a good grounding of what youâre looking at and what youâre dealing with. What are some of those best practices?
Tim Davis: And I reallyâI try to stay away from the best practices thing, because sometimes whatâs good for somebody isnât great for somebody else, but thatâ
Mitch Ashley: Well, and I say that as best practice is not universal, right?
Tim Davis: Absolutely. And there are some things that you can do to help yourself out, for sure. If youâre using infrastructure as code, having the single source of truth can be very helpful for everybody, essentially stopping that drift that I just mentioned. So, if you are using infrastructure as code, save them in a repository somewhere. Make that the single source of truth where whateverâs in there, whateverâs in those infrastructure as code files, thatâs whatâs there.
So, whenever you decide to go for infrastructure as code, stop using the cloud UI, stop going around and click, click, clicking and adding resources and things. Do it by updating the infrastructure as code file and then re-deploying. That can really help you make sure that youâre not causing any problems, nobodyâs stepping on anybodyâs toes, and you know if I see it in the files here in this one spot, thatâs whatâs out there.
Mitch Ashley: Mm-hmm. Yeah, I totally agree with you. That makes a lot of sense to me. What are some of the complexities, then, you have to deal with? Because now weâre working an environment where infrastructure, the stack, the distribution of that, the locations, whether geographic or service provider really can change instantly without necessarily the full development team, which is an advantage, right? You want that sort of abstraction.
Tim Davis: Exactly.
Mitch Ashley: But it also can beâintroduce new variables and maybe even new problems.
Tim Davis: Yeah, and it could be new problems, it could be the same old problems, or it could be new problems that you kinda deal with the same, old way. And, you know, adding controls of making sure youâre adhering to policy, like, youâre only allowed to deploy to certain regions or youâre only able to deploy a certain number or size of instance, making sure that you have some form of role based access control there to know, you know, this person is allowed to deploy straight out to development, no problem, but if itâs going to production, it needs to wait for approval and somebody from either the DevOps team or the SRE team needs to validate everything first before we actually make that push.
Mitch Ashley: Mm-hmm. I think something else that always happens, too, is inâyou know, Iâm a security guy as well as a software guy, so, I always worry about the security side of it. Now, automation can make that, you know, much better.
Tim Davis: Exactly right.
Mitch Ashley: Much more reliable, less human error. Thereâs a lot of good things that come with infrastructure as code from a security standpoint, but it also can be, itâs sort of security is in the eye of the scripter and the person whoâsâ
Tim Davis: Right. [Laughter]
Mitch Ashley: – doing, you know, configurations or doing the scripting, too, which can be good or bad. How do you address security in this kind of a world?
Tim Davis: Yeah, and this is just one of those things where weâve all heard the term shift left, and shifting all of these different thingsâsecurity, performance, you know, billingâeverything, if you shift it left into the deployment process, it really helps if you foster that communication. I mean, we know that old school term of silos where one hasnât isnât talking to the other hand. If everybody gets involved, if the security team is involved with writing the policy, they’re involved with double checking that it is implemented into the deployment process so that you donât have to go and fix a problematic deployment later, itâs just stopped before it starts. That can really make sure that everybody kind of gets what they want, but security folks still have to be involved. They are still in charge of the overall process and procedure and policy, itâs just, itâs kind of a new way of getting that implemented and at what stage of the life cycle youâre implementing it.
Mitch Ashley: Do you think it shiftsâand this is actually, I just did a talk on this about shifting left of, we wanna shift everything left, which is generally a good idea, right?
Tim Davis: Right.
Mitch Ashley: To be able to address some of those things early and design it in, design security in, et cetera. Oftentimes, itâs interpreted as, âLetâs put that on the developers, too. Letâs have themâthe developers will worry about that. The developers will worry about all those.â Now, itâs pretty much, it could be everything, sort of a ridiculous request, right?
Tim Davis: Right.
Mitch Ashley: Because thatâs not a developerâs expertise to necessarily know all those things. What is yourâwhen you say shift left or infrastructure as codeâ
Tim Davis: Right.
Mitch Ashley: – in practical terms on a software team, what does that look like?
Tim Davis: Yeah, and a lot of folks think that that just means, âHey, Iâm taking away your job as the security guy and Iâm gonna give it to the developerâ and thatâs not the case. The developer, they may be a little security conscious, they may understand the infrastructure or the networking piece, but nowhere near as much as the career security guy or the career networking and infrastructure guys. It just kind of brings them in and fosters that conversation.
I definitely think the developers are going to be part of the conversation, because it is bringing it into their tooling, into their languages, into their life cycle, but it still requires that expertise to be able to make sure that it is done correctly, itâs implemented correctly, and that itâs being checked the way it needs to be done.
Mitch Ashley: Mm-hmm. So, does it look like security engineers, to use that as a term, they’re sitting down with the developers, saying, âOkay, how are we configuring the environment?â and, âHereâs how youâre building your Terraform configurationsââgoing through that with them?
Tim Davis: I think so.
Mitch Ashley: Is it saying, âHereâs the principles we want you to followââ
Tim Davis: Yeah.
Mitch Ashley: – âand as youâre creating this, please do these things, and then we donât have to sit on your shouldersâ?
Tim Davis: I definitely think thereâs lots of different ways you can do that. I mean, obviously, you know, having your standup meetings, making sure that they are kinda telling them, âThis is what the policy should look like, however you want to implement it is fine, but this is the kind of processes and procedures, these are the rules that we need to check.â So, it can definitely be done however works best for everybody, but as long as youâre having that communication and youâre making sure that everythingâs going throughâyeah, you know, you can always do it different ways and be successful, still.
Mitch Ashley: Mm-hmm. Interesting. What are some of the things that youâve seen change? You know, thereâs been a lot of acceleration over the last 12 to 18 months.
Tim Davis: Right.
Mitch Ashley: And, you know, Iâve heard people talkâof course, you always hear about the, as much digital transformation happened in the last year that was planned for five years.
Tim Davis: Yeah.
Mitch Ashley: And there is some truth to that, and Iâm sure some exaggeration, too. But thereâs a strong belief that, you know, people are now thinking they can deploy applications much, much faster and theyâve proved it in this last window. Have you seen that happening?
Tim Davis: Yeah, absolutely, and you know, technology changes. They used to say it doubles every six months or what have you, and really, we are iterating and changing and kind of moving forward very, very quickly. A lot of times, we get a new tool and itâs great and then people are like, âAlright, Iâm gonna pull this tool in and automate itâ and then they figure out, âOh, thereâs some extra complexity here and weâre having to go back through and figure it out.â
I definitely think thereâs a lot changing, you know, even just the shift from on prem legacy, I guess, enterprise architecture through to new, like, cloud native architectures and things like that. Weâre moving fast, weâre able to change and pivot and do what we need to do, but as long as we make sure that weâre kind of keeping grasp of what weâre supposed to be doing from either a security or an infrastructure construct, we can make sure that we can iterate and change and adapt as fast as possible without causing any major issues down the line.
Mitch Ashley: Mm-hmm. Cool. What do you think the next 6 to 12 months look like? If you had to put on your crystal ball, your Magic 8 Ball, that says, âAsk Againâ?
Tim Davis: [Laughter] Yeah, I love to look into that. Obviously, itâs good to see, you know, what am I gonna have for lunch next week, but also, you know, looking into the industry of whatâs gonna happen. Weâre seeing more and more X as code. Weâve got infrastructure as code, youâve got security as code, youâve got policy as code tools. I think weâre gonna see more and more and more, you know, performance as code and things like this that just are able to bring those day two plus operational tools closer left into the deployment cycle and have all of these single source of truth in the repositories of, we know exactly what our infrastructure is supposed to look like, we know how itâs supposed to be secured, we know how itâs supposed to perform. All of this is just declaratively set up there. I think weâre gonna see a lot more of that going forward.
Mitch Ashley: Mm-hmm. Well, certainly, as you said, it follows the âeverything as code,â right?
Tim Davis: Exactly right.
Mitch Ashley: And if weâve learned nothing else, I think thatâs been a lesson of the past 12 to 18 months, right? It is software, itâs all about software.
Tim Davis: It absolutely is.
Mitch Ashley: What do you think some of the skill challenges are for people as we continue to evolve this and move into this rapid world, shifting things left, doing more infrastructure as code, and maybe asterisk as codeâeverything? You know, itâs always the self-learners can be at the edge of the curve, other folks have other ways of learning. How do we bring everyone along in terms of their skills and their learning, their development?
Tim Davis: Yeah, and thatâs definitely something. I mean, I ran into myself. Iâm an infrastructure guy at heart, thatâs where Iâve been, you know, my whole career, and eventually, someone was telling me, âHey, this Python thing might take offâ or, âIâve heard of this thing called Terraform and itâs basically like code, but itâs our job.â And, you know, just realizing that nobodyâs trying to take away your job as a security guy or an infrastructure guy or girl or what have you. They’re not trying to take it away from you and move it over to a developer, itâs just one of those things where you need to adapt to move forward faster.
Now, itâs not just infrastructure folks that are learning to code, itâs also developers that are kind of learning infrastructure and figuring out how can I optimize my application against this infrastructure a little better? How can we work together to move forward faster? So, itâs kind of a melding of skills from different, you know, old school silos now to work together to solve the problem.
Mitch Ashley: I made that recommendation to a network and security engineer about 10 years ago. Itâs likeâlearn Python, and he looked at me like I had six eyes instead of two.
Tim Davis: [Laughter]
Mitch Ashley: And he came back from the Cisco conference, he goes, âNow I know why you said that.â [Laughter]
Tim Davis: Exactly right. And thatâs a great piece of advice even today in 2021. I mean, if youâre in infrastructure or youâre a network tech or youâre a security person, look into Python. Itâs not as hard as you think and you can do so much with it. Itâs a fantastic way to kind of break into that DevOps automation type space.
Mitch Ashley: I like that, too, and not that weâre trying to make everybody a developer, but if itâs not a skill you have, it sort of leaves out this whole domain of things that you can either do to understand whatâs happeningâ
Tim Davis: Right.
Mitch Ashley: – or do to automate or et cetera. Itâs sort of like youâve got one arm tied behind your back, why donât you have two out in front where you can fully work?
Tim Davis: Yeah. And it also helps from a cohesive understanding between groups. Back when I was a dedicated infrastructure person, myself and the development team didnât care for each other, because we all were trying to get in each otherâs way, it seemed. We were trying to solve the same problems, just going about it in different ways, because we didnât necessarily understand the methodologies or how those people were trying to get their work done.
If you as an infrastructure, security, or other operations person start to kind of learn the development methodologies and figure out how things work, itâll help you to communicate and solve problems across teams better, simply because you kinda see where they’re coming from with their tool sets and the way that they do business.
Mitch Ashley: Great. Well, itâs been a great conversation. Iâm glad we got to explore this path together.
Tim Davis: Absolutely.
Mitch Ashley: Where can folks find out more about env0? I know you have a kind of funky spelling of env0.
Tim Davis: [Laughter] Yes. We are at env0, E-N-V and the number 0.com. You can find us on Twitter @E-N-V-Z-E-R-O and on YouTube at E-N-V-Z-E-R-O.
Mitch Ashley: Great. So, environment zero, right?
Tim Davis: Exactly right.
Mitch Ashley: Perfect. Well, hey, itâs been fun talking with you and hope you’ll come back again.
Tim Davis: That sounds great. I look forward to it. Great to meet you, Mitch. Thanks for the time.
Mitch Ashley: Alright, take care.
[End of Audio]
