Okay, just checking if you can hear me, can you hear me okay, just check it, good to know, good to know. A couple of things I wanted to ask you, first of all is about certificates. I think for the cloud technologies program, there are certificates that should be available on the website that you may see already in the cloud genius website, let me just share my screen to see if I can actually show you what I'm talking about. So here we go, I'm sharing my screen and you should be able to see that site which is the cloud technologies site and somewhere on the idea where you have this dashboard website. This is a page for dashboard and that page should actually show you that you have a certificate available for download and this certificate by the way does not apply to Boeing, so Boeing is a separate discussion. Is this too small, I'm suspecting it is probably very small, so I'm going to make some adjustments here just a minute, okay this should be better and one more thing I wanted to do is to move out some of these elements that are not needed. So on this dashboard you can see some of the courses that you have like the cloud technologies course for example, that should show you that you have completed 100% and there should be a downloaded certificate available to you on that same site. So I wanted to make sure that all of you have access to it from that location that should drop down a PDF file, for example this PDF is downloaded, that's how you should be able to see it. If you want to see it live in the browser itself then you should enable plugin and enable the PDF viewer plugin if you're not seeing it online and then once you have that plugin downloaded it should just populate and show that certificate right in the browser itself and here is a certificate that you probably will see something like this. So that is one thing that I wanted to tell you about that you should be able to have that certificate already available to you for the program you just finished and that is one thing. The other thing is that for those of you who are taking this program through LTP under Boeing for example, for you the certificate required for submission should match exactly what you typed in the Boeing LTP program. So for that you should actually go to this site here which is the Bellevue College site and this applies only to those who are participating in the Boeing program, LTP program and so go to that site and here you log in and there you should be able to find out in the cloud technologies section, maybe I'm confused as to where exactly you get the certificate, maybe I've never actually been to that site but somewhere here after you log in there should be a sign-in button. So this sign-in button should allow you to actually download that certificate that Bellevue College provides and that is the one that you submit to the Boeing LTP program through your internal tools and that certificate you should actually get from this institution and that is a one that will apply to LTP for I don't know what they do but they do something important like make sure that they don't deduct money from your salary, those types of important things so you should want to make sure that they don't and the best way to do that to make sure that they do not deduct money from your salary is to provide this Bellevue College certificate in time to the LTP team make sure that you do that in time within the deadline there is a deadline for that you want to do that as quickly as possible and submit this certificate that you obtained from Bellevue College give it to them before the deadline otherwise you will start receiving emails that will say we will deduct the cost of this program from your salary and you don't want to have those emails coming to you so it is better to do this as soon as possible if you run into a problem email me we'll fix it we'll find out what to do and we'll go to Bellevue College I'll call them do whatever it takes but please do this as soon as possible and tell me positively that you have done it and that you have actually received a certificate that you should actually email me a copy also so send me a copy of this send me email my email you probably already have so what happened was they'll send you a link in email once you log in it takes you to the username and password so once you enter those two things on the right side it says my profile username password history and certificate list certificate list okay okay okay nice so I would like to see you know maybe you take a screenshot of where exactly you log in and send it to me that on later sometime that will be awesome yeah I'll do that yeah thank you and when you get the certificate send me a copy of the certificate and also when you submit that to LTP LTP should respond back saying accepted or rejected and just let me know that they actually accepted because that is what we want we don't want LTP to tell us that they will deduct from our salary and so that's the one thing I do not want you guys to just you know have somebody haunt you so make sure to do that in time and that's the correct location to get that LTP paper so that was the logistics thing that I wanted to tell you about this certificate by the way is also available to you if you if you want it you can hang it whatever you want I don't care but I don't think you are here for the certificate I think you are here to learn and so that is what I accomplish is to make sure that you actually learn yes we have we are an institution by by the state of Washington we are providing certificates because they ask us to do so but that's not what we really do yes we have a certificate and all that but that's not the point the point is we are we are getting the concept down making use of it in actual life in real life and that is what we intend to do so we were doing something like crazy stuff the other day right you remember just checking audio quality how is my audio can you hear me clear loud or is there a problem in the sound is it too low lower than usual sounds good from here good good good good just checking just checking because I'm recording it it should show you that I'm recording and then just checking who's available right now we have so today's Eid celebration so both of us what both Muhammad's are away we are recording this session for them as well so they will have a copy but everybody else I think is he is here okay one two three four five yeah okay let me who's missing sama okay sama is missing okay so I got that so let's let's proceed what we were doing the other day if you remember is that we had this exercise finished up until a point and so that point in that lesson sequence let's go that put that point and understand where that was if you remember we were using Chef server and you know this long weekend throws me off I just completely lose sight of my train of thought but let's go there and find out where we were here yes that's what we were doing okay so we were what we were basically doing the other day when I think many of you actually have completed this part that is actually awesome you have actually accomplished this test for validation of success so that's a recap what we did and you know with high speed I'll do it again don't worry but the point here is what we are trying to accomplish in this exercise is understanding at the real real nuts and bolts level how to deploy a service for the customer that is what we are really trying to do in our scenario we are delivering an application to this customer and under the hood this application will actually be a open source software called WordPress which requires certain dependencies and those as you know are these things and so we need to have these things and the WordPress application and all of it deployed and delivered in form of a service running on the cloud to this customer that's the ultimate idea what we have done up until now in the last session is that we have accomplished up to this point beginning from nothing okay absolutely nothing get a machine somewhere out in the cloud and just build the whole thing and then we tested and validated we tested that we have you know Linux machine Apache installed PHP correctly working and this MySQL database also running and not only that we are able to log on to this MySQL using our own chosen password that we I think in our example we chose 123 was the password and we have our root user for this MySQL database that we also have validated in fact I remember that I forgot to validate when I was running this exercise I forgot to validate whether the root password works I should have done that but I did not but you know many of you actually did that that is awesome you have pasted those details on how you actually accomplish this on your on the slack chat with me you have provided that output from the result that you actually ran successfully up to here up to this point and what I'm going to do now is quickly recap and resume up to this point because what I have accomplished over the course of this weekend the long weekend is that I have actually killed out those machines that we had in Amazon and digital ocean wherever we created them I killed them I don't there's no point leaving them running however however this chef server that we have still has all the things we need from a usage perspective it has all the books and all the roles and everything that we defined so if I sign in I should be able to find all that thing right in there and so what I want to be able to do is first of all correctly login and then check that my policy shows all these code books and the roles that we created the data bag item that we have the secret containing our secret which was the my sequel password or development mode and development environment and production environment so we have those then we also have this other users in a bag containing a user item for the user or user and with these group membership that you see here we have three environments defined in addition to the default environment and we have some clients that I ended up deleting because we don't need them because we destroyed the machines and that's the test that we did the other day now how do you get to that point again quickly that's what I would like to illustrate so you know the way you can accomplish that point is if you have a virtual machine that actually preserves all the state that you may have it is easy to actually accomplish that however in my example I was not using this computer so this virtual machine does not have that particular repository that we call the chef repo like we have this repository called chef-repo that we are working on that folder that we obtained from a basic skeleton we obtained from our manage.chef.io that's the place where we obtained this original starter kit and then we began building that kit to a point where we are able to accomplish up to this point up to this level where we have a stack going now what we need to now do is add some additional cookbooks and get this WordPress going and then we have a complete solution however this kit that I used the other day is sitting in another computer so I need to go to that computer and project from there instead instead of rejecting from this box we will you know I don't want to waste time so I would actually want to use and build upon the work that we did the other day I can do the whole thing here but that will be beginning from zero I would rather begin using what I already have in that chef repository and build on top to construct what we accomplish otherwise it is too much of repeated steps that I want to avoid so what I'm going to do is sign on to a different computer the meeting will keep on running here I will just you will just see two nileshes and one of them will be showing you and speaking to you the other one will just be recording so that this machine right now will be leaving we leave this one in recording mode you will leave it running I will now switch to the other machine so there is another nilesh coming online right now so please stand by as I switch the machines go So, in this machine, you should be able to see that I am joined in. I'm going to make this other Nilesh a presenter. Right now, I am not projecting, so I want to be able to project for which I am going to make this Nilesh a presenter of what I am going to show. So I'm seeing the other guy's screen, I'm going to just change to this as the presenter and manage participants and this other Nilesh make him a presenter. And I'm going to stop sharing from here. And on the other machine, I should be able to start sharing now. So here we go. Starting to share my screen, my desktop, my entire desktop should be visible to you. And now you should be able to tell me that you successfully see my screen, that you are able to see my virtual machine. Not yet. Not yet. Where is virtual machine? Not started. So here is the virtual machine that we were working the other day. And this one, I can quickly start and get to a point where we were on the other day of that last session that we were doing. And at that point, that's what I'm trying to resume to that point as quickly as I can because I'm going to rebuild whatever I already have with one command that you already know, which is the command that I want to be able to run to invoke a machine and run a LAMP stack. That state is what we have in our repository, in our workstation. And that is what you will see as soon as this machine pops up. It is popping up. And there it is. So here we have that Chef repo that you know already. So I'm going to go to that Chef repo folder and open the Atom Editor. Just quickly examine all the contents in there. And that is what I am doing right now. So on the right half, you should see the repository. In there, we have this your SQL cookbook that you remember we created. And we also made some little modifications to it, like the recipe, we modified it to include this customization that you remember. If you remember, we made these customizations in that cookbook and then finally ended up in invoking the MySQL server cookbook directly. We basically passed control to that cookbook, the original community provided cookbook, which is sitting here. And the MySQL cookbook is actually that one. And specifically, the recipe for server. That's what we are invoking, the server recipe. And we invoke this server recipe in the MySQL cookbook. And we are invoking that with our custom cookbook. We are invoking that through line number 18. So if you remember this, and I know some of you have actually done it yourself, that is awesome. But let's quickly check what do we have on this machine in terms of the environment that we have in our cloud. So for example, DigitalOcean, let us see what we have. So it's a bundle, exec, knife, digital, ocean, droplet, list. Do I have any droplets running there in the DigitalOcean cloud? The answer we are getting is unauthorized because I also do not want to leave these credentials that we have for any cloud out in the open. As you know, credentials are a critical thing. You can lose money very, very quickly if you leave your token out in the wild. And as you know, this token that we generate here, by the way, I do not have any valid tokens right now because I made sure to delete those tokens. Because if you leave the tokens open and you record the video like I do, and these videos go public, like many people see this, and they can actually examine my credentials stored in this KnifeRV. And in theory, if some person who wants to hack my account, and if they have access to this token, they can absolutely hack the account. And that is why, because these videos go out to many other people apart from just you, I make sure that I destroy the token after the class is finished, especially when there's a long weekend involved. That's what I exactly did. And that is what you are seeing here is DropKit error, unauthorized. I am not authorized to connect to my own DigitalOcean account because this token, I killed it by design. I hope you understand what I did there, right? Just quickly making sure that this token that we create is an important tool. If you leave it out in the wild, like why videos go out, people can actually see this token and make use of, misuse it potentially. And so there are lots of people actually that watch these videos in other, like, you know, we actually don't know who can actually watch it currently at this moment. So I have some things that I'm developing to improve that situation. But for right now, these videos can actually go out in the wild. And that is the reason why I kill my tokens after I do the class. So now I'm going to create a new token and call it this exercise that we are doing. We're calling it, say, WordPress exercise generator token. And that token is what I want to be able to copy to clipboard. So I'm going to take it here and delete that old token and now paste it in this new token and save it. As soon as I save the new token, I should be able to run this command and get access. And there I will find that I do not have any droplets. That's a good sign. Similarly, if you go to another cloud, let's say EC2 and give me the list of servers, actually EC2 server list, you will see the same thing is access denied because I have also deleted that key as well, like this secret key and access key. I have invalidated that, which means I should go and get a new key pair for Amazon and put that right in this location. If I don't do that, I will not be able to connect as simple as that. So I will do this part basically to go to Amazon console and in there, I will sign in. And once I sign in, I should be able to grab my token from the identity and access management service. If you remember, you go to this location, go to the access management service, which is here, and there you can generate a user. And you have this group already, which this group is authorized to access EC2 cloud already. So I'm just going to create a user and we'll call this user, what's the name of the user I want to use today? Last time I used July, so I killed that user already. I'm going to create another user this time, we'll call it WordPress, WordPress exercise. And that the user I want to create and I will get these credentials out, show them here. So that is one section of credentials that I want to put in my virtual machine in that location. So I'll basically delete this item and paste this new token, go back here and get this secret access key also copied over and then bring it to the virtual machine. In this location and paste it, you will see that there was a copy problem. And so many of you actually ran into these kinds of things. The pasting problem is that we have line number 22 popped up for no reason. I should close it and make it clean so that this copy and paste should be a clean exercise with no space at the trailing end. And that is one of the issues that some of you ran into. And the reason it happens is that you don't correctly copy. And I was copying from there wherever I was copying from, like here, and I left this extra space at the end after this number 8 key, there's an extra space that I copied by mistake. And that resulted into that problem that you saw, which is creation of unnecessary line number 22. So this is how you get the keys back. You have saved them. You also want to make sure that you actually close this window and get that user, this user word WPXSI, add him or her to the EC2 manager capability. And now you can go and validate whether that command works and it will, because now we have permissions. And so now we do have. Another thing that many of you run into is this leaving this atom window open. And then you fat finger somewhere along the way, somewhere little things happen all the time. And it is a good idea to just press control W and close out any open windows that you might have. And that reduces the chances of you making a fat finger mistake or typing mistake or something like that. And that's the quick check we did with our two clouds, making sure that they are correctly working like this and like this. And you'll notice that the droplets are missing. The machine servers have been deleted. The credentials were also deleted. That's a good sign. That's a good thing. Let's quickly check a couple of other things like knife EC2, sorry, knife cookbook list. And so here I'm checking out all the cookbook, we got an error. The reason we got an error is as simple as the fact that we are not running this command with bundle. And that is another error many of you ran into. So this command has to be prefixed with the idea of running in the context of the bundler gem and using the discipline of this gem file that we have here. So that discipline can be enforced by typing and remembering to type bundle execute followed by whatever you want to run, knife cookbook list. If you do not run in the context of the bundle, it will pick up whatever else you might have on your machine and cause conflicts. And so this command will actually bring down all the cookbooks that we have uploaded, including the your SQL cookbook. That's what we have uploaded up there. Having done this and having reminded all of you about this bundle exact thing, it is critically important to type that. If you want to make sure that the discipline of this gem file is honored, the only way is to actually type bundle exec before every Ruby command, every Ruby command. Having said, now leaving this gem file open is something that you do not want. You want to close this out completely quickly, control W, closes it, save it by the way. If you have not made any changes, you don't need to save. But if you accidentally type something, like for example here, and I typed the letter A for no reason, then if I type control W, it will tell you that something has changed. Do you want to save it or not? And since there was no point in typing that A there, I will not save it. And that's a good thing. Now having done this, I have checked my connections to the Chef server by examining my cookbooks. I've checked my connection with the Amazon Cloud and examining the list of my servers. I've checked my connection with DigitalOcean and getting a list of all my droplets, and I am succeeding in getting those connections established. Now is a good time to just quickly run that step that we did the other day when we ran one of these commands. We actually ran both. So we ran this as well as that. We did both versions of both cloud examples, I think we did. So in our, let me get to that exercise again. So in Slack chat, there's a link at the bottom of the group chat where we have a link to where we were doing the other day, which is this location, that's the location we were. And in that exercise, we were validating for, let's see, what was the invocation command I want to try. Make sure that we are able to do both Amazon Cloud and Google Cloud and just about any cloud. That's not the issue. The point being, we need to be able to just take one example right now and actually invoke it. So we want to invoke those things. By that, what I want to, I think I'll pick the DigitalOcean example, it's a whole lot easier to deal with that cloud particularly, as you know. So what I want to be able to do is, how do you invoke that machine? That command you have here is written down. It's coming up. And then in the previous screen, it should come up as soon as this. Why is it slow? Hey, a question for you. A question is, do you find this CloudGenius website slow? If that is the case, please tell me. Because I want to hear that complaint from you that yes, it is slow. And if you don't tell me it is slow, then I will do nothing. But if you tell me that, hey, it is slow, I will fix it. Nilesh. I noticed that it was slower yesterday. Okay. Okay. Yeah, last night, I had a same problem, you know, I was working the night. I couldn't able to do anything, not only EOS, you know, I couldn't able to get through AWS and DigitalOcean. And it was like, you know, three o'clock, 3pm though. But in the morning, it was working fine. So you know, you just told me that. I don't know. This is Could be my own connections or? I don't know. That's the problem. I'm trying to understand. In fact, yesterday, and even right now, I found this CloudGenius website a little slow to my taste, little slow. And so that's the reason I asked this question. So if you're running into that problem, and since I heard two or three people say the same thing, I'm going to presume that yes, the site is slow. And we will actually, we will understand why it is slow, and I'll come up with ideas to show you why it is slow and how do we improve the performance and all that. I'll do that live exercise with you at an extra session. So maybe some other day, but not right now. So yes, the problem is understood, we will identify the root cause and see how we can actually improve the performance of that setup by doing something, we'll figure out what we want to do, we'll play a couple of scenarios and maybe move the whole machine out from that particular location, wherever it is running to another machine, to another cloud. We can do, we have so much flexibility in migrating this from one location to another because of this core concept of fungibility. We don't care where the cloud is, which cloud company we use, because it's irrelevant to me. So that exercise of mobility of moving this cloud site to another location, we'll do that separately. But for right now, I want to actually create a droplet in the digital ocean cloud right now, right there. So this is the command to run it. You know, the command sequence that we have created here is actually already saved in form of this from our previous notes the other day. So I'm just going to take this command, explain it to you one more time. I'm assigning a name and selecting an image here, selecting location, size 512 MB, bootstrap it with Chef. So basically, purely installing Chef, not actually giving any run list yet, we are going to run it also, but it will run with an empty run list. So this command will just install and run Chef with an empty run list, the run list is still empty. And that's this command I will like to invoke, and that basically generates your machine in the digital ocean cloud. As you will see in this example, I'm going to paste that command and execute. This will go to DO, create everything, install Chef, run Chef with an empty run list and come back and say, you know what, I have nothing to do, so I did nothing. And that's what I'm expecting to see coming back as a result of this. As you will see that. So that's what I'm waiting for that machine to pop up in our digital ocean cloud, which is here. And so it should show me a droplet now. And there it is. It just started. It is called Abracadabra. And in that machine that we have, this IP address and all that, I am waiting for it to do these things. What is that thing I want to wait for? This. Waiting for SSHD right now. So that's what's going on right now, as you see. And it got connection to SSH on that remote computer. It created a node called Abracadabra in the Chef server, created a client for Abracadabra in the Chef server, installs Chef, and then runs Chef. That is the first run happening. And since the run list is empty, it does nothing happily and then comes out. That's the scenario. That's what we did right now. So back here, what I want to be able to do next is to understand that we have to provide a run list. By the way, you can also do the same thing in any cloud. I have this example for Amazon. I'm going to focus just right now on the digital ocean cloud for this next maybe a few minutes or more. So going forward, I'm going to actually provide this machine that we have a purpose in life. So we do that by basically adding these things in the run list. I'm adding the base role. I'm adding the DB master role and also adding the web server roles. I want to have all these roles on the same box, totally doable. You can also separate roles and responsibilities very, very clearly by running the database on a separate box and the web applications on a separate box. You can do two boxes, two droplets scenario also, and that is going to be an extra credit exercise for you when we have a solution for that and we'll leave it alone right now. Let's focus on getting all of this running on one box. So that's what I'm going to do is basically assign these run lists, so assigning a purpose in life. That's what these three commands will do. If you take them and take it to the terminal and invoke them one at a time, you're basically adding the purpose of base role, DB master role, and web server role to the box. Now the roles are assigned in the Chef server. The machine actually doesn't have any idea. The machine doesn't know that, hey, I got a new role unless it runs Chef. So we need to also set one more thing is to execute this command, which is to set that particular Abracadabra node in production environment, that is a critical thing that I want to be able to do is to mark that machine in production. So I will do that just now. And this machine gets targeted for production environment, like that's what you see here. This command shows that the machine has been targeted for production environment. Let us check the status of that node. Let's find out, are you really in the production environment? Where are you located? What is your purpose in life? So the location is IP address here. The purpose in life is base role, DB master role, and web server role. The underlying operating system happens to be Ubuntu, like we defined here in the invocation. We said it needs to be Ubuntu in New York with this much amount of RAM. That's what we have. So in that machine that we have there, what we need to be able to do is somehow have Chef run automatically, but it doesn't run right now automatically. So as a proxy to it, we are going to visit that machine like this. And on that target box that we have, we will quickly do the sanity check. Did our thing work correctly? That's what we're going to check. So first thing first, did we connect? Yes. Now we want to actually run Chef one more time. When we are running Chef this time, it is going to go to the Chef server and say, you know what, hey, what is my new purpose in life? And so my new purpose in life is this. So then it will understand that purpose and do whatever it's supposed to be doing, like grow up to become a database server, grow up to become a web server, and basically become a LAMP stack complete. That's what it will do because that's what we are going to do on that machine is pseudo Chef client will basically automatically run every so often depending on customer policy or business policy of the company that you are working for or working with that you will have this Chef client run on itself, on its own, automatically in a pull mode. It will look for the Chef server, understand its purpose in life as indicated by the run list like here, and then just pick up that role and take it on. That's what we will do right now, simulation, we are physically going to the box. This is not how actually in real life, this is not the scenario you will use it in. In real life, Chef will automatically get invoked every so often. That's the most dominant usage. And so we are going to simulate that scenario right now by actually visiting the box. This box here, we are visiting that box and on that box, after you connect to that box like this, you are then invoking this manually as a proxy or a simulation to what will happen in real life. It will happen by itself through a cron job, for example. So I'm going to invoke this pseudo Chef client. So it is going to basically run the Chef on that box and then figures out that there is a new role, a new purpose in life, which includes the base, the DB master and the web server purpose. And that's what's going on. So the machine is actually getting created in form of a converted or taking on a function, a purpose in life. The purpose happens to be make me a LAMP stack. So grow up to become a LAMP stack. That's what's happening. And once this happens, we should be able to examine whether it happened correctly. And that is what I will do right now. So I will basically go to the next step and test for validity. And the test for success is basically check for Apache, let this finish, by the way. So I want it to finish correctly. And so that action of Chef run is happening. When this finishes, we should be able to test and validate what we have done. And what I will also do is make sure that this repository that we are building up towards the Chef repo that we have, it is a good idea to put that in Git version control and save it somewhere like on GitHub, for example, for your own usage. Now, remember, when you do that, you do not want absolutely do not want to leak your credentials like these guys. You do not want them on GitHub. You do not want this token on GitHub, because if you leave it there, I'm sorry, but somebody will steal your money. So don't do that. Having said that very loud and clear, please, please push it to GitHub. Send it to GitHub. Keep a copy for your future reference, because this is going to be a complex exercise. It is a good idea to just preserve it. And you can derive on it, build upon it over time. You don't have to worry too much about the credentials that you have here, because we are still learning. So this is a private key for the Chef server. I don't care. If the Chef server dies, I just open a new account, who cares? But this is all good as you learn and practice. But in real life, when you are really working with a production Chef server, you will never let go of your encryption key like this, or never publish or expose your private key for the Chef server. Don't do these things in real life. And especially right now, don't let these guys on GitHub. If you leave them on GitHub, you know, I'm sorry, that's all I can say, but do not leave them on GitHub. I'm repeating that. But having said, delete these, make some fake entries, call it change, some other proxy word for it, and then push it to GitHub. Keep a copy for your future reference. Having said, let us go test. So in our example, we have actually specified, let's see if there are any errors. So no errors seen. Now we should be able to run test for Apache. And we have it running. Let us touch for PHP. It is also there. And let us see MySQL is there as well. Now three items that we wanted to install on top of Linux are there. But does our login password actually work? So we'll go log in using MySQL and the username is root and the password is going to be 123. And so let us log in. And we did correctly log in. That is great. And so we see them and then we can exit out of that database and then exit out of the machine. The machine is all nice and running and LAMP stack correctly functions. According to what we ran this command, we have a LAMP stack going with our password in the MySQL database and all of those things correctly functioning. Having done this part, let us understand what is the next logical step to build. The next logical step essentially is to be able to install the application. And you can install the application in many, many ways. For example, you can just go to this WordPress location and download the package from here. And the tar package may be this tar ball. So get a link from there, the copy link address. And then bring it here on the remote machine. You can operate on it directly. For example, you just go to that machine directly and then do a wget and then download the file package for WordPress. And now you have it. And this latest package that you get is the WordPress application. All you need to really do is somehow manage to put that application in the right location. So we can do this by the dirty, ugly way by going to that box and doing a wget and basically doing it by hand, which is exactly what you should not be doing. You don't want to touch the machine directly. This is how you actually do it if you want to do it directly by hand, by messing around with the box yourself. So we will first mess around with the box ourselves by running some scripts directly on the box by hand and just get a feel of how it is done, the crude way. And then we'll do the same thing in Chef way with the crude way first. We have this downloaded right now. I'm going to remove it because that was just a quick example as to what you really need to do. So that is gone. We have nothing in that Abracadabra box that we have. But what we need to be able to do is get this script down to that machine. So there is a script written already for us. That is called the DB setup script and we will bring that script down. So now we have that script here and this is what I want to actually examine. What is it that it does? So we will go look in GitHub and see what it does. And that script does a lot of things. For example, here it does create a user which is different from the root user, by the way. We are going to create a username and a password for a user who WordPress will use as a user for the database. We will also create a database itself for using with WordPress. So this code basically does that. And also provides permissions for that user using the password to connect to the database that we have. So that is the grant usage on this star dot star to username at localhost identified by the password. That is what this command is going to basically do is, first of all, create a user and create a password and create a database on the database. These things are different from the root user and I think this requires some clarification for those of you who do not understand or know these things. I think it's a good idea to just clarify a couple of things here. So I'm getting a piece of paper and pen right now up here in my notepad coming up. I think these things, I'm not sure how many of you actually deal with databases and users and passwords already quite a bit. Not sure. So if it is too trivial, I will skip forward. But if it is not, if it is new to you, please tell me. So I will do exactly that. So here is my notability coming up. I connected the tablet. Why does it say not found? Okay. There it is. So the tablet is connected and I am going to make a touch option, pen option mapping to this monitor and say, okay. And now we should be able to find a new page. There we go. Make it fit with and off we go. So question is, if you know what databases are and like right now we have a root user and a password for that user in that database, that's what we have. I know some of you are DBAs, like experts in database administration, but some of you are not. So I'm just clarifying a couple of things here. So that's what we have been able to do these things. But this application that I want to run, this application also requires a database here in the MySQL database server. This is the server. It has a root user and a root password. We have that, but we want to have a database in the database server. And this database I would like to have for WordPress. So we'll call it WordPress. And like these guys, I would like to have another user and another password, a different user and password for this guy, this application to be able to connect to this database. The database name is WordPress. The username is username. And the password is password. And I chose these things for a specific reason that will become clear as to why I chose it. But in real life, this is not the name you use and this is not the password you use. Just remember that these are like dummy examples. In real life, you will use a complex password here as well as here, and the username can be whatever you want. And the scenario that I'm going to play with is to actually have a username called username and a password called password and a database called WordPress in this database server. That is what I'm going to do. And that is what we are building out through this script that I'm showing you all. So the script that is showing up here, this one, by the way, I'm going to paste a link for you so you can have a copy of that here. So this script basically sets up a DB, a user, and a password. That's what this thing does. So we have that script downloaded to our box there. Our box is that box. Where is it? Yeah, this box. We have downloaded this dbsetup.sh. You can see that dbsetup.sh file, and it is the same file we downloaded from that location. And so that's what this script was, as you can see. There's another script that I want to be able to run. And that script actually gets the WordPress application down and sets it up. So that script that we have also obtained that I have written for you already as a quick hack. This is just a quick hack, by the way. This is not the chef way of doing it. So here is the other command that I want to be able to get in our computer in that location. We have this only one file right now, which is the dbsetup file. I want to get one more file for WordPress setup. And now I have two files, the WordPress setup as well as dbsetup. So this is a second script that helps us actually install WordPress application in the right location as defined by the WordPress developers. They want it to be done like this. And so if you look at this script, this will basically get the application, expand it, and delete the tarball, and move the expanded content over to a particular location, and then change the permissions for that particular location to be owned by this particular user. And this is the user that Apache runs under in Linux, in Ubuntu. The Ubuntu Linux Apache user happens to be www-data. And that's just how things are configured in Ubuntu. So that's why this name and this group ID, these two things are getting the ownership for that particular folder so that Apache can actually read and write and do whatever it wants on that folder and basically read and write and manage and render WordPress. That's what you will see. And that is the command I want to invoke. These two are basically a hack. This is not the chef way of doing it, but we are doing it to understand what is needed and then build on to the next step, which is now do this the chef way. So we want to get to a quick gratification, quickly see what's going on, and then get to the chef way of doing by writing a cookbook to accomplish the same. And so here, automating end-to-end, automating the WordPress deployment on top of the LAM stack that we have already created through automation. You want to also automate deployment of WordPress. But before we automatically deploy WordPress, I want to make sure that all of us actually understand what are we doing by doing it by hand, like simple scripts, like you see in this example, the last two elements that I posted in Slack chat are basically those two scripts that I want to be able to invoke one after the other in the terminal, in the Abracadabra machine directly. So I'll invoke this, and then I invoke this, and you will see the machine running WordPress right away. That's what I want to be able to quickly demonstrate to you before we go do it the chef way. Any questions at this time? This particular step that we are doing is not how chef does, but I'm doing it to illustrate that what exactly are we going to do with chef, just to drive home that point, is what I'm doing is doing it this way, which is, by the way, again, not the chef way. This is a hacky way, you do it by hand, you're creating, I don't know what you can call it, entropy, I think is the right way to say it, entropy. You cause entropy by mucking around with the box directly, but first time you always do it by hand. So this is like almost doing it by hand in a quick fashion by running two scripts that I have already written for you. And so I'm basically invoking the database setup script and then the WordPress setup script, two scripts, that's it. And now we should be able to actually see WordPress live running. And so one at a time, we will invoke the DB setup script, which will create this, a username and a password and a database in the database server. That's what we will do in the first step. So we are running this command, basically, we'll do that part for us here. And like that, DB setup, boom, it happens quickly, very, very quickly, actually. And next step, which basically, this means that we now have a user for use with WordPress. We also have a database for use with WordPress. You can actually go and check these things, like, for example, we'll go say MySQL. And where was that MySQL connection command here? And here we can say show databases. And we can see that there is a new database added. This was added by this execution. And then it finished gracefully. So this database that you see now was added by this guy. And I'm going to come out of the database back to our AvraCAD Avra machine. And now I will run the other command that we have here, which is to set up WordPress. So I will do that SH WP setup and run. And so you watch what it's doing is basically it goes and grabs this version of WordPress 4.2.2 and installs it on the box and sets up permissions and everything. And we should now exit this box and visit this IP address. So we will take that IP address and go to Chrome browser and watch what's going on. What do you see? You see that there is a live application running and it's allowing you to configure as a first time user, continue. And here it says, welcome to WordPress. Before getting started, we need some information on the database. You will need to know these details about the database name, the user name, the password and the database host and the table prefix if you want to change. So that's what you need. That's what we know already. We have it. We know the username is username. The password is password. The host is the box itself, localhost. The name of the database is WordPress. So that's exactly what I have given in the configuration script. So let's go. When say let's go, it automatically populates the default values. And that is the default that I have chosen for myself to make my life easy. So I don't have to type anything here. By default, it assumes that the database name is WordPress. And that is exactly what I have chosen in my script. It also assumes that the username is username. You are supposed to actually use a different name. But in our example, we chose that name just to speed up. Password is chosen as password. The host is localhost. It's the same box we are running the database as well as the application and Apache and everything else on one box, one droplet, all of it right here in this droplet. So next, I'll just say submit. And there we go. All right, Sparky, you have made it through this part. So let us run the install. And here we go. So we are going to give it a title. We're calling it Cloud Genius. And the username happens to be Nilesh. And the password is very complex. And I will give my email address here. And the next item is about privacy. I will actually uncheck it because I don't want Google to see on this box. I don't want them to be basically indexing my site yet because I'm not ready. So I will disable it because I don't want Google to check and see what am I doing with my test site. And so I'm hiding it. And I know that I'm going to install WordPress. And it's a success. So we'll say login. And we'll say my login name is, and my password is, and say, login, please. And so here we go. We have successfully logged into WordPress application. And it is running exactly what we said. We can also go and do a couple of things, such as create a post. And we'll say, testing 1, 2, 3, hello, and publish. And there we go. We have a new post already out there, testing 1, 2, 3, and hello, and all that. So we have these things already. We have seen these hello world posts, and I don't like it. So I'm going to make it instead of hello world, make it hi world, and update. It's very easy now once you have this going. And you also notice that instead of hello world, it is now hi world, which is fine. So you have a WordPress application running all live. However, in the last step, we did not run it through automation. In fact, we ran a script by hand, which is absolutely not what you should be doing, unless you're doing it for testing or fun. By the way, you also notice that this version of WordPress is 4, 5, 3, whereas the version that we have installed is, oh, not this machine, on the other Abracadabra machine, we have the WP setup. We have installed 4.2.2, and we should be able to change it. So we should be able to change that by just asking, hey, please update now, and this should update itself. So we should be able to just say update, and this should actually update WordPress by itself. So we should not worry too much about a slightly older version. And now we have succeeded in updating our WordPress deployment. We should also update this particular plugin, and we don't need to activate those. So we have these updates taken care of. We still have those, oh, there are themes updates available. So we'll select all those themes and update them. And now we have one, two, three themes updated and all the updates taken care of. And that's how you, over time, update WordPress sites and maintain it, manage it in real life. But we want to do it the Chef way now. What does that mean? We will kill our box, basically. So here we go. Bundle, exec, knife, client, delete, Abracadabra. I want to kill the box, the client entry in Chef server, the node entry in Chef server, and also find out the box ID and kill the box itself. And also remove non-host files. So these are the commands I want to actually clean up. I'll clean up the Abracadabra reference through my Chef infrastructure by running these commands in the computer, in our workstation, like this. So deleting the client entry from Chef server, deleting the node entry from Chef server, deleting the machine, actually, the real machine, I want to kill that machine. The machine identifier is this. So I'll grab that machine identifier and say, bundle, exec, knife, digital, ocean, droplet, destroy, minus S, I think. Let me just quickly check the syntax. It should be in the dash S, destroy, dash S, and then identifier. This should actually kill the machine, and it did, which means our droplet, this one is dead. It's gone. It also means that our Chef server in this location should also not have any reference to the Abracadabra name in the client or node entries in the policy section. You should not see any client for Abracadabra and any node. There are no nodes. So that's what you just saw me kill the machine completely outright, and what I would like to do next is to do the same thing Chef way, basically creating a cookbook to do it in a fashion that it can run by itself in an idempotent fashion. It should create a user and intelligently understand that the user exists and should not delete or actually disturb the setup if it's already set up. Don't disturb it. There is some craft in writing those things in an idempotent fashion. That is what you need to really do and focus on when you are creating something that requires an application deployment on some cloud. You want to deploy this application, and if the cloud already has the application, you want to be careful on how you deploy. You don't want to mess around. So don't mess, but do it in a fashion that is idempotent. That is a critical thing to remember. So when you write cookbooks, make sure you write them idempotent so that repeated runs of Chef over and over and over as you apply Chef plan to run over and over, it should not actually create any mess. It should always get to that same desired state that we have. The desired state is we want to have WordPress running, and the initial state is we have nothing. We want to get from this state to that state, and then when we run Chef again and again over and over, we should also reach the desired state and not the messy state. You don't want to go here. You want to go there. The desired state, which is WordPress running correctly. You don't want to go mess. That's a different state. It's called the messy state. You don't want to go there, and so you want to write cookbooks in a fashion that do not create mess, even you run it over and over and over again. Even if you run those cookbooks over and over again, and that is the example I will now walk you through in terms of writing cookbooks for something that you want to be able to do on your own. So here are a couple of examples coming up. The first one that we want to be able to do is create a couple of cookbooks. For example, custom cookbook to deploy WordPress software, and custom cookbook to create a database and a user for WordPress, and these two cookbooks we need to write. We need to create them. And then you invoke them, these new cookbooks that we will have, by expanding the web server role. We have to expand the purpose in life of the box. So right now, the purpose in life of the box that we had in the other example that I demonstrated here, we added a couple of roles in life. We added the base role, the DB master role, and the web server role. So we will expand the web server role to include references to our own cookbooks, such as Recipe, My WordPress Cookbook, something like that, and then invoke it as in addition to what is already there after you have done all this PHP, Apache, MySQL. By the way, please do the WordPress thing also for me. And do the user and database creation also and all that. So that's what we really want to be able to do is to expand the role definition, the purpose in life assigned to the box by including our own cookbooks after the LAMP stack has been set up. That's what we will essentially do since I just randomly wrote something here. I don't want to save it. So I'm going to control W and say, don't save it. We don't want to miss the existing role that we have, so not missing it and keep going forward with what we want to be able to create our two cookbooks, one for this WordPress deployment and another for database and user creation. And that's what we will incorporate by expanding the web role. And then invoke Chef Client on the target box over and over and over again, and you will see that Chef actually does maintain your desired state. So let's go see how you do it. We'll create another cookbook. So here is a cookbook creation. So Bundle Exit Knife Cookbook Create, we call it WP. And so that's the command to create a cookbook, like it's a skeleton cookbook that you will see here, sorry, not here. This command, we will copy it from here and then go and paste here. This will basically create a blank cookbook and place it in this site cookbooks folder. That's what you will see when I run that command, this one. You will see that it actually creates a new cookbook in the site cookbook folder right there. And it is going to be a dummy blank empty cookbook, but it's going to give us something useful to begin working with. So here we have a new cookbook. And most of the folders are empty except this folder has a default recipe, which is also basically pointless. All of them are comments, hashtag, hashtag. So comments. So it does nothing, but it has a name, it has the author's name and a license. That's pretty much it. But it does nothing. It doesn't know what to do because you did not tell it anything. So it just created an empty skeleton in this location called WordPress. And since this window is open, I'm going to just close that window out. Don't leave it open, otherwise you will factory or something. Having created that WordPress cookbook empty skeleton, what I want to be able to do next is to understand what do we write in there in the default recipe. So here is what we want to write. And let us understand what this, there are a couple of different ways I will create cookbooks and give you at least two or three various ways of writing a simple, actually not so simple cookbook. It's not so simple, but at least just see what it is doing and you would understand. This is Ruby language, but it's not rocket science, it is plain English. So from here all the way up to this point, all the red lines, these are all comments. We can just ignore reading that, but that's going to be the recipe that we want to be able to put in the WordPress site cookbook location, WordPress recipe default. This block of code will go in there. And so most of these are comments all up to here, but below that we have something useful. So what is that useful segment? That's what I want to actually take all the way from here and read and understand what it does. So copying it, taking it to my WordPress recipe, default recipe in there, selecting it, pasting it and saving it. And now try to understand what it does. So as you will see, line number 19 is the first line, which is actually useful. Below that is all comments, so we can ignore all of that and focus on line number 19 all the way through line number 40. So these are the critical lines to worry about. That's what we just added in terms of a Ruby block. This is by the way written a Ruby block written mostly in shell script, but it is written in Ruby. So we will see how and what am I saying essentially is this portion all the way up to here is actually Ruby up to the statement number 22. And that after 22 is what we define as EOH, this segment all the way up to the other EOH here. So between those two EOHs, that segment is plain shell script. This you can execute directly in shell. So let us understand the shell script part, which is now highlighted and everything else outside the shell script part, which is basically Ruby language. And let us read that. So let's read the Ruby portion first. Line number 19, it's basically telling you that telling Chef that I'm going to give you a bash script for you to execute. You should execute it as the root user and use the TMP directory as a temporary directory for yourself and then run it. We'll call it the install WP action. So that's what this action is going to execute is to install WP is going to run the shell script, which is basically in the highlighted block of code. So it's the Ruby wrapper around a shell script that we have put and created a cookbook for ourselves to install WordPress. Now let us go inside the shell script itself. The highlighted portion of what we have in there from line number 22 all the way through 38, 22 and 39, I should say, 22 and 39, these are like open and close statements, open and close. So it's basically telling you here is my shell script. The operative lines actually begin line number 23 all the way up to this point where you will see it looks for a particular file and its existence of that file. And that happens, the check for existence of the file happens right here. The first thing it does is if this file exists, which is a file, by the way, a good indication of a valid WordPress deployment. If you have a properly deployed WordPress, you will have that file. And if you find that file, then, okay, I will do nothing because I know you already have WordPress. That's a quick way to check whether you have WordPress on the box. And if you don't have that file, that can conclusively assume that you don't have WordPress deployed on that box. So then in that case, the else statement kicks in. And here, what we will do is echo, meaning type out on the screen, you do not seem to have WordPress. So I'm going to install it for you. And here it goes. Now it goes and grabs the WordPress binary, unzips it, basically expands the tarball, removes the tarball, removes the existing content you might have in your WordPress location, which you probably don't have. But I'm just making room for it and then moving the WordPress expanded folder, that is an output of this command, is this folder called WordPress. You move that folder in the right location and change ownership to the www data user and www data group for that folder that we have moved this WordPress into. And so that is how you actually invoke this portion of the code when you do not have WordPress and if you find WordPress, you do nothing, you just do nothing and come out. And that's the way we have attempted to illustrate a point, which I would call is to make sure that we don't mess up any existing installation. So it's a simple way of wrapping a shell script that actually detects whether you already have something going, so I should not be touching it. If you don't have WordPress deployed, let me deploy it for you. If you have it already, I'm not messing with it. And that's the scenario that we have written down in form of a shell script here that we are basically invoking through this Ruby wrapper around between the EOHS that we have two of them. These guys, two yellow highlights, E-O-H, these are markers to indicate the end of block, beginning of block markers. And in between those markers, we have shell script written, that shell script itself is written in a fashion that it doesn't shoot yourself in the foot. If you have WordPress, don't mess with it. If you do not have it, install it and move on. And that is a very simple way of invoking a shell script through a cookbook is just one way of representing and writing a simple cookbook. So we are going to close this window because we have saved it. And now look at creating the other cookbook that we had in mind, which is about the database, the username and password for the database that WordPress would like to use, just like we did in the crude example before, same thing, but this time the chef way of operating. So if you remember, we ran a shell script. And that script that we have was available to us in the Slack chat that you have already there. So there are two scripts I mentioned, we'll reuse some of those scripts already. For example, here, what I'm going to do is first of all, create another cookbook. This is going to create another cookbook, BundleExecKnifeCookbookCreateDBUser. And that command will basically create our cookbook in this location for us in the site cookbook folder. You have another cookbook in there like this, off we go. So we have a DB user cookbook created for us, which has this recipe folder and a bunch of other folders, but that's the most important one that we want to be able to mess with. You want to modify this a little bit as we, excuse me, I think I made a typing mistake. So Ctrl W, don't save anything and come out. So that DB user cookbook we have is what I want to be able to modify. And so I want to be able to edit a particular file in there. And in that file, I will actually place the shell script that we used before directly. So this script that you see in here is actually provided to us for us to use in the cookbook. But here is a slight difference in the previous example that we saw. And this example we are going to use, there's a slight subtle difference. The difference was in the WordPress cookbook versus the DB user cookbook that we are now creating. In the WordPress example, we had a code of shell script inline in the cookbook recipe slash default.rb. The shell script that we wanted to execute was written inline within the body of this file itself. That's how we wrote it inline. The shell commands were right there. There was an if statement check, an else check, and some setups here, and then there was an end. That the block of shell script that we wrote, we put that inline in the body of this file. Whereas in the other example I'm going to illustrate, it's just a different way of accomplishing the same thing, which is you don't actually put this whole thing in the body of the default RB itself. So here in this cookbook, we also have similar structure. We have a recipes folder. In there we have a default RB. In that RB file, I would rather not put the shell script inline, no. But instead, I would like to put it in a separate file that I will create in a separate folder. The folder happens to be this files folder, files default. There's another folder here called files default, available with every cookbook you'll have it. So there's a files folder available in default folder inside there, which contains nothing right now. You will also see the same folder that we have not used in the WordPress folder, files default, nothing, and your SQL files default, nothing. So it is a common folder available in any cookbook that currently contains nothing. We are going to use that structure in the dvuser cookbook to actually create a file in the files default folder here. And in that folder, what I want to be able to do is create a file, create an empty cookbook inside the site cookbook that we have created, and then edit a file that doesn't quite exist yet. And by running this command, we want to actually create this file, install dvuser.sh as a shell script that I want to put in the files default folder. That's what I really want to do. So here is a gedit way of doing the same. And you can type this command to execute gedit. But since in our example, we have our atom editor already open, I'm going to just take this file name only from here, copy, go to that location, create a new file, and save it as an empty file. I want it to go to the site cookbooks, dvuser, files, default. And that's the location I want it to go and have that name installed, dvuser. So it should be Chef Reco, site cookbooks, dvuser, files, default. That's the location I want it to go. In that file, I want to keep that file, create that file, save it, but currently contains nothing. It is empty. This is Salam. Yeah. I'm sorry to stop you on the time. In order to open that box, what key you use? I am having struggle with. Control N. Control N, new as a new, control N, new. Control N. Oh, thank you. Control N to create a new file and then save it, control S. Yeah. Because I had to do a lot of stuff. Okay. Control N. Control N. You can just say file new. That also works. Okay. But your cursor has to be on the all the way top, right? Yeah. All the way in top. So file new, which is control N. Okay. I mean, your atom cursor has to be all the way top. Right. Yeah. It is not all the way top, then it might cause you trouble in getting to it. Right? Yeah. Yeah. Because at that case, if I don't create the file correctly, the bundle doesn't work. Yes. Correct. Yes. You're right. So that's one of the reasons why, since this atom editor can be confusing a little bit, that's why you're creating a file. I tend to say G edit. Yeah. Yeah. G edit is a slightly simpler editor. Yeah. And so this G edit, one long line will actually you invoke it here. And so it will bring up this whole thing like this. Oh, sorry. I did not copy. So let me copy and then G edit open. So the editor will open up and you just save it. And here you can type whatever you want and save it and close and all that. And what I want to be able to do now is basically look at that atom window and find that this atom has actually that file created with some random characters typed in there like that. And so we don't want those random characters, so I'm going to delete them again. But that's the way you can edit using G edit like you saw here. It's also possible to use. It's a lot simpler to use G edit, unless you are familiar with atom, then in that case, I'm getting used to on it, but I'm having I figured that out eventually, but right. And would be that great. Okay. Yeah. That's why the commands that we have in the site are basically referencing G edit and not atom. The atom can be a little bit confusing to people who are new to it. Yeah. G edit is simpler, a lot simpler. Yeah. Okay. Cool. Thank you. You're welcome. So next up is that we want to in that in the install dv user shell script, we want to actually use that put that in a file as opposed to recipe, it is not a it is not a Ruby script. So it is not a recipe. It doesn't fit in the rb.rb extension, it is.sh extension, it's a shell script. And this shell script is what we have as an example that we ran earlier before. And you will notice that this script is written also in an idempotent fashion. For example, if I look at this script carefully, and you will see that this script actually tries to create a user, a database and a password using the MySQL script command. So we are actually going to deal with the MySQL database itself. So the line number three in here actually invokes a MySQL shell with the root user that we know already called root and with the password that we know already called 123. And so with that information that we already have with our initial LAMP stack setup, we are going to use the root password and the 123 root and 123 combination to connect to the MySQL database. And then inside these two stop blocks that we have, so there's a stop block at the bottom and the stop at the top in between these two stops, what we are essentially doing is running a SQL command stream. So we are executing SQL commands in a shell script inside a Ruby cookbook. So lots of complexity, but that's how life is. We just have to deal with databases. And when we're dealing with databases, we just have to use the database language. In this case, it is SQL and we are passing the SQL command script through a shell script, which is this file, which we will now invoke through Ruby. So we will do these steps. But for right now, just understand what this MySQL command stream is doing. What it does is create a database if it does not exist. So it's a good condition to test for if the database already exists, then great, do nothing, move on. If it exists, great, move on. But if not, create it. That's the outcome we want. We want in the result, we want a database called WordPress. So that's a very nice way of doing it. If you have it already, don't touch it, don't have it, create it and go ahead. And so next step, we are setting some SQL specific modes and starting to use the WordPress database. And then we are writing a SQL procedure. This is a procedure for which we are going to use that this is probably some of us in this group who are database experts can potentially write this MySQL command stream better than what I have written. So I understand I'm not a database super duper expert, but this is just one way of accomplishing creating a user, a password if it doesn't exist. So like an example here, if the database doesn't exist, I use this command. If it not exists, then create it. If it exists, then do nothing, move on. That's the sequence was easy to do in this language. In this one command, I was able to do that part of creating a database only if it does not exist. But turns out that a user that exists and you try to create a user that exists, you will cause trouble and you will cause MySQL command stream to fail. And as a consequence, the shell script will fail. As a consequence, the cookbook run will fail. As a consequence, your chef run will fail. Basically you will not have a good result. So to accomplish that, I have written what is known as a SQL procedure. And this procedure begins and ends between these delimiters. So the $$ sign here, the $$. These two, the one you see in the yellow highlight, those $$ in between that is what we have defined a procedure for use with the database called WordPress. And in that procedure, which is this portion, by the way, we are basically saying, you know what? If you have a user, delete it and create it again. If you do not have a user, then create it. That's essentially what we are doing in this iteration, in this SQL stored procedure. And then in the line number 29, we are calling a drop user for that WordPress database if it exists. If the user exists, drop it. And then proceeding forward, create that same user. We just dropped it. We create it again. And as I said, some of you who are SQL experts, please help me improve this. Please write it smaller, write it better than what I have written already. And if that's the case, that would be awesome. So I know a couple of your database admins, you know SQL better than I do. So find a way to write this in a nicer fashion than I have written. I think there is room for improvement and I will eventually work on it. But essentially what this basically does is it creates a username on the local machine identified by the password and grants all the permissions to that database with this username on the local host machine identified by this password and grant all the privileges to WordPress database for this user with grant option and then you flush your privileges and then you stop. This stop basically coincides with the MySQL command stream. And at that point, what you will have at the end is you test whether you actually cause any failure or not. If you do not have any failure, you echo that your MySQL bad job completed successfully. And this whole thing is a shell script inside of which we have a SQL command stream written. And this shell script is what I want to be able to now use in my default recipe. In this is the default recipe that I want to write, but I have this install DB user shell script that I have put in form of a file, default install DB user SH. And that is what I want to actually execute, but as a reference from the default recipe. And that's the next step. So you have created this particular complex looking shell script that actually invokes a SQL command script inside it. And now we will invoke this shell script through a Ruby wrapper that you will write in the default recipe in the cookbook itself. That one is coming up. And yes, the site is actually slow and I am sick and tired of it already. In the last two days, I have been, you know, this is pathetic. So we'll fix it. This is way too bad. So the root cause of this problem, by the way, is Azure. So let me admit, let me admit what's going on. So by the way, it opens up this thing, it actually opened up finally. So I am going to sign out and let's talk about Azure later. So this default recipe for DB user cookbook is what I want to be able to incorporate in my DB user recipe default file. And that's why we have the gedit command right there. But you can do it in the atom way also, basically visiting that folder, site cookbooks, DB user recipe default, and then place this block of code that you see here. Most of this is again also comment. So all of it is a comment. The real operative parts are not too big, not too big, the operative parts are actually all these guys. So let's go grab all of that, copy it over from here, take it to that recipe. So site cookbooks, DB user recipe default. That file is where I want to place it and paste it. And all of these are comments. I don't care too much, but lines number 20 through 25. Here it says, you know what, I want you to run this cookbook file. And basically before you run it, the run actually happens in here. This bash, install DB user, do, and then invoke the script itself. That action will actually run it. But the lines above, which is 20 through 25, these lines actually will take that physical file from here, this file. It will physically take that file and copy it over through this construct. The construct is cookbook file. So take my file, please. And from this source location, which is this location in the files default, that location, which is called dbuser.sh, look at the source, which is the file's default location, and paste it into the target computer, wherever it is running Chef, in the tmp folder, in that file name. So it will basically, this construct will copy the file, this one, into the target location. That is what will happen when you invoke this portion. The subsequent portion actually runs that file on the target location. So it says bash, go to that location, change directory, current working directory to slash tmp. User name should be user, user. The username is user. And the code you want to run is very small, it is one line. But that itself will invoke that install dbuser.sh, which actually has been copied already to the tmp location on the target box. And that tmp location is what you see here. And so this is how we are using a cookbook to invoke a shell script, which we are first copying it over onto the target box. And inside that shell script, we have a MySQL command screen because we are dealing with databases. So we have to write in SQL, and we will now control W and control W. And this file needs to be saved because this is the default RB, so I want to save it. And now I have two cookbooks created, one for the DB user, one for WP. And that's what we have now in the setup example, which means we should be able to proceed forward now that we have two cookbooks to incorporate these two purposes in life and assign those purposes in form of roles. So I'm going to expand the current definition of my existing role called web server to include two other additional cookbooks that I want to invoke. So the expanded web server role that we have, this is the current web server role that we know up until here. That's what we have. So we'll add these two elements in extra. These two elements, which are basically invoking the default recipe in the WordPress cookbook and the default recipe in the DB user cookbook, I want to invoke those two lines in addition to what we have already in the web server role. And this is how I'm basically expanding the purpose in life of my box. So in my role definition, I have the web server role and I have these things already defined as the roles and recipes for that box in the web server role. I will expand it to include these guys, which is basically run my WordPress cookbook default recipe and DB user default recipe, run these two for me. And that becomes an expanded role, expanded purpose in life for the web server role in there. So now we have three new things. We have two cookbooks here and here. These two cookbooks are new. They are WordPress and DB user cookbooks. We also have a expanded role definition for the web server. That's what we now have. We know that we have. So we have to somehow tell the Chef server that, hey, Chef server, we have a cookbook for you. Please take. And by the way, we have a new role for web server. Please take that also. And so we have expanded that role definition like this, as you've seen before. I am going to basically send my new cookbooks over to the Chef server. This Chef server does not currently have our cookbook for WP. There is none. And similarly, there is no cookbook for DB user either. So you don't see them because they don't exist here yet. So we want to send these guys over. So we can bundle, exit, knife, cookbook, upload all of them in one shot. And so it doesn't actually waste time in uploading what it already has uploaded. It will just upload all the cookbooks. It will first look at the cookbook path. So the cookbook path is already defined as site cookbooks, followed by cookbooks folders that will look at the site cookbook path, as well as the cookbook path, and upload all the cookbooks that are not available there in the Chef server. And so currently, it is uploading all the cookbooks. Basically, it is smart enough to know that it needs to upload only those cookbooks that we need to. So for example, this one and this one were uploaded. Others already existed. So we now have all these cookbooks, including the WordPress custom cookbook and the DB user custom cookbook that we now have. We have given it to our Chef server. We have to provide this role also, by the way. This role also needs to go to the Chef server. So we can do that very simply by saying, you know what? I'm going to take all my roles, but we don't need to send the other two roles. We did not change anything, but it doesn't waste too much time. So we can just send all these roles one at a time. These three roles go up. And now we have an updated web server role on the Chef server. We can go and examine it here. We should see now that after you refresh Chef server, it should show you the DB user cookbook like that. And down below, you should also see a WP cookbook for WordPress. And that's what you are looking at. You also see that the role definition for web server has been expanded to include our WP default cookbook as well as DB user cookbook. And those expanded functions, as you can see here at the bottom, there are two additional entries. These are the two that we just added to the role itself that expands the scope of that function and the purpose in life. And with that understood, we want to basically run these guys in another command that I want to be able to invoke. So since I deleted all my boxes that I had, I'm going to create one more box very quickly like this and assign the purpose in life again to that same box. So like this, I'm going to create a new box. And then to this Avra Kadabra, which gets created momentarily, I will assign our purpose in life, which happens to be get all these three things to do in life. So we have actually, let me break it. I just want to actually do this. So I don't want to repeat again. So I'm going to break this right now. So this machine got created. I'm going to go kill it. So here we go. Kill that machine that I have and say, you know, you go away. So this is a browser way of killing. The other way of killing is through terminal. You can also kill the terminal if you like. A couple of other cleanups I want to actually do right now, which is because of this invocation that I did, I want to do it a slightly different way. So all of it in one shot. That's what I want to be able to do. So bundle exec knife client list should show me nothing. Yeah. No reference to Avra Kadabra and bundle exec knife node list should show me nothing. And that's great. So with this understood, what I want to be able to actually do this time is instead of dealing with that box and then going to that machine and putting the machine in production mode and all that, all of these things that we did in the first time we did it, we can do the same thing in a much more delicious way by running something like this. And I'll show you this line by line. So standby. It's like one shot approach to the whole accomplishment that we want to be able to have in the entire exercise that we did up until now is actually defined right here. So here in our example that we used to run before was this, that's what we did. And prior to that, we added some purpose in life and all that and set the machine in environment called production. And then we were able to run Chef manually. But this time what I want to be able to do is slightly deviate from what we did before was this. And this time what I want to be able to do is expand BundleExecNive DigitalOceanDropletCreate. Server name CloudGenius, so this was Abracadabra. I'm just choosing a different name. No big deal there. Ubuntu Box, same thing. New York City, same thing. Py1 to MD, same thing. Bootstrap it. Winning run Chef, install Chef, run Chef. Same thing. Identity file, same file. Identity key, this is the valid one. So I'll take that one and this is not the valid one, so I will overwrite it. So now I have the same key. Environment, I'm basically setting the environment right in the invocation time. At the time I'm creating the box, I'm setting that box in production mode already to begin with. And by the way, like these commands that I will do after the fact in the previous we are doing things, this time I'm saying my run list includes the base role, the DBAFTA role, and the web server role. So take all these roles already to begin with and the very first time you invoke the box, just shut up and run the whole thing. Meaning if I run this one command, I should have a complete WordPress deployment in one shot. So right now if you see here, I have nothing, like nothing, blank, my droplets don't exist. Awesome. If you see my Chef server nodes, I have no nodes. If you see my policy and clients, I have this classroom validator for the company, which is okay, and there is no other client. So now if I take that one long command that I have now constructed for myself, and what I want to be able to do is take that one command, copy it over in the terminal, and invoke this one single long command like this, which not only creates a machine called Cloud Genius in New York City, bootstrap it, install Chef using this private key, the key pair given to DigitalOcean, set that box in production environment, and also make sure that my run list includes base role, DB master role, and the expanded web server role, which includes DB user creation, WordPress database creation, and installing WordPress, all of it in one shot. I do not have any machine right now, but as soon as I invoke this, I will get a machine running WordPress end-to-end live right now. It is happening as we speak. So I'm going to wait for it. It takes two minutes. We should have a complete functional WordPress deployed live as soon as this thing finishes. So I'm waiting for it. And I am impatient. While we are waiting, I have a question. Yes. How does it have your access to your DigitalOcean account? How does who have access to what? How does it have access? Like how does it know how to log into the DigitalOcean account? Token. Oh. So it means you have to use the secure token for this. Oh yes. Because of the token, nothing works. So you saw me doing at the beginning of today, beginning of today's session. What did you see? You saw that my access was denied because my token, I have invalidated it the last time, right? You remember? Yeah. So I think there is something wrong or maybe, yeah, time out. It timed out. It basically tells me that my internet connection is broken. Is that correct? Let us ping. Yahoo.com. It is pinging. Correct. Yes. What about break? So it timed out for some reason. I don't know why, but that happens occasionally. So I'm going to try that command one more time. So basically the same thing, copy, and it knows my credentials because I have given my token to that machine in the KnifeRB. So it has my token. So it has droplet creation started. I get an IP address there, which is where I will go and see my WordPress deployment and is waiting for SSHD. And so in here, as you will see in DigitalOceanDroplet, now I have a droplet. It is started two minutes ago. This machine should be deleted, right? By the way, there was a previous unsuccessful attempt that also called CloudGenius, which was done two minutes ago when I saw that it was timed out. So I want to destroy that box and not the correct box we are getting this IP address. This 116 IP address, that's the latest box we have. In the previous attempt I just did two minutes ago, we have a different IP address, which is 132, and the machine that is currently invoking has 116. And so I need to delete this 132 box like that. And I just deleted that and go bye-bye. And so that droplet, that unnecessary droplet that I had invoked, which timed out, I got rid of it. And I'm still waiting for this box to give me an IP address and all that good stuff that you see is happening. And it is actually doing it. By the way, it grabbed all those things to do in life, like run list, like all of those. You also see that it also grabbed our DB user cookbook and our WP cookbook. And the function in life has been expanded to include all these things, including DB user default, WP default. So all these things are happening for us as we speak. And it is doing it for us. As you can see, it is, first of all, setting up the whole LAMP stack and then setting up a database, database user, database password. Before that, group user, group password, getting the application downloaded and configure it just the way we want, all of that nuts and bolts. And yes, it is complex, but we basically shrank all that operation in one command, which is line number 17 through 26. We just shrunk the whole thing in one command. We can just repeatedly do it over and over again. Any number of machines you want, any number of WordPress deployments you want, you can invoke it like this. And that's what we are able to crystallize in form of one command that does it all on this digital ocean cloud. We can construct a similar command for another cloud on the example given here. But that's a different story. We'll do it. But that's not the point. The point is that it works. It is actually working right now. So we'll wait for it to finish. And then I want to actually go visit that site and see how does WordPress look like again. So if you go to that site right now, where is that? Here, this droplet and this IP address, I copy that IP address and try to open it up. Nothing opens because it doesn't have anything. It is still being set up. So if you see that it is still being set up in Apache, it'll do its thing. But let us wait for it to actually finish. And then we should see WordPress live running on the box as soon as this thing finishes. And it actually installed WordPress. I saw it did it. So I am going to reload. And we should see WordPress right there and continue. And let's go and submit. And run the install. And give it a name like this. And username and a password. And password again. And my email address. And don't allow. And install WordPress. And then we log in. Just like that. Just like that. And here we have, we hit site. All up and running. One shot, one command, two minutes, done. Right? What do you think? Are you still there? Or did you sleep? It's awesome. Thank you. It's great to see it work so fast. Yes. Yes, yes, yes. You know, this is, by the way, a slow way of doing things. This was one of the most intense things that we did, right? This was a slow way. I'll show you even faster way of doing things in a matter of, you know, maybe in another discussion. It is not chef discussion, by the way. It is Docker. So we'll do that also. But I want to conclude this exercise just to make sure that everybody understands what we really accomplished. What we did was the nuts and bolts way of understanding. These nuts and bolts are really, really needed for clarity. If you really clearly understand what's going on, then you can apply the same concepts to any other tool. And it's not that big a deal, in fact, you know, totally, totally doable. But this level of depth helps you gain clarity on what we really did. What we basically built out with was, you know, get some random cloud to get us a machine. And in there, we have Linux installed. We said, you know, get me Apache, run some PHP, create a database server. And by the way, get me a root password. And after that, we have a LAMP stack going. Now on that LAMP stack, we said, you know what, get me a DB user and a password for the database that I want to actually have these three things on this database server. And get me the application that I want to run, also installed, and then connect all that thing, configure the connection between the database and the application. And now you have a nice solution out there running for you. On all of that is served. And you saw this construction of all these elements, item by item, as we went along in the nitty-gritty of this exercise that we did. And you saw that there is an update for WordPress. So you can just quickly update that and say, update now and all that. But there is another way to do it. The other way to do it is actually getting that script that we need to modify a little bit. So the script that we had in the example here, this one, this script, refers to 4.2.2 version WordPress. So if you go to that location and try to download 4.2.2, you will get 4.2.2. But this WordPress installation, you can get version 4.5.3 right now. And how do you do that? It's basically by modifying this version 4.2.2, replace that, and replace all the occurrence of 4.2.2 with 4.5.3. And that's how you get the latest WordPress installed. As simple as that. It's a little hack, little edit to your configuration to get the latest version of Chef. And that you can obtain through any way you deploy. The scenario essentially is you make that change in your Chef infrastructure. And what we have in our virtual box that this Chef run finished, it took us about 2 minutes and 22 seconds for it to do the whole thing. You will also need to do a good thing right now, which is to git add everything and git commit everything. So let me have a complete stack with application deployed. And so we have this git repository showing and preserved all the changes we made to our creation of that file, the creation of DB user cookbook, the creation of WP user cookbook and all that detail that we just did. And the notes that incorporate that change is also included. So essentially, we were able to accomplish all these details. Now let's see what missing steps. I don't want to miss anything that I wrote down before, so I tend to forget. So in this example, you can run the entire exercise like we just did. Let's see if there is anything missing in this particular exercise before. No, we are not. So the next exercise is a whole lot simpler than this one that we just did. And in this exercise, we will do it at a later time. Let me conclude the previous discussion before we jump. To be able to operate like this, and you can practically swipe, let's say, Apache and put nginx, and let's say I don't want to use MySQL database because I would like to use PostgreSQL. And WordPress doesn't work with that Postgres, but whatever. And so you will like to have maybe another application called Drupal and make it to work with Postgres. Does it work with Postgres? I don't know. Let me check. Drupal, Postgres, I think it does. Let's quickly check whether Drupal will work. Yeah, it does. So Drupal works with Postgres, no problem. So Drupal, by the way, is a good software that runs the White House. This site, the White House site, is basically Drupal installation. That's what White House has done. And they are running this open source project called Drupal.org, which is conceptually very similar to WordPress in practice. It's a different application, by the way. And so this is another open source product, very good product that you can basically, any application you want to run Drupal there, same concepts apply. It's also a LAMP-like stack, Linux, some web server, like Nginx, PHP, or a Postgres database as opposed to MySQL database, and create a user database password and all that, and then install the application. You just have to understand what pieces you need to modify and build those things appropriately. For a LAMP stack, as you know, L-A-M-P, you don't need to have Linux. You can use Windows, so it becomes a LAMP stack, W-A-M-P stack. And sometimes you want to use, not Apache, but use Nginx. In that case, people use the word Linux, Nginx, MySQL, PHP. They call it Nginx, a different name, LAMP stack. And people have come up with other ideas of creating custom applications to deploy whatever you want. And a commonly used example for that is called the MEAN stack. Here the MEAN basically stands for Mongo as a database, Express as the web server, Angular as the JavaScript framework, and Node.js as the backbone to run it all. So you will see references to MEAN stack where people will deploy JavaScript-based custom applications on top of another platform. And people will make up these words all the time as they will create something, acronyms or you will find too many of them all over the map. But the core concepts that we understand is that you need to identify the application that you want, the dependency that it needs, and then build out whatever it needs all the way from a foundation and make sure that this foundation is solid. And then everything else that you know and control, control through a Git repository so that you are able to reproduce the exact same every single time and not just that. Your colleagues, your coworkers, your customers, your partners, all of those will also be able to reproduce this exact version of version 4.2.2 of WordPress with all the underlying dependencies that you have reserved and kept your credentials safe and secure encrypted in a Chef server that is shared by the team that is managing a deployment of this exact version of WordPress, even though the latest version may be different, but that's the point. You control what your outcome you want through a disciplined method of operating and deploying through in this example, we use Chef. We will use Chef or use other tool, but the concepts apply universally. Basically you have the sense of discipline. You put everything in control, including your application itself, your infrastructure, and the layout, the configuration of the infrastructure, the overall architecture. So we can actually expand this idea that we are discussing right now into a slightly different fashion such as you will see here. So here like what we just did was we were able to basically put all of these elements of our application on one common box. Basically if you put all of these aside, we were basically beginning to build an infrastructure that scales eventually. What we have succeeded is this user that comes and logs on to this location, we have this user connected and this box itself runs the database, it runs PHP, Apache, and everything else needed to make that user see WordPress. That's what we just did and we did all of that in one box, but in real life you will have more customers than this one guy. What if more people come like here and more, maybe a gang of people just show up and they all start hitting your website and that may be one of the reasons why your site is slow. The other reason the site could be slow, for an example, is that this box is too small. So you want to maybe make it big and you can make it big by adding more money essentially and make it even bigger by adding more money. But how much money do you want to add like this and that becomes very, very expensive. So another way to design applications and deploy them in the cloud is to not scale them like I am showing you, not too much like this. Yes, you can go a little bit more bigger and smaller, but that's not the ideal scenario in every single case because this kind of a scenario of growing has its own limitations. You cannot get a bigger machine than a $640 per month machine. That's the upper limit in this particular cloud right now. You cannot get a bigger box than this, 64 GB, 20 CPUs, that's the limit. So you have a limit to it. The limitation comes from the fact that your box can be limited to say $640 per month or whatever the number of CPUs are. So that's the limitation that we run into and we don't want to actually run into limitations because people will grow in number and these are the customers that you want to give them a good experience. And so the scenario of scaling changes a little bit, this kind of scenario as you know already is called scaling up, scaling down, up and down. You know this already. You heard me say that before. So you want to change it a little bit different fashion. You want to actually do a different type of scaling and in that I want to be able to scale out like this and add more servers. And in order to accomplish that scenario, I would rather have my database separate or rather have my database separate. So keep the database box in the back and have these machines maybe begin with just two. So like this. Or even simpler, just go first like this and put, sorry, close, back here. First thing is to separate the role that we have in two parts. This guy will run just database and this box will run your Apache and PHP and your WordPress application itself. So we will have to identify what purpose in life this box will get. This box will get Linux. You will have PHP and database. This box will have Linux, PHP, Apache, and WordPress. So that's the division of responsibility. You're basically getting two boxes to do the stuff for your customers and by dividing this kind of a role in life, isolating a database layer from the application layer. That's a simple way to divide the work. And that's how I would like you to begin thinking about. And this is a stretch exercise. It is something that I would like you to do. But before you stretch into this stretch exercise, let us first get the basic thing going, which is just get the one box running first, the whole thing end to end, get it to work, get a feel of it, and then think about how do you divide the responsibility among these two boxes that, like I described, get this box here and this box in a separate box on the back side, put the DB role there, web role here, and let it play, connect them together, and then have these customers hit your web server. And whenever it needs to query the database, it will go query the database, get the results back, and operate. That's the second logical step to split the function that we have in our infrastructure into two parts. Now when this thing also grows and your customers grow, then you will have more customers showing up, which becomes another problem to scale. So you have more customers showing up. They all hit your site. Then you will have another problem to deal with. In that scenario, you can handle a slightly different fashion by putting a larger number of application servers that runs your application like this. You can scale out like this. However, it needs a front end to balance out the load. So you need to have some kind of a device or a method to distribute the load. You need a... What's going on here? Don't save. So you need... Let me not play with it too much. What you need is essentially these guys that the customers will come, but this box will act as your... Something is wrong today. This box will act as a traffic cop, and he or she or this box will guide you, customer, when you hit the site, you should go here. And you, dear customer, when you hit the site, you should go to maybe this box. And both these guys, they're application servers, essentially. So application server, application server, they will interact with the database server on the backside, both of them, and get the responses back from the DB, and then pass it on to the load balancer. This is the load balancer. And now you have traffic regulated in a fashion where the traffic cop actually diverts the traffic among multiple nodes that can work for a variety of customers. And when you get more customers, all you need to do is just add... Something wrong today. Add one more box like this and more like this, and have the traffic cop understand that, you know what, you need to now go and pass on this traffic, not only here and here, but also here and here and here. Now at some point, things will go wrong. Your boxes will start behaving, and some of them might die. So if this box dies, in that case, you need to be able to find out that this box dies. To somehow communicate back to this box that, you know what, this box is dead. So don't send traffic to that dead box, just ignore it instead. And instead, divert the traffic to the other boxes that are still available. And so these box and that box are still available, so use them. However, don't send to the dead box. And that somehow you have to communicate back to the traffic cop that one of our boxes died. And then you get another box in its place. So you basically grab another box, put that box in the right location, and make it up and running. And when the box starts up, you communicate back and say, you know what, that new box has taken shape of taking place of the old dead box, so please, please start making use of it. And then your load balancer, the traffic cop, will then understand that you now have that dead box replaced with another box, so it will incorporate that scenario. So that's an expanded scenario of scaling. Similarly, you will scale and have multiple load balancer points available on the internet that you can create using HAProxy, which is an open source software that you can do it yourself or you can use a load balancer service available from many cloud providers. Almost everybody will give you a load balancer service that you can basically make use of here and then have it connect to these boxes. And we will do such an exercise where a highly, highly available load balancer service, which will basically have two availability zones or sometimes even more availability zones to provide a higher level of reliability and availability for these customers to be able to help. You can do it yourself here using HAProxy or using load balancer service and we will have an exercise like this coming up. On the backside, there's also this problem of high availability, where what do you do with the database? And to address that scenario, you need to have a high availability, multi-availability zone database service that you can apply. The scenario for that usage will be to use a database as a service. Most cloud providers will give you a database as a service solution in which they are providing you a multi-availability zone, multi-AZ database solution set, which this box actually is in multiple locations. There's not one point of failure, not a single point of failure, but one of them is they'll automatically replace it for you and keep the service working and running. But since this part is mostly custom and you tend to run your own custom applications here, that part you have to basically create and scale out like this on your own. And that is something that's something that you want to be able to configure and understand. But before you jump into this level of complexity, I would like you to keep things really simple and make sure that you understand this two-part role in life, two-part basically split the functions of application server and the database server into two boxes, make it simple, and then understand that complexity first before going into this scenario, which I'm just trying. So what I'm suggesting is just take two boxes here and here, assign them these purposes in life. The web server role and the database role and have them communicate in two separate boxes and have this customer visit the box like this. And so have this customer visit the web box and that web box should then communicate with the database box and get this guy WordPress. So just get this scenario playing before you jump onto a more complex scenario. And if you are interested in this kind of a deployment through Chef, please chat with me because we have a solution ready for you to use and refer to it. And I will show it to you. But only if you actually begin to take efforts in understanding, thinking, and discussing with me as to what would it take for you to actually employ this. In that case, I think I put a do not disturb here, it is already on. Why does it ring? Something is broken. So what I'm saying is on this two-part role, so two droplets, that scenario is already available as a solution I have for you in GitHub somewhere, not here, github.gist. So there is a solution already I have placed for you. I will give a link for you in that location. But before you use that, so create a separate web app server and DB server, that's the solution available there. I would like you to, I'm deliberately leaving some parts open-ended for you to ask me those precise questions. What would it take to make it happen? So it is written down very clearly actually in this particular DB Setup.txt file, which I'm going to paste a link for you in Slack chat. You have the solution there. However, I would like you to think about before implementing as to what would it take to actually implement a two-droplet scenario where you will have the purposes distinguished between web role and DB role playing on two separate boxes. That complexity has to be understood before jumping on something very large-scale. And we will get to the large-scale point, but I want you to do this first, just a simple two-part split, and then think about larger cases. That's the point I'm going to try with that idea. So with that understood, I would like to ask you if you have any questions before we take a short break and then do the next step. Questions? Any questions? Nobody? Hey, Dhanajesh Munir. How are you? Hey. Is that... Yeah, no. It's Mohammed Munir. And that's Salam. I know I missed most of the first hour of this because I was out. And I missed last class because Friday was the last day, but I don't have a question. I followed along this late, but I'm going to watch the video again, and I'm going to try to finish up module seven and eight before Friday. First thing in the morning. But I don't have a question, but I will try that one we just explained right now. Follow that link, and hopefully I will ask questions on Friday about it. I think you're more than welcome to ask. But I do have to start from the beginning because I did miss the first hour. No worries. And in fact, you know, there has been a request from, I think, Ketosin suggested that we do this whole thing again, one more time. I am game for that. I will do it. I will absolutely do it. If you say yes, please do the Chef thing in a separate class, I will gladly do it. I need to see three yeses in the Slack chat. I will say yes, because I did miss it. I will do it because this is, I think, one of the most complex exercises. And if there are three yeses, I will set a date for it and do it. No problem. I have to catch up. So I definitely would. And I'll give you ample time to actually catch up and then run it. That is something that I think it is important for you to digest the whole thing first before I rerun the whole thing. And so I think we have three yeses there. We have Mohammed Munir and Paul Grozen, and Ketosin already asked. Salam. Yeah, Salam also says yes. I think this is a need. So I will do it. I want to give you some time for you to digest this on your own. And then one more session, redo this whole exercise, and it's going to be an extra session. We are not disturbing what we are running through the program. So whatever we are doing, we will proceed along in the regular sequence on the cadence that we have set, which is Monday, Wednesday, Friday. We are not disturbing that, but I want to do this module eight, which is deploy a complete application and its stack of dependencies in the cloud using Chef. I will like to do that exercise on a separate session a few days from now, not right away, because I want to give you enough time to digest what we have done and actually watch the recording, try it out, run into issues, call me, chat with me. And then we'll do it together one more time. And yes, I will record that. And yes, I'll give it out to everybody. So that's not an issue. I will set that date to maybe sometime like right now we have the sixth. We'll set a date of, say, Saturday or something, or some other, we'll take a date, but it's not going to be the eighth, which is where a regular scheduled class is scheduled. So I'm not disturbing that date. We'll do an extra session at some other time. I'll set a date in Slack chat and tell you. I think Saturday will probably be good. If that's not okay, tell me. Okay. If Saturday doesn't work, please tell me, very likely to Saturday as a date. Okay. No problem. Okay. So, Nilesh, I did have of this, I created successfully the knife.rb, I could able to do it and then I was trying to push that code to GitHub, but I was not successful. I was not successful. I'm glad, but it was a key in it. If you have a key there, you want to hide it and I'll repeat how you do that. But I have a question. I need your help. You know, I was not successful as I said. No worries. So here's how I do it. So let's understand. And, you know, in a digital ocean server, there was asking for a password. Which password should I use? So at which command are you running that is asking you for a password? Like I was trying to do SSH. Okay. That means your key is broken. Your key that you have. Yeah, I checked my, I did check the keys, keys is fine. It's working fine. That is the only, there is the only reason why it is asking you for a password because your key and its usage is improper or the key is bad or something like that. There is no other reason it should ask you for a password during SSH if, unless you have your key wrong, key is broken. So this IDRSA key that you have here broken, it will ask you for a password. I was watching you, you, you put it down Abraca Debra, but that's your magic. It's a joke. It's a joke. Yeah. It's a joke. This time I use a different name. It's cloud genius. Right? Oh, okay. That's fine. But you know, I just want to tell you that, you know, I, I get a password through the emails from digital oceans. Yeah, if digital ocean is sending you password in email, another sign that your key is broken. Okay. It just means your key is not in there correctly because it's correct. Exactly. Yeah. That's another sign. I would say because it's my free call is a freak me out last night and it's like I eventually give up and it's internet was slow anyway. So in the morning I was trying and it was the same issue that could be okay. So if you do not actually use your key, it will email you the password. Oh, that could be okay. And digital ocean is smart enough to understand that you made a mistake in selecting the key or your C key is not selected properly or something wrong. It will give you the password. Yeah. So first of all, I was clicking and they create the three, um, mission, uh, three servers and then I delete two of them and I don't know which one I'm using. It may be there. So, you know, system was confused, which key I was saved when I get the server. That could be the issue. Other than that, I'm doing fine so far. So good. And, uh, hopefully I will go through and if you can, uh, do it on more time, that will be good. I will. I just said, I will do it. So I will, I'll give you an exact date and time, uh, and then, uh, in Slack chat, maybe after the session, I'll think about the good time that I would, I mean, we'll do it and run it. Uh, it will not be on a scheduled hour. So it will be a session. Okay. I have a question beside this one. Yeah. Uh, the last class that I missed, that one is on online, right? It hasn't been sunk through bitsync, right? So what I, what I, what I did was just to confuse everybody. I'm sorry. No, no, no. I've seen it. I'm just confirming. Yes. What I did is what I, what I just did was I migrated all these files, the files over to YouTube. So that, that means also in this location, yeah, module 11 is what I found it. Okay. Yeah. So these are recordings from previous sessions, I migrated them to YouTube and so that other people can also see it. Okay. And that is the problem that we, I run into is I, I send them to YouTube so public can see it and then they can see my keys and then I don't want them to see my keys or misuse the key. Got it. Okay. I found and I did see that file that you put up the text file with the location, but I was just confirming that there wasn't just me. Okay. Got it. Yeah. Everybody, you know, I basically took the videos to YouTube and I placed it there and I have the links in the, the site itself. And by the way, here in that location, you can also find recordings from other sessions like, you know, in, in a previous, yeah, previous class. And so in, uh, right now it is what summer. So if you want to say winter 2016 in January, there are January sessions available if you want to watch it. You know what? That is awesome because I did miss the first class, uh, and that was the recording that was in, that was in, uh, yeah, I know, but these are, these are like different people. This is not you and all these guys, all the, all you, this is not all you guys. It's a different group of people, I think about from a previous January timeframe. Okay. Cool. But you have access. I have no problem in giving it to you, so don't worry about that. All right. Thank you. You have it. You can review as much as you like and not only for DevOps, you also have it for other. So in the technology section, if you go to the technology section, you will find not only the summer recordings, which are available with you, uh, as a team members together, but also from winter 2016, that is the prior iteration of cloud technologies in January that is also available to you. Now it can be boring to watch these videos that three hour long, each one of them, and you don't have a context as to what is going on because you did not participate. So boring. Honestly, honestly, it may be boring, but I'm just saying. But it's there for, if you want to watch them, correct. So now let us clean up. So cleaning up is an important thing to understand that, you know, when you clean up, that you have to do it in a systematic fashion. If you clean up, uh, this droplet by destroying it, the identifier, you need to copy that and then say bundle exec knife, digital ocean, droplet destroy dash S and then identifier. That's how you kill the box. However, when you kill the box like this, you still have two entries leftover in the chef server and you want to delete them also. How do you delete them? Bundle exec knife client delete and then cloud genius like that and say yes. And similarly, you have to delete the corresponding node called cloud genius and say yes. And one more cleanup step, which is to remove the known host file. And this is not really no, no, no, not knife RV, but known host remove the known host file. Also, this step is not necessary in every cloud, but sometimes if you run the same exercise and use the same name in certain clouds, they will assign you the same IP address. Just run the same name again and invoke a new machine, a new WordPress installation, just like we did with that long command, one shot command here. This long one, you run the same again, digital ocean will give you the same IP address again. And if you have that still older instance of known host file in the entry in that known host file, it will cause you connection issues. So you want to clean up that also. So that's an important step to remember in certain clouds, they will assign you the same IP address over and over again. And therefore this file needs to be removed. You also want to delete the node entry for cloud genius in the chef server. You also want to delete the client entry for cloud genius in chef server. And you want to also destroy the box, which is this cloud like this in digital ocean droplet destroy in Amazon cloud, it's going to be different. Every cloud has their slightly different way of writing it, but you need to destroy the box, delete the client, delete the node, clear your known host file. And now you have it in a point where you can invoke the exercise one more time and it takes two minutes, 22 seconds and you have another WordPress box. So that's what we did. Now the exercise for you is to not only do this, but also think about how do you expand this concept to a two box scenario, right? Web server, database server, separate these roles, separation of concerns and have these two boxes interact with the customer and have that customer engage with the web application server. The customer should see WordPress here and this web server and this database server should work together to provide that solution for this customer. That's the scenario I want to think about. I want you to think about the solution to that problem is available in the gist that I'm going to paste one more time. And that is here. That's the solution to what I'm describing right now. And the exercise is this and the solution is in gist right there. So give it a shot, give it a try, think about it and we will run this whole thing all over again until you get it. My goal is to, is the thumb rule of, is the rule of thumb to delete no-nose file all the time? No, no, no, no. Don't delete all the time. Although I have been generously deleting it all the time. You want to actually delete specific entries in the no-nose file as needed. You have to be diligent about what entries you want to delete. Otherwise you will be prompted with this, are you sure you want to correct kind of a question when you attempt to correct. To avoid those prompts is what you do is this no-nose entry in the no-nose file is what gets added. And if you are okay with that prompt, you know, it's okay to delete. But when you are in a large company and you have a common machine that people are accessing, it is a good idea to carefully delete only the entries in that no-nose file that are offending and not every entry. So I am just brute force deleting the whole file, which is not necessary, actually not appropriate in a larger context. You should be only the specific entries in the no-nose file that hurt you. In our example case, we just have one box and one person dealing with the box. So who cares? Delete the whole thing. Right? That's the answer. That was the question about the delete the no-nose file all the time. Okay. So with this exercise that I want to close on this window, close Atom and clear my terminal and come out of that Chef repo completely. So many of you I've seen work inside not this folder, but sometimes you go and work in some node folder or sometimes some other folder. Sometimes many of you actually go to this folder for some reason and then work in that folder. Don't. Don't work here. It will cause you trouble. Come out of it and go to the proper location where you're working and work in that folder, which is the exercise you're doing, be in that folder. That's where things will run. I know some of you have also had this habit of running pseudo, like for anything that you see some error, you want to run pseudo. Do not do it. Pseudo is like what Uncle Ben said to Spider-Man. What did he say? With great power comes great responsibility. So the pseudo is like that. It's great power. So you don't want to wield this pseudo everywhere, wherever you feel like, unless you really know what you're doing. It is a very powerful command. You've seen me illustrate the power of that command by destroying a machine that we created in Docker exercise a little while ago. So don't wield power. Unless you know exactly what you're doing, only then you use pseudo, but otherwise there is absolutely no reason to use pseudo at all, except when you're running Chef, which requires pseudo privileges and that is okay. But probably on this class, in this whole bootcamp, there is no reason to run pseudo. So don't run pseudo. Work in the folder. Don't work in the.ssh folder. Not here. No. Not in this folder. This folder is where you keep your keys. Don't work here. Come out and work in whatever folder you want to work in. Okay. Now, let's change topics. Maybe take a short break if you like, I think I would like. So we'll take a short break, a few minutes, 7.33 right now, we'll make it 7.38. We don't have much time actually left. So we have say about 20 minutes left. So I can run through the exercise. That's not the point, but I would like to ask you, do you want to run this exercise? It doesn't take much time. This exercise about running your own Chef server. It is actually very easy now that we have done a whole complex set of exercise. So that should not take more than 10 minutes for me to do it, but that's not the point. The point is, I want you to understand why do you need a Chef server? Your own Chef server. Why do we need that? Any thoughts on this? Maybe after the break. I just keep forgetting about the break. So let's revisit at this time, Pacific, Eastern, and talk about why your own Chef server and at least have the discussion and maybe get the exercise going. Okay. So 7.38, I'll be back. See you next time. Hey, can you hear me now? Yes. Good. Good. Good. I was concerned. I think I almost lost you. I was about to break the connection and reconnect, but if you can hear me, okay, that's good sign. That's a good sign. So I am going to now proceed. I want to answer the question that I think Anand had. The question Anand had was, hey, do I need a new virtual machine? The answer is yes. The answer is yes. You need a new virtual machine because we have updated the exercise to use the latest version of Chef. And that required a lot of changes to gems that are installed. When you install gems through a gem file, you need to build some of them locally, natively. And that build process requires more than one GB RAM on the VM. So what I've done is I've built these gems for you already and have given you a new OVA file. In the meanwhile, Oracle also decided to update their VirtualBox software. So the virtualbox.exe file that you may download from Oracle is going to be a new one. So use that one, please. In addition to that, I have given you a new OVA file. It is available in your workstation folder. And that OVA file you need to import. But before you import, you delete everything that you have currently inside in your virtual machine. Delete every single thing and then import this new VM, OVA. That OVA is available to you in your folder, which is called workstation. It looks like this, if you remember. That OVA file you need to import by double clicking into your VirtualBox software. So you can just import that machine and that's how you should get a new VM that looks the same but then there are newer versions of gems loaded up in there. And that's what you need to use for the exercise, otherwise exercises will fail to run. It will not work and I want it to work. You can get it to work yourself by building the gems yourself but I have done it for you. If you want to use it, go ahead. Now having said, let us now discuss the idea about this concept of Chef server that we have been using from this company called manage.chef.io, the website that they give you a Chef server. The limitation of this one is that it is free, by the way, but the limitation is that you can have only five nodes. And as you learn, it is totally fine to use just five nodes but then your infrastructure will grow. And so this free may not work for you, which means you have to pay them money. And so that's one approach is to just use a ready-made Chef server from them and that is totally, totally fine approach, especially given the fact that our data bags are encrypted and our passwords are all safe and all that, we don't have to worry about security standpoint as such as to whether my credentials will be stolen or somebody will snoop on my machines and all that. It's a decent, decent service available out there. However, it is a commercial offering and some companies want to go purely open source and take the whole control in their hands and for them, they have this other choice, which is to run your own Chef server. In order to use a Chef server on your own, you need to have another box and that box will essentially run your Chef server. And so it will give you your KnifeRB and your Postal PEM file and all that. You will see these things that this Chef server box will provide you, but then it will not give you that beautiful user interface that you are probably used to by now, which is this user interface. This user interface is a commercial product. It is not available in the open source. So what you really have access to is access to an API endpoint from Chef server on GitHub. You can see the source code. Here is the code, sorry, here is the cookbook for the Chef server. Let us go GitHub Chef server and this is where the product called Chef server is available on GitHub and here when you use this Chef server, you can install it on a box that becomes your own Chef server and when you manage the box, there are no limits to what you can actually accomplish as long as your box is big enough and capable enough. You can basically deploy your own Chef server and use it and then there are no such limits of you can have only five nodes and all that. That whole thing goes away, although the restrictions and limitations just go away because you are now dealing with your own infrastructure, your own box and your own box running Chef server and installing Chef server is a pretty darn simple thing. However, we will, like usual in our exercise, we will run and install Chef server using Chef and that's how we like to do. So we will begin basically by grabbing certain things that we need and using a cookbook for Chef server to deploy Chef using Chef solo. So it's really, really uber in that it's very meta. So what I just said is that I will use Chef solo and use the Chef server cookbook and then take a box and in that box I will install Chef server using this cookbook that I will play using Chef solo, this cookbook and this cookbook will install Chef server here on that box and then that box becomes my Chef server and its address is not going to be manage.chef.io but it will be whatever that IP address is. That IP address for this box is going to be the Chef server IP address and that is how we intend to do. So it's the Chef way of deploying Chef server using Chef solo and that is what this exercise is going to be and it is very simple. It's basically as simple as the very first Chef exercise you did. Basically you take a gem file that looks like this, bundle it, initialize a new kitchen and then you get some cookbooks from the supermarket and then you create a node like you did in the very first exercise. In that node you are defining a run list with just two things. The apt recipe to update apt cache and then the server recipe for the Chef server. That's it and when you invoke this you have a ready made Chef server going and that's how you connect to it. You basically invoke a new box and then you have a Chef server working. You can actually see what it shows you. By the way this example shows you a user interface where you can log on to the Chef server and this Chef server is a little bit older Chef server so it does have a user interface. As you can see here the version of Chef we are using in this example is 11.1.6-1. That version of Chef and its corresponding Chef server had a user interface. That is what you are looking at this picture which is what shows here. This picture actually shows you something happening and it's an animated picture by the way. You saw that this does have a user interface and you can see that the whole Chef infrastructure actually got installed and then you can configure your own KnifeRB basically that uses that Chef server. I'm basically extracting all the credentials. They will not give you a ready-made solution like this for example manage.chef.net. You have the ready-made starter kit that you have here. That starter kit is not going to be available to you at all when you are creating your own Chef server. So that is the only complexity here where you basically have to construct that starter kit by yourself. This starter kit that you downloaded from the Chef server the last time in your own Chef server you will not have that ready-made solution. So you have to construct that starter kit yourself and that is what this exercise is. I can do it but I don't think we have enough time left so I'm not actually invoking it because it will drag on beyond the hour. But I'm making sure that you walk through this step when you get to the point. But before you get to this exercise I really like you to accomplish those steps which is before even Chef server comes along just use the commercially available Chef server solution and use that Chef server that we have from the company on your workstation, on the cloud genius workstation that we have. You configure that box in DigitalOcean, that box that we have and configure it to run WordPress on its own. That's the first thing. Through a cookbook complete deployment into one command bring WordPress up. Second thing I would like you to do is to remove these guys, get two droplets this time. Box number one, box number two, two boxes, two droplets. Call this the web server box and call this the DB box and have them connect to each other and have WordPress deployed here. Again using the Chef server instruction and once you finish this then I think it's a good idea to try your own Chef server. This is going to be your own and that is not that complex exercise actually speaking. It's not that difficult at all. The most difficult part will be the very first part which you're doing right now. So getting the one box thing to work. That is the most difficult thing and I think I want to have you focus on that before going to your own Chef server or even the complexity of having two different droplets, two different boxes. Don't even think like that yet. Just get the WordPress going on just one box, nail that concept clearly before adding complexity and we will do Chef server. The exercises are available to you and you can refer to them and use it and all that. So take your time to digest it but get it to work. Get that one unit complete end-to-end deployment of Chef server to work correctly and we will do an extra session like I said or I'll tell you the date I think very likely Saturday but I'll confirm that date on SlapChat after the session is over. So after I speak to my wife about Saturday plans. Having said, I lost my train of thought completely but what I'm saying is we have a few more days before we wrap up this DevOps section in which I have said I will do an extra session on just this Chef WordPress exercise completely but what I would like to actually cover is a Ansible that we still want to cover a little bit. We'll expand this Ansible portion into the architecture segment also and then begin looking at the next segment which is the architecture segment starts. I think I don't remember exactly when we started but let me just quickly check dates as to when do we start that. Do you remember? I think the date is 13th of July when the architecture starts. So we still have 8 and 11, two more days left. I think that's ample enough time for us to touch base on what I want to cover. So I will use those two days for DevOps discussion and then on 13th we start our, where is that date? 13th? Am I confused? Are dates or not? Do I sound confused? I think that's right. Why do I not see it yet? Oh there it is. So what I'm looking at is the future dates, I was looking at the future dates in September and I got confused. So the dates are actually here. The dates are these dates, July 13th and all that. So that's good. So yes, no confusion there. So I was looking at the top and I have added some more dates for future bootcamps which starts in September 13th for cloud bootcamp and then another one in January 17th next year. Those are the dates for the future. And then another new bootcamp that I will be doing is data science bootcamp which is also in January but that's not announced yet but it will come, I'll talk about it later. So summary again, do the chef exercise and is it just me or is there no audio? I think it was just me. So do that chef exercise, one box, expand into two boxes, chat with me, do it, make sure to do it. This is the one exercise that will give you nuts and bolts understanding of complexity involved and beyond this, the tools that we will use are slightly higher level tools. They will make life simpler. They will not be as gory, literally gory as we did this one. This is probably the most intense of all the exercises that we have in the program. With that understood, I'm not basically saying that I will not inflict more pain on you but instead take you a little higher level to make it faster and get to a result even faster than you thought possible with what we just did in the chef exercise. So we understood the concepts, once the concepts are nailed down we'll use higher level tools so that we can build up a whole lot faster and scale out much better. We'll do those things but remember you have to do this exercise to give you this complete understanding of the nuts and bolts without which just merely using higher level tools to automate things doesn't make sense. It will not make you a person who understands the level of depth needed to make it a complex deployment successful and that is the reason why I want you to actually try this exercise and succeed in doing it and I will help you any step along the way, any time you feel like, just come to SlackChat and I will help you out. Thank you. Please do it. And on the certificate side, on the certs for Boeing employees, please log on to the Bellevue College website, Anand will share a screen as to how you log in. If you haven't logged in, grab your certificate from the Bellevue College website and give it to the LTP and have LTP come back to you saying accepted. Neelesh, Anand is here. I sent you the email to you and Sam. So that's how you do it. I'll provide it to everyone. If you do not know how to do it, log on to Bellevue College website, grab the certificate, take that certificate, give it to LTP and have LTP accepted. That is a critical thing I would like you to do and for those who are not going, the way to grab your certificate is very easy. You need to basically click through all the steps and mark them complete. And as soon as you do that, the certificate will pop up like here and you just click and download the certificate that you are registered for and enrolled for. And there are several other courses, but you will probably see only two, I think. Yeah. You'll see a third course opening up pretty soon for architecture, which parts of it, I leave that in gist. So in GitHub gist, you will see a lot of them deliberately left it out there and we leave it like this because I want to actually simulate your thinking, your thought, and I would like the architecture segment to be a whole lot interactive as opposed to just me talking, which is what we did up until now, most of it, but I would like you to participate. And that's what I would like to have in the architecture segment, which starts 13th, which is two days from now. I mean two class days from now and on the 13th, then we start that one and that's pretty much what I wanted to say. If you have any questions, please chime away, ask away. And as otherwise, we have that Slack chat going on all the time. So that's not a big deal at all. Please, if you can demonstrate using this for us, okay, let's see what it is. So clock, clock, login, sign in with Google and signed in with Google. Now what? Here we go. So this is the tool that Muhammad is asking us to try. So there are two aspects to it, the design aspect and the live aspect. So if you have to see the design aspect, you can basically mess around with whatever you feel like and delete them and just get rid of whatever you like, as simple as that. You just create an empty sheet of paper and in that empty sheet, you basically do whatever you want, build out whatever infrastructure you want to create. And just like I draw in the tool that I use, that's the answer to your question. So if you want something like EC2, get a virtual server, it will actually tell you how much will it cost, which is very nice. So if you want to get an entry machine, you basically drag that machine and it will show you the cost of that machine already. Similarly, if you want to run some Route 53, it will tell you how much it will cost. So you can basically remove the item by pressing the delete key, off is off, delete, why is the keyboard not working? Option group. I think some keyboard is stuck, so I'm going to close this window again and open that link one more time. And let us create a new reference. So here, if you add S3, it will tell you that it gives you a bucket, so you can add a bucket. And if you want to add a DNS Route 53 server, it will tell you the Route 53 server, you can place it wherever you like and draw around whatever you feel like. But the interesting development with this website, AppLint, apparently is that you can click on the live button and here, add an AWS account, pay for the feature set. And this will connect to your cloud in Amazon, this is just Amazon by the way, it will actually connect to your live Amazon account and draw out a picture of your cloud as it sees. So whatever you have really deployed in the Amazon cloud, it will go grab that information and draw out a picture like this for whatever you have implemented in real life. And the flip of it is also being built, which is if you design something, you can then apply it to the Amazon cloud visually. It's more a visual tool of understanding the cost, understanding the layout of the architecture and connecting it back to a real cloud to show you what live versus design is as long as you add an account. I don't have a subscription to this, but there's a trial comes, it's a 14-day free trial and so you can actually sign up if you'd like. However, in my mind, these are gimmicks. I would not mess too much time with them except that I would actually learn basic cloud concepts like directly go to the Amazon, understand what they have, go to Azure cloud, go to Digital Amazon cloud, go one more thing here, which I think may have mentioned to many of you is that Google is giving Google cloud $300 of credit, use that. So if you go take that link, copy link address and open it in a new window, you can get $300 of credit. Now I cannot get this because I have already used it up. However, if you don't have used Google cloud, they are giving you $300 to spend for the next 60 days. I know at least two of you have taken this, but it's a great idea to just play with that cloud. If I go there and try to grab that, they will not give me because I have taken it already long time ago. Oh, it does give me? I don't think so. I don't think it will give me. It will say, no, it's not available to you. Yeah, sorry, free trial not available. Because I think in my example, I have actually tried $2,000 worth of Google cloud. So that's the value they gave a while ago, 2014. It expired. I tried it in 2013 or sometime when it came out. That used to be the case of promotional value, but today it is $300, it's good enough, enjoy. Play with the cloud, understand its capabilities. It's conceptually similar to what you have seen in Amazon. You have a concept of a VPC, they have a different name for it, network, they have a different name for it. So all these things that are there in Amazon, you will find them in Google, you will find them in Azure cloud, except not in digital ocean. Digital ocean is not really a cloud. It's more like a VPC solution, not VPC, VPS solution, virtual private server. So you get a box and you just start it. They don't give you any other thing apart from just the box. Other clouds have elaborate capabilities that you probably have seen before already. Cool. So that was the response on your cloudcraft.co question, which is it's more like a drawing tool and sometimes a gimmick. It works with only one cloud and that's one of the reasons I don't like it. I know it's a good tool for designing something quickly, but that's the limit. It can do what it can do, but I haven't tried it, honestly. I have not tried it. So Nilesh, if we can create the architecture with that side, so it's going to go the live, it's going to do all those, you know, create like a VPC, all the connectivity, everything is going to be set up automatically. We don't have to do anything by our hand. No, it sounds like there is no magic, right? There is no magical shortcut in the world. It's complex and you just have to understand that it is complex and there is no magical shortcut. You know, people think that I will do this and that, but no, there is no shortcut, man. You still have to understand, you still have to, if the application somebody developed like cloudcraft.io and it simplifies the whole thing and it's all nice and beautiful, but you still have to know. And if you don't know what it is doing, you will never understand what's going on. And so I honestly want you to really know what's going on and then use such fancy higher level tools. But without knowing the nuts and bolts and you just start using it at a higher level, you know, I draw something and it will magically appear in the cloud and those things, no, it doesn't work like that in real life. They may claim certain parts will work and I agree. Many things will actually work, but to get it to work exactly the way you want will not be possible. So don't fall into this trap of somebody telling you that it works because it may not. And you know, you have to understand that, you know, people will come up with tools and new sites and new services and new things come up all day, every day, but not everything that they claim actually works. That's the unfortunate part. And that's a fact of life. You know, people are trying, people are learning, improving and it will happen, but you know, don't assume that it will magically work. And if it just magically works, something is wrong because there is no such thing as magic. It doesn't exist. Okay. Yeah, there are good tools. Don't get me wrong. The tools are, some tools are great and they work, but again, even Chef doesn't do things on its own. You still have to tell how to go and do things. Same with Ansible, same with Docker. You will not see these things in mind of their own. They will not read your mind and implement certain things for you without you telling them what exactly you need to do. And a simple example of this is this cloud genius site. You know, you have heard me say that this site is slow and all that. And so how will I actually move this site currently runs on Azure cloud? Let's go check that. If you go to this site, which is by the way, I'm going to do this any moment soon because I'm tired of this getting slow. So I'm logging into Azure. You will see that it connects to the Azure cloud. And there is where you will see the machine that runs that site that's coming up. By the way, Azure website itself is slow all the time. And here is that virtual machine that is running Docker and it is managed by Docker cloud. And this machine is actually a pretty big machine. I'm amazed as to how slow it is. So if you look at the machine, it has 20 cores and 14 GB RAM. Let's see where that is. The RAM size, I think is 14 GB, where is that? Something like that, RAM, it doesn't show me there easily. Why? No, it doesn't want to tell me that. But the point remains that there it is 14 GB, 14 GB RAMs, two cores currently deployed. It's a large scale capable machine, so two cores, 14 GB currently active. And still you complain that the site is slow. So how do you take this entire site and take it to another cloud? That's what I will be doing in the next, after dinner maybe. So this current site runs as a container in Docker. It's a container, not a box, container in Docker. And the Docker itself is running on that machine in Azure. So all I need to really do is to get another cloud, say DigitalOcean, and have it run Docker here and have this container migrate to this Docker. That's it and change DNS. DNS currently points to this machine, I will then move that entry point it to this machine. That's it and that goes away and then I will delete all of this. And then it will run on that cloud. And I have been moving machines like this for many, many years. So the migration happens through Ansible. And we will talk about Ansible before talking about the migration. But that is something I will be doing myself in the next few hours, after dinner probably. And to get, I think I should not start talking about Ansible right now. I'll let you digest Chef and finish that exercise and then I will discuss Ansible the next time we meet instead. So that is my plan to migrate this away from that cloud on Azure. And I spent about $150 here on the Azure platform. I am betting money that I can accomplish better performance on this DigitalOcean cloud for $40 droplet. I'm betting money, not kidding. It will definitely perform better on this droplet that I will get from here. And it will be a $40 droplet, this one, with only 4 GB RAM, Ubuntu 4 GB, San Francisco IDRSA. And that's what I will basically do. And then migrate through Docker Cloud, which is where it is running right now, Docker.com. This currently connects to Azure Cloud and runs Docker there. And so I will create a new node. Currently my node is, there are two nodes I think I am running. One is in Azure that I was looking at, this one. And I have one running in my garage, that one. This machine runs a replica of the CloudGDS site all the time as a backup. It's in the garage. And on the other node that I have, which is the real functional site, which is this Azure Cloud, that one, I will basically launch another new node. And this time I will say, give me in DigitalOcean. And give me a machine in San Francisco. And by the way, choose 4 GB RAM and one node is good enough. And launch a cluster and move. That's it. That's how simple it becomes. But before you get to that level, I would like to really have you understand complexity to make this thing work. That will give you a solid understanding. Then you can play with higher level tools. No problem there. Like this. It's a really, really simple tool. And I think I have a payment profile set. It was complaining about payment profiles. So I have it. Yeah. It will work. So that can go away. And all I need to do is launch a node and run my stack. My stack is defined here in form of this name. It basically describes how I want to run my infrastructure. So this is how it lays out. You will learn these things in terms of how I configure a given Docker layer for WordPress deployment. But before this comes Ansible. And then we'll jump to Docker and understand how do we make complex architecture layouts over time. Cool. I will pause the recording now. So doing that right now. And we'll be back.