Bolt - A must have devops tool form puppet | D谩niel Ern艖 Szab贸 | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Bolt - A must have devops tool form puppet

teacher avatar D谩niel Ern艖 Szab贸, Pythonista in the making

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

16 Lessons (1h 39m)
    • 1. Bolt Introduction

    • 2. Bolt Environment and Gitrepo

    • 3. Bolt Installation on Win and Lin

    • 4. Bolt Initialize project

    • 5. Bolt Inventory file

    • 6. Bolt Commands, Scripts, files

    • 7. Bolt Writing your own tasks

    • 8. Bolt Metadata

    • 9. Basic Plan

    • 10. Bolt Advanced plan v1

    • 11. Bolt Advanced plan v2

    • 12. Bolt Powershell script as task

    • 13. Bolt Apply manifests via plans

    • 14. Bolt Deploy packages with plans

    • 15. Bolt Install bolt on MacOS

    • 16. Bolt The End

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class


This course is an introductory course on the bolt tool from puppet. This is a tool which is very similar to ansible, it allows you to automate most of the aspects of your daily work from a single node. In this course we will build up the knowledge that allows you to utilize this tool to its full potential. We will start with an environment setup, then go through from the very basics to the most advanced use cases of bolt. This course is intended to anyone who wants to make their lives easier and go with the devops flow.

Course material

See you in my first video.



Meet Your Teacher

Teacher Profile Image

D谩niel Ern艖 Szab贸

Pythonista in the making


Hello, I'm Dániel Ernő.

I currently work as a devops engineer. I have several years of experience with various platforms and I'm here to teach some advanced techniques which may attribute your job security ;)



See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Bolt Introduction: Hello there and welcome to a course on board from Puppet. So basically, this is an open society automation solution, and it allows you to ultimate from simple tasks or comments toe very complex work flows. And, um, this is something which is really powerful in a way that it allows you to create. Redistribute about projects that you can share with your colleagues, or you can use those projects to set up in the environment for developers and so on. And if you are family are with puppet or answerable, the concepts will be very similar. So it's closer to puppet than an zieba because it uses puppet. As, let's say, the foundation. And, ah, it's steel allows you to create a flexible solution that commodity accommodate your needs. And in this guide, we are going to take a look at how we can install board on different environments what we can do with boards from simple commands to complex tasks or work flows. We are going to see the nifty detests of configuration off both and how you can create your own project, and basically we recover most of the aspect of the communique. All of the documentation and this is going to give you a foundation to cope with your old own automation problems. And if you are into the double password with a little experience or no experience, as you are just starting out this journey, then I think this is the right course. Any too happy get started, See you in the next. 2. Bolt Environment and Gitrepo: Hello there. And welcome to my video on the environment and the supporting it have repository. So recently I started making courses with ah regards to the feedbacks to my students. So I believe it's easier to reproduce the tasks or the actions that are performed in each course if there is a supporting document or documentation, and I would like to make this freely available, So basically I have created a repository and get hub. This has a read me. And under the Guise folder you will find Guide related the most of the videos where I feel like it's necessary to highlight what are the steps that are performed and maybe additional information which may not be in the documentation. Okay, so how will our environment look like? So for line looks amusing. Cento a seven and this is a very small machine. It has two gigs, a fram to see peak or so I think. Nowadays, most off the laptops that we have have enough resources to reproduce them, and we are going to use a Windows machine which has four gigs of ram and to process, of course, and this will provide you with, let's say, Ah, well, the demonstration off the capabilities and as to what we can do with the bold and the solution regards to automation. So see you in the next video. 3. Bolt Installation on Win and Lin: Hello there. And welcome back. The time has come for us. Now, toe, take a look at how we can install the board onto our line looks and windows machines. So I have booted up my center, let's say, and 2019 a machine. And, um what, I feel like I need to mention you is that under the virtual network editor grabbed the window for you. So I have created an extra richer network, and I'm using that to allow direct communication between the two were trapped machines or any wheelchair machine that I create on my system are going to be able to directly communicate with each other and ah, yeah, So that's what I wanted to tell you. So first, we are going to start out by installing it on the center s machine. So let's ssh into Santo S A and I have working. Ah, let's say name resolution because I have a dated my hosts file on the windows machine and I'm using the Commander, which is Ah, let me show you. It's a consul, amily later for Windows, which I think it's pretty nice. Back in the days when I was attending University, I got to be familiar with the quake style. Ah, common prompt online X and this is really family are to that end. For whatever reason, I just stuck using it. So let's see what we can do. So on line looks you have to Commons that you need to use If you are using center a seven, then you need to use the following command to download and install the RPM. And I need to specify the password for this. And after it was installed, we can use the pseudo um, you still but Pitt. What? That's why. So it will not keep asking us if we except the G PG signature and whatever or what not. So until it completes, we are going to look into the Windows machine and not see how this fares. Great. Now we are in business, so we need to grab an Internet explorer and I have the git repository and it is going to have a link for the address that you need to copy paste years. So don't worry. You can follow based on leased the exact er version that we would like to, So yeah, when windows you may need to add This has an exception, but after you have added it, it will ask you if you want to save this, it will run a security scam hand after the line X one has completed, we will see that the board dash dash have is available for us. So basically, in the next video, we're going to initialize project and I'm going to explain you how the for the structure looks like what kind of options are available. But for now we should make sure that it's it. It is installed on windows as well. So what? I would like to do a store so ensure death. My pink for Santo s A is working and 2019 a is working as well So the same needs to be done on the windows and for days we need to open a common prompt as administrator and go to the C windows systems. 32 drivers at sea hosts and hear what you will see that we have this name resolution for 2019 A and sent us A as well. So it it should be working and it will be working once this completes and ah, online looks you saw that I was able to issue the board command without any modification to the path worry able because it did it automatically. So if I call the buff, then we will see that the which port lives on the user local bin, which is already Oh, my pass. Worry about This is why I'm able to issue the board command now from puppet O R on Windows . Sorry, What I need to do is tow ish. Open the city and that CPR. So seize the, um, that CPL. Which is basically the short for the Explorer, right click properties, advanced system settings. Man, what I would like to do is to add the path for the installation. So if you have downloaded the 64 bit version, it will live under the program fights. If you downloaded a 32 bit version, it will live under the x x 86. And to be honest, I'm not sure if it if there is a set two bit version for Windows. But what we need to do is to go on the environment. Variables path, new based backslash. Okay, Okay, Okay. Okay. Okay. And now it will not recognize it unless I open a new prompt, so now you can see that this is thinking on something. So in my experience on Windows, it's a little bit slower because I don't know, because maybe it's ah line X native tool, and it is just happened to be compatible with windows. But ah, as far as this video is concerned, the our task is now concluded. In the next video, we are going to take a look at how projects look like and how we could initialize a new project, tea and the next. 4. Bolt Initialize project: Hello there. And welcome back in the studio, we are going to initialize our first project with the half of board. Let me just my microphone. So basically what we would like to know O r. We would like to acquire its knowledge after the end of this video is how you can create the plane you project and we will see it for both we nose and line X machines. So let's start out with a line looks. So that's clear the screen. And with board project I mean it. We will have created something which is called Board camera in the current folder. And what's more important is that we have afford er under our home directory, which is called Puppet Labs and Puppet Labs Board. So what you need to know about projects is that that is ah, um, user white configuration, a global configuration and a project white configuration. And you need to make sure that you were aware off these. So if you want a system wide configuration, you would configured at sea puppet the labs board and placed configurations here when you initialize when you project these directories not created. So if I shoot the LSD shall it says no such five or directory. So the reason for this is that you may not always like to use your node with Bolt installed as some kind of master. No, There too reaches out the multiple nodes and configures them or what? And I think that's a perfectly viable reason. So for now, we are going to use with the use the user white configuration and ah, here. What you see is that we have the board Thiemo and basically this board Thiemo is a configuration five foot bold itself. And under the puppet labs, you will have the board directory menu, will have the analytics. And inside this analytics, you can tell board that you do not want to send any kind of analytics. So this birth true And, um, that's basically, but by the way, the default configuration looks like this. So we I project. So we have a project folder and it has it can have a puppet file, abort him a data so date I some thing is gonna imagine, like vari ables or configuration preferences with which modify the execution off tasks and modules. You have a new inventory which is basically the heart off everything that this project can do. And technically, what it does is that it directs bought to specific nodes with specific configuration as to how they can modify or execute the task that you intend to execute and you can have modules . And these modules are basically set of factions work flows that you can use to configure your systems. We will take a look at these in later we deal. Now, let's see what happens on Windows. So let me never get to my desktop folder and issued both project in it. And until it completes, I'm going toe open the documents, not the document. Sorry, the users for that and under the Reaper pie. If we, uh, configure the ruptures to show he don't fires, then we should have Oh, we do not have it. So basically on windows, it works a little bit differently. What I have used it was in order version due to a reminder mint. But basically what happened is that here we had a new folder which is called Puppet Laps. Huh? That puppet laps Whoa! Oh, so that I just simply cannot see it. So Puppet labs there and Bost. And here. Okay, then. This is kind of phenomenon version for that. Now that technically concludes our project initialization. The next time we are going to see what we can do regards toe gone for your ing this project toe run or execute specific amounts, say, in the next room. 5. Bolt Inventory file: hello there. And the way I come back in this video, the time has come for us to set up a basic inventory. So I would like to start from the beginning off, setting up a project. So board project in it. And what I would like to pal you is that by default, when you issue from a folder this command, it is going to create this. Let's collect analytics from you, my friend file. And if you want, you can disable this one with the fourth configuration item. But what is important for from board's perspective is that you either have the bold file overboard, dear, or you have a board camel. And if you created this board GMO in the current directory, then it doesn't matter where you define the directory or project five. If you execute commands from the specified fall ever where the board families, then it will look for inventories in the current for that, and that might cause you some headaches. So let's say we would like to remove this bold at Yemma and then navigate into the Puppet Labs Sport folder and here we can create our in man story that GMO five. What does this cement Auriemma if I hold? So this has the groups section inside the groups. We have a name which is Lennox. And this line is group has a target, which is gold. Santo s A on the Stargate has the config four an ssh connection. And this ssh connection is special because we would like to have the horse key check false set. So we do not want to care if the husky for the remote thorn is not the same as it used to be. We would just simply like to ignore this fact. And as long as our credentials are working, we would like to execute our commands, tasks, work flows, whatever. And we would like to have another group which is called Windows, and this Windows group is going to have the targets, which is the 2019 A and the Stargate have the configuration with the transport. We know that, and this transport winner will have a configuration, and this configuration will consist off the user, the password and a necessary configuration. So we set it false because ah, currently I do not have the configuration of the windows. So this is the different windows now. So let's go out out and create the create local user. So loco, you, uh, use uh okay, then add or him off You ther's? Oh, use ah, management. And we would like toa have another user, which is called What do we call it to be coming? We should call it as. Mm. How do we call it? We should call it the bolt. So new user board board Pop it the user Ford Boiled demo. And we say that the password is sport and user never expires with the password off bolt! Exclamation mark! Want to three World exclamation mark wanted three. Ah, it doesn't work. So let's a start exclamation on 2345 Mm. And it is working. And we would like to be this user, the member off the administrator group. And OK, so now we look off and after log off, we should be able to again just a verified this password, some bold puppet. Oh, yeah. Now this is working and we can go back to our configurations. Start, exclamation mark wanted 345 on. Bold as it is now, what we can do is to issue the bolt run command. And this should take care off running a specific, um, ump on our system. So let's start it with the lineups. I'll expect that key and target Leno's group. Oh, boy, this is targets. Okay, Now I am unanswerable user, which is running now. We should go and see if the windows is working and it is working. Apparently. So this is not the most that we can do it bought. But I would like to explain with you the details. So for Lennox, we have set up a password less out indication we are public e So this means that the SS age copy i d with Desh I and that s a sage i d. Harris a pub was he shoot against the Santo s A. And this means that we can simply go with the center s a command and into a log in to the remote system with Paki. An indication that this is why we do not have to specify Ah, password. When we would like to configure our in inventory, we would like to say that we don't care what the husky is. As long as we get in, we are good to go for Windows. It's a little bit different because it uses winner him and win a room requires us to use ah specified configuration. And this configuration can be either user or password authentication or sad, difficult indication that is not covered in this course. But based on ling documentation, you should be able tow cope with this problem and that we are using SSL Force because we do not encrypt. We'd ssl our winner, um, comments or transfers and we may be able to Ron more exquisite commands. So now what we did is to created them directory under the sea. So if you call this pc see, we have them directory with our specific users permissions. So if you go on their properties and security, you will see that this was created with the credentials that we have provided. And as far as this video goes, I think we need to stop here and leave the rest for the next video. See you in the next time 6. Bolt Commands, Scripts, files: Hello there. And welcome back. Since we have already got an inventory defined under the let's see puppet board Invent Auriemma, What we can do now is to start running Commons. So for line of systems, we have the why is it looking like that? Oh, boy, let's look at it with re I great. So for line of systems, we have the ssh key based authentication and for window system, we have the winner. I'm out authentication, but board is Ah, let's say more sophisticated than that. So I couldn't leave you say that board common, Ron, we specified a Komen, Who am I? We need to specify targets. And the stargates can be individual hosts groups. Or we have a jolly joker, which is all. But this assumes that you are running a common which is ah, able to run on each system. So there are comments which running windows that are commands with China line accents on but basically this ah, who are rises kind officially joker. In this case, what you can also do is do not rely on your inventory, but say that you would like to use the ssh Protocol to run on the center s A and you specify the user and it's it's an symbol and the password which is answerable and the no host he check. And the basically this gives you an opportunity to run common on a remote system which is not in your inventory. If it's an imminent is it is in your inventory. Then you will get this warning that these may be over redone based on the inventory. But if everything is correct, I have a raspberry pi in the kitchen. Yeah, and it seems to be reachable. So let's see this one. So 1 92 1680 that 1 50 and whoa, This is also working. So I have added the answer by user and it has the default password. But it is just a demonstration that you do not need to have the host against which you would like to execute in Yuri Mentor If I and the same goes for Windows systems, so what? Goemon run? I don't know set best star gets and this is Winner um, and 2019 a. The user is bored and the pastor distort exclamation mark wanted 345 and we need to call it that. But this should also work or not. So Mm. Because when we are using windows, we have the winner and for http and https and ah, we need to add the no ssl are human. So no SSL that's a direct We win around to communicate. We are the http port and this should be more aligned with what we would like to achieve. Ah, come on. So, basically, that's it. If you are stuck with a common or you don't get the desired old foot, then what you can do is to add the date dish help, and it would try to give you back the results that you require. What ask can you do? You may want to run a script on the remote system and this can be a power shell script, a bash script, the person with the bite asking the ruby script water very free, like running. So in order to do that, let's create a script. So my script dot s h. And you need to start this with the interpreter. So in my case is being bash, and we would just simply like to accord. This is running with the dollar sign zero and the dollar sign one. And what happens now if you'll run this? So let's issue the board Iran script. And it's called my script and we specified the argument First argument and we see that the targets this line looks Oh, sorry. So script run. And as you can see, we have the standard output. This is running. This is basically the location where the script is. Scope it before execution. And as you can see, we can specify arguments to this script. Now, let's create the PowerShares script. So test a PS one. And basically we would like toa right to deal with Put the PS version table and right to the oath put. This is cool. Now we have the test that PS one and we would like to target against the windows machines and we do not want to give it on argument, So test at P s. Well, and as you can see, we have the sisters collection such they were OK, so right, host? Yeah, there is a difference between right or Putin, right? Host and basically ah, it says that Ah, you would like to produce the oath put to the console. If you are using writers, if you're using writers, but then you can produce the Earth. Put through a pipeline basically, and let's see what our PS version table. And if you would like to run something with the dollar sign in it, we need to use the backslash as an escape character. So the PS version table is going to give us the power shell and the dotnet framework and we Emma frameworks version. So, as you can see, this is what in our collections hash table off course, you could create more sophisticated scripts. But basically, in this video we have covered how we can run Komen's How We Camera script and one I think that we need to cover is how we can upload fires. So let me check my cheat sheet. Uh, let's say we would like to upload. Ah, let's grab them by, get pig script. So get pip P. Y ah, get Pip. So no, we would like to distribute this script, and basically what we can do is to issue the board file upload, get the P y under the temp, and the tar gets his light looks great Now, under the temp. We should find the by P I What? What? Oh, yes. Ah, What? Oh, boy. Great. So let's create another directory test and try to upload it there. Ah, wait. Coun Now under the test, we should find it. Get rid that p y. And this has just demonstrated you an interesting problem. So if you are uploading something, you need to specify the fine Amos. Well, so if we say that we would like to have the gap boot that p I under the camp, then we should say that the destination fine name is get people p y The same goes for windows. So basically windows and see if we have such directory. So vm and we are getting there this pc, see dump water. So seek a long column backslash stamp backslash get peep that bu I and there you go. So as you can see, it's it's really easy to distribute fires with the half board and see you in the next video 7. Bolt Writing your own tasks: and load out and welcome back the bolt. So in the previous video, we have seen how we can run at a commands. We have seen how we can let's say the upload fires or execute scripts on remote systems. But what happens when you don't really want to type all those things out and you may want toe store them in a place where you can just simply invoke them? And for these board has two facilities that we want video for writing tasks in more yours, and there will be one example for writing plans in modules. So in this video we are going to talk about tasks and how we can write them. So board has the board task show common, and basically it is going to show you what kind of tax tasks are available on your system, and this is based oh, in your more Europe. So if you want to add a new task on this path, what we need to do is to go under the puppet labs under board, and here we would like to create a folder, which is called modules and inside modules. We will have a fire folder called application, and inside this application we will have a folder called Tasks and in the Tasks Folder. So the idea is to write ah task, which is able to deploy an application of the eight and application and ah un deploy an application. And ah, basically, what I'm going to mean by application is that we would like to write this task so it can grab a get abuser name and let's a hob repository and just simply deployed. So now first, we would like Toa create our deploy app script, and in order to do that, we need to open up a text, the detour and say that deploy So every task needs to have an interpreter, and we would like to run these in the Bash interpreter. So we're going to need the the she bang exclamation mark in front of our script. So this way, and how do we pass arguments or arguments to the tasks? What we need to remember is that every argument that you passed the task or a plan is going to manifest as an environment very able with the PT underscore graphics. So if you want to pass an argument which is called user, then we can reference it this way. In the script, if we want to pass an argument which is called reform, which is going to be the get have repository, then we can reference it this way. And basically, if you want to deploy this application, what we need to do is to make a directory or you can create your own for their structure. But here I would like to create director record EPS And inside this directory, this is a fresh deployment. We would like to remove any previous version off this application. So PT Repo and after we have removed it, we would like to change the directory toe home as a bow EPPS. And after that, what we can do s issue to get clone. And we would like to clone http s calling forward, slash Get help, not come forward slash pt user forward slash b p repo and the technically this is it. And now we are going to invoke our script. So how do we invoke the script or tasks in order to reference it? What we need to say is that we would like to run the board desk, run and then we give it the arguments. So our application Colin, Colin, deploy And we need to specify the report, which is going to be, Let's say, the vague grant serious and the user is going to be Reaper pie and the targets going to be sent the West A. And if everything works properly, what we should get back is that it has successfully deployed this application so executed this task. And if we are correct, then we can see under the home folder the Apse folder, and inside that the vagrant Siris for their So now we can deploy it. What we would like to do now is to create a task which can update the up. And here what we would like to do is to all also define our interpreter. So which bash? And we say that all we need to do to update the application assuming that we have it already deployed, is two CD under the folder. Andi PT Yep. And, uh, lets go. Let report just to be consistent and issue the get pull common. And now, if you want, we can say that we would like to update the repository vagrant Siri's and now I did. And if everything goes well, it will not do anything because there's the latest version of the repository. But basically you can see that this is working and, ah, let's say we would like toe on deploy the EP. Now we are also going to need the Bash interpreter and simply say that we would like to remove this folder p d repo. And if everything goes well, we can un deploy this application. Whoa! And it seems to be working. OK, but what happens when you would like to gain more insight as to what happens when you, for example, deploy an application? So there are two switches that you can provide. The one is called debug and the other is her boss and the figs execute. This is going to fail. But let's say the user equals Rieber pie. Well, yeah, now we should be able to deploy the application. So, as you can see, it is providing us detailed information. And ah, it is also submitting analytics toe the pop it because I didn't disable it. But technically what we are doing, we are initializing the connection. And what's interesting to me is that it is going toe upload this more you're to a temp folder And them that directory which has acuity. And if the upload is successful, then the command has returned successfully. Then we are executing with the argument, the deployment, our the task. And now we see the standard output from the cloning. And technically, this is it. So this is what happens behind the scenes. And that's all I wanted to show you about how you can create your own custom tasks. See you in the next form. 8. Bolt Metadata: we'll come back in this video. We're going to talk about math. A data. So when you show the common off board task show what you see here now is that we have our application deploy up, update up, whatever. But when you issue disco manned with the task name, you basically don't back get back a detailed information as to what it is. Four. Unlike when you are using, let's say the reputation. So if we replace this common, what you see is that it has espera meters which explained to you what bottom eaters that this task can get. So in order to provide our task with such definition, what we need to do is to create Jason fire with the same name as the task. So we I am deployed app that Jason and inside this Jason up, we need to create a valid Jason document. And basically we provide description and we say that this is going to deploy up from user dollars NPT user and people dollar sign PT Repo. All right, now what we can do as well all don't let save it. So we should define this supports no up and we say that this is true. We will get back later to what this is and how you can use it. They input method is the standard input and ah, there is no understand underscore And we need to define the para meters And this perimeters are going to be also in this Jason style format. So we say that this task has a perimeter which is called Use that and this user has the description which states that the get hub user which we want to use and it has a specific type which is going to be string in our case. All right, now we have another perimeter when we are deploying and this is called Repo and this triple has the description. We says that the report from the get hub he was there and this has a type which is also a string and technically this should be it. So now if we issue the show command, we should have these detailed para meters, which makes it easier to understand for someone as how to use this task if they didn't write this task and ah, basically we can and should define for all our tasks and plans this document because this is what makes the definition concise. Off course there is ah, overhead. Because if you modify the task and it changes like the perimeters or the way this dust should be utilized, then off course, Um, you should abate this definition as well. So let's get the deploy after Jason. And here What we would like to do is to create a V I update. App touches, um, and just based it. Oh, boy. So it may be easier if we just go with you in a seeping and santo us a and navigate under the directory and created there. Um, yeah, yeah, yeah. Well, you were able to do that. So, puppet, where are we? Puppet labs. Great. Now board more yours. Obligation task, man. We create a new fire, which is on the ploy the EP. But Jason and this is going to on the ploy de ep from Repo. And we are only going to take one argument, which is the repository, and we would like to save these changes and let's just go back to our consul. So if it go back here and see the half for the UN deploy app you see that? It shows that we need to specify the report name from the get abuser as a string. And finally, we would like to create this sport for the did that, uh, of the step. So of the help that Jason, Um, great. This is going to a bit the EP from Repo, and we need to specify the report. All right, now Ah, the gives us back this response and ah, this ah idea or methodology goes behind plans as well, but we're going to go back to that in one of the next videos. So that was all I wanted to show you about Mata data and see you in the next time. 9. Basic Plan: hello there and the welcoming. The time has come for us now to improve our capabilities regarding board. So in this video, I'm going to show you how you can create a simple plan. So physically plans are, let's say, ah, conscious con collection off tasks that you want to perform consecutively to achieve a desired goal. And basically, you can imagine it like the deployment often application and upgrade often application, for example, if you have a Web application, which is, uh, behind load balancers and running a multiple nodes. Then before the application is updated on one of the notes, you may want to disable the old unanswered for traffic to the node that's being upgraded so you can do a rolling update or upgrade and so on. So plans live in the same folder inside the module as the tasks tasks, so what you can do is to create the plan's folder, Romney said. Plan's folder. I say we would like to create Ah, I don't know. Hello that pp. And basically, if he go here, we can say that this is the plan off the application withheld own and here what we are going toe have is a target spec, which will be the targets that we define. After that, we can specify to Ron Command. And this command would be Ah, that's the time on the targets. And we may want to run a command, which is who am I on the targets? And if you save it on, just make sure to check it once again. Ah, we can run the following plan this way. So bored. Plame Ron Application. Hello And the targets. Ah, Santo s a And if everything goes well, we can see that the common started the commonest finished and so on. And ah, what you don't see here is basically return value. So what happens when you run a task behind or within a plan is that it gets executed. But the off but is not really Let's say provided to you. So one way to go about it is to specify the debug vor boss, and this should give you ah, a little bit of insight as to what you see on the standard output after each command. But if you want ah, you can specify a return command and this return command is or can be around command or on task and so on. So let's say around command is going to be the present working directory on the targets. And if you run this now, the difference in the oath put if we don't use the d back and the verbals, we'll be the following. So currently, what you see is that we have finished on Santa S A and the present working directory is the home answerable. So this was just, ah, simple the demonstration. But in the next video, we are going toe. Let's a pitch it up one level and create something more complicated or complex See in the next room. 10. Bolt Advanced plan v1: I load out and the welcoming. The time has come for us to create more advanced plan, which is going to deploy our application. So let's go lit up. Deploy that pp and we defined a plan as application up deploy. And what we need to say is that the target spec is going to be targets and we will have a string which is called Repo, and we will have another string which scored user. All right now what we can and should do is to define our ah, let's say steps that we want to perform when we are deploying this application. So we would like to run the command which is going toe m kader the home as a bow hips on the target servers. Then we would like to run a common which is going to see the into the home as a bill eps end. Get clone the https get help that come the Sri Po the that's user dash repo on the targets . And finally, when we are done, we would like to return with run Calmund l s dish all home as a bill EPs people from the targets. So if he did everything correctly. What we will see as the North board is that this represent Tory's clones. So now under the apse, we should see nothing because we have nothing and we should issue the board. Run, Ah, blend. You're in application up. Deploy the user is Reaper pie and the report is vig grand serious. And the targets are sent us a. All right now, As you can see, it has started and finished these commands. And now, if you look at our hips immigrant Siri's, we have the repository club. So this is one way to create advance the tasks or adverse plans. And, ah, this kind of shows you the concept. So plans are for solving MAWR or tackling MAWR complex problems, and they allow you to create a plan which, except specific targets, so you are not restricted to specify targets were very able. You could say that you want to rely on your inventory file and just at least these targets here. You can also say that you don't want to specify the repository or the user as an argument, but you want the hard coded, and that's perfectly fine and you have the option to run commands or on tasks. And in the next video, we can We will see how we can change tasks together it with the plans. So that was all I wanted to show you in this video. See you in the next one. 11. Bolt Advanced plan v2: load our and the white come back in the city. All the time has come for us to call a task from a plan and I'm going to show you how you can do that. So in one of the previous videos, we have created a task which will un deploy the application that we have just deployed. So, under the APs, we have this vagrant Siri's now named the application which was deployed, so we would like to create a plan which is able to undiplomatic. So now we were called this up on deploy the PP and we say that the plan is application ap on the floy and we say that the tar get spec its targets and we need a string which is going to be the report. Now. What we can and should do is the following. So we would like to create this Ron task and in the run task, we were specified application. I'm deploy and the targets are going to be the same. And the report will be whatever we specify on the cones or and now, if we go back and execute this plan so boat plan Ron application up on the ploy with the report which is equal to vagrant. Serious. And the targets we charge Cento s A We should see the following on the open. The plan has completed successfully. No results because we didn't specify a return, what we could have and maybe should have bought. We have successfully removed the folder and Ah, basically, that was all I wanted to show you in this video and see you in the maximum. 12. Bolt Powershell script as task: Hello there. And welcome back in this video, we are going toe Look at how we can configure your power Shit script which is intended to run on Windows systems and ah, use it as a task in our bolt environment. So this is really a powerful concept and it allows us Ah, quite a bit of flexibility, But it has some caveats that we need to be aware off. So let me just ah, pull up the power. Shall I seek Alonso and ah, let's write the script. So every decent power shell script make it bigger. So see, starts with the common let binding. This allows us to inherit many features that are beard within power show. And ah, these are going to be inherited by our scripts that right? So let's ah say that we would like to have three parameters. So the first thing that we define to the script is the perimeter, and we say that this is a mandatory perimeter, which is true and the position is one. Now we specify the perimeter Stipe and the perimeters name. So this is going to come from the system string class and this is going to specify a folder , and we would like to have another perimeter, which was specify a name, which is going to be the name off our five and the third perimeter, which is going to specify a message that we would write to write. We would like to write inside that folder. So now let's call it message. We need to change these values for the position toe the corresponding two and three. Now every power share script should have a begin a process and the end block in the big in process being block, you can specify steps that are performed before the actual execution happens. So what we would like to say is that if the folder does not exist, then we would say that right? Both put what? What's wrong with this? The PATH folder And we have it here. Come on. So this is our vain look and we would like to test if the folder exists. If math, we say that with a right old put folder, not present creating it Wreckers Eve. The because we might want to avoid the chance that someone specified in non existent folders. So we included. So how do we create a new folder. We used the new item Go Mandala and we say that the past is equal to our folder and the item type is directory and we would like to use the force switch. Otherwise, we say that folder already present setting file content. All right, so now we either had already folder or we have just created it and we need to use the set content Common left with the value, which is the message in the path which is going to be our folder plus backslash plus our name, which is the final game. And we would like to use the force So we over right every time. And we would like to use the verbals and ah puppet expects return cold after the execution off these power shift scripts. So, for example, if you face and Harrower we would return one. And if everything goes right, we either return zero or two. So we exit with zero and we say that the fold fire in the folder with the content Waas created All right now, before republic ties this, we would like to go to the script and try it out. So let's say that our folder is C temp. Both and we would like to have a fire test that the x t with the message. This is from Windows PS. Great. Now, if you go to the TEM directory and the board for their we would have the test. This is from Windows PCs. Okay, Now this script seems to be working the next thing that we need to do after we have gone through our line of system. So first we create the content that B s one and ah, I would rather like to created with the win a sippy So far, be it Lips boat, more U S application tasks. And here I creating you five called content that ps one. Great. Now we can copy the spot and just simply place. Okay, After we have saved it, it has successfully upload one. And what three means now is that we create our test definition. So does definition is a little bit tricky with power shell, but ah, if you learn the ropes, then it will become second hand or easier. So let's create the content that chase on and we have the description and this tusk creates a folder with fire with specific content. Now we would like to specify the input method and this should be power show. And we would like Toa specify that it supports no up true. And we would also like to specify the para meters and let's not forget the double quotes. So the first part a meter that we have this cold folder and for the perimeters basically description is the folder where we want the fire to live in. And this has a type which is string and you would like to have two more arguments are para meters so one to and the 2nd 1 is called name and basically this description will tell us that the five well, the message goes to on and we would have the message on and great. Now let's save it and take a look at it once again. So we have the name, the message, and I think we may be good to go, but let's see. So how do we run this? What we need to do is to issue the boat tusk rum, and we say that we would like to run the application contempt. Oh, first, let's ah se see it with the show. So application content and, as you can see, unexpected token at Well, there might be a people. So we have somewhere. Usually this is the hard spot when you are writing the Toxic Manifesto or matter. Datafile. Yeah, we didn't need those characters, but basically and now we have a decent description off the task that we would like to run. So let's run it Support task run application. Go on. And we say that the folder should be see Bolt and let's a message and the name should be boarding. And we say that the message is this is coming from another galaxy. And let's not forget our targets, Which is the 2019 A machine. Whoa! And it seems to be working. We have run successfully. And if we go back here and check see Dr Bolt message voting north bed. Well, so technically, this was what I wanted to show you. And ah, see you in the next time 13. Bolt Apply manifests via plans: Hello there and we'll come back in this video. I'm going to show you how you can utilize the manifests feature off puppet. We are bold plans. So the idea here is to create a manifest file which has the people extension under the Puppet Labs Board Born yours Application plan's folder, and we will call this create user, not BP. And what we would like to say that our plan is in the application and this is called Create User. We need to specify the target spec, which is going to be the targets, and we need to specify a string which is going to be user name. And after that we need to prepare our let's say, destination where puppet is going to apply these manifest. Because in order to apply these manifests, we need to have puppet agent installed. And, um, in order to achieve that, we need to say the targets apply breath. And, uh, let me just spin up another machine for you. So I'm going to spin up the center was be machine just to see how this works. So now that we have applied the preparation steps, what we need to do is to create this conflict section and we would like to apply on the targets The following set off manifest so you can define any set off manifests. But basically, we would like to use the use of resource and inside issues a resource. We will say that we have a user name and this user name has to be present. So in short present after this user is present, what we also would like to do is to say that we set a default password. So it is different. Password is going to be I don't know what should it be? I a b c. I want 345 and the we also need to specify a shell and we would like to use the user been bash as the fortune. And we would also like to have ah, something which is called Home directory. So we will need defined home directory this way. So we say that our home dollars signed curly brackets or curly braces user name and it should be ensured that it is not present but the directory because if you specify ensure present, it would create a file. So what? We would also like to do is to set the owner of this directory, which will be out user name, and the group, which will be also our user name. Now, if we did everything correctly, we only need to modify our inventory file so you can see this in or let's just run it against the grand machine. And then I'm going to a detainment, terrified, and we run it against the newly spin up Santo US machine So bored. Run! Sorry. Plan rump application Create user. He was The name is going to be, I don't know, secret agent, and the targets are going to be Santo s A If everything goes correctly Oh yeah, and we need to run it as root. So if you want to run it through it, you need to make sure that you're either ah, past the password or you ah, set it up as ah pass for less pseudo for the specific user. And, um yeah, so, basically, now this is running the manifest. And if you specified I d secret agent, then we can see that our user is created and it also has the home folder. So basically, that's it. And, uh, let's just look at Ah, the Santo s B machine and we go back and edit our puppet labs. Bold inventory, Yemma and on our target, which is going to be San the U. S. A or B. So, Walt, run or dusk Run! Who am I? And targets Santo s B? Let's see if we have Oh, sorry, not task, but go Monday. Great. Now it seems to be working. What we need to do is to see if this asks for password. It is asking for password. So on center, A system what we can do is to edit our pseudo first file. And now, if you go back to almost the bottom off it, what do you can do is to add a new user. And this new user is called and civil and all. It was all no pursued or great. Now if I log off and log him, if I issued a pseudo so common it should be able to come on, give us the route prompt without password. And this is what we needed. Now what we can do is to run our plan and let's just change the target, which should be sent the west be and let's see what is happening. T Now this is installing Puppet and Geathers some facts on Santa S B. So if you check with the top it says that GM is now working pretty hard doing started openness packages. But after it completes, basically it is going toe. Apply the manifests. Andi, if you go back here and secret agent to the I d, then we have successfully deployed the new user. So in a nutshell, this is how you can apply manifests with both plans to your target machines and see you in the next. 14. Bolt Deploy packages with plans: Hello there and the work Come back in the city or we are going to create another plan We the manifest and this manifest is going toe Solve the situation for you when you need to deploy a specific package Teoh multiple line of systems and you don't want to go in and let's they care about what provider is there. So, for example, rpm's are installed yum or death packages with apt or force Ah, so say you're slash Ah, anti applies, then looks you could use the zip arising So we are going to create Ah, um deploy package manifest. And here, as usual, we were created the plan application deploy package and we would have the target spec which goes to the targets. We need a very able which will be a string and this we hold the package name and we would like to create this section and call the targets that apply prep And then we would like to apply to our targets on the following So we would like to have the package resource and this package resource is going to install whatever package with specified to it. So let's say this is just a package name and we would like to ensure that this package is installed. And if you save it, we can use the both plan run application, deploy package, package, name and basically this will be called by Tone three and we would have the targets sent the west A and, ah, don't forget to run as route because we need to ah, used am which requires reroute privileges to apply this change. So to install the fight on three package. But after this is completed, you will see that in your interpreter you can type bite on three and you have a 3.6 point eight installed. So basically that is or I wanted to show you in this video, see you in. 15. Bolt Install bolt on MacOS: Hello there. And welcome back. This is my first bonus video. So I would like to show you how you can install board on basically ah, Mac OS systems and ah, we are going toe. Ah, See, in the two ways that allow us to in store this kind off tool on Mac os Sorry and ah, there are two ways. The 1st 1 is to use home view and the second way, which is maybe easier. Maybe not, but misused the DMG file that is provided by puppet. So if you look at the install page, you will find here the Puppet Board latest that the M G and after it was downloaded. What we can do is to open up the installer, packaged. My course is going to very fight for us. And after it is verified it for us, we can double click it. Continue, continue enter our root password. And after the installation has completed, we can immediately start using it. So basically the same ah, method applies to using boredom Lennox, Mac os or Windows Systems and ah, what? Let's move it to trash. So what we would like to do hissed open up a terminal. See if the board as common, this working it seems to be working. And if you want, we can use the board project in it to initialize the foot pre act. It will remind us that it is going to call collect analytics which we can disable by editing this fire. But basically now what we can and would like to do is store on a common against the center s a machine. That is my line X machines. So in order for the name resolution toe work, I'm going to edit etc. Hosts fired. It will last for password because I'm doing this with pseudo and all. I'm going to do his standard I p address 50 62 Santos A and save it and just simply think. See if the ping off Santos is working. It seems to be working. And ah left me make this terminal a little bit bigger. Where is deformed? Is the phone on and just let's make it. I don't know. 26 and let's open up in your window. Great. So now Okay, close it, please. Thank you. So now what we can do is to issue some comments aboard gourmand And who am I and targets? Sorry, Does Dash Targets s message column? Send the US A and it's left. May bring it a bit down for you. So let's go back. So bored. Command Ron, Who am I targets? Ssh! Santo us A user is answerable, the password is answerable and if everything goes appropriately Ah, we should try Teoh. Try to use the hap. So as a sage answerable that Oh, I have ah, hunger in keyboard for know Michael's so at sign this is going to be a very nasty work around, but at me just co police on on and as about at cento us A. Well except the whole ski and the some dummy password. We don't care if it fares. All we care is the board is not going toe. Complain about the husky verification. There is, ah, common an argument that you can pass for unspecific target to accept the host key. But anyway so this seems to be working. So if you are online looks Windows or Mac Wesh, you are happy to your sport and I think this is really ah great to duty lies on your daily works because there might be cases when you don't really want to excess the jumps of management server to execute task on remote systems because your network infrastructure allows you and the world is, I think, pretty west that must have toe in every Devils. Engineers tow a set to you in the next room. 16. Bolt The End: welcome to the last city off the scores. So basically, and that is all I wanted to show you. And I would like to thank you for you in my course and make sure you leave a comment or feedback as to what you like or what you didn't like. So both of us can improve from this experience in this course. Ah, we have seen how we can basically set up board on multitudes off environments. So line looks, Windows and Mac OAS and how we can use it. So we went from running out of commands to creating tasks, creating plans, applying money, fasts and what not? And there are so many different ways that people are stretching this solution that it doesn't really matter to create. Ah, I don't know, five hour long course to show every aspect because even that way, there would be some spaces when you just simply couldn't cover it. And, ah, I wanted to create a course which allows you to get started with solution. And they tried to plant ideas for solving different club problems with the half off this product. And as a final word, I would encourage you to try and visit the official documentation because there's the best place to go where you will find most likely the answers for your questions. And ah, I would like to thank you for attending the scores and stay tuned for more seeing my next.