1
00:00:02,130 --> 00:00:04,650
Now it turns out there are different kinds

2
00:00:04,650 --> 00:00:08,550
of projects you could be working on which utilize Docker,

3
00:00:08,550 --> 00:00:10,980
you could have one or more containers,

4
00:00:10,980 --> 00:00:14,890
you might wanna deploy it on one or more target servers.

5
00:00:14,890 --> 00:00:16,260
And we're going to have a look

6
00:00:16,260 --> 00:00:19,960
at these different scenarios throughout this section,

7
00:00:19,960 --> 00:00:22,430
slowly building up on each other.

8
00:00:22,430 --> 00:00:24,140
But of course, we're going to start

9
00:00:24,140 --> 00:00:26,760
with a basic first example,

10
00:00:26,760 --> 00:00:29,060
so that we can understand the basics

11
00:00:29,060 --> 00:00:32,270
at a simple example before we then later also dive

12
00:00:32,270 --> 00:00:34,460
into more complex ones.

13
00:00:34,460 --> 00:00:36,400
And therefore, we're going to start

14
00:00:36,400 --> 00:00:39,520
with a very simple NodejS application,

15
00:00:39,520 --> 00:00:42,390
which has no database, nothing else.

16
00:00:42,390 --> 00:00:44,700
So it's just one image, one container

17
00:00:44,700 --> 00:00:48,140
and one application in that image and container.

18
00:00:48,140 --> 00:00:51,350
And for this basic example, we're going to start

19
00:00:51,350 --> 00:00:55,060
with one basic possible deployment approach,

20
00:00:55,060 --> 00:00:57,920
where we set up a remote server,

21
00:00:57,920 --> 00:01:01,040
we then install Docker on that remote host,

22
00:01:01,040 --> 00:01:03,540
we connect via SSH for example,

23
00:01:03,540 --> 00:01:06,890
and you'll see this in action in just a second.

24
00:01:06,890 --> 00:01:08,980
We then push our Docker image

25
00:01:08,980 --> 00:01:11,150
from our local hosting machine,

26
00:01:11,150 --> 00:01:13,560
where we developed the application

27
00:01:13,560 --> 00:01:16,520
to a Docker registry like Docker Hub,

28
00:01:16,520 --> 00:01:19,250
we then pull that image from the remote host

29
00:01:19,250 --> 00:01:20,820
to that remote host.

30
00:01:20,820 --> 00:01:23,770
And we then run that container on that remote host,

31
00:01:23,770 --> 00:01:26,600
and expose all ports to the World Wide Web

32
00:01:26,600 --> 00:01:28,010
that need to be exposed.

33
00:01:28,010 --> 00:01:33,010
So that end users can visit our application or our website.

34
00:01:33,300 --> 00:01:36,530
That's what we're going to do in this module,

35
00:01:36,530 --> 00:01:40,200
or that's what we're going to start with in this module,

36
00:01:40,200 --> 00:01:44,230
setting up a remote machine, a remote hosting server,

37
00:01:44,230 --> 00:01:47,260
connecting to it with SSH, then install Docker

38
00:01:47,260 --> 00:01:50,130
on that remote host, pushing and pulling the image,

39
00:01:50,130 --> 00:01:53,563
running the container and then testing it in the browser.

40
00:01:55,300 --> 00:01:56,660
So in order to get started,

41
00:01:56,660 --> 00:02:00,300
we need a remote server, a remote machine.

42
00:02:00,300 --> 00:02:02,720
And there are multiple hosting providers

43
00:02:02,720 --> 00:02:03,930
you could use for that.

44
00:02:03,930 --> 00:02:05,690
Indeed, there are hundreds

45
00:02:05,690 --> 00:02:08,169
and thousands of Docker supporting hosting

46
00:02:08,169 --> 00:02:09,720
providers out there.

47
00:02:09,720 --> 00:02:13,070
And you can simply google for Docker hosting provider.

48
00:02:13,070 --> 00:02:14,760
And you'll see a bunch

49
00:02:14,760 --> 00:02:17,670
of advertisements, a bunch of providers.

50
00:02:17,670 --> 00:02:21,090
And you will also find articles like this one,

51
00:02:21,090 --> 00:02:25,500
which compares possible options you could go for.

52
00:02:25,500 --> 00:02:28,910
So definitely consider searching for this

53
00:02:28,910 --> 00:02:30,850
if you have your own application,

54
00:02:30,850 --> 00:02:32,350
which you wanna deploy.

55
00:02:32,350 --> 00:02:34,370
And once you chose a provider,

56
00:02:34,370 --> 00:02:37,320
you should always dig into the documentation

57
00:02:37,320 --> 00:02:40,180
of that provider because the exact steps

58
00:02:40,180 --> 00:02:43,270
on how to connect to your remote machine,

59
00:02:43,270 --> 00:02:46,190
or on how to bring containers onto

60
00:02:46,190 --> 00:02:48,703
the remote machine will always differ.

61
00:02:49,860 --> 00:02:54,140
Now, there are three major big hosting providers

62
00:02:54,140 --> 00:02:55,240
out there though.

63
00:02:55,240 --> 00:02:59,210
And that would be AWS, the Amazon Web Services,

64
00:02:59,210 --> 00:03:03,223
Microsoft Azure and the Google Cloud Platform.

65
00:03:04,130 --> 00:03:07,350
These are three major hosting providers,

66
00:03:07,350 --> 00:03:10,170
which are more than just hosting providers.

67
00:03:10,170 --> 00:03:12,570
These are cloud service providers,

68
00:03:12,570 --> 00:03:15,230
which have tons of cloud services,

69
00:03:15,230 --> 00:03:17,550
which can help you with anything

70
00:03:17,550 --> 00:03:19,710
that you might want to do in the cloud,

71
00:03:19,710 --> 00:03:24,190
from web development, web hosting, all the way up

72
00:03:24,190 --> 00:03:27,120
to machine learning and whatever you wanna do there.

73
00:03:27,120 --> 00:03:30,680
So they do offer way more than just web hosting.

74
00:03:30,680 --> 00:03:33,770
Though in this course, we're going to utilize one

75
00:03:33,770 --> 00:03:36,280
of them for web hosting.

76
00:03:36,280 --> 00:03:37,980
And as I just mentioned before,

77
00:03:37,980 --> 00:03:41,310
you should always have a look at the websites

78
00:03:41,310 --> 00:03:46,070
of these cloud providers to learn more about their products

79
00:03:46,070 --> 00:03:49,300
and how these products work, it also

80
00:03:49,300 --> 00:03:52,310
will turn out that they have multiple products

81
00:03:52,310 --> 00:03:55,770
that can help you with Docker containers.

82
00:03:55,770 --> 00:03:57,630
And I will walk you through some

83
00:03:57,630 --> 00:04:01,650
of the most important ones for AWS in this course.

84
00:04:01,650 --> 00:04:04,830
But obviously, this is not a cloud hosting provider course.

85
00:04:04,830 --> 00:04:06,170
It's a Docker course.

86
00:04:06,170 --> 00:04:09,230
And therefore I'm not going to cover all hosting providers

87
00:04:09,230 --> 00:04:11,320
and all products you could use.

88
00:04:11,320 --> 00:04:13,660
But I will show you different ways

89
00:04:13,660 --> 00:04:17,920
of bringing your Docker containers to live on AWS

90
00:04:17,920 --> 00:04:19,690
in this specific course.

91
00:04:19,690 --> 00:04:22,650
Since it's the biggest cloud hosting provider

92
00:04:22,650 --> 00:04:24,770
or the biggest cloud service provider,

93
00:04:24,770 --> 00:04:26,680
and they offer by the end of the section,

94
00:04:26,680 --> 00:04:29,520
you will have a very good understanding

95
00:04:29,520 --> 00:04:32,690
of why we have multiple services

96
00:04:32,690 --> 00:04:34,620
and how you could utilize them for

97
00:04:34,620 --> 00:04:36,393
your own projects as well.

98
00:04:37,440 --> 00:04:39,590
Now, as I just said, we're going to use AWS

99
00:04:39,590 --> 00:04:42,770
in this course because it's the biggest hosting provider.

100
00:04:42,770 --> 00:04:44,550
But I also have to warn you,

101
00:04:44,550 --> 00:04:48,460
you will need a credit card in order to follow along,

102
00:04:48,460 --> 00:04:49,990
but that will be the case for pretty

103
00:04:49,990 --> 00:04:52,450
much all major hosting providers.

104
00:04:52,450 --> 00:04:54,970
And if you don't have one, you for the moment

105
00:04:54,970 --> 00:04:57,240
of course can also just watch the videos

106
00:04:57,240 --> 00:04:59,910
and then follow along once you got a real project

107
00:04:59,910 --> 00:05:01,850
you wanna deploy, at which point

108
00:05:01,850 --> 00:05:04,140
you will need a credit card anyways,

109
00:05:04,140 --> 00:05:07,010
because at some point you will need a hosting provider,

110
00:05:07,010 --> 00:05:09,340
where you will of course also have to pay

111
00:05:09,340 --> 00:05:12,330
for hosting and for using their services.

112
00:05:12,330 --> 00:05:15,600
Now, I will say though, that for AWS,

113
00:05:15,600 --> 00:05:17,720
if you check out their pricing page,

114
00:05:17,720 --> 00:05:19,540
which you definitely should do,

115
00:05:19,540 --> 00:05:23,010
if you plan on using their services for your own project,

116
00:05:23,010 --> 00:05:25,640
they do have a so called free tier.

117
00:05:25,640 --> 00:05:28,410
And that simply includes a bunch of services

118
00:05:28,410 --> 00:05:31,580
and certain quotas for these different services,

119
00:05:31,580 --> 00:05:33,820
which you can use for free.

120
00:05:33,820 --> 00:05:35,350
For example, EC2,

121
00:05:35,350 --> 00:05:38,540
which is their remote hosting machine service,

122
00:05:38,540 --> 00:05:42,380
you could say, you got 750 instance hours

123
00:05:42,380 --> 00:05:46,270
for free every month for the first 12 months.

124
00:05:46,270 --> 00:05:48,890
And that effectively means that you can run one

125
00:05:48,890 --> 00:05:53,890
of these remote servers for free within the first 12 months.

126
00:05:54,330 --> 00:05:58,690
But check out this page since it might change over time

127
00:05:58,690 --> 00:06:01,260
to find out what's included and to avoid

128
00:06:01,260 --> 00:06:04,070
any unwanted surprises.

129
00:06:04,070 --> 00:06:06,210
So now with that out of the way,

130
00:06:06,210 --> 00:06:09,760
I am indeed going to start by launching such an easy

131
00:06:09,760 --> 00:06:13,020
to instance, which is basically a remote server hosted

132
00:06:13,020 --> 00:06:17,310
by AWS and I will show you how we could use this easy

133
00:06:17,310 --> 00:06:20,820
to instance to install Docker on it and launch

134
00:06:20,820 --> 00:06:24,000
our Docker container on this remote machine then

