1
00:00:01,200 --> 00:00:06,960
So we're now at the point where we can deploy our application to a live server and there are many,

2
00:00:06,960 --> 00:00:09,760
many ways to do that and there are many places to do that.

3
00:00:09,780 --> 00:00:14,610
One of the most popular ones is Digital Ocean, which you see right on the screen in front of you.

4
00:00:15,030 --> 00:00:18,950
And it has some good pricing and they have lots of functionality and a lot of people use them.

5
00:00:18,960 --> 00:00:20,520
And I used to use them all the time.

6
00:00:21,090 --> 00:00:28,520
Another popular one is Vulture Dotcom VLT, our dotcom, which has slightly better pricing than digital

7
00:00:28,530 --> 00:00:30,480
ocean, at least at the time that I record this.

8
00:00:30,660 --> 00:00:32,770
And it works very well and I've used that as well.

9
00:00:33,210 --> 00:00:38,400
And the third one is Lynard, which I often call Lynard for reasons I'll never understand, but it's

10
00:00:38,400 --> 00:00:42,720
pronounced Lynard and that's the one I'm currently using and it works really, really well.

11
00:00:43,800 --> 00:00:45,240
And I'm logged into it already.

12
00:00:45,660 --> 00:00:46,770
So I'm going to use lineout.

13
00:00:46,770 --> 00:00:54,240
But the process for deploying to a server is almost exactly the same, regardless as to which service

14
00:00:54,240 --> 00:00:54,820
you use.

15
00:00:55,230 --> 00:00:58,260
So I have four existing Linowitz, but I'm going to create a new one.

16
00:00:58,450 --> 00:01:00,900
So this is they just call their servers Linowitz.

17
00:01:00,900 --> 00:01:06,630
So I'm going to create one and I really like Ubuntu, so I'm going to choose the latest version of Ubuntu,

18
00:01:06,630 --> 00:01:12,720
the long term service one Elz Ubuntu twenty point zero point or twenty point zero for Altius.

19
00:01:12,720 --> 00:01:16,110
So I'll choose that and you can put it anywhere you want.

20
00:01:16,110 --> 00:01:18,270
And I'm in Canada, so I'm going to put it in Toronto.

21
00:01:18,300 --> 00:01:23,220
I'm not in Toronto, but I am in Canada and I'm going to choose something that's relatively straightforward.

22
00:01:23,220 --> 00:01:31,200
I'll choose the two gigabit, two gigabytes of memory with 50 gigs of storage for ten dollars a month.

23
00:01:31,200 --> 00:01:33,870
You can use five dollars a month and it will work just fine.

24
00:01:34,410 --> 00:01:40,710
And actually, if you look around, you'll probably find some some promo codes that give you a bit of

25
00:01:40,710 --> 00:01:46,530
free usage so you can actually try this and not spend any real money if you want, if Leno doesn't have

26
00:01:46,530 --> 00:01:46,600
it.

27
00:01:46,620 --> 00:01:50,210
Chances are Digital Ocean does, but somebody's always got a promotion going on.

28
00:01:50,220 --> 00:01:52,760
So just search for a promo code before you sign up.

29
00:01:53,160 --> 00:01:59,460
But I'll choose the two gigabit one with a shared CPU, honestly, and production.

30
00:01:59,460 --> 00:02:04,680
You want to use dedicated CPU, but for the purposes of this lecture, shared is sufficient for our

31
00:02:04,680 --> 00:02:05,250
purposes.

32
00:02:05,580 --> 00:02:09,390
Then I'll give it a name and I'll just call it temp server.

33
00:02:10,380 --> 00:02:13,320
You can call it whatever you want and I'm not going to give it a tag.

34
00:02:13,320 --> 00:02:20,010
And you can choose a password to for a root password which will be sent to you and you'll have access

35
00:02:20,010 --> 00:02:21,060
to your server that way.

36
00:02:21,330 --> 00:02:26,940
I'm actually using a SHC, which I've put in beforehand because I don't like using I don't like giving

37
00:02:26,940 --> 00:02:29,070
access to the root account from a password.

38
00:02:29,310 --> 00:02:32,760
I use SSA keys, but you can just Google how to do that if you want to.

39
00:02:32,790 --> 00:02:34,830
And I won't specify anything, anything else.

40
00:02:35,310 --> 00:02:38,490
So I'll create that and wait for it to be created.

41
00:02:39,150 --> 00:02:42,990
I got to give it a something here, a root password when deploying from an image.

42
00:02:42,990 --> 00:02:44,460
OK, so I have to give it a password.

43
00:02:47,350 --> 00:02:48,480
All right, let's try that.

44
00:02:50,130 --> 00:02:51,360
This is a temporary one.

45
00:02:51,360 --> 00:02:55,260
So I'm using a very short password and it is being provisioned.

46
00:02:55,530 --> 00:02:57,780
So we'll wait for that to happen and then we'll log in.

47
00:03:00,120 --> 00:03:00,510
All right.

48
00:03:00,830 --> 00:03:01,860
It appears to be running.

49
00:03:01,860 --> 00:03:08,940
So what I'm going to do now is copy the IP address for this server, open a terminal window and connect.

50
00:03:08,940 --> 00:03:17,250
So I will go S.H. route that and paste in the IP address and I'll accept the fingerprint for the certificate.

51
00:03:17,250 --> 00:03:17,760
Yes.

52
00:03:18,660 --> 00:03:19,140
And I'm in.

53
00:03:19,410 --> 00:03:23,670
So the very first thing I'm going to do is update the the server.

54
00:03:23,970 --> 00:03:30,120
I will apt update and it goes and gets the latest versions for all the packages.

55
00:03:36,100 --> 00:03:40,450
And it will tell me that ninety five packages can be upgraded, so I will go app upgrade.

56
00:03:41,410 --> 00:03:45,840
If you're not doing this as a pseudo user, then as a user, then you have to put sudo in front of it.

57
00:03:47,350 --> 00:03:49,740
So, yes, update all those packages.

58
00:03:49,780 --> 00:03:51,250
So we'll let it do its update.

59
00:03:54,440 --> 00:03:59,090
And there it's finished its update, so now actually I need to reboot the server, but I'm not going

60
00:03:59,090 --> 00:04:00,290
to do that until I'm finished.

61
00:04:01,070 --> 00:04:05,600
So we have this server running and right now it's running very, very little software.

62
00:04:05,600 --> 00:04:09,280
And we needed to have certain things in order to be able to run our application.

63
00:04:09,560 --> 00:04:13,310
The most obvious thing we need is we have to have a copy of postscripts.

64
00:04:13,550 --> 00:04:21,350
So let's search for Prospero's and install it apt search postgrads and that will search to see what

65
00:04:21,350 --> 00:04:22,370
packages are available.

66
00:04:22,380 --> 00:04:25,340
And if I scroll up a little bit, let's see.

67
00:04:26,270 --> 00:04:28,430
We should have the postgrads server.

68
00:04:30,520 --> 00:04:36,430
So over to P0, they're in alphabetical order, so I'll just keep scrolling up postgrads.

69
00:04:37,710 --> 00:04:46,770
Database, Kluster Postgres client postgrads 12, postgrads 12, Snake Oil Postgrads.

70
00:04:51,460 --> 00:04:52,780
I think it's just postgrads.

71
00:04:53,760 --> 00:04:55,440
Q Well, but I want to be sure.

72
00:05:03,160 --> 00:05:09,720
There it is, so this is what I want, postgrads QOL 12, I'll copy that, go back down at the end here.

73
00:05:09,820 --> 00:05:12,760
Clear my screen Apte install.

74
00:05:15,620 --> 00:05:19,310
And yes, I do want to install it, so hit return one, install that.

75
00:05:37,200 --> 00:05:43,710
So let's see if that worked service Postgres status.

76
00:05:45,220 --> 00:05:48,070
And it appears to be running good.

77
00:05:48,210 --> 00:05:51,430
OK, so postgrads is running, so we have that ready to go.

78
00:05:51,430 --> 00:05:52,390
So we need postgrads.

79
00:05:52,810 --> 00:05:54,130
We also need a Web server.

80
00:05:54,130 --> 00:05:56,020
And I'm going to show you a couple.

81
00:05:57,640 --> 00:06:02,500
One that's very popular is Ingenix, which is spelled Ndeye Anex.

82
00:06:02,500 --> 00:06:04,150
And it works really well.

83
00:06:04,150 --> 00:06:05,800
And it's not difficult to set up.

84
00:06:05,800 --> 00:06:08,680
And it's there's no reason why you shouldn't use it.

85
00:06:09,130 --> 00:06:13,870
But one that I really like is called Cadie Server, and that's the one I'm going to use.

86
00:06:14,290 --> 00:06:20,340
So Katti Server is a Web server written engo, and it's extremely easy to configure.

87
00:06:20,380 --> 00:06:22,090
It's very, very high performance.

88
00:06:22,450 --> 00:06:28,090
And one of the great advantages it has is that it automatically manages SSL certificates for me, free

89
00:06:28,090 --> 00:06:32,350
SSL certificates from a service called Let's Encrypt, and this is the one I'm going to use.

90
00:06:32,350 --> 00:06:37,240
So to download this, I'm going to click download and we actually don't want to do it.

91
00:06:37,240 --> 00:06:40,060
We want to use let's see here.

92
00:06:41,200 --> 00:06:49,240
So documentation getting started somewhere in here and downloads try that one.

93
00:06:49,840 --> 00:06:50,860
Static binaries.

94
00:06:50,860 --> 00:06:52,090
No, doctor, no.

95
00:06:52,090 --> 00:06:53,230
This is what I want to do.

96
00:06:53,230 --> 00:07:00,250
Instead, I want to install it using the Apte tool that's built into my particular package.

97
00:07:00,250 --> 00:07:01,600
So I will copy this.

98
00:07:04,270 --> 00:07:10,360
The first line, which is actually split on the two and I will paste it into my terminal window.

99
00:07:11,780 --> 00:07:16,160
OK, then I'll do the second one pseudo Apte update, which I can do.

100
00:07:16,570 --> 00:07:18,670
I can just type Apte update because I'm route.

101
00:07:21,850 --> 00:07:26,470
And the last command is to install Cadie Apte, install Cati.

102
00:07:32,100 --> 00:07:38,730
Perfect, so now I have my database installed, I have Cadie installed, there's one more thing I want

103
00:07:39,090 --> 00:07:47,210
Apte install supervisor and that's the package I'm going to use to manage my my Web application.

104
00:07:47,730 --> 00:07:51,350
It's the one that will start and stop and keep going.

105
00:07:51,600 --> 00:07:54,710
My goal binary, which will get up there in the next lecture or two.

106
00:07:54,720 --> 00:07:57,390
So let's just install that now and we'll be ready to go.

107
00:08:02,020 --> 00:08:09,100
So I have my database, I have my Web server, I have my service that will keep my Web application running,

108
00:08:09,310 --> 00:08:10,410
which is supervisor.

109
00:08:10,780 --> 00:08:15,490
So in the next lecture, we'll actually get our project up there and see if we can get it running.
