Why you should embrace OpenSource. Jenkins-PowerShell-Containers
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 60 | |
Author | ||
License | CC Attribution - ShareAlike 3.0 Unported: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this | |
Identifiers | 10.5446/37416 (DOI) | |
Publisher | ||
Release Date | ||
Language | ||
Producer | ||
Production Year | 2018 |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
00:00
Open sourceSlide ruleData managementWindowOpen sourceBitCovering spaceDemo (music)Computer animation
01:21
Open sourceComputer-generated imageryInstallation artJava appletRevision controlRootFingerprintDemo (music)User interfaceExecution unitSpacetimeModule (mathematics)BuildingPoint cloudQuantumMountain passLevel (video gaming)Software testingDemo (music)CodeClosed setExecution unitInterrupt <Informatik>Medical imagingGastropod shellData managementDefault (computer science)Cartesian coordinate systemKey (cryptography)Process (computing)Communications protocolJava appletComputer fileWebsitePlug-in (computing)View (database)Installation artVirtual machineGame controllerInformationSoftware testingVideo gameLaptopGraphical user interfaceScripting languagePasswordLine (geometry)Endliche ModelltheorieFlow separationRight angleRevision controlComputer configurationInformation securityVideo game consoleInheritance (object-oriented programming)System administratorMereologyBitDirectory serviceResultantPower (physics)CASE <Informatik>CuboidTouchscreenComputer animation
09:55
Open sourceExecution unitNeuroinformatikGame controllerRevision controlInstallation artBitCuboidTrailVirtualizationWindowService (economics)Computer animation
10:41
Open sourceStructural loadComputer-generated imageryVolumeComputer musicHill differential equationExecution unitMaxima and minimaService (economics)Computer fileProper mapLine (geometry)Computer configurationLoginMedical imagingData structureCartesian coordinate systemDifferent (Kate Ryan album)Mobile appComputer animation
15:15
Open sourceIRIS-THill differential equationWechselseitige InformationNo free lunch in search and optimizationService (economics)Multiplication signRight angleData loggerHand fanCodeComputer fileSource code
16:48
Open sourceComa BerenicesWechselseitige InformationMusical ensembleMaxima and minimaConvex hullInformationInformation securityRight angleService (economics)LaptopPoint (geometry)Source code
18:57
Focus (optics)Open sourcePower (physics)Continuum hypothesisComputer animationSource code
19:34
Open sourceExecution unitCASE <Informatik>XMLComputer animationSource code
20:13
Execution unitGamma functionOpen sourceMaxima and minimaVenn diagramPower (physics)Electronic visual displayMenu (computing)Coma BerenicesComputer wormVolumeEvent horizonLattice (order)Proper mapContent (media)Computer animationXML
21:10
Open sourceInclusion mapMultiplication signIP address
22:01
Power (physics)Open sourceConvex hullVenn diagramElectronic visual displayPasswordSystem administratorIP addressMultiplication signCubeTouchscreenComputer animation
22:40
Open sourceMoment of inertiaExecution unitAnalytic continuationAddress spaceSystem administratorMultiplication signConfiguration spaceDefault (computer science)Process (computing)Computer fileWindowDifferent (Kate Ryan album)Remote procedure callWeb browserCuboidRootLoginError messageGraphical user interfaceMathematicsInformation securityXMLComputer animation
26:50
Graphical user interfaceExecution unitOpen sourceConvex hullMassCellular automatonLimit (category theory)Hill differential equationFingerprintProtein foldingSource codeVideo game consoleFunction (mathematics)Simultaneous localization and mappingFirewall (computing)Windows RegistryDifferent (Kate Ryan album)Projective planeParameter (computer programming)Scheduling (computing)Java appletProcess (computing)WindowSoftware testingError messageInstallation artDefault (computer science)InternetworkingRevision controlKey (cryptography)Type theoryDatabaseMaxima and minimaMeasurementMereologyGoodness of fitInformation securityService (economics)Group actionVideoconferencingPlug-in (computing)Graphical user interfaceNumberFormal languageSynchronizationComputer fileComputer animation
35:45
Open sourcePrice indexComputer wormMusical ensemblePower (physics)Type theoryComputing platformProcess (computing)Boss CorporationVideoconferencingExecution unitOpen sourceXMLComputer animation
37:04
Open sourceNormed vector spaceData managementCone penetration testBuildingComputer-generated imageryInstallation artRevision controlCore dumpSource codeFunction (mathematics)Video game consoleCommunications protocolConvex hullVirtual machineSelf-organizationPerformance appraisalOperator (mathematics)Sampling (statistics)WindowInternetworkingDefault (computer science)CodeMultiplication signSystem callComputer fileProcess (computing)BuildingConfiguration spaceInstallation artGastropod shellPhysical systemInformationEstimatorRevision controlScripting languageGraph (mathematics)ResultantCore dumpGraph coloringJava appletError messageLoginDifferent (Kate Ryan album)Unit testingExecution unitLevel (video gaming)Data managementInformation securityComputer animation
46:34
JSONXML
Transcript: English(auto-generated)
00:11
I've got 12 in my watch, so let's get going. My name is Gabriel Rojas. I work in a financial company in New York City.
00:22
I'm a pretty much person that works in DevOps, a lot of cross stack, like Jeff was saying a couple of days ago. So it's a little bit of Windows, a little bit of Linux, any open source tools that we can use to manage environments, Linux or Windows.
00:41
And I'm going to go over the slides first a little bit, and then we'll get into the demos. As you guys can see, we're going to cover Kubernetes, Jenkins, and PowerShell. And my goal here is for everybody to understand what the tool can do for you, what you can do in your companies.
01:01
But this is something that you guys take back to your companies and start doing a little more research how you guys can use it. There's a million ways of using all these kind of tools on Windows or Linux. So let's see. Let's go to the next slide.
01:22
OK, done. Let's start going to the demos. OK, close these, and then we're going to VS Code. I'm going to show you guys showing you for Docker. So the way I describe Docker to people is pretty much the way you want to run your application.
01:44
This is the way I wanted to look at it. This is the way it needs to look. This is the way I wanted to deploy it. And everything is version controlled, and you can actually codify it. That's the view about it. And it has a lot more advantages in security, all that stuff that you guys can read about it online.
02:01
There's a lot of information there. I will have two Docker files. The first one I'm going to show you is using the Microsoft PowerShell for the Docker Hub. Docker Hub, where a lot of people publish images, is public. So everybody can download it. Do not put secrets in there, please.
02:21
So be careful with that. But you can share. So Microsoft, anybody, Jenkins, Ubuntu, Red Hat, they put their images up there, and you can download and play with them. Usually you get like a shell, blank shell, but you can do whatever you want to make it look the way you need it to look in your enterprises.
02:42
Similar when you create a VM, you install agents and you install whatever you need to do. You have to similar stuff to your container image. You have label, pretty much the version. Then the working directory, start working there is to download,
03:02
to install the model pester, and I do a couple of updates on the image. You always update your image when you create them. Make sure you do that. I had to install Java. The reason being, the way I'm going to show you guys is like Jenkins can connect to Windows, either full GUI or core,
03:23
via something called, protocol called GNLP. So it's a Java protocol. So that way you don't have to worry about a password or anything on the open. It knows how to connect to a secure. Not saying better, but it's another option.
03:40
You can do SSH also, but in this case I choose that and I have worked with that, it works pretty well. I'm copying from my local directory. There's a PS1, it's just a regular script just to show you guys how it works. You just get command. And then I have a user called Jenkins.
04:02
I make sure it's part administrator writes on the box. And the keys here is expose. On expose you can actually tell what ports you want to expose to the work. Usually you will not be able to get in or anything like that. So exposing SSH, 8550,000.
04:23
8550,000 for Jenkins to communicate over and talk to a container. And then you can comment it out, but you can actually tell the default shell when the container starts.
04:40
You can be bash or PowerShell, whatever you want. If you guys have any questions, please raise your hand and interrupt me anytime, okay? That's the file just for the container itself. So now this is the Docker file for the Jenkins life. So I'm going to run Jenkins in a container
05:00
that's going to manage all containers, all the holes. And the reason being I'm doing this, it is because it's easy to manage. You can brush your control. It's easy to test with your machines. So I sent in a couple installations. So I installed PowerShell here because I wanted to show you how it works on the machine also.
05:21
So you can install it anywhere. I have problems doing just downloading from a Git. I had to download it manually because Deviant, they do a lot of checks on it, so I had to do it manually. But in theory, you should be able to install it
05:40
via AppGet or whatever you're doing for the image. Install Pester, a couple of plugins is important. So the power of Jenkins, something called plugins, and usually what people do, and I will show you guys, people are actually going to the console and just start clicking on them.
06:00
Sometimes when they need to create a new Jenkins master, they have to do all this thing manually. So make sure when you're deploying Jenkins, you deploy plugins and you make sure you use version. They upgrade all the time, so it's usually a good practice to improve what version you're using. So you need to replicate this, and it's all point, you have to replicate.
06:23
These are plugins, a couple, there's a PowerShell plugin somewhere, okay, it's right here. So the PowerShell plugin is able to talk over, question? Is there a reason you're doing separate run commands? Yes, just explain to the people so people can see, but you can't put anything in one line.
06:40
You can actually put, install plugins and commas. The reason being this way, I just, it looks better on the screen. For people to explain, that was the only reason. You can actually condensate, as he was saying. I installed the PowerShell plugin, I installed the end unit plugin,
07:00
and this is for Pester. There is a, when you do a Pester test with Jenkins and you get the results back, you don't use end unit. It will tell everything, it's okay, good to go, even though you may have failures on it. So end unit, what it does let you to do, you just start the XML file, and I will show you guys how this works,
07:21
and then it will tell, okay, I got the XML, yes, I see an error, I failed the build. A couple plugins that you need for Jenkins and sending updates and exposed supports. So this is the Docker Jenkins file. Now, let's go into a little bit of what we're doing
07:49
for Kubernetes. What is Kubernetes? The way I can explain it better for people is, let's say you know somebody has 10 kids,
08:00
so your parent needs to make sure he knows, and you can only teach your mom or your dad, cannot be both. So let's say your dad needs to know what is he doing, did he do his homework, did he shower, did the other kids eat, did you eat, did he drop the keys off, so it's an orchestrator. So it makes sure everybody's on where they need to be,
08:22
or where they need to be at. So for example, if they're running a job, a website, and the website's running on that host, and that is present, it knows how to move those containers to hosts that are not utilized as much. So think about an orchestrator, and that's one of what I'm going to use Kubernetes here for.
08:44
To run Kubernetes, it's a lot of work to run the infrastructure, so I would recommend, if you guys are in the cloud, I use an Azure, GCP, AWS, AWS not yet, it's coming up. They do manage Kubernetes, so they manage all the infrastructure for you,
09:02
and the only thing you need to worry about is deploying your jobs and your services, your applications. It will go that route, you guys can't, but you can install it on-premises. There's a lot of stuff you need to take care of. It's a full-time job, just been upfront with you guys.
09:21
But Azure, GCP, they do a great job, you need to worry about it, and will go that route, and you can manage stuff on-prem from there. Keep that in mind. Okay, so let me, so what I'm going to run on my laptop is I'm going to something called Minikube. You download it, install it,
09:40
and it's a small version to do development, so that's all the things that you need to do for you. So what it does, what it really needs is you need to have installed, in this case, have virtual box installed. When you create the box,
10:01
it creates something called Minikube, and that's kind of the controller for everything that goes on inside your computer. All the other services are containers that I run, so I'm going to show you how many containers you need to run this. So I changed a lot of the presentation last night. I'm going to show you guys how to make it work with Windows 2019.
10:22
It got released, which version it was. One of the tracks that's released right now is the technical preview, so I'm going to use one in 2018, so to show you guys, it's pretty much simple. Hopefully it works. Okay, so let me, guys, show you now a little bit of Minikube.
10:45
So, and please tell me, Minikube has a dashboard, so you, let me make this bigger, and don't worry about taking notes too much.
11:03
If you go to my website, I'll put it back in there, all the step-by-step instructions how to do this is there, so don't worry about what did he do there, so you guys can actually look it up.
11:29
Okay. So the only thing you guys need to have installed is Minikube and Docker, even though you installed Docker and then you just installed Minikube, and the instructions are online.
11:41
It's not that difficult. What it does, you will see a lot of the options you have here, pretty much you have jobs, you have parts, services. We're going to focus on deployments and services for this session, it's a lot of stuff, but what we're going to do for what we need to do, we're going to create a deployment file and a service file.
12:01
The main difference is that deployment actually deploys what you wanted to deploy inside Kubernetes, and the service is the one that exposes what you want to expose to the open world. So Minikube just did a deployment, nobody will be able to get to this, but the service allowed me to expose something called a port to the open world.
12:22
So the deployment file is pretty simple. You tell it a name, you tell it what is the app you want to deploy, what is the image you want to use. I'm using Docker Hub, and I created this image based on the Docker file that I showed you guys earlier. This is the port I need to expose for the application.
12:41
The value mount, just to make sure I don't have persistent storage. As you may know, Docker, when you kill a container, it's gone, so you may want to make sure you have the structure somewhere else you can. When you spin it back in, it knows what you need to do. That's the deployment, and let me show you guys the service.
13:01
Service is pretty simple. This is what I'm exposing to pretty much to port the HTTP port, to connect to the GNLP port. So when you do a deployment, so qscale create,
13:21
and I'm going to give you the file name that we have here, Jenkins deployment. Now, before I do that, let me show you guys all the stuff that actually, so each line that you guys see here, it's a different container,
13:40
and it contains something for Kubernetes. This is all that it needs, just on my laptop, to run properly, to run Kubernetes. So just imagine running this in production, properly. So it's a bunch of service discovery, DNS, some stuff for DNS internally,
14:02
for externally, for storage, for PODs. That's kind of similar to like, in Azure, I forgot what they call it, but when you put it in a resource, so you put all the resources inside, I forgot what the name, but you just kind of put everything together. This is my application,
14:20
and this is all what I need for my application. So that's what happened with PODs, the dashboard, and a couple of items. This is funny. So now, let me show you guys the deployment first. So, I'm going to do kubectl, create,
14:45
and then the file, we call it Jenkins deployment, and it's going to create my deployment. So, and this is pretty quick, so if I go back to my deployments here.
15:02
So actually, deploy the container, it tells you how long ago. People usually have deployment with containers, how do I get log files? Kubernetes actually grabs all those for you, for free, pretty much. So the log files that they're exposed, you can get them here.
15:22
That's pretty cool. Because usually, you cannot get into a container, so you spin it out. There's a way to get into a container, but usually, you will not. But you need to troubleshoot something. This is a good way to do it. So we just did the deployment, and now we'll look at Docker. So Docker ps is to show you all the containers
15:43
running at the time. So you see my container running here, and I can get into that container from here. So it's a do Docker, exec interactive, and my container name, and let's say I want to run to bash.
16:01
So that's my container right here. So that's the, you see, inside my Jenkins container, I have running PowerShell right now, okay? So that's running inside Kubernetes. Now I'm going to spot the service. Let me get over here.
16:20
And to spot the service, I just use the old YAML file. You can be JSON, but I usually recommend people use YAML because you can actually, with YAML, you can actually have comments on it. So it's good to comment your code. Not a fan of JSON, really. For the reason. So now I create a service, okay?
16:42
So if we go back to the dashboard, we went to services. So we see the Jenkins servers, and we see all my internal endpoints that I have exposed right now. You get a host IP that's only accessible
17:01
when Kubernetes, so you cannot get, I cannot get to that IP at all from my laptop. So I had to use a pod endpoint to get into it. So let me, let's get into the, so the way you can find that out. kubectl cluster info, cluster IP right here.
17:33
And the port, I need to get the information for the port because the port that they expose is random,
17:41
and the reason being they expose you at random points through the one you gave. It's because the post can move to different hosts if the host dies, and you don't want to interfere with something that's running there so you know it's smart enough to know it's not using port 8080, and something that's used for 80, it will change the port to something that's not in use so you don't get conflicts.
18:01
That's another good thing about it. So I'm going to get that information now. So kubectl, get service, service. So you guys see a mapping? So you see how it's mapping 8080 to 3046.
18:25
The 31000 port right here, that port is the GNLP port, and you have to make sure that's not random for security reasons because it can change some Jenkins, I will show all this in a few,
18:42
but that's one of the key things when you're working with this. Make sure the port is actually always the same one to communicate over. So I'm going to grab the port, the IP that I have.
19:37
Yes, thank you.
19:51
It's taking too long, let's see what's going on. 3846, let me see, I have notes in here
20:01
just in case this is what's going to happen. I mean, I'll be using, let me check really quick. Let me see what's going on. I'm most likely using the wrong IP.
20:26
I'm using the right, I'm using the right. No 104, no 39, no 130.
21:00
Make sure the content is started properly. Just want to see if that's the correct, oh, I think it's the wrong IP.
21:21
I just want to make sure I can turn that to it. Okay, so that's not right. And I just did this now like five,
21:41
like 10 minutes ago, it's the first time. Really, I may be using the wrong IP. Just one second, yeah.
22:01
Yeah, it's the IP address of the mini cube. It's because I'm using mini cube and I have to use the IP address of the mini cube. So the first thing when you get, this is the first time Jenkins started up. You just need to install it. And even if you run it from the container itself, you do talk and run at the container.
22:20
This is what you get. You need to get that administrator password. And the good thing about here is what I showed you guys before is you go to deployment and go to logs. That is the secret. There's only one time, so don't worry about this on the screen. It will never work again. It doesn't do anything crazy.
22:41
You just copy and paste it there. Continue. It will ask you to configure for the first time. It will ask you to configure for the admin stuff. It's offline right now because of the internet, but if you need to install more plugins, you can do it from there.
23:03
Just go to the admin, admin, admin address. Save and finish. And start using Jenkins. So forget about Kubernetes. What we just did right now, that's what it takes to do this.
23:22
It's pretty much a minute to set this up. And now let's start creating jobs. So, and the way Jenkins works, and before we go there, I forgot, I just, what I told you guys to forget about the security, the port. You go to global security,
23:40
and TCP port for GNLP. I'm just going to change it for 31,000. And the reason I didn't use 50,000, Kubernetes by default Minikube doesn't let you expose a port above 30,000 something. So I had to change it to 31,000.
24:01
If there's a way to make it work with 50,000, but you have to make configuration changes. I didn't want to worry about it. So that's the first thing you need to do. So the good thing here is that you can even run jobs in the master.
24:21
Or you can have workers. It's better to run the jobs in the workers and the master, because if the master is serving a lot of different jobs, it may get bogged down. So you usually want to spin a different containers to do your job, or a different post to do your jobs. So now let's, we're going to configure one of the windows,
24:44
the windows host now. So the first thing we need to do is when you go to manage Jenkins, then you go to manage nodes. This is your master. And then you do new nodes.
25:00
I want to call it Windows 2019. Check permanent agent. The description, the number, securities, how many jobs can it run at the same time. So you can do one, I don't know, 10, whatever. The remote root directory,
25:21
it's pretty much tells you it's where it puts all the files that Jenkins creates. So it's all your logs, all that stuff, and it goes graphics from there. So you have a security, a company that gives a lot of security and they send the logs to certain places. You can actually point them there.
25:42
Or you can get the logs to your, whatever you guys use for monitoring your companies. So in this case, I actually put it on, let's see, Jenkins, I created a folder there. The label is important. This is how it knows when you create a job. You tell it, I want to run this job on this node.
26:03
Because you have something that's only Unix, Linux, and now let's say you need to run Python and it's Python running on Linux. You may want to make sure you point it to the right place. So Windows 2019. I'll leave the defaults in here and just save it.
26:24
So we just created here. Now we have to make sure it communicates. You can actually, what I'm going to show you is the GUI version, but you can see the command and you can do it via command line, via DSC. When you're configured, you know, so check for error. If you know your parameters, you can do this via that way.
26:41
So you don't need to log into a box. Let me see, I can't make this bigger, okay. So I'm just going to open the browser. And I'm going to go to that, let me open it here first on Chrome. Let me go to the IP.
27:19
Just want to make sure it opens.
27:21
What I had done here beforehand, so now do this in production or whatever. The firewall is disabled on 2019. A different firewall, USC, I think, put in the minimum. Install Java. So Java has actually installed, you can, by default, you can let it be the default.
27:40
I usually like to control it. So in this case, Java is installed on C Java. And this thing should download from the internet from java.com. Do the offline installer. There is something here that you guys need to be aware of when you guys doing this. This. When I started doing this, it took me like a whole day to figure out why it was not working.
28:01
I said this will never work because it's Windows. I was actually playing with Windows. It was actually my fault. See all Java downloads. So you guys see here. So that version is a 32-bit version of it. If you're trying to use PowerShell,
28:20
it will not work with 64. It will give you a bunch of errors. So make sure you download the offline version 64-bit. So that way you can make sure PowerShell goes over 64-bit. That's what you're using by default. You need stuff for 32-bit, just use 32, but usually I find better to use the 64-bit version for that.
28:42
Make sure that that's a good thing. And now, let me, let me just get this. Let's go over here. And I go back to my notes.
29:19
So you click on it.
29:22
As you see here, it will give you, to install it from the browser, but you can create a service. If you want to do this via DSC or Chef or whatever, this is the command that you pretty much will need for that. And the only thing you will need to change
29:40
depending on, this will need to be parameterized based on the label name that you have. Go ahead. No, that doesn't exist until you click there. You have to create a note first. On the note, so I want to show you Jenkins.
30:00
The good thing about Jenkins, what I show you is because step by step, but there's something called a Jenkins file, and you can put everything in code, and you can version control that too. So this pretty much what you need. So what I'm going to do is launch in here. It's going to launch Java.
30:21
I'm going to show this up again. And it will try to communicate over there. It's running protocol, and hopefully this works. Yeah, connected, right, finally.
30:41
It's a pain in the neck to get this part working. And the reason being is because of the port where I told you guys about the port, I suppose. After it gets this, you guys click on File. You guys can see install as a service. So this is a good thing about it. But you can create a service. There's a command, a partial command on 29, I think it's on 29.16 too.
31:01
Create a service, and you can use that one, and just pass what you're gonna need. So this will create a service. And now if we look back to our, here's where it says how to refresh. This should be now red.
31:23
In sync. In sync, sync. Okay, so you guys see right there, it's actually talking right now. So let's test this really quick. So to create a job, using your name. You guys want to,
31:40
so the Freestyle project is pretty manual. The pipeline is what you want to learn. Pipeline is you need to know Groovy. It's not that much different from PowerShell. But this is how it comes, you have to become a cross-stack engineer. I don't know Groovy, so I cannot copy and paste from the internet.
32:00
It works for me. So I'm just telling you why. They work for like, just look for examples. Look for examples, and a lot of people have write stuff already. So you know a language. Google it, paste it, and see what happen. That's the way I've been learning this stuff. Don't, oh yeah, that's true too. So you got examples of stuff.
32:22
I will show you guys that last, and you guys see this is not that difficult. Maybe difficult for me. So I'm just going to call it test for now. There is the registry where this project can run.
32:40
So it will auto-complete. So in this case, we have 2019. And make sure you remove space. Actually, I do that. So that's the way it should look. It should look when it's actually talking fine. And the good thing is how to add a build step, and you want to use bash, there's Windows Bash in there. And I never use it, but let's do something simple.
33:02
Okay, command, and apply. And save the job. So this will actually work PowerShell over Java. And if I build now, hopefully this works. If not, we figure it out. So you will see, yeah, this thing was quick actually.
33:23
Wow. You will get all the resources there, like that. So now just imagine, and this is where, just imagine, I just run a command over there. So imagine what you can do for this now. You can schedule stuff from Jenkins. You can, let's say you have decon jobs. You want something run, it comes every Friday.
33:42
Dump it in here, schedule it. Just, you can pass parameters on the jobs. Let's say you want to build servers. Hey, this is a good place to build. If you don't have a centralized place to build servers, this is a good place to build servers. The first thing I ask, and this is the view about it.
34:03
So, the Jenga Credentials Store. Let me see if it's configured. You see credentials here. So if I add credentials, you can add different type of credentials and you can add them here.
34:23
So you can add your SSH keys, all that stuff. It's obfuscated on the database. It doesn't rotate, but you can actually, you have something like HashiCorp Vault Server, or whatever you keep your secret secrets on, and you have API, it can go reach the API,
34:41
encrypt it in here, and then you pass it down to your commands. So you can do it different ways. This is easy. You need like a simple authentication. You guys are going to use open SSH. Just put your keys in here. Just make sure you take the measures to rotate those keys
35:00
and be, it's a little scary, so it's encrypted at rest and encrypted in transit. So keep that in mind. And that's pretty important for everybody here, especially now, and it's everything, our job security. I think our company now secretes the number one priority.
35:24
They have a lot of plugins for Azure, AWS also. So you have some, let me show you guys. This is the video about Jenkins. Jenkins plugins.
35:49
Just type something like, let's see what they have for PowerShell. I think it's only one. But they have, I wonder if I can, platforms.
36:03
Yeah, I don't know. I don't want to say over 1,000 plugins. More than that. So something you're trying to do, mspill and unit. Anything you think you're doing in your company and you're trying to do it yourself, go look it up first here. Somebody had done it.
36:21
That's the video about this. That's the video about open source. Somebody had done the job done. I was the kind of person that it has to be me doing the job and it will tell me three weeks or four weeks to get it done. My boss doesn't even care about it. Like, but if I can get the same job done
36:41
and just to me like five minutes to Google it, I think you become more efficient. So try to use what the community has written. Allow, same with PowerShell and stuff. Don't be the one, it has to be me. You will get the crate. Don't worry about it. You will get the crate in your company too because you found it or whatever. But it's a bunch of stuff that you can do here.
37:03
So that's a good thing. Keep that in mind also. So let's see if we can get this working out on. Now let's try to run it on PowerShell Core now that we know it runs on Windows PowerShell. I'm going to create a new job.
37:21
How much time do we have? 10 minutes, okay. I'm just going to do, I'm just going to call it, PowerShell, PowerShell Core. First start job. So the other thing I'm not doing here
37:41
because the internet measures you using source control. You put all your stuff in Git. Whatever you guys use GitHub and it integrates. So you're using GitHub, Bitbucket, I don't know what else out there. You're just uploading for it. And every time you do a merge into your branch, you can actually, the job will keep by itself and it will do all this build. So whenever you want to test your code using Pester
38:02
or something like that, do unit testing, it's a great place to do it. Because it will do it, it will give you about the results and the beauty about it is like people will know who broke the pipeline. So there's a command called get blame even though we're not supposed to, this is supposed to be open-ended but it's supposed to, there's a command called get blame so you know who broke it.
38:21
So even though it's supposed to be open and no blame and all that thing, it's a funny command. And then what we do here is a little bit different. Windows PowerShell will not work. So you have to do bash. And where's my bash, execute.
38:44
Oh, this is great, I think. Oh, execute shell. The default shell is something, it's console, it's not bash. So just you have to make sure you do pound, estimation point, being bash, whatever.
39:01
So keep that in mind. I have a couple of experiences with that. So you do polish command. And let's do, I think the syntax is like this. You know what? I have it actually, I'm not going to screw it up so let me.
39:25
Oh yeah, I have it here, hold on. Let's do something simple. I'm going to graph organic stuff, so actually I'm just going to copy this. Here, it's going to do something similar
39:45
we do over there. So that way you guys know I'm not pushing. Get command. Am I missing something? What's that? I will tell you what it's trying to run.
40:01
So what we, yes, yes, yes, yes, yes. Oh, that's fine, we'll do the default. We'll do master, I don't specify it. I think you can specify, I have never done it. So let me run this first if it doesn't work. We specify. Run the Java, it failed. Okay, good, let's see what happened.
40:28
If system can, okay, so it's, because it's running on Windows 2019. I read the logs, it's Java logs, I hated Java logs because it gives you a bunch of stuff.
40:42
And I'm like, you know, I don't want to deal with it, but then you start looking at it. Usually you read the top. That's pretty much it, that you figure out your errors. You pretty much, as I said, I had to specify where to run it from. Rest is, let me see if this works, if I do master.
41:02
Yeah, master will work, okay, just agreeing. As you see, see what it got wrong. Also you see what command.
41:21
You can obfuscate also, like the output, so you don't need to want to show something for whatever reason, you can do that. The other thing that's a funny fact about this, you see how it's blue instead of green? In Japan, this is the person I created, Jenkins,
41:41
somewhere over there, and in Japan, blue is actually gold. So you can change the color if you want, you can change it to green, but usually red is bad, blue is gold. Different cultures, amazing. Okay, and you see here how we did,
42:00
we now take the next secure. So right now, if I had two here, if this job was busy doing something for half an hour, it will be able to run another one, but then the other jobs will stay there waiting. So that's why you want to give yourself enough room depending on what kind of machine you're running, you're running the stuff.
42:22
Containers, let me show you a pipeline, and hopefully it works really quick. And you guys see how this is different. So you have to try a sample script. There are a couple in there.
42:41
I have this one that I was using this morning. So I will explain really quick. You need pipeline on top. You can read about it, but node is what node you want. So instead of what we did manually,
43:01
you tell it what node you want to run on. Stage is just a name, so it will be unit testing. You want to test first step, it could be a spin-up, container X, or maybe I want to check if my machine has X, Y, and Z. So this is just names, you can call it whatever. And you will see.
43:22
Then you are running in bulk operational evaluation. I don't know if it's in 2019, so we're going to try and see if it works. And this should fail because I didn't put the file in there on the Windows host. You just apply it. Make sure you use VS Code for the syntax of the stuff.
43:43
Let's see, it failed, okay. Expecting, okay, let's see what happened. How to make? In 2019. In that, okay.
44:02
Back to project, configure. Oh, yeah, this is why you had a previous. I will not have noticed that. Let me build now, and hopefully the job will pop up here.
44:21
So you see, this is one of my stages, I call it. So you know, if you're building servers, say install X, install Y, join to domain, do X, remove, or remove whatever. This was supposed to fail, but whatever. But you see, so I did operation evaluation, so you get all this stuff. Actually, it does work on here,
44:42
and then you should have to see it won't fail because the script didn't run by whatever. That's it. You have any questions outside here? Let me know. It's right, just download a container, spin it up. You just took commands, it's a lot of information out there. Let me pull back my information here.
45:10
Okay, that is my information.
45:24
And on my website, you can see all the stuff step by step. Go ahead.
45:45
Yeah, there's other tools you can put on top of it. I think there's a tool called release management that can actually go and talk to all these endpoints that you may have. But I think it can talk to all these endpoints. It depends what you have these guys need,
46:03
and how good they are. But you can do it from Jenkins. Jenkins can talk to everything, pretty much. Everything that you have, you have the protocols, OpenSSH, WinRM, E-Works, WinRM2. It's a little more with the credentials and stuff.
46:23
The NLP, so as long as you can communicate with API or something, you can do whatever. Okay, thank you very much.