 Thank you everyone. Can you hear me all right also in the back rows? Okay, nice. So yeah, I'm Martin Pitt. I work in a Red-Heads cockpit team and yeah, I'm glad that so many of you made it here at this early hour Even though I'm competing against then wash so welcome to deaf con if I suppose So I want to start this With a 10 second history of cloud computing at the beginning. We had infrastructure as a service Aka my other computer is a data center Then later on we got platform as a service So this was stuff like open shift or open stack to manage all these extra computers that you had And on top of that then we got software as a service So for example, we don't host our own repos anymore. Like everyone just uses github but ultimately Undeniably the pinnacle of evolution is cockpit continuous integration and deployment as a service And obviously it cannot get any better because you would just run out of graph trying to pronounce it And this is what I this is what I want to introduce today But let's start with the with the first world cockpit. So I hear that there's still people around who don't know what it is So let me quickly introduce that Conceptually cockpit is a linux session that runs in your web browser So technically is very similar to what happens when you log into your machine with ssh Or on the virtual machine a virtual terminal or if you have a desktop and log into gdm into gno So this is like yet another way to work with your server And it is aimed at administrators which are neutral linux. For example, they come from the windows world and they are familiar with the Like with the concepts of system administration, but not necessarily with the linux terminology But it's also appealing for experienced administrators particularly for Doing Infrequent tasks like if you only set up a radio way once a year Like you're really not going to remember all the command line for it And it's much simpler and safer to do it in a graphical you are in a guided way And thirdly it is a great troubleshooting tool. So whenever you have a bunch of machines You can drill down into the cockpit interface and into all the details and see what is wrong with this machine And then it's just an apt or yam or dnf installed away from like all the major distros fedora atomic rel devian ubuntu arch and others So what does it look like so this is the system page Gives you summary information about your system Of course, you can drill down into a lot of extra details here And the menu on the left that shows you like the available administration pages And you can also switch between multiple machines here For example, this is a sub page Anyway, this is the sub page of networking which allows you to control the firewall. That's a ui for firewall d Or you can interact with your local libvert or overt virtual machines And get consoles and configure disks and so on And the cockpit team maintains all of these pages that you see in the menu here But of course there will always be things that are missing for your use case So cockpit was designed from the ground up to be extensible Then we do this by offering a javascript api which you can include in your page and this offers your apis to And to do stuff on the connected machine like run a program or connect to adiba service Or open files and sockets and like all the things you need to implement functionality So a very little example often cited we want to create a ui for ping So we could whip up a little address So we set up an address input vine and a button to while actually do it And here we have a little summary status whether it succeeded or failed and a little pre where we can watch the output And we can wire this to the cockpit api So this is the interesting bit here. So we can use cockpit spawn to run a program And whenever something happens and standard out you can output it to our Like streaming element and whenever the process finishes Then we set like the status field Of course, this is slightly simplified. So for of course the error handling case is missing Uh, but this is the gist of it And so there's a very similar structure for like doing a divas call or opening a file, for example So initially it looks like this you have a new menu entry here You see our input line you click on ping And you see the result And yeah, so it's mostly what you expect And it appears in that menu with a very little declaration thing which we call the manifest, but it's not terribly interesting here And this is actually good enough if you want to set up like a little page for your own personal environment Like you have a company specific page or you want to have a very cheap way of monitoring or controlling your service in your household or whatever But as cockpit has become more popular Like and there is more and more extension projects Which are public These projects they become much larger than this little toy example For example, there is now a ui for potman Or we have a user interface for building installable images Operating system images, which is called cockpit composer Or there's user interfaces for setting up an ipa server or fleet commander There's been ideas floating around for Setting up an nfs server or certificate management and so on And if you do this scale then just tossing all of your code into a single html is just not good enough anymore So in such like public public and officially supported projects You want to have a clean separation of html and css and javascript Put split them into multiple different modules And of course, you don't want to couple together the ui by hand You want to use modern frameworks like react and pattern fly And once you do this then you need a whole javascript toolchain to compile all your files into Essentially a blob that the user can understand And these build systems they get very complex very quickly and even for experience developers It's a big annoyance to set up set them up And once you have this you also want automatic browser tests to make sure that your Your project keeps running over time and you want to test it on various operating systems And Also, you want to make sure that doing a release is very cheap so that it can do it very often So essentially push button release process And putting all of that together is a daunting task and we know that and it might help might prevent you from Like starting this project So we came up with a project to help you with all this which we call the starter kit And this does all the glory that I was just talking about with you having any with you not having to do Like a thing and without having to learn about all these gory javascript toolchain projects So it is essentially a collection of best practices for modern javascript and for cockpit development And it provides a little example ui Which you can just clone and then rename and you can start hacking on the react pages and the code without having to worry about all the boiler plates And so for example, you can run make develop install to run it straight out of your build tree Or you can of course do make install to put in it to use a local or you can build an rpm and then install that And whichever way you decide to do if you do this then you get a ui like this Of course, that's like rather boring looks unspectacular But it already demonstrates like the core thing of what you want to do on a cockpit page So for example, this uses a cockpit file call to read etsy hostname and then show it on the page And so the idea is that it's ready to hack on react component and You can then build whatever you like without having to worry about the toolchain or testing And testing is a good Good keyword here because this is something that a lot of projects also struggle with And this is also why the starter kit contains one of contains a browse integration test So again, if you run make check here that looks very simple But it does a lot of stuff for you in the Behind the curtain for example it downloads an appropriate operating system image from our servers like in this case It's well 76 But we have like lots of images for debbie in the windhoof or dora centos you name it And it builds your code installs it into that virtual machine starts a headless chromium browser And runs your test there and then gives you back the result And this reuses the virtual machines that we use in the cockpit team ourselves to test our own product Yeah, own product and believe me. It's a halftime job to maintain all these So if you possibly can then reuse these images instead of trying to maintain your own And so of course once you have these tests you also want to integrate them into Your ci so for example when your project gets a new pull request you want to make sure that these tests actually run And you can actually do this. So we offer it to Projects to run your tests on our infrastructure Of course You have to go talk to us first so that we make sure that the project is reasonably sane And of course we need to control like what kind of workloads goes on our infrastructure But yeah, if you ask us nicely, we will figure this out for you And the next step would be the automatic release process So the idea of how we do releases in the corporate world is Essentially that you come up with a small list of changes And then put them into a signed tag on your project push it and then everything else happens automatically Like for example Building release tar walls putting them on github building a source opm pushing them to fedora or coper Or updating your project page for the latest documentation and whatnot or pushing an image to docker hub And we have a lot of little helper scripts, which Can help you with that So for example, this is and and this is controlled by a little like shell script Which you call copitches release and that needs to be in your project And with that you can tell the release machinery like to which targets you want to release your project So the real file has lots of comments, of course But I hope if you look at it you should get the gist of what is possible And just like with ci I mean you you are welcome to run this on our infrastructure If you talk to us and we can set this up for you So help you with set up the web hook for your project and as soon as you push the tag We split the release out for you But unlike with running the tests this part is actually relatively easy to self host if you prefer that Like in essence, it's just a container with a bunch of Tools that you need for doing all this and a bunch of credentials so that you can upload stuff to copo and github and whatnot And if you want you can just run this on your own laptop as well So push the tag and then just run like cockpit release runner point it to this control script and it will do that for you as well And if you do this you get also some extra bonus So in the cockpit team itself, we do a lot of routine maintenance tasks In an automated way For example, you want a regulatory update keep your npm dependencies up to date to pick up bug fixes and security updates Or you often need to upload the latest translation templates to zonata like the translation platform Or and of course download the latest translations into your project so that you can actually use them And we have bots for all of that. So this is an example That a bot did against starter kit itself So we see there was a new react package available And so the bot comes along and updates the version of react in our package jason And then runs the test against it and we see it's all hunky dory And then in the end the human person can come along and say, yeah, this looks sane Or maybe well, this was pattern fly. It might have a visual impact. So let's give it another manual test and then sign up and land So it's basically the the minimum human involvement to keep your your project alive and healthy So and this this is not a pipe stream So the we have a bunch of projects which are real life which use all this machinery For example, as I said copy composer or podman or s3 They all use that independent projects which make use of our infrastructure I come So and let's add your project to that list So the idea from our team is that we can only scale so much So we cannot become experts in like for all the subsystems and technology in the world But instead from building all the ui's ourselves. We want to help you with Building your ui for your project And so we work a lot on our ci infrastructure to make sure that it's scalable and generic to other projects And we do cross project testing And of course, we are very happy to work with you to set all of this up with you So if you want to talk to us, so we usually hang out in hash cockpit on freenote And our project homepage has pointed us to the main list And to lots of documentation and tutorials And of course while we are here, please come and join us in person So we have a hack fest That happens sunday 14 30 So it's not that long. So actually it's more like a meet and greet But still please tell us about your project and ideas and we can answer your questions there Also, uh, we are currently doing a user interface User testing So if you want to go down the hall and meet the lovely people there like mary and gen for example You can also help us with improving the The current user experience with cockpit and compositor itself and just say hello Well, thanks for your attention So we still have some minutes for questions left So are there any And Can I build something besides react? So for example, if my plugin would be written with view Would that be an option where I have to start changing my my packaging and my npm scripts? Of course, I mean You are not tied to any of the choices we make in the starter kit So if you use like angular or any or any other technology, you are of course very welcome to do this It's just the starter kit as an example react component But I mean it's like 10 lines of code So and even in cockpit itself we have like you see the history of javascript development there We have j query of angular. We have react and whatnot. So You can change the frameworks you work on you can also change the test frameworks you work on like if you don't want to use our test api for controlling the browser And the different ones so you are happy to help this to you're welcome to do this and in fact we also Have even tested this with a couple of other frameworks. Of course, we know our stuff the best So if you have questions about that, we are best able to help you But yeah, you have a question Is cockpit a Linux session in your web browser? Not only in mine also in yours, didn't I mention that? But thanks Steph So anyone else okay, well then if not then thanks for your attention and feel free to grab me an order