 Good morning, everybody. Welcome. Wow, thank you, yes. I like that. Good energy. I've had a lot of coffee this morning, so I'm ready to do this thing. Thank you so much for coming out. Obviously, this is the most important presentation at the conference, so I'm so glad you guys figured that out. So look around. These are the good people who know what they should be learning here. So you can follow them around if you don't know what session to go to. I've met a lot of you. Thank you for those of you kind enough to shake my hand and tell me a little bit about why you're here and what you're looking for. It's too late for me to rewrite my presentation, so I hope that this is what you're all looking for, but this is basic DevOps for Drupal. And I'm really hoping this is basic. So some of you are cis admins who are looking for how to apply DevOps principles to a new Drupal site. Some of you are front-end or content editors who are looking to develop new skills. Others of you are just webmasters or senior Drupal people who are just here to judge me, and you're all welcome. Welcome to be here. So I hope everyone gets what they need out of it. I'm used to walking around, but I can't move. So all of the flips and the acrobat stuff that I usually do, I'm not going to be able to do this year. But I'm going to try to stay close to the mic. OK, so my presentation is deployed. So if you want to follow along, or at any time you get bored and you want to go ahead, you can follow me at basicdevopsfordrupal at Herokuapp.com. Everyone's getting seated. Let's get going. So my name is Michelle Creechi. I'm a warrior princess, but I'm also a software engineer at pantheon.io. I'm going to talk a lot about me in this particular presentation. But you can find me on Twitter at DevNichev, or you can find me on my website, creche.io. I had some naming collisions there. It'd be nice if my branding was all crechey, but there's a 17-year-old who grabbed that first, so damn it. OK, so the first rule of DevOps is there is no such thing as DevOps. If you're going to become part of this cult, the DevOps community, the first thing that you're going to need to acquire is sort of a patronizing tone when you talk about DevOps. And you need to be able to say things really condescendingly about it doesn't even make sense to have a DevOps engineer. I mean, what does that even mean? And you'll have to practice that a lot. It took me a long time to form this air of smugness about me, but I've acquired it, so you can too. And it's important to understand where that kind of attitude comes from, about why do you even want to know about DevOps. DevOps is just like, no one even knows what it means. And really where that comes from is a deep sense that this stuff is so important and so critical to everyone who belongs in the software engineering pipeline that to say that it's a special skill that you should acquire or a special thing you should look for seems completely redundant. It would be like looking for a critical thinking engineer. It feels so basic to say I need someone with DevOps skills to the people who are in DevOps that it just seems like, why wouldn't you have critical thinking skills? Why do you need a special critical thinking engineer? What about the other engineers? Even though it's sort of a condescending attitude to know that it's coming from a place of wanting everyone to have these skills and wanting it to become basic and common sense, if you're interested in knowing more about what it sounds like for proper DevOps people to talk about there being no such thing as DevOps, there's a link here to a really great presentation about DevOps Kung Fu by a chef maintainer. I recommend taking a look at it. But the second rule of DevOps is that DevOps is definitely a thing and it's a real thing and let's all just agree that it's a set of skills that everyone should have, that it's worth your time and it's worth acquiring. So here's my agenda and I mean it programmatically but also philosophically what my agenda is. I wanna talk to you about why you should acquire these skills and why you should acquire them early on, early and often and then I'm gonna walk you through essentially a lightning talks, a series of lightning talks about what those skills are and where to get started with them. If it looks like at the end I'm rushing because there's a lot of stuff to go through that's totally planned, I'm just gonna rush through the end but I'm gonna go slow towards the beginning and if you ever feel like this is too much for me, you can just kind of tune out and let this happen. You can just, you can come back later if you ever feel like this is where my train gets off. All right, so a little bit about my first agenda topic, why I think you should acquire these skills early. Back when I, I have a PhD in philosophy and my story has, I was not programming at all. My family did not own a computer growing up. I got my first computer in college and I installed malware stuff on it and also malware anti-stuff on it and that was about the extent of my knowledge of computers. And after I finished my dissertation, I was so burnt out I thought maybe computers are an important thing to learn about so I taught myself some Drupal, I had done some things in graduate school with Drupal previously and when I set off for myself on a path of I'm gonna learn Drupal, this is what I thought it was gonna be like. I thought I was gonna like, all right, well Drupal's in PHP so what I'm gonna do is I'm gonna learn PHP. And then that's gonna look like this. I'm gonna just figure out what the dollar sign stuff means and then there's all these four loops. That looks like a thing so I'm gonna learn how to do that and then I'll learn how to build a module and after I master those things I'm gonna learn how to make everything look good. So I'm gonna learn stuff that seems to do that like the JavaScript and stuff and responsive is a thing and I'll learn that thing and then after I get better at making stuff look good I'm gonna get better at it, get better at PHP which probably means like algorithms so I'll do like space-time complexity and stuff and then I'll patch core at some point and then I'll test some things and then maybe for extra credit cause I'm gonna be so awesome at this I'll figure out what Apache does, that'll be extra and I'll just all that stuff on the terminal that people are doing and then maybe I'll do some MySQL just to know how to do that stuff. So that went really well and I'm really good at programming now so this is what it actually looked like. I had a Windows machine so when I was ready to learn PHP and learn the Drupal I had to install it so that means I had to set up a WAMP whatever that was at the time and then I had to quickly learn Linux because I Windows, I ran into Windows stuff immediately and every tutorial was not useful for me so I immediately went to install a virtual machine and had to learn Linux, which I wasn't expecting and then I found out that the websites I was working with, their databases were on a server and everyone was working on configuring a server up on this other thing that wasn't my computer and I had no conceptual, so there's a browserless server somewhere where there's a database and I just made this very fragile script that would pull down the database and push it up and I didn't know what it was doing but it was super important and then my first assignment I was given this really amazing blog post by David Strauss and the brilliant Mark Tunison about they had just deployed the Economist so there was four kitchens and the Economist they had just deployed the Economist and they set up this continuous integration system with Selenium and Jenkins, it was really fancy I was running on a cron job like every morning it would run through the Economist and do a bunch of tests with Selenium and then take pictures of it and my very first boss for my very first Drupal project ever handed me this blog post and said, do this so I thought I was gonna be writing PHP but no, I was writing Selenium and looking up Selenies because that ID didn't work and it was just, ugh, I hope no one knows what I'm talking about but if you do, let's get a drink and turns out that when you test something that's not repeatable or deployable and you're testing something in production the best I can tell you is like, yep, that's broken that's it, I can just be like, ugh, broke today and it just ended up, every day it was just broken and then I had to just figure out if it was my test that broke, if it was your stuff that broke it was completely useless information and one of the reasons why it was completely useless is because we had no repeatable install process we had no way of managing our config it was all shared databases so it's not like you could roll it back if I found something wrong I couldn't be like, reset, reset no, it was no resetting, it was in the database, it was done so I started to work on creating repeatable processes all right, well we're gonna need to be able to roll back a deploy if deploys aren't working if something's breaking we have to be able to like to go back to undo and so that meant learning virtual machines and vagrant and containerizing our build environment and learning configuration management and that meant a lot of features through in Drupal 7 and turns out BeHat was way better than Selenium and I was able to actually start validating that things were working through the whole development process and be able to pinpoint where things broke and then I had to be able to manage the deployment of this stuff as we have this virtual environment so I learned Chef and Composer's not really an orchestration tool but let's just humor me and I started to get really precise about what exactly I was testing I didn't wanna test Drupal Core I wanted to test my configuration and Composer helped me manage what I was testing and keep the core out of the repository and I became like a small core proponent and it felt great to be opinionated and spug and all of this would have been way better if I had learned some basic DevOps skills to begin with my mindset was stuck on I'm gonna learn PHP and then I'm gonna be a great Drupal developer but my thesis statement here is that learn DevOps skills and if you're a mentor if you're teaching people I think you should start with basic DevOps skills so let's go through what those are there are some prerequisites here this is basic but I'm expecting everyone to know some things first I expect just the basics of the command line I'm linking here to a tutorial it's actually a tutorial from Learn Python the hard way but there's no Python in this particular tutorial I like it because it's good for both Windows and Linux Unix systems and it talks at a level that I wish someone had talked to me when I was learning the command line also you should know the basics of Git I'm linking to another good tutorial here you should know what an SSH key is and you should have a GitHub account and I'm linking here to what that is and things you should know all right this is controversial but I think you need access to Linux and Unix environment I know I just said that you can learn the basics of the command line on Windows but I wish someone had told me earlier I spend a lot of time working on Windows as a very new engineer and it is rough it is a mean thing to do to somebody you can get them going but every stack overflow every answer starts with a dollar sign and that's super confusing when you're in the Linux environment and you're just learning please out of the kindness of your heart if you see someone learning DevOps in Windows just install a virtual machine with Linux on it and just it would put them out of their misery I just we can't pretend like you can learn this stuff on Windows it's really really difficult so rough yeah Unix yeah Mac works finally you need a willingness to ask questions nice job sir he's a plant you need to have the willingness to ask questions and like questions that you know are so just so stupid this is a true exchange that happened on my first day I this was over Skype and I pinged Brant Wynn who I worked with and now it's been awkward and he's a superstar he's one of my mentors and I had a very tenuous grasp of what it meant to put together a Drupal and I just knew I was smart enough to know that you need a database so I was like feeling pretty good about asking like hey so where's the database and he responded with this it is really hard for me to remember how many questions I had when I saw that I had no idea what was happening here this isn't obviously the actual thing but I didn't even know where to begin like this meant nothing to me like do you put this in a Word document and send it to someone is this an email address it looks like one I had no idea where to go I had no idea what SSH meant I like that could have been like the name of I didn't know that could have been a person or you know like a nickname or an acronym like everything about this was so confusing this was the best I could do took it like a trooper I mean I know like he must have been thinking like oh god this woman is so screwed and I hope that if you don't know why this is funny listen you got this like you're gonna be okay and if you do get why this is funny next time someone asks you a question like this that makes your heart break just they got this they got it they can do this like we are not wizards like we all gotta remember what this was like right okay so once you feel comfortable with what just happened there the next thing you wanna do is you wanna learn some basic commands there's a lot of them I'm gonna these are sort of simple commands and we're gonna here's some tooling just then just do it I don't wanna talk about it okay um here's some goals of learning the commands and tools the goal aside from looking really cool on phone calls with clients they'd be like oh I'm just gonna I'm just gonna ping your site and just oh yeah it's up and look at the headers and like you definitely wanna look cool in front of your clients but really you wanna gain the insight that like most of the web is just text you're just sending text and you're manipulating it and there are various tools to chop that up and to inspect it and to search through it but you wanna gain the sense that like we're just sending text we're sending strings all over the place that's all like the web really is and the more that that becomes intuitive that you're just organizing and manipulating text you start to get a DevOps mindset which is this stuff is manageable it's not all wizardry we can inspect this stuff we can we can secure it we can block things we can look at error reports you wanna get that sense as soon as possible and you wanna be able to gain an understanding that you can observe the health of a system you can observe what's going on with a system outside of your own computer your computer can talk to another computer without opening a browser and get a lot of information about how that thing is doing you can get it you have the power to talk to other things all right this is the only live demonstration portion of my presentation so don't screw it up Michelle I'm gonna go through a couple of commands the first ones are text manipulation so I think you need to this is going back to the concept that there are such things as strings and you're compressing strings and you're expanding strings as soon as possible you should force yourself to get links off of the internet on the command line it will help you it will form a good practice so for example if you're going to Drupal and you decide like you know what Michelle really sold me I'm ready to try Drupal you don't go here I went to the wrong link you wanna go to get the code cause you're done you're gonna get the code and we're gonna download Drupal 8.3.1 cause it's semantic versioning for the win okay and we're gonna grab the tarball so what that looks like in a DevOps world is you don't click the button you right click the button and we're gonna copy the link address this is your new DevOps world guys we are no longer button clickers we are inspecting what we're doing before we install it into our system and you use WGet I had to look up what that means and everyone should look up what it means it turns out it just means like WGet so just WGet it I don't wanna do that I'm gonna go into a test directory cause I'm gonna test stuff and this is really cool you just WGet and you paste that link and it's gonna grab that thing for you just like clicking a button except now you didn't untar it it didn't like do things for you because sometimes systems make assumptions and you're a DevOps person now you're a DevOps mindset you gotta like you wanna know what's going on you wanna know did it actually connect to Drupal maybe it went somewhere else is there you're suspicious of everyone now you're just you're a DevOps person like you can't trust anyone this is good this is growth so did you get to grab a link and then we've got it and we've got a tarball listen if you can tarball flu this will save your life one day being able to tar things from memory and learning how to untarball things through the command line is one of the wizardry skills that will make your friends think you're a wizard so here we go we're gonna tar and the command is X which means extract extract which starts with an E but we're not gonna question that okay and we're gonna extract cause it's a file so we're gonna use F and I want it to be verbose and for reasons that tar won't explain to me you have to do the V after the X not the F just remember this is important DevOps stuff to remember this is the kind of knowledge DevOps people have they know where to put the letters oh no oh it needs an F option which means I need a file just a good call that's fair I'm just gonna untarball that thing woohoo and now it's been untarballed and if you're thinking clicking the button would have done that you are right but you are a DevOps person now you're not clicking buttons anymore you are inspecting things now we wanna make sure that we actually have the thing that we want so a good way to do that is to use cat which will just dump something out so let's see I wanna know did I actually get Drupal 8 or maybe some spyware yeah that definitely looks like Drupal 8 I just concatenated the composer JSON check that out there's my composer JSON it says that it's from the package Drupal 8 that looks like Drupal 8 this definitely looks like Drupal 8 great concatenated then you wanna grep all right grep will change your life and the first time I used to grep like this and this was intuitive to me what I thought I was doing is like just look for stuff in my thing and it was waiting like this you just need another you need two arguments for grep you need the thing you're looking for and where you're looking for it so I could do and I'm gonna pass it some letters because learning DevOps is about learning letters and means give me the line number R means recursively so I want you to look through directories don't just look don't just look at the directory I'm pointing to I means give it whether it's case insensitive so I want stuff capitalized I want stuff lowercase and I'm gonna look for the words deploy and I'm gonna look for it in the Drupal repository and it's gonna grep through it and it's gonna find every instance because everything is a string and you can search for strings and it's just smashes it all together and looks for a string match and I can find all the instances of deploy this is super useful when you're looking for you find an error or you find an error message in Drupal copy paste that onto the command line grep through the directory where was that error thrown you can look through the error logs learning grep important DevOps go okay now Vim you need to be able to connect with your you need to be able to use something other than a word document to read stuff you can't just open everything in Word which I might have done at one point you can't do that you need to be able to do this in the command line I'm not gonna spend a lot of time working on Vim but I'll show you some tutorials at the end here's a good thing to start learning Vim though if man means manual so that means like open the tutorial so if you do something like man grep it automatically opens this in a Vim editor for me and learning how to do something like open man Vim and do a backslash yeah do a backslash to look for something like file it's a good way to it's a good thing to learn then to be able to close out of it with WQ I'll show you a tutorial at the end that's much easier than the one that I just gave you but finally pipe grep so the power of pipe grep and DevOps people call themselves like the brotherhood or the sisterhood of the pipe greppers is that once you understand that you can you can take the output of something and put it into the output of something else that's incredibly powerful so you can do something like history pipe grep Drupal and it'll go through all the history of what I just ran through with you and it will output all of the all of the instances that I have ever used that so everything that you use on the command line everything that you type on the command line stored as a string and if you output all of that into grep you can search through the string okay networking we're gonna go through a few command lines curl dig and ping I use curl so now when you're in it when you're in the DevOps mindset you wanna be able to observe systems that are not in your computer so you're working from home and I wanna just do I wanna take a look at what's going on with drupal.org and the command curl dash I means I just wanna look at I wanna look at the headers from drupal.org and looking at the headers tells me a lot it tells me that this thing is not around it does not exist it is moved permanently so I can go to where it recommends me to go which is HTTPS.drupal and this tells me some more information but we're turning a 301 301 means you have not reached what you're looking for so good to know tells me that I need to go to www.drupal.org at last I get a 200 which means I'm good I'm where I wanna be and I can get all sorts of information out of this I know that it's running on Nginx I know what version of Nginx it's running on I can see that the cache was a miss which means I'm loading the full page I didn't hit a cache edge I can see that it's using Fastly so it has a Fastly debug so if I had access to their Fastly admin I could sort of debug this and all sorts of great information including who's hosting it and I can see that the reference to home points to this node 2,709 more than that I can see exactly what node number this particular URL hits which is useful useful information okay that's curl if I didn't pass the that just showed me the headers it would give me the whole page which means I'm looking just like I would at the source so I'm looking at the full source and I could grab through that for something like oops okay I didn't output it alright so you can essentially look at the DOM and inspect the DOM and inspect the headers with curl the same way that you would inspecting it on the browser particularly useful when it doesn't actually have a browser for you to look at something like dig which we'll go through real quick dig is for domain for domain information so if you're playing with C names if you're playing with A records you wanna look at something like dig to be able to look at what's hosting make sure everything is set correctly I'll make this larger and you can look at the www.org and I can see that it's on fastly I can see what the IP addresses are and finally a ping a ping just checks the connection from one thing to the next so it's checking my connection from my local environment to www.duple.org and it's over an ISCP ISMP connection so it doesn't work for everything for example if I looked up if I looked up my own presentation which is what you're looking at here it'll give you a time out because Heroku doesn't allow you to ping the environment but it's one way to check if something if the service is up or not okay those commands thank you for sitting through that those are eight commands that I think you should know we are done with the command line portion of the presentation but I think you should spend some time investing in feeling comfortable with the command line I really recommend a game called Vim Adventures which is a like online browser game that uses Vim commands to solve puzzles and it sort of like ups your VIM skills as you go along and it helped me get a little bit more comfortable with manipulating a VIM environment I also use Vimium on my browser to help me feel more comfortable with Vim so it uses Vim commands so I can navigate through the browser and finally like my biggest advice to you for commands and tools is anytime you come across something like this which is a curl a dash O of a URL and then a PHPs a installer far and this is how you install Terminus onto your onto your computer before you do anything like this you should stop and take a look at what's actually going on a DevOps mentality would be to look at and figure out exactly what you're about to do often times you're pulling something off of the web and you're piping it into something else that runs some script on your computer and you're now going to be very suspicious of everything that does that and don't do it unless you feel like okay I have some sense of what's going on there all right so once you've mastered commands and tooling or you feel more comfortable on the command line this is a good time to get to get more comfortable with scripting and writing scripts and it doesn't have to be really crazy I think writing scripts for Drupal as the first thing can be a little bit intimidating but you want to first start by automating the boring stuff in your own life look at what your own daily routines are and see if you can write some scripts for them here's some of the very first things that I wrote when I got used to writing scripts so I wanted every morning I had a routine where I would get up and I would try to force myself to write things and so I had set as a goal for myself for New Year's Eve or like a New Year's resolution I'm going to write for 45 minutes every day and I wanted to make it enjoyable so I created an alias called Sunshine so I wanted a reward for myself and it's this beautiful I downloaded this MP3 it's just an MP3 sound and it goes like this it's just a lovely good morning sound so I gave it an alias called Sunshine so that whenever I type Sunshine into my my computer it would play this beautiful music and I also aliased Sunshine with morning Sunshine I don't know why I did that but that felt next level to me at the time and then I created an alias for myself so I had all of these aliases that started with Mieshev which was like all my personal stuff and what this alias did you could see that I got pretty used to the terminal and pretty carried away with stuff I had aliases for where a draft directory is and then I aliased the date in the right format and so in the morning I could type Mieshev right and it would go into my draft directory it would make a directory for today it would go into that day and it would create two pages it would create a private .md file and a public .md file and then it would open one of the private files and in the morning I could type good morning and it would open all of my Tmux windows and split it the way that I wanted it to be split and it would say to me another day Mieshev it is the start of and then it would say the date but it would say it in this robotic voice another day Mieshev it is the start of good luck with your writing and then it would play the sound and it would open and I did that for like two weeks and that was fun I got really sick of the noise but it was really I ended up parsing this down without the music and the voice and it just opened my routine for the day and this did take some time because I was learning how to script it took some time to learn how to write aliases but think about how much time you spend in the morning you have a routine you open certain windows you look at your email there are things that you do every morning and if you just took the time to figure out how to script all of that and write just good morning on your terminal and just all opens up then you can spend more time writing more scripts and it will be a recursive thing the next thing I wrote after I aliased my morning routine is I aliased making a Drupal module so I made a command for myself so I could just say like make low key dot Drupal and then I would pass it in argument of what module I was building and it would create that directory and then it would create a .info file and there's a way that .info file should be set up and it would create a .module file and it just scripted all of this for me because all of that is completely routine that is not a good way to do that by the way but you know, it's a start so I recommend, I guess this is after you've written some aliases something that's been really useful for me is that I took all of my I took all of the things that I install onto my Mac all of those like I know that I'm gonna need Git I know that I'm gonna need Docker and I scripted this into one install .sh file and it's not pretty but I've used it several times now to rebuild my Mac if anyone's ever had gotten a new computer you start a new job or something catastrophic happened to your computer and you have to reinstall all of your setup you've just gotten comfortable with everything having a script like this that this reminds me that I need to get Xcode it knows that I like to call my computer a low key and it runs all of my brew install commands and I keep this up to date this is in the Git repository so these are all of the things that I use to build my machine and a practice that I've gotten used to is every six months I delete everything off of my computer my things are stored in the cloud on Dropbox and S3 and I clean out my computer and I run this install script and it's really good practice for having control over your local environment and that's what scripting is it's being able to be very precise and controlled nothing is stored in the mind of a human I don't have to remember all the things I like to have installed on my local computer I have this written down so that if my computer needs to be reinstalled nothing I'm able to do that over and over again this is exactly what you wanna be able to do with Drupal you wanna be able to define the environment that Drupal lives in but you should start at home first you should start getting some control over how you can figure your environment so now we have some command lines now you're feeling more comfortable parsing text, inspecting things in the system you are starting to gain some tighter control over your own local environment now you could start with continuous integration so continuous integration just like you're trying to control your local environment and control the system that you work in continuous integration means that you are controlling the environment that your applications and the things that you create that you create so if you create something can it live somewhere besides your own computer and how do you know that it's okay there's a number of tools so I listed here some tools that you can use Jenkins is a thing I don't recommend that you start with Jenkins but CircleCI and TravisCI and Bamboo are all free for public repositories I'm gonna show you my Circle build so I have a tutorial for this on my blog post about how to set up continuous integration with Drupal but Drupal is a terrible teacher for continuous integration if you have never touched continuous integration in your life if you've never touched Circle if this would be completely new to you I don't think you should start with Drupal I think you should start with my presentation my presentation literally is an example of continuous integration this is my repository it's a reveal.js and you can go visit it I have a link on my slide and you see that there's a link to Circle here and Circle on a deploy to master Circle will run through my instructions and my instructions are to build this thing and then to run a HTML on linter because my presentation is in HTML and you can see that there's a lot wrong with my presentation it is pretty awful what my HTML skills look like I have not gotten to the learn how to make things look good part of my journey yet but I do know enough to pipe the output of that failure into a success with great power comes great ability to run things so I know enough to make this look like I just passed when I didn't and just to remind myself that maybe I should learn this stuff one day I should learn how to write HTML and after it runs through some tests and reminds me that I should learn how to what I'm doing it deploys this to Heroku so I have some Heroku integration here you can take a look at at what my Circle looks like so I recommend that if you're completely new to continuous integration you've never done continuous integration before I think try making a presentation try working with some HTML go back to the basics and make that into a continuous integration repository that's a way better and way safer way to get used to writing tests working on a deployment and feeling comfortable with what that process looks like alright the next thing that you'll get to is web servers this is the part of the WAMP stack that I thought that only super advanced smart MIT students had any knowledge of this is the I had no idea when I started Drupal what Apache was I thought it was some I could not tell you I faked it for a long time but I had no idea and I think it's probably because it's a bad name we call it web servers it's way better to think of it as web bouncers it's a different they're the guys that stand in the front and everyone's got to talk to the bouncer before they go in and the bouncers are given certain rules about who to let in like tonight only people in blue shirts can come in we're at capacity you can't let in anyone who looks like they're going to dance crazily or something whatever the rules are clearly my job as a bouncer did not work out very well so I want to demystify this for you it is not as rarefied as it seems so I'm going to try to explain nginxconfig to you using only the the 1,000 most common words which is inspired from XKCD cartoon so this is I'm going to explain nginxconfig that you can find on the nginx website under the Drupal configuration and I will tell you that this isn't this isn't perfect nginx but here we go so you'll find this on nginx go to the web page and what this means is if someone comes looking for this name you can find them over here those are the instructions the bouncer has and this means if machines or people come looking for this window picture or this rule for machines I'm using the 1,000 most common words here but but a window picture is like that guy or that guy okay and a machine thing is something that machines know what they're looking for and let them in but don't record anything about it and even if it's not even if it's not what they're looking for I don't want to know we don't even write down that someone came looking for this thing I don't care this is just the window picture is there the robot's there you don't record anything about it I don't want to know it fills up my record machine with too much stuff this means that the rule is that only I can make things at the end like this when I'm at home so that means only when I'm here which means I'm inside the machine can I look at stuff like this this means if people want to look here these locations tell them no you can't and if they want to look here then everyone can see this stuff otherwise if you get to this part of my configuration and they haven't been sent away yet you tell them that they can go to this receptionist and the receptionist will tell them where to go so the index.php file is the receptionist of Drupal everyone has to report to the receptionist if they make it through the web server and the index.php will tell them where to go after that but if someone wants to look up something here which is the vendor directory you're going to return a 404 which means I don't even know what you're talking about I don't even know doesn't even which is a not found so you're just going to pretend like that thing doesn't exist and then this crazy thing that ends in an update.php this guy over here this means sometimes you can get things into names that we do not allow if you say another name first so if you start with update.php it's a weird crazy exception in Drupal and you can get in so this is a security hazard and it's sad that people like to use this kind of stuff to break in to your files but that's what web servers are for and this is a reminder that people who know security and people who are looking out for our Drupal well-being are really good at finding ways to get into Drupal and reminding us to update our bouncers so our bouncers know what to look for and Nginx is really a security protocol measure in addition to just being able to serve things fast and everything else it's the rules about who can get in and who can't. Alright I'm going to rush through these last three automation containers and cloud automation we've already gone through the Nginx config and you can see that the Nginx config is an important part of the well-being of your ecosystem and because it's an important part of the well-being of your ecosystem you need to deploy you need to care about what your Nginx config looks like outside of your own computer so automation is for describing everything that's not Drupal your project is more than just config or PHP it also includes descriptions of PHP packages, Nginx config MySQL database setup what your PHP I and I set looks like and automation helps make all of that describing and all of that repeatability a lot easier what I showed you with my install script and installing my local environment the same thing can be done with an environment that your Drupal will live in your Drupal will have certain configuration that's important and some trends with automation that are important to note is that it used to be that we would write our automation tools in such a way that you would apply changes B to A so you had something running in the cloud and you would write all these changes and you would run this update script to transform A into B that's no longer the way things work you now are not changing A into B you're removing A and replacing it with B and that's a true artifact deployment where you're not trying to change the state changing the state of anything is very difficult and anyone who's touched Drupal it's just as hard to change the state of something it's just as hard to change the state of a system we're no longer doing that now we're just replacing the system and to get more of that I have a repository of Ansible configuration that is not production ready but it was me learning Ansible and me learning how to configure Drupal environments that you're welcome to play with it also has a tutorial on it but GearlingGuy is really the better tutorial I link here to to his project Drupal VM that's a way better way to play with configuring environments in container environments which brings me to containers you're going to need a container because you can't take your local environment with you you get really good at setting up an Nginx config really good at setting up PHP you're not going to be able to serve people from your computer so you'll need a container some trends to know about containers is know that virtual machines are out and now that you're in the devops in the know you're going to say kind of patronizing things about people who use virtual machines they're so out, they're so 2015 containers are in containers are in because they're cheaper there's less surface area they SLA components which means I can have my SQL wanting in one container my Nginx wanting in another container and my PHP runtime environment in another container and I don't have to update my Nginx every time I deploy my app and I don't have to deploy my app every time I update Nginx remember these talking points this is really important, this is your script this is what you're going to say when you're convincing people that containers are important the understanding will come later but the talking points are key folks great tutorials about containers which is interesting I'll see if I can do something about it if you have a good tutorial for containers for Drupal let me know but this is a pretty good tutorial it's for Python but it's a pretty good hello world playing with a container tutorial and lastly is well not lastly there's the cloud which my Drupal is which my presentation is running in Heroku I think again learning how to deploy presentation to Heroku or another cloud environment is good practice and lastly there's monitoring so once you get really good at creating all these containers you need to make sure that they're alive my thinking about monitoring has changed a lot over the years I now think of it more in terms of monitoring risks you're not looking for zero errors you're trying to think about what percentage of errors you're okay with and breaking this down into points I would think about monitoring in terms of describing your risk tolerance there's just the basics of is your thing alive in the internet is it still serving traffic but if you run a commerce site you might have zero risk tolerance for your your checkout cart going down so maybe you want to be able to look through the logs and you want to see how many errors your commerce cart is getting or are people able to check out successfully and you might want to have a monitor that says hey if the success of checkout to the error rate or the errors of checkout if we have less than 99% success rate I want to create an alert so you're going to fail sometimes people aren't going to be able to check out but if checkout is the most important thing in your website then you should have a monitor that reports to you when the error rate gets higher than your tolerance this is a pretty heady topic but the first four chapters of site reliability engineering by Google it's free, it's online and it's a really good way to get your head around describing not looking for the perfect system but describing what your tolerance is and creating monitors for each of those components alright so once you've done all of that you can learn some PHP thank you so much for coming to my introduction for DevOps, we have successfully exited this program I'm really curious to know what everyone thinks so please tell me how I did that's the evaluation we didn't have any time for comments and questions because that was intentional I am avoiding everyone I would like you to all leave here with an assurance that I know everything but if you do have comments or questions I'd love to talk to you about it can you ping me at my DMs are also open I'm around for DrupalCon thank you so much for coming good luck with DevOps, let me know how it goes