How AI & DevOps Are About to Change the Way We Create Products
This presentation was recorded at GOTO Copenhagen 2023. Marko Klemetti - CTO of Eficode ABSTRACT This talk is a combination of a hands-on demo and explaining how to approach modern AI-powered DevOps. As AI-assisted development becomes mainstream, organisations will have to find new ways to ensure their service quality remains high. Without the proper DevOps culture and practices in place, organisations will not be able to get the full benefits of this unseen velocity. This talk will explain how DevOps is building a safety net around modern software development, and how the right way of approaching Continuous Deployment and modern DevOps will help speed up the development when using AI-powered tooling.
Transcript
thank you so much I I'll start by saying I'm honored that you've decided to spend the next 30 to 50 minutes with me I'm not going to be rushing so I'm going to be I'm going to be walking through my presentation on a peaceful manner I'll see if you start nodding then I'll speed up so half of my presentation is going to be Basics and the other half is going to be talking about actual AI so be be patient you as well I'm going to be live coding some but we'll get back to that afterwards or Dash later I'll start by saying that lots of the movement has been started Naturally by GitHub I'm not going to be bound into GitHub but it's a as they are uh the most advanced currently in this technology it's the most natural place for me to present the Technologies in in AI driven development as a starter which those of you who were early you've already seen as a starter to give you some sort of a thinking base one of these pictures is real it's actually taken exactly 80 months ago here in Copenhagen um near uh Revan sorry for not pronouncing it correctly and three of the others are descriptions of this one real picture to d e which is essentially very close to the same as what we're doing with AI driven development um some of my slides also have a QR code so if you're bored or interested you can just scan it and read for some more information on the topic the latest research that has actually been made on the topic is Naturally by GitHub and even if you have to take it with a pinch of salt what they state is developers are going to be 55% Faster by using AI co-piloting whether the the technology is co-pilot or then say gitlab duo or similar and I'm just going to quickly present what this means so I have a small application made in JavaScript currently showing a line and then I have a fun a file called weak number and this example came from I I was working with my son who is uh doing university studies and he had a python course and he he had to do all of the exercises and next to him I was working with co-pilot to do the same exercises and it took me it took me less than a minute to solve the exercises that had been put in place place and for this particular presentation I'm going to use a similar programmer dilemma which is called date calculation so let's do a function gets week number gets a date as a parameter like so and then let's open the function and you'll see that all of the algorithms that I have to come up with the AI co-pilot already gives me so with a few tabs and then exporting that function like so and clicking save I should see the week number done so that was easy have a great day no just kidding but you already see that that doing the actual maths and the algorithm and all of that in very very basic situations the AI co-piloting does make us lots faster with a friend of mine we even took it a bit further we created an open AI based pool request reviewer using only open AI meaning that we asked all of the code from essentially chat jpt for the code to create a pull request reviewer and you can now find it in the marketplace with the name AI code review action I'll quickly show you how it looks it's here so there is an old pool request called changed color to Blue and if we read down we can see that GitHub actions has already made some comments in there you can see oh consider adding JS stock saying that's not necess to create a copy so the kind of review comments that you would as a human being also give to the pool requests but now of course with the uh addition of of the help from AI good now as we're there and we at OT have been working with lots of um how should I say more traditional organizations we worked with uh GE Healthcare in building their newest the patient Monitor and when we started the project we already knew that it's going to take us three to five years to create that patient monitor put it into the market and get all of the certifications done for it and when when we talk about like quick coding the algorithms and then on the other side we have the three to five years development time we already know that there is an issue somewhere this is from another customer we made a value stream mapping and the value stream mapping all of the yellow posted notes here are manual steps to get one requirement through the organization through the value stream through the pipeline into production and you can already see that the actual development value happens between two posted notes and now if we start improving something between these two posted notes we already know that no matter how much we improve these parts we will not make the organization faster we will not get anything out faster and if traditional organizations spend 5 to 10% of their actual R&D time and budget on software development and we improve that by 55% we've improved the organization 2 and a half to 5% which essentially is not good outcome from what we have at hand and here we get to the basics so when we start doing AI driven development when we get our organization faster and as I said I'll start from the very Basics there are six areas I want to introduce before jumping into the actual a driven development the first one naturally agile practices I trust everybody here already know roughly what that means from roughly 22 years ago with the agile Manifesto and organizations trying to become become more agile and so here's atlassian jira um tool that I love and hate at the same time almost all organizations use it today it's great for people reporting it's great for managers it's it's great for someone who wants to overlook things and if we think of the modern software development how that would work is let me pick the change colors to Blue we'll make a new Branch was 16 yes colors blue like so so now we have a new Branch with the tag name colors blue and we push it to Version Control System like so we've created a new Branch change colors to Blue and by not touching the actual requirements management tool which I said for us developers is really boring we've been able to mark a point in history where something actually happened which means that for the organizational agility with automation we've been able to create something that happens just in the background without uh the nuisance for developers or the R&D organization of course you decide how to solve this kind of a agility in your organization but any requirements management tool today supports the way where developers are blocked as little as possible the next part uh cicd another very basic practice that you all of you are already familiar with but with the introduction of the continuous integration continuous deployments organizations have been able to add a layer of continuous practices in the organization and if we look at the yaml file so here's just simply the the CD yaml file the boring most boring possible example of cicd pipeline in use all it does it checks out the code it runs the the build the test and then some linking and this is where it usually starts for organizations and then it goes further and further and if we go ahead and check out the actions we can see the process that has been run here there it is CI test and run lint fantastic now we have the cicd in place and it it's guard rails for our actual application development and then we know then we get into more interesting part The Continuous quality assurance so we've now established agility in the organization we have the requirements going through the organization we're trying to make way for organ I ations to be able to move according to needs and customers we've established a continuous way of checking the quality of what we've created and now it's time to look at the test Automation and of course how this works is that we have tests and we run the tests with the code we just created okay four tests and all of them have passed and as you know the tests these days are written in such a format they that they actually Define the requirements so we have the original requirements and the definition is written into the tests whether they're unit tests or acceptance tests and they work then as a framework to make sure that what we created is working and then when we're creating something new that's also working and now chronologically Cloud native was invented then next in line of all of these basic practices but something that makes for me the cloud native today most interesting is that not only do you develop the code on your own laptop but if we take the Styles let's make this steel blue save there and color aour pun intended there we go and we make a comit let's add both and we push it and we go check out what's Happening Here we have the colors blue here and instead of now having a staging environment and a production environment and and two environments that are then some one that we use for testing and the customer testing maybe even and the production environment we actually are able to deploy all of the different branches so here's uh colors blue and if we go and check out the this particular deployments I'm using uh service called versel we click here we can already see that it has been deployed uh week number hopefully Works versel app and we can actually if you wanted you could even collaborate on this particular version the original version naturally is is running in week do hopefully works and it's still in its production version of the b in gray gray color so today when we start thinking about Cloud native environments it doesn't mean anymore that we have the traditional uh traditional practices in place but we can start imagining and looking outside the box meaning that all of the deployments when you run cicd just to give an example uh you can deploy everything and start using especially those web based applications to be run in a service that's taking care of the so-called Ops for you of course this is not feasible for everybody but especially when you are prototyping or building applications um rapidly rap rapidly deploying applications this is super interesting option and of course verell is just one example you could use fly iio or you could use Heroku or you could actually many organization have built this one themselves as well one of the key areas where when when you're creating new applications you can get them up and running and see how they are working then building the harness two more pieces uh one that I definitely want to mention something that we have also in this particular uh conference present the previous session in in the neighbor neighboring Cinema was really good on the security side and there's lots of security tooling that's already available for you this is an example stolen from a friend of mine uh Stephanie chaplain from git laab and she's kind of made uh a quite good list of tools that you can put in place already today and just start using automatically as part of your cicd pipeline and and if we look at how it looks in in the tooling of example here when we have the application up and running without actually doing anything we can see the security issues that we have in this current application so we've made the comment we've made the pull request and then we have the warnings here and then of course if there is let's say These Warnings are coming from a library vulnerabilities which is usually the most common problem we get also automatically pull requests that we can just go and check out so here's one we see that uh in this case versale has already deployed it for us we can go and see the preview if you wanted um and then we see that all of the checks for this particular uh version have been passing so of cicd and if needed we could could even merge it and then the sixth one uh my favorit uh continuing from the agility so few years actually just before covid uh mr's uh pi and skeleton who had originally created the devops topologies wrote the the Great Book team topologies which I I think is already familiar to all of you but just as a recap if we look at uh the the original Conway law as you saw from the value stream the organizations tend to create applications that reflect their organizational structure and the team topologies has a target of changing that into a direction where the applications you create follow a more healthy architecture and what they did they wrote about four different typologies for teams the most important of course of course are the stream align teams that deploy applications so their responsibility is to own a particular part of the customer value let's say it's a web application in this case then we they would have a platform team or platform teams who are responsible for providing a certain platform whether it's their own say um um backend platform or then for example tooling platform so the tools I'm showing here could be one of the platforms then there is the complicated subsystem team so especially if we look at Automotive or other uh very controlled organizations which has complicated parts of the customer product there would be a complicated subsystem team taking care of that particular area so a platform team for a vehicle could be for for example the AP the operating system of the vehicle and then complicated subsystem theme could be uh for example the sensors which are usually very very spec demands very specific skills and then the fourth one of course is enabling team so all of the six areas for example which I've presented here you would have an enabling team going into the stream Aline teams sometimes even to the platform teams and Coach them give them as assistance on how to put new practices in place so even while I'm saying you all know about cicd it's surprising how many organizations don't know about cicd as of today or even if they did they would probably use it in a suboptimal way good now that we've set the scene for the basics we're ready to jump into the actual AI side so before showing any new slides let's take a look at what we've created so we have the weak number here fantastic AI created it for us we have the tests running let's see npm test still tests passing um we have yes our super nice blue application here and then let's make a pull request for that let's see if it's there still Yes feed update colors to Blue let's do it create pull request so essentially the checks have been already run in the background we merge it it's fantastic I'll just delete the branch because the comments are there and then if we're any lucky we're go to verel we check out the week number deployments still build building should be ready in 14 15 seconds and if we now go to the week do hopefully works it should be blue yes uh no applause because I've added in a feature where you can set a date and coincidentally this year the year starts from Sunday which means that if we look at the date for the upcoming Sunday which is 8th of October and Sunday here in Europe is still week 40 but unfortunately the algorithm I've gotten from the co-pilot is saying that Sunday is week 41 so seems like we've failed something let's take a look at what happened an easiest way naturally in a case like this is to write a test case it should return week 40 for 8th of October there we go let's see if it giv gives us any code looks good closing that one and then let's run the tests and oh no for Sunday for the test case that we've written for quite naturally Sunday which was supposed to be week 40 our algorithm gives week 41 let's see what happens if we try to recreate it oh looks bad this is essentially the same algorithm so maybe we will just go to chat GPT which I've already generated for us uh just in case it would be slow or giving some other result by the way I'm going to copy paste it the the key term here was ISO format and let's take it here close it module exports oops too fast for myself there and then let's see still week 40 all good let's test on the Local Host oh yes looks good looks good let's run the test cases yes five of five passed we can actually we'll be we'll be just boring and fix the algorithm oh no actually we cannot be boring because I just just realized that I already merged it so we're going to have to open a new branch almost there we go and now if we go back to the Week calendar there should be fixed Cal I know didn't go to atasan fix algorithm create pull request and then we'll just quickly check once verell has done the deployment that it's not completely broken versel deployment completed fantastic looks good then we'll just merge it confirm the merge there we go delete the branch and here we had the weak number and without just clicking the clicking frantically the reload button I'll just let the build finish before reloading just so I won't be too stressed there no we're done oh there we go thank you okay so on to the topic so now now you had an actual demonstration how the so-called harness Works around AI driven development so we had a quite difficult algorithm in place I still don't quite understand all of the fness of that algorithm no just kidding of course but it's not easy to understand to be honest and we've created tests also using AI driven development I'm just quickly going to mention that uh different from the modelbased development since AI does the generation independently for the code and tests it's quite okay to do both as long as you understand what you are doing and with cicd and all of the like no Ops just deploying it somewhere and hoping it works which it does because it's service they provide we've now deployed uh a nicer actually working version of our application so where is AI good at we've already seen that for the software development it's going to make a huge change but then there are four other areas for software development essentially the uiux where we so Adobe send say for example is a really good example of not only being able to bring AI into the graphical design but also putting it in place for knowing what the customer or how customers or users behave in the sites then devops practices naturally as as some of you surely write terraform still copile will also help there all of the AI co-piloting will be helping there and then a bit less on the agile culture and product and portfolio management although it depends of course how organizational you are how bureaucratic you are as of today because of course jet GPT will help you create very very nice reports in addition to all of these we've already seen a move movement called prompt engineering and what that means is we during that last year we've had chat GPT have learned to do the questions to have the prompts in a correct way for chat GPT or other AI driven engines and it's it's a skill that has emerged out of nowhere it's a skill that you have to have if you want to survive in the future of software development or digital age all together and there's there is already some tutorial some help available for for from engineering but it's essentially a skill that we all have emerged but it's all from over so something that's evolving something that all of us have to learn and for today where we are standing today um there are four areas that AI driven development is especially good so as you already saw naturally Auto completion of code tests and comments so a is pretty good at grasping the context you're working in and proposing you completions so you actually have your idea of something you want to accomplish and then you use AI to just fill it in so to speak the second one which is one of my favorites because when you start working on a new new library open- Source API maybe um AI has all of the knowledge of course we know that they current cutting point is somewhere January 2022 but most of the libraries that we use today already has quite extensive documentation up to that point so when we make questions to the engine we get way better answers than usually looking at the API documentation the third one uh boiler plate code gener