Python for .NET Developers Transcripts
Chapter: Deploying Python web apps
Lecture: Creating a virtual machine

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Whether or not you agree with my assessment just, let's follow along and get started over on DigitalOcean.
0:06 We're going to create a Droplet, and we can click here. Droplet is like, their dyno or whatever It's their virtual machine.
0:13 Okay, so we're going to create a a Droplet. We're going to do Kubernete's Clusters Data bases, volumes, DNS, etc. We're just going to create this.
0:21 When we come over here and we can pick Ubuntu or a whole bunch of other options and down here and or even different categories. We can pick later ones
0:28 I'm just going to go with 18.04. Latest LTS longterm support version. I'm going to pick a standard plan no-no we don't really need that
0:36 lets go for this one. Honestly this is way more than enough, this $5 one for what we're doing here. Normally I would put it in New York or somewhere
0:45 on the East Coast. Virginia, something like that, because it's a good trade off between the US market and the European market
0:52 uh- the best you can do with one server I mean, you know, focusing on Australia sorry that doesn't help, I know.
0:57 It's probably the best we can do by picking any one of these spots but I'm going to pick San Francisco 'cause I'm on the West Coast right now.
1:04 All right so we'll turn on monitoring. We're going to use SSH keys so we don't log in at all. Uh we just well, we log in
1:10 but we don't use a username and password; We just register to the SSH keys in our machine and then we're just, let in because we have them
1:17 and without them you cannot get in. So, I don't remember which ones I have on this profile so I'mma check them all off, that's a little overkill
1:24 I'm going to delete this machine anyway. Okay One droplet we'll call this "Guitary Web". There we go, apparently that's a valid host name
1:32 I can put some tags, I can put it in different groups I can have back-ups. They recommend it, I don't want them. Alright, so I think that should do it
1:39 let's go ahead and create our Droplet... And for this I'm going to leave it running real time I won't speed it up or anything.
1:45 You'll see about how long it takes to get this thing up and running and we can log into it. Boom! There it is.
2:08 Well I didn't have a stop watch but I'm... estimating 25 seconds or something like that. Let's go see our new machine! Let's go pay it a visit.
2:17 It's... excited to meet us, I'm sure. Who over here at SSH at this. Still turning on... Let's give it a few more seconds.
2:26 Here we go... They- Yes we want to trust it It's going to let us log in. What is the very, very first thing we should do
2:33 when we log into a computer? Make sure it is up to date So apt, update, this is like checking for updates
2:40 on Linux. Talk more about the commands in a minute but you can tell that there is a lot of stuff going on here.
2:47 I think it's also checking for updates on itself. Okay. Apt upgrade. There's a whole bunch of stuff going on and if you see this Linux image thing here
3:04 this generally means there's a new release of Linux. If we were to look, go back to the top what does it say we- Oh, ran out of space but
3:13 we're not on this version of Linux. This is some old so there's like a deep upgrade along with a bunch of other stuff.
3:17 So, let's go ahead and upgrade those. Say yes. Sometimes it will say it needs to update this particular file like Bootklub LST.
3:35 And I'm just going to leave it anytime it asks me this question I just accept the defaults, that's probably the safest.
3:42 All right, well, It's been updated so that's a good thing, let's log back out and then log back in here. And It's very, very likely because it updated
3:51 the Kernel, that we're going to have to do a reboot so we just type reboot. Usually it takes about 10 seconds... Try again... Not quite, There we go.
4:04 All right, super so here is our machine and we can do all sorts of fun stuff with it. We're ready to start setting up our web server
4:11 and installing some monitoring tools and things like that. Before we start running commands Let's jump back and look at the higher level
4:18 architectural pictures and things like that. This web server is up and running It's ready to have all of it's stuff installed
4:25 and most importantly, it's patched. So it's relatively secure, there's a few more things we'll do to make it more secure but it's got a good start.

Talk Python's Mastodon Michael Kennedy's Mastodon