1
00:00:02,040 --> 00:00:03,930
So over the last lectures

2
00:00:03,930 --> 00:00:08,350
I showed you how you can deploy a dockerized application

3
00:00:08,350 --> 00:00:12,530
to an AWS EC2 instance and how you can therefore run

4
00:00:12,530 --> 00:00:16,770
your application in a container on a remote host

5
00:00:16,770 --> 00:00:19,860
without installing any extra runtimes

6
00:00:19,860 --> 00:00:22,600
or environments software on that host,

7
00:00:22,600 --> 00:00:24,720
except for Docker, of course.

8
00:00:24,720 --> 00:00:26,750
And that's why Docker is awesome.

9
00:00:26,750 --> 00:00:29,800
Only Docker needs to be installed, no other tools,

10
00:00:29,800 --> 00:00:32,040
it was super easy as you saw

11
00:00:32,040 --> 00:00:34,410
uploading our code is very easy

12
00:00:34,410 --> 00:00:37,160
since we simply pulled the latest image

13
00:00:37,160 --> 00:00:41,480
and therefore we have to exact same app and environment

14
00:00:41,480 --> 00:00:45,570
on our local machine as we have it on the remote machine

15
00:00:45,570 --> 00:00:48,510
because in the end, it's all in the container.

16
00:00:48,510 --> 00:00:50,600
Now that's why Docker is great.

17
00:00:50,600 --> 00:00:54,760
But this specific way of deploying a Docker application

18
00:00:54,760 --> 00:00:57,320
has a couple of disadvantages.

19
00:00:57,320 --> 00:01:00,610
I like to call it the do-it-yourself approach

20
00:01:00,610 --> 00:01:03,400
because we had to create that instance manually,

21
00:01:03,400 --> 00:01:07,120
configure it manually, we had to connect to it manually,

22
00:01:07,120 --> 00:01:09,290
install Docker on it manually,

23
00:01:09,290 --> 00:01:12,210
we had to do a lot of steps on our own,

24
00:01:12,210 --> 00:01:14,090
even though running the actual app

25
00:01:14,090 --> 00:01:17,290
was still fairly easy in the end.

26
00:01:17,290 --> 00:01:19,900
But the main thing you have to keep in mind,

27
00:01:19,900 --> 00:01:22,440
if you use an approach as I showed it here,

28
00:01:22,440 --> 00:01:24,990
so if you use your own remote server

29
00:01:24,990 --> 00:01:28,570
which you started with help of a cloud hosting provider

30
00:01:28,570 --> 00:01:30,530
like the EC2 instance here,

31
00:01:30,530 --> 00:01:33,040
the main thing you have to keep in mind here

32
00:01:33,040 --> 00:01:36,760
is that you fully own this remote machine.

33
00:01:36,760 --> 00:01:39,450
You are fully responsible for it

34
00:01:39,450 --> 00:01:43,810
and most importantly also for its security.

35
00:01:43,810 --> 00:01:46,450
You are responsible for the configuration

36
00:01:46,450 --> 00:01:47,960
of that remote machine,

37
00:01:47,960 --> 00:01:50,550
you have to take care, it's powerful enough.

38
00:01:50,550 --> 00:01:53,470
You have to replace it with a more powerful one,

39
00:01:53,470 --> 00:01:55,800
if you get more traffic,

40
00:01:55,800 --> 00:02:00,070
you have to ensure that all the key system software

41
00:02:00,070 --> 00:02:02,560
stays updated, even if you don't need

42
00:02:02,560 --> 00:02:05,340
to install application specific software

43
00:02:05,340 --> 00:02:08,699
you have to keep the operating system on it up-to-date,

44
00:02:08,699 --> 00:02:11,633
you have full responsibility for that.

45
00:02:12,470 --> 00:02:15,520
You also have to manage the network in which it is

46
00:02:15,520 --> 00:02:18,520
the security groups and therefore the firewall,

47
00:02:18,520 --> 00:02:21,270
and if you don't know what you're doing here

48
00:02:21,270 --> 00:02:25,220
it's easy to set up an insecure EC2 instance

49
00:02:25,220 --> 00:02:30,100
an insecure host, which could be hacked or abused.

50
00:02:30,100 --> 00:02:34,240
In addition to that, which already is a major disadvantage

51
00:02:34,240 --> 00:02:36,080
because you have to learn about things

52
00:02:36,080 --> 00:02:38,900
which you don't natively know as a web developer.

53
00:02:38,900 --> 00:02:42,600
In addition to that, SSHing to the machine

54
00:02:42,600 --> 00:02:45,030
and connecting to it through SSH,

55
00:02:45,030 --> 00:02:47,610
and then installing Docker there's on

56
00:02:47,610 --> 00:02:52,330
works and is not horrible, but it's still a bit annoying.

57
00:02:52,330 --> 00:02:55,250
You might want a deployment workflow

58
00:02:55,250 --> 00:02:57,540
where you don't need to do that,

59
00:02:57,540 --> 00:03:00,420
where you instead maybe can just run a command

60
00:03:00,420 --> 00:03:03,760
on your local host machine or a couple of commands,

61
00:03:03,760 --> 00:03:05,580
and this then automatically

62
00:03:05,580 --> 00:03:08,500
moves your image to some remote host.

63
00:03:08,500 --> 00:03:12,490
And maybe that remote host should also be managed

64
00:03:12,490 --> 00:03:14,430
to ensure that you don't have to take care

65
00:03:14,430 --> 00:03:16,330
about everything on your own there

66
00:03:16,330 --> 00:03:18,310
that the system software do

67
00:03:18,310 --> 00:03:21,380
operating system stays updated automatically.

68
00:03:21,380 --> 00:03:24,800
Maybe you want such a more managed approach.

69
00:03:24,800 --> 00:03:26,470
And I would indeed recommend

70
00:03:26,470 --> 00:03:29,360
that you go for a more managed approach

71
00:03:29,360 --> 00:03:32,610
because then you can focus on writing your source code

72
00:03:32,610 --> 00:03:35,350
and building your dockerized application,

73
00:03:35,350 --> 00:03:37,450
and you don't have to focus

74
00:03:37,450 --> 00:03:41,520
on managing servers and firewalls and networks.

75
00:03:41,520 --> 00:03:44,800
That requires a totally different set of skills,

76
00:03:44,800 --> 00:03:47,210
and as a software and web developer,

77
00:03:47,210 --> 00:03:50,470
you might not have that set of skills.

78
00:03:50,470 --> 00:03:52,900
So that's why using this EC2 instance

79
00:03:52,900 --> 00:03:56,450
was a nice first example, which I mainly used

80
00:03:56,450 --> 00:03:58,740
to show you that you can't really just

81
00:03:58,740 --> 00:04:00,970
install Docker on a different machine

82
00:04:00,970 --> 00:04:05,000
and then use your container data as you used it locally,

83
00:04:05,000 --> 00:04:09,460
but for real applications, bigger applications,

84
00:04:09,460 --> 00:04:12,600
maybe all the applications with multiple containers,

85
00:04:12,600 --> 00:04:14,250
it might not be ideal

86
00:04:14,250 --> 00:04:16,899
unless you really know what you're doing.

87
00:04:16,899 --> 00:04:19,170
Then if you do know what you're doing,

88
00:04:19,170 --> 00:04:22,410
having this full control over everything

89
00:04:22,410 --> 00:04:24,810
could indeed be an advantage.

90
00:04:24,810 --> 00:04:26,870
But in many cases it will not be,

91
00:04:26,870 --> 00:04:29,630
and therefore, throughout the rest of this module,

92
00:04:29,630 --> 00:04:31,940
we are not going to use EC2,

93
00:04:31,940 --> 00:04:34,210
instead I'll show you other services,

94
00:04:34,210 --> 00:04:36,940
which we could use which are managed

95
00:04:36,940 --> 00:04:39,030
and we therefore then,

96
00:04:39,030 --> 00:04:41,343
don't have to take care about everything.

