Viktor Farcic, Upbound | DevOps Experience 2022
At DevOps Experience 2022, Viktor Farcic, developer advocate at Upbound, explores the architecture and the critical ingredients needed for an internal developer platform.
Transcript
Okay, so we are into the last talk I think for today and my name is Victor and I will talk about what I believe devopsies. Why does it matter and what we should really do with it quick introduction. Oh, here's my slides if we can introduction.
My name is Victor. I work for upbound. We're a company behind cross plain.
I will do a demolate tree you will see among other things cross-plane in action within the context of this talk. I have a Twitter account. I belong to some groups.
I have books and podcasts and YouTube channel and all the good things check them out, but I will not lose more time on introduction. So let's talk about devops because that's the subject right now. when I talk about devops and when asked people, okay, so what are you doing?
Oh, I'm devops. Right and but okay, but yeah, but tell me what are you doing? And usually the answer goes along the tools?
Oh, I worked with containers. I work with kubernetes or cloud or pipelines or githubs or I'm security to something something or I'm interested in the infrastructure is code and so on and so forth, right? That's usually how in practice many people perceive devops.
I'm I'm a master of one or a couple of tools, hence. I am doing devops now. I think that that's completely wrong.
Really, I mean those tools are extremely useful we use them we should use them but that kind of misses the point. And it missed the point simply because devops is cultural movement. It's a change in how we do things in the Apparently of which tools we are using for doing those things.
So the tools and names so far and in most of the others that we're using today, they're operational tools just as they were equally operational tools and many of them exists before even anybody coined the term devops, right? And the real question that we should be asking ourselves is first of all weather devopsies what is meant to be and what is meant to be is to unite the different types of expertise and to form self-sufficient teams teams capable of delivering everything from the very beginning the idea until it is running in production right team. Is that do not depend on jira tickets or slack messages or emails asking for questions.
Hey, I need this. I need that. Can I do this?
Can I not do that and so on and so forth, right? And if you go back to how many devops engineers and that would be a longer discussion how I don't believe that there is such a thing. Is there obviously Engineers anyways perceive usage of those tools as being the essence of devops, then we really need to ask ourselves.
What about developers? Right? What should they do?
If you want them to be self-sufficient if you want to developers application developers to be more precise to be able to operate their applications to deploy their applications to observe their applications. Their natural question that we need to ask ourselves is can Application developers will use all those tools. Can they have sufficient experience in kubernetes in cloud in AWS Azure in infrastructure is code and so on and so forth.
and if they can use those tools First of all, most of the people cannot for a simple reason it takes years until one becomes proficient, but even if they can whether they should use those tools in the first place. So if I Define developer, the devops is being or the desire, let's say to enable developers application developers to be self-sufficient. If you define devopsis shifting left is moving all the things that we were doing in the late in later stages of the process.
Towards the left. So the towards the very beginning towards application Developers. Then whatever we do if that's the goal.
The last thing that is acceptable at least for my perspective is to say okay. You application developers just do it. Now right operate your kubernetes clusters operate your Cloud Define your applications and so on and so forth.
Now you do it is probably the worst thing that somebody can say because that leads to potentially similar disasters as we had with let's say full stack developers in the past. so devops If you're going to technical aspects of what we're doing today, and what we should be doing. And if we agree that devops is about enabling application developers to do operations.
Then the only part forward truly is to create services. That use those obstacles. But we but services that are that have the primary goal to enable developers to do things themselves instead of waiting for some other people to do it for them.
And that's how that's probably one of the main reasons why there is such a increased interest in platform engineering these days, especially in internal developer platforms, right more and more companies are putting tremendous Focus today into building their own internal developer platforms. And there is a good reason to do that. Simply because by having platforms that enable us to do things in an easy way yet specifically tailor-made for the needs of the organization where people work gives obvious benefits, right?
And those benefits are mostly not having to wait for somebody to do something and introduce the inevitable in time. Into the whole process, right? So what is IDP or internal developer platform?
It is a layer on top of technology and the tooling that specific profiles specific expert experts are used to use but now we need that layer that will simplify the usage of those tools and unite all those tools into something that is very meaningful to everybody in an organization. It is about shifting left. For real and it is about probably the primary focus or today of what Ops necessaries and devops and whatever we call ourselves today should be doing.
so and the reason for building a platforms is such platforms is twofold right if he create services that everybody in an organization can consume and if you expose those Services be accomplished not only that application developers are moving faster and are capable of doing everything themselves, but we also free. UPS people and they say Ops. I mean in a very general term because up in some company that would be S3.
In other company. It would be devops and third company it would be something else but people in charge of operations. To dedicate their time to do what matters right what scales manually or automatically doing operations for others is probably the thing that scales the least.
So I'm not going to rent Wise by self-service is important, you know productivity in time and all those things. Everybody probably already knows the advantages of those everybody already probably saw how beneficially that is to advance organizations like Netflix and Spotify and Google and so on and so forth. So I will skip that part.
I will instead focus on because I think it's important for the rest of the conversation very briefly on the lifecycle of applications. Right and on a very very high level every application go has Four distinct faces, right? We have the phase of Designing the defining the state that we want to have right?
I want to have this and that whatever that something is the expression of a desire. Of what the state should be? We have some Bunch attractions that we always need to perform like build binaries build container images run tests certain actions that are performed once and only ones every time we commit something to get Repository.
The third phase would be convergence of the actual into the desired State processes that will compare what the desired state is what we put into git and what something actually really is. I might say that I want the cluster with five notes and the actual State might say that there are three notes, right and we have processes that converge those two states into one and finally we have the last part, you know, once the actual State changes. Once we let's say have a new release running in production.
Observing how the new state behaves right that's typically monitoring observability logging and all the good stuff that we do. to make sure that namely mostly production is really continuous being in the state that we want, right? Without going into details every application goes through those four stages one way or another right?
No. If I would want to design an internal developer platform. That can be used in an easy way by everybody today from scratch and I must repeat the word from scratch right?
I'm fully aware that companies for not not all companies for created yesterday. Everybody has like us see and then everybody's solution will be different so I cannot. Include all the possible permutations, but if I would be starting from scratch no time almost anybody today those platforms would on a high level look very very different.
Right? We know the patterns today and those patterns are even though this graph looks complicated relatively straightforward. We have a layer on top through which everybody in an organization can interact with the system.
That's that's what we call top layer of internal developer platforms. That could be web interface. It could be CLI.
It could be extensions to visual studio code. It can have many forms, but we have that layer. Through which we interact with the system.
And that layer interacts with the system through an API today and I stress today. There is no good reason for that API to be anything. But kubernetes API and bear in mind that very sick over not sapi.
I do not mean necessarily kubernetes as in running containers. I mean specifically kubernetes API And then we have two types of things or operations we do right either we modify what we want by pushing changes to get. Or we observe and I must stress this strongly.
We observe we do not interact directly. We observe the actual state of our system and that actual State can be AWS or larger can be on-prem can be services like data dog and so on and so forth. We have drift certain number of providers you all of us that are using for one thing or another we have infrastructure managed by those providers and we have applications running on top of those that infrastructure.
So this is what we observe. This is what we modify the bridge between those two today is kubernetes. And again, I'm not talking about kubernetes as something that transcontainers in your servers.
I'm talking about kubernetes as a control plane vitally accepted by everybody in the industry, right? And that and that kubernetes is heavily extended by custom resource definitions. That's how we Define what we need specifically for specific to our organization.
Those custom resource definitions are essentially extensions of the API and those customers and once we have those definitions we have custom resources that do one thing or another right and what they do inside the synchronize get with what is running in that kubernetes cluster not containers, which resources are running. It interacts with all the tools that we have today and it modifies the actual state, right? That's the most logical architecture we can imagine today for internal developer platforms, right?
Now the tools that we might be using if you would like to design something like that, if you would really like to enable people to be self-sufficient, we can split them into a couple of categories. We have infrastructure and application specifications, right? That's what it means for you to have this or that what does it mean for you to have a cluster?
How do you manage your what is the definition of your database? What is the definition of your application support? Today everybody's standardized.
Our custom resource definitions is being the way to extend the extend the API. With your specific needs right? There is very little doubt there.
Then we have pipelines, you know tools that we execute actions as a result of you performing some changes to the desired state in get I honestly do not care much about which pipeline somebody uses simply because they're all doing more or less the same thing whether it's kitkactions or jankins or Agro workflows or Tech tone or Circle CI, they'll do more or less the same thing and that same thing is I'm executing something as a reaction on a web cooking get and that's something are a set of steps that set of commands executed in parallel or sequentially, right? Then we have the third phase synchronization where we need to figure out how to synchronize what we want which is what is in in git with the actual system where we are talking about typically today about Target City flux or Ranchi Fleet, right? Those are the only three tools that they know that can bear the title of being kitoffs even though other people.
Argue against that we can speak about it in comments. Then we have we need to figure out how it orchestrate our infrastructure now given that Most of the most of the most of the new setups today use kubernetes as a control plane then The Logical assets that is crossed when I come from Cross plane up bound so I might be a bit biased but there are many many other Solutions right ACA for AWS. Any infrastructure is called tool that can run is kubernetes operator and so on and so forth.
Then we can we need to figure out how do we orchestrate our applications and again in events? This customers for the needs of an organization. That's usually today either open application model with Cube Vella or cross plane.
There are a couple of others meta controller could be a good choice, even though more work is required and so on and so forth. Then we need to think about how do we do authentication and authorization? That one is this is fun to solve today for a simple reason that if nobody has access to the live system if everybody is allowed to perform changes only to get then actually get becomes our role-based Access Control our weight authenticate that people are doing what they should be doing.
Now I'm going to skip process because I have 10 minutes today. I left actually and I'm going to skip right into a demo and try to show you a couple of things. That might clarify how that all that that I'm saying looks like right so over here.
I have Argos CD that is monitoring my git Repository. It is making sure that whatever I put there becomes something somewhere becomes the actual State no matter whether it's on Prem whether it's a w s that's my kubernetes cluster or anything like that, right? You can see that I already applied a couple of things just because it takes I'm using AWS today.
It takes a lot of time to provision stuff in AWS, but what I'm going to show now Is how we could approach this now? I will use terminal today. Mostly because I like terminals but you can you need to imagine that all those things can be done equally from a web UI or Visual Studio code or something like that.
Right? So what I'm going to do is first I'm going to copy two files to a special directory and I will explain after that what I did but first let me do this. Let me say I'm copying a file that will Define one cluster.
I'm going to do that with another one. Don't worry. I'll explain what I'm doing.
I just want to start the process while I'm talking and I'm going to add this and commit to get Something and I'm going to push it to get. And now let me show you what I push to get while git is doing something right. So what I pushed is this now, let's say for a second argument that I'm a developer right now and that I would like to have a kubernetes cluster and I do not want to open energy at I do not want to bother anybody but I was lucky in a way that Other people in my company Ops or kubernetes experts or Cloud expert.
So whatever they're called created a service attacking consume and that service happens to be called composite cluster, right? So this is not something that comes out of the box. This is service specifically terrible made so that everybody in my organization can create clusters themselves and it is intentionally simple because it contains only the things that matter to everybody else and the details are hidden.
So here I'm saying, I want my classes to be in civil because I'm cheap. I'm going to use that as a development cluster. I want to have small servers right?
I do not know what's small is but I hope that somebody will figure it out and I want to have one server in total. And then let's say that I want to have production cluster as well. And I can this is the second file that I pushed and this one the beginning at least is exactly the same as before.
The only difference is that I'm saying here. Yes the same thing. But I wanted to have in AWS.
and when I say the same I mean It's everything behind the scenes that will happen will be completely different but I want it in AWS and I want to have medium size notes, whatever that means and I want to have three notes in total. And since this is production. I would like to have to enable githubs in that cluster.
So I'm going to Define yet another instead of installing everything that is required. And what's not I'm going to use a service custom resource definition defined by somebody else called kitops. I'm going to say hey among different implementations.
I want to use Argos CD. This is this is the information how to find the cluster where I want to use Argosy in this case. And this is the repository that I personally Victor or my team will use to push changes and this setup should enable that right.
Now if I see I pushed those two files to get as a result of me pushing it to get. Argo City so far probably detected the changes. Synchronized and it distracted my control plane kubernetes control plane that those resources should be created.
and inside of the control plane, we have crossed my running that will make sure that all those things are created and when I say all those things it looks like only a few things should happen because I defined Bank clustering receivable another cluster kubernetes cluster in AWS, and I want to enable the cluster to be production ready and I wanted to be githubs ready and what's not but behind the scenes those three simple definitions expanded into all this. And all this are the details are the sub-services we call it what I created before because it compositions and those are the resources created by those compositions. We have several cluster being created still.
And in AWS internet gateway was created in VPC and Route table and a bunch of other things. And a lot of things for installed in that cluster. And some help charts were applied and so on and so forth.
And all those things happened as a result. Of me leveraging Services defined by somebody else. defined by Services provided by somebody else by Ops in my company and consumed by me.
So I can see the status. Of what's going on by saying? Hey, give me all the I don't want to see all the details all those things that you showed me.
I want to see all the things matter to me and that's composite clusters and you can see that the one in AWS is already running because I actually repeated the same process few hours ago and the one in civil is still being created. And I can prove to you that all that is working that I just got the production ready cluster by showing you the notes. Of the cluster, right?
So the simple manifest creates the cluster with vpcs and subnets and so on and support and that last three is up and running not only the disabled running but it is production ready right now. Okay, three minutes left. Let me show you now that was all from the user perspective.
How can I's application developer consume Services created by somebody else and do things by myself instead of requesting others to do it for me. Now if I would change the role and therefore, I would say now. I'm I'm a person who creates such Services instead of just consuming.
There would be two things that I would need to Define one. Is that definition the How can I extend kubernetes with something new and that is in this file that says Hey I want to extend kubernetes with something called composite cluster. That's what the other me the developer me used before.
And whenever and I'm going to extend kubernetes for the custom resource definition or in terms of cross plane, we call it composition. Uh with that name and it's going to have the fields that you saw before like version and Note size and minimum number of nodes. And this is open API schema at the standard stuff, right?
And then I have the implementation of that package of that definition and actually here you can see that I can implementation for Archer and foreseev. And for what's not let's say let me show you a kiss for example. And here comes the problematic part, right?
This is behind the simple consumption of a service. I had to let's do this. I had to Define whenever somebody says I want the cluster in AWS spot that something is and that's something is defining a cluster specifying some properties defining a node group with some other parameters and properties defining how to transform when somebody says medium what that means in AWS and so on and so forth as a result over there.
The only thing I'm missing and I don't have time to show here. Is potentially creating I would wrap I don't have time unfortunately, but I would create similar services for people to create and manage databases for people to create and manage backend application front-end applications cues. Whatever.
the meaningful units of something in my organization are and they thought would like to have a web user interface for people to click buttons instead of operating back writing yaml. All I would need to really do is slap Backstage on top of that instruct backstage to go to kubernetes to get the scheme of all the resources dynamically and present them on the screen. Now that that was my very hastily done.
Talk unfortunately, not much time left. But where are my slides? Where are my slides here are my slides?
If you want, I can give you the slides and then you can see the rest of the presentation yourself. There are three others pages, and I'm I'm over the time. Thank you so much.
Check out our bound company where I work check out cross plain open source donated to Cloud native Foundation. Listen to the podcast watch the YouTube channel. Thank you so much for listening to me and watching me and see you next time if there is time for questions if there are any questions, I'm going to ask them.
If not, thank you so much.





