1 00:00:02,190 --> 00:00:08,370 With my cluster up and running, we can now work with the cluster. On the cluster here, we get a couple 2 00:00:08,370 --> 00:00:14,670 of options to migrate data into the cluster for example, to pause it, to terminate it, 3 00:00:15,030 --> 00:00:20,130 you can check out general metrics about your cluster and see all kinds of information of what happened 4 00:00:20,190 --> 00:00:23,010 on your cluster, how many reads you had and so on, 5 00:00:23,010 --> 00:00:25,510 you can also dive into the collections your cluster has, 6 00:00:25,680 --> 00:00:31,590 so you see databases and the collections in the cluster and some of these options might only be available 7 00:00:31,620 --> 00:00:33,600 outside of the free tier by the way, 8 00:00:33,810 --> 00:00:35,920 so I'll not dive too deep into that, 9 00:00:35,940 --> 00:00:38,150 definitely just click around there and play around. 10 00:00:38,340 --> 00:00:41,790 For now, the interesting part is how can we connect to the cluster 11 00:00:41,790 --> 00:00:46,870 and for this we can click on the overview page, we can click on connect here. Now 12 00:00:46,890 --> 00:00:51,660 there you see the IP addresses that will be able to connect and you can also add an entry from here 13 00:00:51,720 --> 00:00:55,240 but that's the same list we had on the IP whitelist page earlier 14 00:00:55,620 --> 00:00:58,190 and then you should choose your way of connecting. 15 00:00:58,200 --> 00:01:04,500 Now I will go with the shell, in another module in this course later we'll of course also connect from an application 16 00:01:04,590 --> 00:01:11,400 so that we can really use that in an app as it could run on a real server, so I'll connect with mongodb 17 00:01:11,480 --> 00:01:12,250 shell. 18 00:01:12,270 --> 00:01:17,370 Now you can follow the instructions here for your operating system, download the shell of course, 19 00:01:17,400 --> 00:01:18,160 we already have it 20 00:01:18,180 --> 00:01:24,100 so you can skip that step and then connect with this command here. 21 00:01:24,510 --> 00:01:27,520 So you should be able to just copy that command, 22 00:01:27,870 --> 00:01:31,240 you'll need your password, so make sure you also have that saved somewhere, 23 00:01:32,200 --> 00:01:33,810 copy that command here 24 00:01:33,970 --> 00:01:36,100 and now let's switch to the shell again. 25 00:01:36,460 --> 00:01:39,130 Now first of all you need to quit a running shell, 26 00:01:39,170 --> 00:01:41,980 you can also quit a running mongod instance on your computer, 27 00:01:41,980 --> 00:01:43,540 you don't need to run a server anymore, 28 00:01:43,570 --> 00:01:45,090 we have one in the web now. 29 00:01:45,460 --> 00:01:48,590 And now to connect to the mongodb cluster, 30 00:01:48,610 --> 00:01:50,640 you can insert a command you just copied 31 00:01:50,770 --> 00:01:52,720 and the important thing here is that we have now 32 00:01:52,750 --> 00:01:54,060 mongo still 33 00:01:54,220 --> 00:02:01,540 but then we have this path here and this ensures that mongo does not try to connect to a locally running 34 00:02:01,890 --> 00:02:06,900 mongodb server which would be its default behavior but that it instead tries to reach a server 35 00:02:06,940 --> 00:02:08,120 at this address. 36 00:02:08,350 --> 00:02:12,210 /tests here by the way defines the default database to which you connect, 37 00:02:12,250 --> 00:02:17,020 so you can change this if you want, so you can also set 38 00:02:17,020 --> 00:02:17,910 I want to connect to 39 00:02:17,910 --> 00:02:21,660 let's say /products here. 40 00:02:21,910 --> 00:02:27,700 You then need to add your username with --username and you can hit enter and you should be prompted 41 00:02:27,700 --> 00:02:29,330 for your password then. 42 00:02:29,350 --> 00:02:34,360 Now make sure you now enter the password you chose when creating the user with which you were trying 43 00:02:34,360 --> 00:02:35,680 to log in 44 00:02:36,220 --> 00:02:41,460 and it should then connect to your mongodb server running in the cloud, 45 00:02:41,470 --> 00:02:44,450 so I'm now connected to this cloud. 46 00:02:44,670 --> 00:02:51,480 If I show my dbs, we again is the admin config local there and now of course, I should already be in products 47 00:02:51,490 --> 00:02:58,000 but we can also use that again or use shop maybe and then there, use db products 48 00:02:58,000 --> 00:03:09,530 insert one and there I can enter a book and a price and if I hit enter, this is now inserted and everything here works 49 00:03:09,560 --> 00:03:13,910 as you learned it in the course. This does not differ, it's a normal mongodb server in the end, 50 00:03:13,960 --> 00:03:19,510 just one running in the cloud and not running on your computer and you can interact with it as you 51 00:03:19,510 --> 00:03:25,560 did with your local server but now, you've got a perfectly configured, highly performant mongodb 52 00:03:25,710 --> 00:03:27,120 server deployed in the cloud 53 00:03:27,220 --> 00:03:30,710 and since it's in the cloud now, so on a server and not on your local host, 54 00:03:30,820 --> 00:03:34,060 you can now use it from anywhere and not just your local machine.