WEBVTT 00:00.360 --> 00:08.100 In this demo, we're going to deploy our application on the Google Cabernets engine on Google Cloud 00:08.100 --> 00:08.640 platform. 00:08.970 --> 00:12.300 So as a prerequisite, you must have access to the Google. 00:13.300 --> 00:14.370 A Google cloud account. 00:15.120 --> 00:18.940 Google provides a twelve month free trial with the credit of $ 300. 00:19.140 --> 00:21.750 And that should be sufficient to follow this demo. 00:22.230 --> 00:27.600 So if you don't have access to a Google cloud already, now use this link and sign up. 00:28.690 --> 00:35.700 Now, of course, some basic understanding of working with the Google cloud environment and the shell 00:35.730 --> 00:39.240 are required so that you can set up all the prerequisites. 00:39.780 --> 00:41.580 So we won't be going into that. 00:43.060 --> 00:48.970 Once logged in to the DCP console, we have a project that we've created by the name example voting 00:48.970 --> 00:49.270 app. 00:49.540 --> 00:55.990 So to start with GCE, click on the navigation menu on the top left corner and under the computer section, 00:56.050 --> 00:57.420 click on Coronets Engine. 00:58.000 --> 01:01.470 Once you're in this page, click on Create Cluster. 01:02.170 --> 01:06.040 So this should load the components cluster creation interface. 01:06.070 --> 01:10.240 So the first thing that you have to do is change the name here. 01:10.270 --> 01:11.470 So we'll we will name it. 01:11.680 --> 01:12.850 Example Wooding app. 01:13.480 --> 01:19.360 We will leave the default values and therefore location type and the zone. 01:19.720 --> 01:21.520 We will live it as as it is. 01:22.120 --> 01:27.520 The master version is the community's version, which we could either set to a static version or select 01:27.820 --> 01:33.760 release channel to automatically upgrade the components versions when new versions are made available 01:33.940 --> 01:34.750 on G.K. 01:35.530 --> 01:39.700 Otherwise, if you set it to static, then you upgrade manually. 01:40.570 --> 01:44.110 We talk about the cluster upgrades in detail in the Saeki, of course. 01:44.350 --> 01:49.990 For now, let's leave it at the default and you may choose another version by clicking on this dropdown 01:49.990 --> 01:50.320 link. 01:51.070 --> 01:56.950 Now you can make additional changes to the worker nodes that have to be configured so you can make change 01:56.950 --> 02:03.160 to the type of virtual machine to be used, the size, etc. But we are just going to stick with the 02:03.160 --> 02:04.010 defaults for now. 02:04.960 --> 02:07.090 So we will proceed with creating the cluster. 02:07.240 --> 02:10.660 So click on CREATE to begin the creation process. 02:11.140 --> 02:14.470 Remember, this can take anywhere between five to 10 minutes. 02:14.480 --> 02:17.470 So let's just wait and give it some time to complete. 02:18.430 --> 02:21.580 You may click on the refresh button to refresh the status. 02:25.090 --> 02:27.070 All right, so now the cluster has been set up. 02:27.240 --> 02:31.090 Now you can see that by the green checkmark next to the cluster name. 02:31.600 --> 02:37.000 And the easiest way to connect to the cluster is by making use of this connect button right here. 02:37.660 --> 02:41.770 So this will give us the command to connect to the cluster using the cloud shell. 02:41.830 --> 02:43.660 So let's click on that. 02:44.230 --> 02:48.530 And on the lower half of the screen, the Google cloud Shell should open up. 02:48.920 --> 02:52.630 And just going to increase it all the way to the top to make some space. 02:53.560 --> 02:54.730 So this is the command that. 02:55.830 --> 02:59.950 Will enable cattle to be able to talk to the DCA cluster. 03:00.030 --> 03:03.450 So in Cloud Shell, you already have the coop cattle utility installed. 03:04.020 --> 03:11.190 So all you need to do is run this command and to set up connectivity to the G.K cluster. 03:12.950 --> 03:16.920 So it will set up the cube config and any other required configuration. 03:17.400 --> 03:18.930 Once that is done, we are ready. 03:19.260 --> 03:20.670 So we now clear the screen. 03:20.700 --> 03:22.800 And if you run the cube, cuddle, get nodes command. 03:23.310 --> 03:28.740 We can see that we have three worker nodes which are in ready state is running wishin one, not one, 03:29.790 --> 03:30.750 one two, one four. 03:31.170 --> 03:34.350 And it was set up about one to two minutes ago. 03:34.890 --> 03:39.900 So our next task is to get the ammo files for deployments and services that we created earlier. 03:40.410 --> 03:46.260 So to do that, we'll open up our GitHub repository where all these files have been committed. 03:46.650 --> 03:49.140 So here we have the repository. 03:49.650 --> 03:55.320 And within the its specifications directory, we have all the deployment and service definition files. 03:55.920 --> 03:58.960 So let's first clone the repository onto the Google Cloud Shell. 03:59.250 --> 04:01.440 So I'm going to run get clone now. 04:01.520 --> 04:02.230 Pays the are. 04:02.310 --> 04:04.230 That was a copy to the clipboard. 04:04.800 --> 04:09.210 And let's run get clone command and paste the world to download the repository. 04:09.990 --> 04:13.750 Now I'm going to see these into the example Wooding App Directory. 04:13.800 --> 04:18.240 And in here I'm going to the specification directory. 04:18.520 --> 04:21.390 And if I run, unless we see all the ammo definition files. 04:21.750 --> 04:22.290 So. 04:23.860 --> 04:27.670 Let's check the changes that we have made to the voting app and the result app services. 04:27.790 --> 04:32.170 So we made a small change to the services because we are deploying these on the cloud environments. 04:33.160 --> 04:37.900 Earlier, we discussed about a service type of load balancer where the native load balancer on the cloud 04:37.930 --> 04:38.620 is deployed. 04:38.800 --> 04:38.900 How? 04:38.900 --> 04:39.910 When we create a service. 04:40.290 --> 04:45.190 So in here we have changed the type of service to load balancer instead of node port. 04:45.610 --> 04:48.460 And we have done the same for result app service as well. 04:48.520 --> 04:52.300 So now let's start creating these objects. 04:52.930 --> 04:59.170 So we will start with the call, create that command and we'll start with the voting deployment itself. 05:00.350 --> 05:02.760 And then we will deploy the service for voting app. 05:04.370 --> 05:08.120 Next, let's deploy the readies deployment, followed by the ready service. 05:10.200 --> 05:13.710 Next, we will do the postgrads deployment, followed by the Postal Service. 05:15.870 --> 05:18.750 And now we can do the worker app deployment. 05:20.230 --> 05:24.820 And finally, let's create the deployment for the result app as well as the result service. 05:27.080 --> 05:33.500 Now, you can also create all of these at once, too, by just specifying a wild card instead of each 05:33.500 --> 05:34.020 file name. 05:34.170 --> 05:41.420 You could just do a Kuka to create Dash F and then a dot to just create all of them at once. 05:41.960 --> 05:46.220 So now we have created all the objects that are needed for this application to run. 05:46.340 --> 05:53.270 So let's verify that by running the cube could all get deployment's Common Services Command again. 05:53.510 --> 05:58.370 See that most of the objects have been created with the exception of the worker app, which is still 05:58.370 --> 05:59.030 being deployed. 05:59.630 --> 06:06.200 I can see that they are ready and we can also see that our load balancers do not have an external IP 06:06.200 --> 06:06.440 yet. 06:06.530 --> 06:08.600 So they are still in a pending state. 06:09.080 --> 06:16.440 So at this stage, the Cabinet is service is in fact working with the native load balancer. 06:16.490 --> 06:22.190 So it's sent a call to the native load balancer to provision a load balancer on on the Google cloud 06:22.340 --> 06:22.850 platform. 06:23.270 --> 06:31.220 So once the load balancer is provisioned and we get the load balancer externally, Warrell and IP, 06:31.220 --> 06:32.390 it will be populated here. 06:32.690 --> 06:37.220 So let's give it a couple of minutes and then check this command again. 06:38.360 --> 06:43.880 Now we can see that all the five deployments are ready and have one out of one part which are in the 06:43.880 --> 06:44.430 running states. 06:44.540 --> 06:48.890 And we also have to load balancers with these two external eyepiece available. 06:49.490 --> 06:51.170 So everything has been set up as needed. 06:51.320 --> 06:55.370 And before we test the application, let's check the load balancer configuration. 06:55.400 --> 07:02.090 So if we click on services and the ingress tab on the left, we can see that we have two services which 07:02.090 --> 07:08.060 are of type cluster IP, which are the internal services of DBI for progress. 07:08.150 --> 07:09.720 And the other one for red is. 07:10.150 --> 07:14.240 And we have two front end services which are making use of the external load balancer. 07:14.810 --> 07:17.280 And here are the external endpoints. 07:17.350 --> 07:22.160 The and the you are all that we can use to access the application. 07:23.680 --> 07:26.580 If you'd like to see more details, you can click on any of these. 07:26.620 --> 07:32.710 And this should give you more details about the service in general, the load balancer, the internal 07:32.710 --> 07:36.520 cluster i.p, the load balancer IP and the load balancer. 07:36.520 --> 07:37.080 You are all. 07:38.610 --> 07:40.780 And you can see that for all of them, the status is OK. 07:41.890 --> 07:43.450 So now we can test the application. 07:43.480 --> 07:46.420 So let's get the link here. 07:46.420 --> 07:56.050 So we're going to open up a new tab in the browser and it will redirect us to the external load balance 07:56.050 --> 07:56.740 right here. 07:57.310 --> 07:59.410 And this is our voting application. 07:59.680 --> 08:03.160 Similarly, let's open up the results app in a new tab as well. 08:03.670 --> 08:09.820 And we will now cast a vote and we see that the result pages updated with the percentage of votes. 08:10.780 --> 08:11.860 Let's try another vote. 08:12.370 --> 08:13.460 And then we see that. 08:13.550 --> 08:15.730 And this has been updated as well. 08:16.630 --> 08:20.560 So that's a quick and short demo for deploying comandantes clusters on GCP. 08:21.210 --> 08:22.700 And I will see you in the next one.