Jose: Hi guys, and welcome back. 2 2
In this section, we're going to be dealing with 3 3
deployment in DigitalOcean. 4 4
So we're gonna go through this video 5 5
and create out first server. 6 6
In DigitalOcean, you can click here at the top right 7 7
and create a new Droplet. 8 8
A Droplet in DigitalOcean is a server. 9 9
Now that we're about to create our Droplet, 10 10
there are a bunch of configuration options 11 11
that we have to choose from, 12 12
what operating system we want, 13 13
and we're gonna go for Ubuntu 18.04. 14 14
That's because version 18.04 of Ubuntu 15 15
is a Long Term Support version, 16 16
which means it's gonna be maintained for many years, 17 17
so if there's any security updates or anything like that, 18 18
18.04 will receive them up until 2022, I think. 19 19
Okay, so 19.04, 19.10 are not Long Term Support versions, 20 20
so I will use 18.04. 21 21
If you want to use any other version 22 22
of these operating systems like FreeBSD, 23 23
Fedora, Debian, or CentOS, 24 24
which we used in a past version of this course, 25 25
then feel free to do that, 26 26
but the instructions that we talk about in this section 27 27
will not apply. 28 28
So the instructions in these sections 29 29
will only be for Ubuntu 18.04, 30 30
not any of the other versions of Ubuntu 31 31
and not any of the other operating systems, 32 32
so you must use 18.04 to follow these videos. 33 33
Then we have to choose what kind of computer we want 34 34
running our code. 35 35
I would go for a Standard Droplet, a standard server, 36 36
and you can left here. 37 37
You can click left there and go to the $5 a month server. 38 38
You don't need anything more expensive. 39 39
$5 a month is plenty for what we're doing here, 40 40
and it's plenty to learn how to deploy 41 41
your application to it. 42 42
Later on, if you feel like you need more power, 43 43
you can always go more expensive. 44 44
You have the option to add backups, 45 45
which I'm gonna say No because this is a learning server, 46 46
but if you are having a database storage 47 47
in your application 48 48
and you wanna make sure you don't lose it, 49 49
then I would enable backups. 50 50
Block storage is not necessary until you have more servers 51 51
and you wanna store files and things like that 52 52
so I'm not gonna add block storage. 53 53
Then you've got your datacenter region 54 54
or where in the world you want your server to be, 55 55
and you should select here 56 56
the server that is closest to your users. 57 57
So whoever is gonna be using the application, 58 58
you want the server to be close to them 59 59
so that they will be able 60 60
to use your application very quickly 61 61
and it won't take very long to load. 62 62
In my case, most of my students are in the United States, 63 63
so we're gonna go for here, San Francisco, 64 64
or you can go New York if they are mostly 65 65
in the New York coast. 66 66
Next, we've got some additional options 67 67
that we're not gonna select any of, 68 68
and you've got your SSH keys 69 69
if you want to add those for login. 70 70
Now, we're gonna use a password to log into our server, 71 71
so I'm not gonna add any of these SSH keys, 72 72
but if you know what SSH keys are and you wanna use them, 73 73
feel free to add it there. 74 74
Then, if you do that, you will not get a password. 75 75
Instead, you'll be able to log in 76 76
with a computer that has that SSH key. 77 77
At the end, you can see How many Droplets? 78 78
That means you can create multiple Droplets 79 79
with the same configuration if that's what you wanna do, 80 80
if you want multiple of them that are the same, 81 81
and you can also give it a name, 82 82
and here, we're gonna type deployment-learning-droplet. 83 83
If you're using projects, which I am, 84 84
just to organise your Droplets into different ones, 85 85
you can also select your project down here, 86 86
and you can also add tags to your Droplets 87 87
in case you have a lot of them, 88 88
and you wanna be able to search through them 89 89
a bit more effectively, 90 90
but for now, we don't really need them. 91 91
That's it. 92 92
Once you do that, you can press Create, 93 93
and as soon as a Droplet is created, 94 94
DigitalOcean will start charging you for every minute 95 95
that the Droplet is live. 96 96
So do remember that if you do delete this Droplet, 97 97
you will only get charged for the amount of hours or minutes 98 98
that this Droplet has been alive. 99 99
So you're not gonna get charged 100 100
$5 immediately at the beginning. 101 101
If you delete this just now, 102 102
you'll only get charged a couple of cents. 103 103
So you can always recreate your Droplets 104 104
up until you've run out of credit, 105 105
and there you have it. 106 106
That is our Droplet. 107 107
You've got some IP address that you can use 108 108
to access your Droplet, 109 109
and you've got a bunch of information on the Droplet itself, 110 110
and that will be populated as you use it. 111 111
So when we wanna log into our Droplet, 112 112
just copy this IP address 113 113
and log into it via SSH. 114 114
What's gonna happen is 115 115
you're gonna get an email with your password, 116 116
and so, you can SSH into the Droplet using the password 117 117
that you got on your email, 118 118
and you'll be able to log in and change your password there. 119 119
Alternatively, you can also log in using the Console here 120 120
up on DigitalOcean by clicking this Console button. 121 121
However, I found this to be not great, 122 122
so I will not use this thing here. 123 123
Instead, I will go over to my Terminal. 124 124
I've opened my Terminal app here on Mac, 125 125
and all you have to do if you're using Mac or Linux 126 126
is type ssh root@ your server's IP address, 127 127
and then, enter the password. 128 128
I have to type yes to this, 129 129
but maybe you won't have to do that. 130 130
Then enter your password to your root account 131 131
that you've got on your email. 132 132
If you're using Windows, 133 133
then you may not be able to use SSH from your Terminal, 134 134
which is called cmd.exe. 135 135
On Windows, you may have to do download 136 136
an alternative software, 137 137
and I recommend one called PuTTY for Windows. 138 138
Once you've logged in, 139 139
the server will ask you to change the root password, 140 140
so do that and change it to something 141 141
that you can remember, 142 142
and then, we can go into the server 143 143
and start making some changes. 144 144
I'll see you in the next video.