 Welcome it's documentation office hours Asia. This is the 28th of July. And today we've got a topic using Docker compose for tutorials. And then if time allows and my strength and stamina allows we can consider reviewing open issues and open pull requests. Meg any other topics you want to add. Okay, I'm since you're muted Meg I'm going to assume not and if we've got more topics we can add them. Ashutosh what would you like how would you like to there okay yeah but I don't go. Okay, Ashutosh what we how would you like us to take a look at at the progress. Yes. It's on the another branch right now it's the batch by removing batch by this, not much right now. Okay, so here's the, here's the repository and which branch. It's RM iPhone batch by this one. Yes. All right, well let's copy that down. So, first, do you want me to run it on Unix first on windows first. There's the nerd on Unix. Okay Unix first then so. And let's make the text bigger here. Is that big enough to be readable by everybody. Yeah. Okay. So, here we have it. And which branch did you want me to be on you said you wanted me to be on the one that had RM dash in the name. Okay, there we are. And it has some changes in it. Oh, interesting. Okay. It has some changes in it and surprisingly enough it needs some white space removed. Okay. Now. All right, so what would you like me to do is there a script you'd like run. No, there's a script now we have all the tutorials from there, including Python and node. Python and node are also added. So node is the one which is as I'll say, which actually produce a website and runs and on port. So I've tested node one already. A lot of times. So I think we should run Python one. Oh, so we'll do Docker Docker Docker compose up with the D and the and we'll use Python keyword. Now, Python. Like that. No, no, no, just like. Just Python. Like that. How will it know where to find that file by just saying Python. Okay. Here we go. Using profiles in the post file. Oh, I just found out about profiles yesterday. Okay, very good. All right. So it's building the container images. Yes, it should only only build Jenkins controller and the Python agent. And another one for running the Keygent script that changes the ssh piece. Okay, good. Now will this require access to port 8080. Okay, so then it's going to it's going to fail eventually because I've already got something running on port 8080 on this computer. So we'll let it finish its build process then I'll stop that other container and start this one. Making progress. This is good. Okay, and so now it's created a network. And there's the failure saying hey I can't connect. So let's kill that. And let's try it again. So here we've got Python quick start and the controller. Sorry, isn't right. Excuse me. Okay. All right, so now do I just connect here to this computer. Yes. All right. So it just so happens that that computer is already in my bookmarks right here. There it is. Nice. Okay, so now I'm logged in as user admin password at password admin or something else would help if I get type. Okay, so now I'm logged in. And here's a simple demo job already created so okay, what do I need to do now Ashutosh. I need a new item I with the pipe I have the Python simple. Simple Python. By install our app on my repo. I've already created Jenkins file for it. We have modified the Jenkins file because the previous one used Docker and Docker. So we can use my link to run that. Okay, so, so where would I oh you'll share the link in the chat. Okay, good. All right. And so this already has the Jenkins file for it. Okay, good. All right, so now how do I do so do I need to fork your repository. We'll just create a new item with my link so I see okay so I'm going to create a new job which is simple Python installer from Ashutosh. Okay, and it's a pipeline and we're going to do this. And then we want to get the script from SCM from get and the repository URL is that. And it seems to be satisfied. I like it without the wild card go and build now. Oh nice okay first things first it's on the agent, not on the controller very good so good practice. Okay, and here all the nice hyperlinks that work in the build log. Thanks to the work thanks to the recent security fix and here it is running tests. Okay and it runs pie installer. And this is all happening inside the container image of the agent. Correct. So there's the artifact artifact archived artifacts. There it is okay so there is the add to vowels artifact. And it's a binary. Okay. So if I were to download it. It will probably be a Linux binary right. Okay so I can't execute it on my windows computer. It looks like with a single command. We executed that. And, and it brought up exactly the Python tutorial. And you save the reason it does that it's able to do that is because there's something called a profile in the compose file. So if we just run docker compose up, it will only launch the default ones with normal controller and agent without any like the Python and other things. So it will run three containers one is for kitchen and that one is sidekick and Jenkins controller and default these are for default when no keyword is added. But when any keyword is added, you can slow down. Okay. See, we are using profile. Maven for the Maven tutorial, but it depends on the sidekick and Jenkins controller. So whenever we use Maven keyword automatically runs the sidekick and and the sidekick service in this case is gender generating the SSH key. Yes. And the reason it needs to be a sidekick service is because it needs to be written to both the controller and to the agent. Yes, it's using it's using the volume. We have mounted the volumes in a way that it gets in all of them. We are using a sidekick because if it's not a Linux system, even then we can run the scripts agent. Okay, so, so the, the idea there was, and you put it in in a sidekick rather than putting it right inside the controller because it makes it clear that the controller is independent of that. Yes, you could have put this inside the controller and then, well, I guess. Okay, so sidekick service was what what what Bruno and Damian recommended. Bruno is the one sidekick. Good. It also helps check whenever the sidekick is completed then only the controller starts. And that is this depends on. Very good. Okay. So now if I if I want to stop that I say docker compose down. Yes. Oops. Oh minus D is detached isn't it. Only need a composer. I see. Okay. And that's because setup SSH D is still running. So the down somehow did not stop the the SSH D sidekick. But now it did. Or now the docker compose down is silent. I've still got the build kit running. So what would you like me to do next that looks really great. I assume that the experience for the user will be instead of running these awful horrors. Like this, they'll do a git clone of this repository and then they'll, they'll just do docker compose up minus D. Or doc compose up minus D Python or up up minus D Maven. Great. So let's bring up a. Get bash. Nope, that's not it. Okay, let's get that. Here is the source code. This is for the simple. Oh, and you want to use something different. We need to clone the. Oh, we need, we need to call the quick start. Right. Right. I'm sorry. You're right. I see. Yes. Pay attention mark. Very good. Let's do that. So we need this one. And we'll need a different branch. Okay, so now docker. I should probably do that from inside a command prompt window. Okay. Okay, here's a command prompt window. Whoops. And now docker PS. First, let's be sure it's running. Oops. Okay. It certainly is not going to run unless I have docker desktop running. Yeah, the technology is so flaky. I don't know what to say. You mean it. It has to be running in order to do work. Yes, I know that's totally shocking. Just a minute while my docker starts, we'll see. I'm out of date. And my startup is really painfully slow. I'm not sure what's going on here. And this is my license copy. I expect this to work. Huh. Okay. Well, while this is starting, let's try on a different computer. We'll try it here. On a computer with a different network. Here. On a computer with a different name. See if I can get it running in the process. Nope, not even installed here. And not starting here. So I am not. I'll have to do some fixing while we're waiting for that to start. Let's. Download docker CE for windows. No, I don't need post install. I need install on. Oh, come on. Where's windows. Docker desktop for windows. Decently waiting while it downloads a big chunk of the internet. And now get it ready and running. Sorry to show that it is still not starting on my other on my regular computer. I must have done some damage to this and now I'm going to have to fix it. Okay. So this one has been downloaded. There we go. Ashutosh, my apologies that it's taking so long to get to the point of showing a running a windows container. Obviously my windows container setup is not as ready to go as I hoped it was. Meg, I assume you don't have a windows computer. I have one across the room. I think I know how to turn it on. Does it have Docker desktop installed? No, no. I have to wait just as long as I'm waiting. Right. It also doesn't have a camera or microphone on it. Okay. Actually needs to be replaced, but I'm useless. Oh, no, no, me. Well, me too. And that's okay. We're, we're making progress. We have shown already that. Okay. So, I'm going to go back to Ashutosh's work and Bruno's work has reached the point where we've got. A working demo that runs in Docker compose without. The horrors of. Running a Docker and Docker and Docker. And without requiring a long complicated set of commands, they just say Docker compose up. Right. That's, that's a great experience. Thanks, Ashutosh. How big is Docker desktop windows? 500 megabytes. So it's large. Now I have fiber fiber optic cable to my house. So that's not the problem. It's that this windows desktop that it's installing to is six years old. And it's still a fine computer. It does just great for me. It's just, it's mature. Just keep telling yourself that. That's right. We don't use the old word mag ever. The grandchildren specifically have been instructed to not use the old word. Good, good, good, good. So they use ancient instead. Bless them. Yeah, don't get me started on never teach your children words. Right. It would be much simpler if they didn't understand the concept of a synonym. But it makes you feel any better. The Linux system that I'm running on is about twice as old as your Windows box. Oh, well, that's good. Okay. It really needs, I have bought the replacement sitting out there with the USB stick in it. And I really need to install it. You know, I'm not sure if that finished its install successfully or not. We'll see. So the installation phase message. Yeah, there was some worry about that wasn't there. Well, it's doing the same thing. So it may be that I've made some mistake somewhere. Who knows. See, I've got Windows 10. 64 bit. Yeah. And it's current. And I've got enough memory on it and. Oh, here we go. Okay. So I have a container here. All right. So we have, let's do something simple. Simple first like. Containers. Hey, we're going to do their instructions. I don't have it. Okay. So. Verify our first Docker file next. Hey. Build your first image. Fail to resolve fail to read Docker file. Why would it say that? Well, because it requires that I'd be in the correct directory. Hey, and then it says an image will appear in the images tab. Containers images. Excuse me. Okay. Still building. And being nagged about JavaScript this that and the other thing. I know why you should have to put up with seeing advertisements from my Windows computer hanging there. Okay, creating. Oh, oh, so it's doing an npm build of this thing. Wow. Okay. This isn't some simple hello world, huh? Okay. Now they said when we look at images, we'll see welcome to Docker, which we do. Okay. In the optional settings specify a port number. All right. So it's like the image name. And how do we run it? Run. There we go. Optional settings port number. 8089. Okay. Run. Oh, interesting. Okay. So it says it's accepting connections on port 3000, but I'll bet if I look at local host. 8089 I'll find. There it is a container. Okay. So we proven that we work on Windows. And here it is running. So now Ashutosh, let's go to do the real thing that you wanted to do. Okay. So. And for that, we needed to copy. We need to clone the repository. Here we go. Get clone. And here, what you think we should do is say Docker compose up minus we'll need to switch the branches. Oh, right. We've got to change branches. Right. Yeah. Yeah. Branch minus a. Check out minus B RM underscore bash files. Minus T origin slash RM underscore bash files. Okay. And now. We're all checked out ready to go. And you were saying now what I should do is, is now time to do a Docker compose up. And which one Maven. No, Python. No. No. Okay. So no JS. No. Okay. So no. Okay. So node. Ready. Yes. All right. So Docker compose up. And eventually we should see a contain an image appear in the list of images. Right now there's just welcome to Docker. Okay. And so it's now doing operating system upgrades. It does seem to work. This third step of the five is was giving air to Bruno. Oh, it was. Oh, interesting. Okay. Well, so I may have different. Get settings than he does in his get configuration files. But we can make the files come down permanently in the correct setting. Okay. No, there it is. Okay, this is, I think this is the one that was getting it. All right. So these files. Now, how do we change them to Oh, I know how we do that. Okay. So. All right. So here they are here are the files. And now we need to learn quickly how to set. Let's see. So set. When get attributes. Force force Linux file format on windows. In figuring get to handle line endings. Get attributes documentation. Here we go. Okay. So this is the thing that we want to use a dot get attributes file. And what it says is. Okay, so we want to have. End of line conversion. Okay. If you simply want to have CRL effort, which is not what we want. So we don't want auto core, auto core CRLF equals true. We want to always have this. Start on SH text. EOL equals LF. Okay, so where is that file, because they're all ending in dot SH right. Yes. Okay. So. Start on SH text equals EOE text EOL equals all of. And we're save that file. I'm going to get add. Okay. Right. Yet commit use LF. For. SH files. Right. Okay, now. I suspect I won't have permission to push. I don't. But if I am very tricky. I know when Peter, oh, that's sad. Oh, I don't have GH on this computer. Okay. So how can I do this? I know how I can do it. Are you willing to be patient with me for just a little bit longer? Ashutosh. Okay. So I'm going to go here. Let's just. Make dirt G sock. Okay. Make dirt. Okay. We need a good repository name and the repository name that you used was. This. So here we are. Yet in it minus, minus bear. Okay. Now. I'm going to push to that thing. Sorry for all of this silliness, but this is the way I can. Make it so it's modifiable for me without having to have permission. Okay. So I'm going to add. Remote ad. Or. Yet at yet. Oh no. M weight. At yet. Mark weight net colon. Yet push. So it should show us I've got one in advance. Good. I do. Okay. So we're going to do a rename of that. And then we're going to do a get clone of. Get a clone from my fork. Okay. Oh dear. It didn't want to do a checkout. Why not? You dive. Oops. Yeah, because I've spent far too much time doing. Huh. That's minus, minus all. Nope. How about this? Get push minus, minus all. For. Okay. Now. Get fetch minus, minus all. Try cloning it again. Just to see if it would give us a better behavior. Hey, get clone. Remote head refers to non-existent ref. Huh. Get checkout minus B main minus T. Origin slash main. Okay. So we have that branch. RM underscore bash files. Right. Okay. Now, if we look at. If, for instance, we were to look at. Those files, they should now have. Unix line conventions on them, not windows. How would we test that? How about. That didn't help me much, you know, had, will it tell me. I need something that will tell me on a windows computer. If this thing is. How would I check that? Meg, you remember any windows commands that can tell us that? Well, let's, let's try the real test. Okay. Okay. Let's try it again. Okay. And since it. Did the copies. I suspect. That the file format changed. Now let's see if I can find a way to tell. Windows report. Line termination. With. No, that doesn't help me. It's not. You say the build worked or is it. No, the, the step that. Before. Okay. So we still have some, some work to do. Okay. Good. Well, so then. Report. Report. Line termination. On windows. How do I do that? How to find out the line endings on a text file. File. Unix. DOS file. Oh, okay. Well, the file command should tell me good. All right. Just a moment. CMD. Tam. Right. Jenkins in it. That doesn't help me at all. There. I don't have a file utility. Okay. No, I truly do not have the file command. So that doesn't help me. So is there some other way? Maybe. The properties of the file. Details. Ashutosh. This is really sad. I've used. I've used windows for a few years. I should be able to tell what. There should be a windows command that will tell me what the line endings of the file are. But I'm not finding it. Okay. So. Let's see. Do I have Emax on this computer? I don't. So what does get LS files report with minus fee? I think the container. Oh, good. Okay. Well, so all of my attempts to show it. Failed. But. We've got something running now. And so if I look here, here we see the container images. Good. And if we widen these out wide enough. All right. So there's the, there are the container images. And I use port 80 89. Was that correct? And there it is. Oh, no, that's first container. No. What port did I use for. For I didn't. So it should be on port 3000, right? I think it should be on board 80 80. Oh, right. This is Jen Jenkins. Thank you. Like that. Yes, there it is. Look at that. Whoa. Okay. So the get attributes file seems to be the magic thing. And here we see demo job running. And of course, if we want to create our new. Item, we do exactly what we did before. And that was new node pipeline. Right. And now we're going to say, okay. And then Ashutosh. I've got to go find the URL to your repository. On the chat. Okay. Now I got it here. So here we go again. Pipeline script from SCM. Yet, if you please. No, that's the wrong. Hyperlink. That's definitely not the right thing. So I should be able to get it from the chat like this. I should be able to get it from the chat. I should be able to get it from the chat like this. I should be able to get it from the chat. So I should be able to get it from the chat like this. Put that away. And copy this. And then here we paste it. That's better, isn't it? Okay. So save it. Build now. And what we should see then is. Get fetch running. And it is running in a Unix environment, even though I am on windows. Whoa, whoa. Well done, Ashutosh. Okay. It's going to take a while because now it's going to download a big chunk of the internet to do node, node, node stuff. But this is going to take the most amount of time. This looks absolutely great. So do you need that? Maybe what we should do for your benefit, Ashutosh is put the, that command that I used because that repository did was entirely private. It's sitting on my own server. So if we just type this dot get attributes. There it is. Asterisk dot SH. Space tech space EOL equals LF. If you do that in your, in your repository or in the branch that you and Bruno are working on. That will be enough to let it work. Thank you. Thank you. Now I apologize. I'm now officially tired. So I propose that we call an end to today's session and I will, oh, hey, look, it's, it's making progress. And then I will show a link to the localhost 3000. To see if the reactor website is running. Yeah, but, but we won't get that. And yeah, well that's, that's where it will eventually get after it finishes all this download and build process. Right. Yes. Okay. Well, so maybe we wait for a little longer and I don't go take my, my sleeping time yet. Yeah. Yeah. Yeah. No, no. Remember, you are, you are, you are a university student. Therefore, the 10 p.m. time is not late for you at all, but I was up at 5 a.m. this morning to start my business meetings at six. And so it's been a long day. Okay. So here we are. We reached it and it says go to localhost part 3000. There it is. Look at that. Ashutosh, congratulations. Very well done. Thank you. All right. So, so that, that line will be in the recording. Let me put it into the. It's going on. Okay. Let me put it into the meeting notes as well. Just in case that's helpful for you. And where are the media? Where is that notepad file? No. Oh, yes. Here it is. Okay. This. And now if I go to the meeting notes, they are right. Where, right. Here. Yes, here they are. Okay. Preparatory dot get attributes file. Okay. So that's it. And let's change this text to be something that is obviously. Computer font like that. All right. Ashutosh, thank you very much. Thank you. Nice work, Ashutosh. Yes. All right. Recording will be available probably in 24 hours. Thanks everybody. Bye everybody. Talk to you next week. Thank you.