Full DigitalOcean Crash Course - Get started with cloud computing today

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone I'm super excited to begin a very good comprehensive course for beginners who want to get into cloud computing using digital ocean now the motive of this course is going to be exploring digital ocean as much as we can in uncreate depth so that we understand ins and out of digital ocean platform how you can work with it how you can create servers deploy applications explore the features which digital ocean has to offer and be a better developer while working with digital ocean in general so I'm pretty excited in this course that we'll be covering a lot of new and interesting stuff for you let's get into it without wasting any time I'll see you then in the next video all right guys first things first what the hell is digital ocean anyway so digital ocean is an infrastructure as a service provider now what do I mean by that that means that digital ocean will actually provide you with hardware with the actual cloud hardware which you would require to run your applications which would require you to run your databases your programming interfaces whatever you want to run on the cloud by cloud what I mean is that the servers are owned and maintained by a digital ocean but digital ocean gives you full access to reprogram those servers to allow people to wizard those servers exposed over internet or basically to do your private work as well if you do not want to expose it over Internet just like that so digital ocean provides you the infrastructure it does not provide you any sort of you know just just a regular platform or whatever it provides you the actual infrastructure the raw things and basically allows you to do anything you want right so similar alternatives like digital ocean exists like Google cloud platform is one of the alternatives AWS is another one which is very popular and we're gonna get into a differences between AWS to do digital ocean Google cloud he Roku stuff like that there soon in the next video most probably so yeah that's your dissolution introduction video so digitalocean provides you infrastructure-as-a-service allowing you to execute your application your code on the servers owned by digital ocean but leased to you for a monthly fee or foreign per hour based fee which we'll discuss later on so yeah the first thing is to sign up for an account on digital ocean and if you use the link in the description you're gonna get free $100 credit first digital ocean if you sign up using the link below in the description that is a special link for you which is my link from digital ocean which gives you hundred dollars of credit you can spend over the next 60 days of your registration so get let's get started with digital ocean and I'm gonna see you pretty soon in the next video hey everyone welcome back my name is Mei hole and in this video we're gonna be taking a look at digital ocean versus AWS and other cloud hosting providers in the same space so the idea is that cloud hosting providers more or less kind of work in the same way expose you with the same features and all that stuff but there are quite some differences between one another which I'm going to highlight in this video I've used AWS and digital ocean both to a lot of great extent and basically I know that things I will be saying are true at least for my experience so the first thing is that AWS and I would say a lot of other cloud providers have a lot and lot of more features than the resolution alone right so one of the things which might bother you if you're opting in for digitalocean is that it does not have those many features inside of a cloud provider right now I know that digitalocean sells itself as an infrastructure as a service and what you would expect is that you know just give us the infrastructure and we're gonna set it all up ourselves but a lot of times it is very very handy when services like you know digitalocean spaces whose equivalent as s3 on AWS and you know for example on AWS you have simple email service which allows you to send emails to a lot of people using the AWS back-end so stuff like this is kind of missing from digitalocean right if you see the services offered by AWS are huge AWS offers a lot of services similarly Google Cloud offers a lot of services as well as your offers them as well so that's one point in favor of other these other cloud providers which are not digital ocean for digital ocean however I would say the best thing is that it keeps its list of features short and the most used one you're gonna see that you have so many features right here but you are probably not going to use I would say 98% or 95% of the features listed here right so you might not even ever need to use for example like the media services of AWS if you are not into the video business right if you are not into let's say if you do not want to use machine learning in your application you're gonna not use this whole section right here right so there's that so it will just offers you a ton of features on the on the first hand but you might not even use most of them secondly AWS is is categorized as one of the most difficult user interfaces to be to use inside of a cloud environment now I somewhat agree with the statement but yeah I mean you can get a hang of AWS if you start using it if you get to you know just just keep working it for a couple of weeks or more you're gonna get under you're gonna understand how everything works in AWS dashboard but yeah for beginners if you're just starting out inside the cloud shurni it might be a little bit daunting to see all those all those gears and the check boxes and you know just fine-tuning so much digitalocean allows you to basically have a very clean and sleek interface for everything and yeah in a few steps you can just get started with complicated features like launching your own server on the cloud in just two or three steps so this is the lotion owns this point the other thing which I like the most about digitalocean is its upfront pricing so you see that although digitalocean is a cloud-based provider it actually provides you the collect and clean up front pricing cost right it is a nightmare to calculate pricing in AWS correctly now you might redirect me to a couple of pages you know just look at that look at there and I might agree but AWS comes with a lot of small cost here and there as well especially with the data transfer so AWS has all sorts of costs for all sorts of countries for example if your visitor is coming from India and you you're using cloud front you're gonna be charged more if the visitor is from us you're gonna be charged less you know if you're hosting your s3 bucket on in some one region and cloud from this front of it then you might be charged if just like I said if that country of the user is different right depending on the country similarly there are a lot of other hidden costs as well inside the AWS infrastructure raid mostly revolving around data transfer that is what I have experienced so that is not really predictable so yeah and in fact this cost for iOS well if you're using ec2 so you cannot have a lot of input/output on your instance so there are costs like these on digitalocean it's pretty straightforward which they say to you it's a $5 per month instance you get a 1gb ram one CPU which is shared 25 gb hard disk and a 1 TB of transfer for free right so this package includes something which I believe 90% of the Internet who wants to host small websites would be sufficient maybe your personal blog which gets I don't know let's say maybe two to three thousand visits a month that that this is like a perfect solution for you right and yeah even the charges for exceeding the transfer are also listed very clearly which we'll get on in later videos but yeah that's that's the idea that digitalocean puts pricing in a very fair and clear way and I would say that digitalocean in a lot of cases actually beats AWS pricing as well by a margin a lot a lot of margin I would say so AWS everybody knows that AWS has a ridiculous model of data transfer pricing in fact zoom even bailed out of AWS just because of the high huge data transfer pricing and they just went to Oracle for that part but yeah I mean this is like one of the things which bothers me about AWS is the data transfer pricing is very high so yeah digitalocean has very convenient data transfer pricing you can see that you for the $5 per month instance you get a 1tb data transfer just on the house so there's that a 1tb data transfer on AWS would easily cost you around 70 to 100 dollars a month so you know you are saving some money here which digitalocean so yeah I mean more or less these are the few things just to summarize digitalocean has very few features compared to AWS or Google Cloud but those few features are very very useful and 99% of the times you're gonna need only those you so you can live with that in a lot of cases number two is that the pricing model of digitalocean is much cleaner and much cheaper in a lot of cases than its competitors right specifically AWS number three I cannot think of anything else but yeah I mean that's that's that this solution I don't have a lot of quality problem with digitalocean not really a lot of downtime I won't say that so was a top-class the network speed is go yeah I mean that's that's a top-class company offering a cheap price for good instance hardware so I wouldn't I wouldn't complain about digitalocean harvest at all because I have been running digitalocean myself for a couple of years now almost and yeah there have been some complaints in some areas which I'll get to as we create this content but yeah more or less my experience has been good so yeah that's that's basically it for this video and if you haven't signed up for digitalocean account just go ahead and sign up using the link below and once you do that we can start with our journey at digitalocean so that's all for this video I'm gonna see you very quickly in the next one so what is going on everybody my name is may hole and welcome back to another video in which I want to explain some differences between hero coup and digitalocean and obviously platform similar to Heroku as well now you're gonna see that hero coup actually offers you a lot of things out of the box right it allows you to deploy your applications instantly you know you get all these dinos your databases your continuous integration development and it also has paid plans and all that stuff but the important thing to remember here is that Heroku is an abstraction layer over the infrastructure right now Heroku manages its own infrastructure that's clear but what he Roku actually does is that if this is let's say I don't know how do I put this if he Roku if digitalocean is layer 1 then he Roku is layer 2 right so what happens is that hero qu is a platform as a service so you as an end user is using a platform for which your pink infrastructure comes first platform is built on top of infrastructure and then your application is built on top of the platform right so hero who actually provides you a platform to build your applications so you get all those shiny and nice features are on the box Roku and if you go to with paid plans I would say you get a lot of other features as well one thing you should remember is because Hiroko provides you with so much convenience it obviously has a has a larger price than a similar solution running completely on digitalocean now that is obviously the case because Hiroko manages the infrastructure for your for you you know Hiroko manages the platform for you so that has an additional cost right and it is absolutely fine for people who do not want to get into programming you know setting up on servers or load balancers data bases stuff like that but you as a developer you as a person who wants to get into back-end or maybe you know cloud engineering this is something I think you should not get into at the very first you should understand how the actual servers are working how the actual things work under the hood you know the black and white stuff how things really work on the solar how server responds to clients how you can manage memory how you can create darker instances containers you know even load balanced instances yourself have a floating eye beam IPS in place managing DNS all that good stuff you should know about that Splatt forms like Heroku abstracted for the good from you but this is like not the best approach for a person who wants to get into back-end development and you know just being a cloud engineer so yeah that that for my two cents on hero core and digital ocean I won't get into pricing and that much because I just have already said pricing would be much larger for Hiro CUDA and digitalocean because it has convenience and you do not have to do a lot of coding and setup and the products obviously he Roku out beats digitalocean in that case because you know it offers so many solutions out of the box sort of scaling you know just that is just one of the many so yeah that's that's basically it for this video I'm gonna see you pretty soon in the next one alright guys welcome back to another video my name is Mei hole and this one will be comparing GoDaddy and digitalocean and basically GoDaddy and other hosting providers like that GoDaddy Hostgator stuff like that so the TLDR version is that if you are a developer if you know how to work with servers or if you are learning to know how to work with servers never go with services like GoDaddy odd you know Hostgator or any other alternative because these are completely managed solutions these are things like you they would never actually allow you to touch the actual infrastructure they would in their VPS plans and all that stuff but if you're going for plants like these I would say just go for a cloud provider you know stuff like WordPress install ish and one-click install it kind of feels like you are you're a person who does not really know how to just double you get a wordpress zip file from their official repo and start the main installer after installing PHP on your server that kind of sounds like ridiculous to me that and that if you are a developer who wants to learn back-end development and stuff you would opt-in for this for production use for your own use right so yeah my two cents is that never opt for good at your Hostgator or any other plans like this if you want to be a good developer who understands how the cloud tech actually works so yeah as you can see for the pricing part as well GoDaddy is much I would say not really much but it is in fact costlier than digitalocean you pay seven dollars a month for WordPress hosting which could be done theoretically on $5 per month digitalocean instance as well you can use digitalocean digitalocean does not offer any CDN but you can use CloudFlare CDN for example you can have free backups yourself by setting up scripts you can you don't have really have free domain but domains not very expensive I would say and yeah they just give you one domain if you opt in for the annual plan that is if you pay for the whole year so these are like their their things right again you get unlimited professional emails with digitalocean you just have to set up the correct MX record and go to you know sites like Soho for example which offer free email addresses personalized email addresses digitalocean actually guarantees you hundred percent we're not really a hundred person but yeah as long as your cell phone doesn't go down if you have configured it correctly that should be fine so yeah I mean there's not even a point talking about opting in for services like these if you want to become a developer so let's get right into digitalocean now we're going to be understanding what it is exactly how many features it has how you can work with it as a developer and take it from there so that's all for this video I'm gonna see you pretty soon in the next one alright guys this is just going to be a quick short video on getting you started with digitalocean just go ahead and click the link in the description below or you can see it on your screen as well just wizard this link you're gonna see this message in green which says free credit active it started on digitalocean with $100 if you sign up without the link you won't get any credit so if you do that you're gonna get $100 credit for 60 days and yeah just go ahead and create your account with email Google or github whatever you like and you should be coming back to a screen like this right so more or less that is what you'll be seeing after you sign up using digitalocean so yeah that's it for this video from the next video will be hopping in into another section where we are gonna see how you can start working with digital oceans some of the core functionalities so that's all for this video I'm gonna see you pretty soon in the next one hi everyone welcome back and in this video let's just go ahead and take a look at what is a droplet because that is the first thing you see on your screen when you login into digital ocean it says you get started with the droplet now the thing with Internet is that when you Stipe a site let's say google.com what happens is that you wizard google.com but your computer your operating system actually has to resolve this google.com into something known as an IP address right and you can actually get the IP address you visited if you go to the network's tab inside your console and go to the dock click on google.com and I'm gonna see that this is basically the IP address at which your computer requested the resource 172 two one seven one six seven two to it now this is one of the many IP address Google uses for its main domain google.com right you just happened to fetch this fetch from this IP address because the DNS resolver told you that google.com is this IP address anyway the point is that this IP address right here which you see is associated with some computer sharing somewhere on the planet and this is the IP address of that computer which responded you with this content right so see starting off with doctype HTML HTML items go of all this all this thing right so this is the content this is this whole text is what makes you see Google's homepage like this right so this is what makes you see Google Play homepage like this which was sent by some computer sitting on the planet with this IP address now the basic idea of hosting your own website is number one get a computer yourself get a computer right so you already have a computer number two get a public IP address for that computer that is connected to internet somehow every computer connected to Internet has an IP address even your computer as well right now you're watching this video from a computer or a phone or whatever device but if you're connected on internet you have a public IP address of that computer which is communicating with this public IP address in this case Mike is Google's IP address but yeah so the step number two for hosting the site on online was to get a public IP address right which you can also do number three is getting a domain for yourself and this is optional you can technically go ahead and wizard IP addresses as well but you see that in our case it just redirected me to google.com so it can be done right but yeah number three is getting domain if you want to have easy to easy way to visit your website like google.com or koat.com stuff like that and number four is setting up this this computer which you owned to respond something like this when you wizard when somebody visits your site right now the idea where digitalocean fits in is that it allows you to create a droplet now what this droplet is is that it takes care of the first two things which has said that is getting a computer number one and number two connecting it to Internet right so when you create a droplet what digitalocean would do is that it would somehow magically launch a computer for you and only you on the planet Earth right not really for you and only you it kind of uses its own virtualization but for the most part you can think of that and once it gets that computer for you it will give you an IP address for that computer as well so you now have two things number one you have a computer which is running somewhere on the planet right not really somewhere you can also choose your region but I'm just gonna stick with somewhere for now somewhere on the planet and it also has an Associated IP address which can be used to reach out reach out to that particular computer over the Internet that's the basic idea of creating a droplet so yeah I mean that's it for this video in the next ones you're gonna be actually seeing this was the theory will now be seeing the practicality the actual making use of the theory to actually create a droplet and see all that good stuff in action so that's all for this video and I'll see you then in the next one alright guys now that we have an idea of what a droplet is on digital ocean what are we gonna do is we're gonna review how we can create one so I'm gonna start off with two choose an image right so we're gonna just stick to distributions we're gonna explore this later on as we proceed with the course but this basically means just choose an operating system you want to be running on that computer so digital ocean just ships with Linux based computers and that too you can see right here so there's that in most of the cases you're gonna be just opting in for a boon - or sent to us because these two light are like the most popular ones you can also choose Fedora or debian or FreeBSD as for your wish but yeah for the most part you can just go with the bun - if you have no idea now the second thing is that digitalocean asked you to actually choose a plant now what do they mean by choosing a plan well you see that there are basically three or actually I should say four categories here you can see we have the standard category the general purpose CPU optimized and memory optimized now let's just get a little bit into it I said that you have a computer running somewhere on the Internet right now what happens is that digitalocean can allow you to have a very powerful computer as a matter of fact or maybe not so powerful computer and how it can do that is because not not because it owns a lot of computers with a with a kind of you know different feature set but it can on its own end use virtualization to a lot.you specific amount of computing power right so think of this in this way digital ocean for example owns a computer which is very very powerful let's say it has got a 100 terabyte of RAM or maybe like you know 1 petabyte of harder scan around 5000 course right you can think of it like this way now what digital Ellucian can do that it can allow you as a developer to take maybe two cores out of it maybe four cores out of it and 8gb of RAM and let's say 25 gb of hardest stuff like that and be done with it right so it can share the rest of the resources with other people so that is that is the main thing so what standard is standard basically means that whatever computer digitalocean provides you the CPU of that computer is going to be shared across different instances so what does that mean that means that if you have a computer under the standard instance the CPU which is being used can also be used by some other person running the standard instance as well well my take on this one it kind of performs pretty well as well on its own in most of the cases you won't notice any performance hit but because digitalocean says that you are using shared CPUs instead of dedicated CPUs you can you know just expect that if you don't get a hundred percent performance for CPU all the time that is normal right general-purpose means that now the CPU which you have is completely yours right you 100% on it and nobody can use your CPU so you won't have you know less CPU time for your applications running on that computer right so yeah Journal purpose is just a set of computing power options which are like the optimal combinations of CPUs and RAM which favors none right so it does not really favors a lot of computing power it does not really favors a lot of RAM as well so you see that the first option for general-purpose for us is $60.00 per month for standard it's $5 per month and mostly we're gonna be looking into that only because it's a pretty decent configuration as well but I'm just just taking you through all the options here to see $60 per month we get a 8gb ram two CPUs which are dedicated CPU and a 25 GB hard disk well you can increase that if you want and 4 TB of data transfer now what does this mean this 4 TB of data transfer if you take a look in the standard you have a 1 TB of data transfer for the lowest instance and what this means is that when you when you create your server online when you create a website when somebody Wizards your website your server has to send them some data right so digital oceans over the solar has to communicate to your to your clients or to a person or to a wizardess computer using the internet the network so that that actually incurs a cost in maintaining that whole Internet infrastructure you know the routers in the place the gateways all that stuff so what digitalocean does is that it throws you a one terabyte of free data transfer that means you can transfer one terabyte of data from your droplet to any computer not just a single computer this is a net total transfer limit right so in net you can transfer a one terabyte of data per month to although all the wizardess of your site and digitalocean would take care of that similarly as your data as your instance size increases digitalocean also increases the data transfer limit so you get a free transform limit for this and mind you this is the free limit right so 4 TB is a free limit you can obviously exceed this and digitalocean would charge you normally for the excessive amount of data transfer so this is like the free bundled limit then we have the CPU optimize performance which means that you have more CPUs to the RAM ratio right so we can put it in this way if you take a look at general general purpose ratio you have 2 by 8 that is 1 by 4 we have 4 by 16 that is again 1 by 4 we have 8 by 32 again 1 by 4 you have 16 by 64 1 by 4 again and this is also 1 by 4 and one by four so in general purpose you see the ratio is one by four for every CPU core you have 4gb of RAM for CPU optimized however the ratio is 1 by 2 for every CPU you have 2gb of RAM well one way of putting that is that the RAM is reduced another way of putting that is that the CPU count is increased right so what digitalocean does is that some jobs are compute are you know just seep you extensive they do not require a lot of memory for example video transcoding using ffmpeg is one of the examples which comes to my mind it does not need a lot of RAM but it needs a lot of computing power it's hungry for computing power right so in that case you might want to obtain for a CPU optimized performance instead of general-purpose right for example if you hop in for this one this is cheaper as well as you know you don't even need the 8gb of RAM which is awful in general purpose so there's that memory optimized is again you can see the ratio is 1 by 8 here so memory optimized means that you have more RAM per CPU core so that's the idea right and yeah I mean if there are some applications which are Ram extensive for example mostly if you're working with a lot of data which needs to be highly accessible by the software so you can use the swap area so you're gonna want a lot of RAM to be available right because Ram is a very fast memory so yeah in that case you're gonna be opting in for memory optimized stuff not the CPU optimized of the general purpose so just to give you an overview again what we discussed standard plants means that your CPU is going to be shared across the instances the other instances running on the digitalocean platform in a lot of cases it's a good thing it's a good way to go right and you can see it has all those good plants and reaching up to 960 dollars per month so you know they are not messing around here it's serious stuff and yeah it's in a lot of cases this is a good option general purpose means that you have an optimal 1 by 4 ratio of cpu to ram and yeah kind of good for hosting a site or something you can see that description a little bit of description here to see if you optimize just like I said is for more applicants for applications which are more CPU intensive and hungry for the CPU time and our optimized for multi-threaded stuff like that memory optimized are the instances which are memory hungry for example data analysis and all that stuff so yeah this was a little bit of introduction on how the plants work in digitalocean for the most part for this whole series I'm going to be sticking with the five dollar instance because it's cheap it's get it gets the work done and it's good so yeah that's all for this video I'm gonna see you very soon in the next one alright guys welcome back and in this one we're gonna be taking a look at that data centers now there's another option called block storage which I'm skipping for now we're gonna come to that later on because we don't really need to discuss it right away but the interesting part after that is the data center region so once you have selected what kind of configuration of CPU you want this is illusion is actually actually provides you the option to determine where you want to host that computer on the planet right so you can have that computer hosted in San Francisco in New York and Amsterdam Singapore London Frankfurt Toronto and Bangalore so these are more or less the locations where the data center owned and operated by digitalocean are located right so you see there's one data center off digitalocean in India which is located in Bangalore so if you go with this you know that your computer which you're gonna get shortly the IP address of that computer is located somewhere in the Bangalore in the city of Bangalore in India in Asia if you if you choose New York and you choose data center one you have three data centers and you know the second one is like restricted to some other people I don't know there might be some things going on but yeah so you have three data centers out of which you can choose the two one and three so these are at two separate locations most probably so if you choose that you're gonna be launching a system which is somewhere in the New York similarly for San Francisco Amsterdam and so on and so forth so eventually as digitalocean grows it's going to add a lot of new data centers as well as it you know CROs its company and just sets up new data centers across the world but these are all the options you have got for now now a lot of times I see that people kind of get confused over what location they should choose my personal bet is that if your site is not local which is in a lot of times it is not that means that it is just not restricted to a specific audience of a specific country I would almost always recommend going for the u.s. that is the New York or the San Francisco why because I don't know I've just personally felt that the network connection when you're using New York or San Francisco instances is much much superior for example in a lot of cases I have seen that when I run apt-get update on Bangalore I don't see that speed which I see when I'm running that on San Francisco right similarly I can see that sometimes the Bangalore instance would return me as a as a as a visit to the site would return me with a higher force to time first to the first bite time of the website than compared to the San Francisco instance it's just my personal experience but yeah this makes sure to keep those things in mind because the infrastructure which digitalocean might be deploying in San Francisco is not as superior as it's doing in Bangalore or Toronto as a matter of fact so yeah if you do not have any choice in mind just go with New York or San Fran if you do have like just visitors from London or like 95% of your visitors from London London and just go with this right this is going to serve them in a much better way so for now I'm just gonna choose New York because we don't have any preference and be done with it so yeah that's that's basically it for this video I'm not going to get into VPC Network yet because that is going to be a whole another section which will discuss what is virtual private cloud and yeah that's all for this part I'll see you then in the next video really soon so what's going on everybody my name is Michael and welcome back to another video in this one we'll be taking a look at how you can set up additional options and finally see how we can create our instance that is a droplet so we have additional options here saying go if you want to have an ipv6 networking if you want to have user data and if you want to have monitor enabled now you can if you want just go ahead and check check this but if you don't have any specific requirement for ipv6 I would just say just leave this out right because it's not not something that you would very much need if you're if you're just starting out right so ibv six just enables your droplet to use an ipv6 address as well with the ipv4 so yeah you can go ahead and use that no problem but there's not really a benefit unless there's some use of some sort of application or maybe for some performance reasons that you really want to opt in for ipv6 you're gonna get an ipv4 anyway right because that is like the de facto standard still on the web but IB v6 is catching up yeah user data is something which allows you to run a bunch of things before your droplet is given to you before your problem is handed over to you as a matter of fact so what digital ocean do is it will create the lot it create the droplet it will put the droplet or if you run your user data script right here now mind you it's not a bash script it's a YAML the yam will file but we are not going to get into that as well because it's just going to complicate things and it's not really required in a lot of times from the dashboard interface especially then we also have monitoring a monitoring a agent would just enable enhanced graphs in digital ocean for the most part you want it to be checked but I'm just going to keep it unchecked for now because I will show you how to enable monitoring for a created instance later on so yeah let's just begin right there so I'm just gonna keep all these three unchecked and I do not want the V PC as well so let's just proceed forward the next thing is authentication now you want to get into your computer that digitalocean droplet which you created in one way or another right because you want to control it you want to program it in order to send relevant responses to maybe clients or maybe if you want to do some work on the cloud whatever your reason is you want to actually get into the instance so what you have to do for that case is that you can have two options you can either create a password that would be then I username password combination to login into your instance or you can set up an SSH key I would almost always recommend going for an SSH key because it might seem like an hassle at the first and password might seem very convenient you just have to write it but SSH keys are very very secure and compared to passwords it will take a lot of time to actually brute-force an SSH key compared to a weak password so yeah you're gonna see here that you have no key for yourself so you want to create a new SSH key and it'll just prompt you with a box like this so what you have to do is now go back to a terminal now if you're running Mac or Linux you should be fine if you're running Windows you can download something known as a git bash yeah so there's a software called git bash which comes with the OpenSSH I believe not not toolkit which allows you to get access to the commands who will be typing now so once you are into that just go into any folder preferably you want to go into the dot SSH folder but I'm just going to keep it inside my custom folder that is called digitalocean course because I don't want to mess up my SSH roller but ideally you want to go into this SSH folder right here right so yeah I'm gonna go ahead and write a command called ssh-keygen what this is going to do is going to generate two files for me the first file would be a public key and the second file would be a private key public key would be used by you to authentic kid that yes you the public key sorry I got it around would be used by the summer it will be stored on the server the private key would be used by you to actually say this over that hey I'm authorized to login so private key is pretty much like your password in a in a way right so yeah so I'm gonna go ahead and let's say I named this as digitalocean key and I do not want any passphrase and then we have it so you see that we have two keys do key and do key dot pub I can just show you both of these so this is the private key and this is the public key so what you want is you want to copy this public key right here and go ahead and paste it inside the SSH key content right so digitalocean what it will do is when it's creating your D it's creating your computer that instance that droplet it will copy in this public key over to that particular computer which would then recognize your private key right here and will authenticate you to use that particular computer right so once you do that you can just name it like digitalocean tutorials I'm just gonna make it like that you can name it like your main server or whatever you want and just add an SSH key so once you do that you can just check on this and make and that digitalocean would just transfer your key automatically no problems there then finally you want to you know if you want to create multiple droplets of the same configuration you're gonna do that but in a lot of cases you just want to create one especially when you're creating with the control panel and a hostname is basically something which would be visible to you inside your control panel right so I'm gonna give this as a digital di GI tal ocean tutorial right tag allows you to you know just tag a bunch of droplets which belong to a same purpose and allows you to easily manage them across firewall fools or maybe if you want to delete them altogether stuff like that right so I'm gonna just leave tags for now but you can give it a tag for example custom tag for example like that and if you create a bunch of other droplets with custom tag as well later on you can basically control them in some way altogether using just customizing just using just rules on this particular tag so I'm just gonna leave it but you can fill it here with anything you like then the project in my case I have two for you you would see only one my second project is called dam which is the actual infrastructure where the koat.com site is hosted so yeah I'm using digitalocean at the moment for code dam so you can use your own name or you can create a new project if you want projects are free so you do not have to pay for creating a project but yeah it just helps you to customize and basically sort work related stuff with your personal related stuff and I would almost always not recommend this enable backups although it is recommended because it's very costly it's to any person of the droplet price and for the most part you do not ever want to have complete backup of the instance you mostly want the backup of database right because your code is something which is with you as well it probably is on a version control system like github as well so you should be fine there in case your droplet crashes or something happens but you want your database to be bagged up and ain't nobody gonna pay $1 a month that is 20% of the droplet price for just backing up your database you can just set up a very simple script which uploads your database on on for example let's say Google Drive every day and be done with it right so yeah there's that so once you do that you can go ahead and everything just check it once and everything looks good we are running Ubuntu or a five dollar machine on a New York data center we have our SSH key configured we just found one droplet no tags and that's the project let's go ahead and create this droplet so once you do that you're gonna see it starts creating your droplet for you and you already have the access to the ipv4 address that is the IP address of the intraplate you can see your configuration for the droplet you have one virtual CPU which is shared 1gb of RAM 25 gb SSD and it costs you $5.00 a month and it just put it up real quick as well so there is your instance now we're gonna be using this IP address somehow to SSH into this machine and then control it from that point if you see right now if you go ahead and take a look at this IP address you're gonna see that nothing happens because obviously the server is not configured but now on the internet you own this IP address right you own this IP address and you control it everybody who goes to this IP address if you configure this server correctly you can see the content you want to share with the world so that's how you set up a computer get it an IP address we have done the first two steps let's move on and see how we can SSH into the computer in the next video so that's all for this one I will see you then very soon in the next video hey everyone welcome back and in this video let's just go ahead and take a look how we can SSH into the straw plate to actually control it so what we want to do here is just take a look at our IP address that is the ipv4 mostly and go back to our terminal now here's the folder where I created to file the digitalocean key and digitalocean key dot public you can get rid of the public file safely because it's stored on your remote server now what you need to do is in order to SSH you have to write SSH you have to give the credential file that is your private file using the - I flag and what this would be is our do key just like that then you need to pass in the credential for authentication right with which username do you want to be authenticated well digitalocean creates a default account for you using the root username and you can use that you can only use that as a matter of fact you cannot use any any other username but yeah root would work fine and then you want your IP address right here right and hit enter so once you do that you're gonna see it ask you for a message like this and yeah I mean if you're not very paranoid it's just always go ahead and okay to trust the source because you're gonna see this message only the first time because of how the SSH protocol works and the authentication works of the SSH key I don't exactly have an idea how how this authenticity actually works but more or less you never do really need to care about this after the first authentication assuming that you are not you know in a network which is very very you know you have the you have the expectation that you are being monitored or something like that in those cases you just gonna say yes so anyway once you do that you're gonna see that you get into your digital ocean tutorial instance just like I am under the root account and if you take a look at the memory you're gonna see that you have a total of nine eighty five megabytes which is 1gb but you know the digitalocean instance might be resolving some of that memory for for some some other purposes I don't exactly know but more or less you have roughly about 700 megabytes of memory on this instance for you waiting to work and exploit and you can see for the disk space as well you have 35 gigabytes of SSD which is which was just promised which comes with a about a 1gb of operating system and other files already installed so yeah there's that so yeah that's how you're gonna put into your digitalocean machine yet that's all you're gonna ssh into that and take control so as a matter of fact what we can do is just go ahead and install nginx real quick so that I can just show you that how easy it is to just have a hello world so once we install nginx you're gonna see that nginx actually let's just go with apt-get update first and then apt-get install nginx so once you do that you're gonna see that Internet's automatically enables itself and listens on your port 80 of your IP address and is ready to respond to people who are coming to your website right it's a very lightweight server very powerful a lot of companies use it so you're in good hands so once its installed you're gonna see you get a message like this and you can check the status of nginx and you can see that it is loaded and it is active right so now if you go ahead on the same IP address and take a look you're gonna see that you get a message like this welcome to engine X right which is being delivered by this computer which you own which sits somewhere in New York and yeah so you can just share this IP address to anyone and they're gonna see the same message all along the world how cool is that so yeah that's basically it how you gonna SSH into a digitalocean droplet because this is not a programming tutorial I'm not really gonna get into how you set up a server and all that stuff but yeah you get the idea so that's all for this video and I'm gonna see you then in the next one alright guys welcome back and in this video we're gonna be seeing how we can enable digital ocean metrics on your droplet so if you click on your droplet you're gonna see that in the crafts section you see you know you see three graphs it's okay it's fine but we can do better than that right you have very less details at the moment so we can get a lot more details when you opt in for the new metrics for your digital ocean now for this what you need to do is if you're creating the droplet that is if you're creating it from this menu right here you're gonna see that we did not check that one box which said that do you want monitoring or not so if you're creating the droplet and you want monitoring baked-in you can check this and be done with it right but we did not do it for our digital ocean tutorial droplet so we have to do something like this in our case right so what we want to do in this case is using this link you see that what you have to do is just install just run this script this little script right here you can just go ahead and watch the script first as well if you want but you know you can just go ahead and do that but before that it just says that you want to uninstall the legacy matrix agent as well so let's just go ahead and run that first of all once you do that you're gonna see that if you do not find it if you do not find the package digitalocean agent that's fine let's just go ahead and run this instead and we're gonna see that it will set up it will download the script it will configure the packages and we'll run it for you automatically so once that happens what's going to happen is that if you go back and take a look in your crafts just refresh this you're gonna see that now you would have a lot of crafts right so previously you just had CPU and I guess the the bandwidth crops you're gonna get banded graphs again but it'll just take a bunch of minutes to just boot up right correctly so that the data populates meanwhile it's populating what we can do is we can go ahead and install app get install stress so it's just it's just a package you should allow you to burn your CPU cores a little so that we can actually see whether that's reported correctly in the digital ocean console or not I'm gonna say stress my CPU for with one worker and just give it a timeout or 30 seconds right so there's that and in fact we can just you know just go into the droplet actually let me just go ahead and do that first I'm gonna install each top has well a very nice tool for you know stats so now let's just go ahead and stress our CPU and inside edge top you're gonna see that we are actually in fact burning our CPU core at 100% while this is running the stress script is running right so that should be reflected in our graph as soon as we have some data for the digital ocean graph to show and it'll just take a little bit of time and you can see now we start we have started getting data for our graph so let me just go ahead and run it for 30 more seconds and we should be able to see a high CPU usage in the digital ocean console as well and you can clearly see that after waiting for some minutes you're gonna see that CPU that spikes to almost 100 here and you get other usages as well so it's working just fine now one of the cool things about this is you can actually create an alert policy as well so you see that if CPU is you know your CPU is running about 70 percent or maybe 80 percent for more than five minutes that is a sign that something is happening on the server and something should not be consuming that much CPU right so you can just get yourself an alert by an email or you can connect your slack and you can just specify the droplet here you can just name it digitalocean you know whatever your name what's droplet was and you can create that policy and again this is free of course so you do not have to pay anything for the alert policy to digitalocean which is pretty good so yeah that's how basically you're gonna enable monitoring for digitalocean and that's how you'll field work and that's all for this video I'll see you then in the next one real quick alright guys now that we have created our first droplet it's time to secure it now what do I mean by securing it is that you know just signing some firewall rules to this droplet so that people are not able to access your instance your computer hosted on internet in a way which you do not intend them to so what you want to do is you want to head over to networking right here and you want to go into firewalls so what you want to do is you're gonna create a new firewall right here and name it whatever you like I'm gonna name it as digitalocean first firewall something like this and what you want is you want to customize the rules right here so these rules right here would define how the traffic reaches to your digitalocean instance and what we want to do is what happens is when a person types this IP address that is you know specific to your droplet what happens is first of all the request reaches to the main digital ocean servers then the digitalocean servers decide that which sower which computer should be responsible for handling that request right so by using firewalls inside your digitalocean panel itself what you can do is you can restrict the access on something known as the network layer that is the layer for so and this happens before even the request reaches your own server so it's basically like digitalocean is sitting in front of you and protecting you and the request does not even reach your own computer if you sort of block it using the digitalocean firewall here this is one of the primary difference between creating a firewall here and creating a firewall on your computer itself that is like you know just using IP tables or I don't know some other tools like that so in that case the actual packets the actual information reaches your computer your computer uses some sort of CPU time or maybe you know uses some sort of mechanism some software to parse whether that request should be accepted or dropped and then if it is accepted it goes through if dropped you just respond blank right if you use a firewall like this on digital oceans resources digital ocean is now responsible for blocking or allowing the traffic right not your own computer so you kind of get that advantage plus you can pretty much customize it very quickly from the dashboard as well and for the most part you do not really need to customize this very often you just have to consist customize this once or twice and once the configuration is fine you should never really touch about your firewalls at all unless you think there's a breach or you know you need to extend some functionality so yeah that's that's basically it so yeah that's it for the introduction part for the firewall in the next one you're going to be learning about these protocols right here some of the most common ones at least and see how we can implement some firewalls rules so that's all for this video I'm gonna see you in the next one all right everybody welcome back and in this video we'll be learning about TCP UDP and the ICMP protocols right most of the internet consists of TCP and UDP protocols what is a protocol well this is not a networking class but I'll just keep it brief so I won't give and get into details of how protocols work and all that but protocols is just a way to computers agree to communicate right so we v2 people that is me and you are agreeing to communicate using the language English so I say some word right then I pause then I write a full stop and you understand that this sentence has been you know terminated or maybe I should give a pause in my thought here you know you construct that in your brain similarly how computers communicate is using protocols so if you use a TCP protocol and the other party is also using a TCP protocol you both have certain expectations in terms of how the communication should be studied how the communication should be carried on and how the communication should end right so there's a certain certain things which both party already know like you and I both know English similarly every every computer which is connected on internet should know TCP and UDP by default so TCP protocol is used for a lot of other protocols as a base protocol so you're gonna see SSH is built on top of TCP HTTP TCP HTTPS SDC be my sequel is TCP DNS TCP DNS UDP well they have the protocols and name and ICMP as well so that's about TCP what is UDP UDP is basically another another protocol just like PCB but it is much relaxed so DCP kind of takes a job that it should deliver what has been sent so it is kind of responsible protocol UDP on the other hand is that guy from the ages of 16 or 17 who's there responsible and does not really care about world law and would kind of attempt to do the work but if it fails he'll not look over twice but TCP is that responsible citizen age 35 or 40 who is determined to complete the tasks given to him so yeah you can think about that but anyway the idea is that your website's work on TCP and UDP just that's the TCP protocol not the UDP sorry so the idea is that you only want to allow TCP traffic on your websites and by default what you want is you only want the HTTP protocol the HTTP traffic to be allowed or maybe you want HTTPS as well right so once you have these two rules in place every other thing every other traffic would be dropped what is the difference between HTTP and choosing you know custom and TCP here well the differences you can specify the port here as a T and this is actually equivalent to just writing HTTP here right so you can see that it's one on the same thing and for HTTP as well it's one on the same thing so once you have that in place every other traffic is going to be dropped right and this is inbound rules so that means that I as an end user when I try to request this instance my instance I am a user and the request is an inbound requests to this particular computer which is running on the scipy address so that is the rule for inbound requests now your own server can make requests to internet as well right that's fair enough you know you can go to your sober right here and you can go ahead and say something like goal google.com right so right here you just made a external request to Google so you can go ahead and even customize that so if you want your instance to never communicate with the outside world well that's one way to drop all the traffic but in almost every case you do not want that because you know in that case you'll also lose the ability to actually have a website online right because you won't be a bit able to update packages you won't be able to reply to people who are using your website using a custom port and you won't be able to even you know just install new packages stuff like that so for the outbound rules you probably in a lot of cases just want to leave it like this for the TCB part you want the SSH to be all ipv4 or ipv6 you can do that or maybe you can just go ahead and add just your own URL so for example if you're running one dot one dot one dot one for example just an example now only the person with the IP address of one point one point one point one would be able to SSH into your instance nobody else right so for example if we go ahead and apply this to digital ocean tutorial and if I create this firewall what you're gonna see now is that if I go back and if I exit because yeah I think the connection is already dead so if I go ahead and try to SSH now what you're gonna see as in fact let's just make it a little bit verbose but you're gonna see that we are stuck now on connecting because the traffic for the SSH is actually dropped by digitalocean before it can reach our server we can never get a response from our own so that means we are just stuck at the connecting phase so let's just go ahead and make this all ipv4 and all ipv6 and save it and you're gonna see now we would be able to connect just fine because the firewall has been updated so there's that again you can play around with this by going here editing rule removing these and saving now what you should be able to see is that if you refresh now you cannot visit the nginx page you see that the cursor keeps loading it's waiting for the server to respond but it never would and it will just timeout so there's that now once you go ahead and edit the rule and add or ipv4 and all ipv6 you're gonna see that it's going to work again just fine right so there's that so that's how firewall inbound and outbound rule works in digital ocean and it's pretty handy to keep at least these three ports open to everyone I would say for SSH you can whitelist your only IP do not blacklist everything but yeah that's more or less for the all the other ports the traffic would automatically be blocked the traffic would be blacklisted so you do not have to worry about anything except you right here so that's all for this video I'm gonna see you really soon in the next one so what's going on everybody welcome back and in this section we'll be taking a look at worship private cloud or V PC and digitalocean now this is a fairly new thing so not a lot of material is out there on word should private cloud but this is this is fairly new for digital ocean just to put the facts out there it has been around for a lot of time in other cloud providers like AWS or Google cloud but the digital ocean just shipped with the V PC as an official thing so what basically what you can think of V PC is that we have seen that you work with droplets you create a lot of droplets you can create a lot of problems and you know you can destroy them as well just just work with them right away right the thing is though that a lot of times you want your droplets to be communicating between themselves as well so you have maybe you have four or five droplets right here right listed as main instance or database or whatever it is right and then you want that communication to take place that your main instance should be able to communicate some sort of information with the database instance the database instance is able to communicate some sort of information with the proxy instance you know some way or another you want a bunch of droplets to communicate so that that's sort of thing actually happens when you have a network when you have a private network sure you can do that on a public network as well you can if you have a bunch of droplets listed here you can get its public IP address and call an endpoint but that is very inefficient to begin with because you would be routing traffic all over the Internet just to reach out to a computer which is sitting next to you right so that that's simply irrelevant and you would result in a lot of bandwidth waste as well plus the speeds would be slow so what we come up with and in a lot of cases it's also insecure so what what we come up with is that we would let a lot of you can create a lot of computers but with public IP what we're gonna do is we're gonna create a private IP as well we're gonna give that particular droplet a private IP as well so once you create a droplet you're gonna see right here you see that it actually asks you for a V PC network right so you see that once you have selected no V PC we get that this droplet will have no private IP now private IP is the IP which would allow you and your other droplets to communicate among themselves within that particular server area within that particular data center right if you do not have a PI private IP you can communicate technically over the public IP just like I said but it's anything inefficient so we need to have a private IP for that we need to create a Wii PC Network a virtual private cloud it is basically a network which is assigned to you which you can then make use of in your droplets in your services whatever and you will have your own little data center kind of thing right so you will have a network of computers you will have your own private cloud your you know a cloud where you can have a lot of droplets a lot of computers running and they have a private IP address space which you can use extensively to communicate that is the main idea right so that that's basically what worship private server is all about rest emoji and definitions and all that good stuff but the basic idea is that you get a bunch of droplets right so this is how our V PC network configuration would look like so you get a bunch of droplets and you just you just enclose them in a pre-defined address space a private address space which is covered by a virtual private cloud and they are then able to use those IP addresses communicate with each other so there are some advanced use cases like you know just having an Internet gateway as a crop plate and making use of EPC for that but those come with with with the time so yeah that's that's basically it for the introduction part that's all for this video I'll see you then in the next one hey everyone welcome back and in this video let's just go ahead and take a look at how you can set up your very first V PC on digital ocean so for that what you have to do is go to the networking tabs here and click on V PC on the top other tab once you do that you might see a V PC if you have created a droplet before or you might not if you haven't created it yet but nonetheless what do you have to do to create a new VP series just click this button and you're gonna see that you come to a page like this now what you have to do first of all is select a region in which you want your V PC your worship private cloud to be present now by region what I mean is that your V PC your private cloud is going to be a bunch of droplets a bunch of instances which are very likely sitting next to one another right so they have to be together physically as well because if they are not physically together you have to use Internet to reach out to the other droplets which defeats the purpose of what V PC provides you know communication over private IP and speed and you know you do not have to traverse the whole Internet to reach to the other instance and so on so your V PC should be confined to only a single place now you can have V be seized in all these places individually but you cannot have a droplet in New York and in Toronto and that be a part of a virtual private cloud that's not going to happen so yeah let's just go ahead and choose San Francisco - once you do that the next thing is to configure the private IP range now just like I discussed your droplets your servers actually communicate using private IP so there are two types of IP addresses the public IP address and the private IP address private IP address is nothing but a reserved set of IPs which cannot be public IP addresses right so that means that those IP addresses those set of IP addresses addresses are not allowed to be used as public IP addresses to reach to other services or other websites on the Internet so private IP addresses why they are reserved well they are reserved for exactly this purpose where you want the communication to happen but you do not want the communication to happen on the internet instead you want to happen on the intranet right within the computer sitting next to each other in some way or another so for that part what you need to do is you need to assign each of that particular computer which is sitting next to you an IP address right and for that digitalocean needs to reserve a certain set of range of IP addresses for you so either you can let digitalocean determine the IP address range for your for you which is the best because they will take care of the things like you know you do not have any overlapping in the V pcs in a specific region so that your IP addresses don't overlap they will they'll be managing the IP address range so that you do not have to mess with these subnets and you know all that stuff which goes in with the network addresses you must know like the classes of the IP addresses how much size you want and all that stuff so you if you don't want to mess around with that this is the best option so we're gonna eventually select this but I'm just going to explain the configure my own IP range as well now this is not a networking tutorial so I won't be going deep into how IP addresses work and you know what the subnet is how the IP ranges work but I'll just give you a brief overview idea you're gonna see that digitalocean out of the box allows you with three options you can go with 251 available addresses 4 0 9 1 and 6 5 5 3 1 so what does that mean that basically means that if you go ahead and pick this and you enter a relevant IP address range what it means is that you can have a maximum of 251 droplets in that virtual private cloud anything larger than that digitalocean would not be able to assign it an IP address a private IP address why because you have exhausted the number of IPs right so you can go ahead and take a look at 4 0 91 as well so 4 0 9 1 actually means that you have these many maximum droplets available in this virtual private cloud so you cannot create more than 4 0 9 mantra plaits similarly if you choose the 16 you're gonna have 65,000 which is a huge limit right and it might be suitable as well for you for almost every case so the thing is how does the 16 20 24 play the role if you go ahead and try a custom for example if I write let's say 18 here so what happens what happens is that now I basically have 18 bits to mingle an IP address an ipv4 address at least is a 32 bit IP address right so I have a 2 bit number so as to say so what the 16 17 18 and you know all this 24 and all that stuff means is the number of bits which are fixed right so when you choose 24 there are 24 bits which are going to be something which is going to identify your network and the rest of the bits would be identifying your computer right if you choose 20 bit that means 20 bits now would be identifying your network and the rest of the bits would be identifying computer in that network so you see that as you decrease these this number the bits available for identifying your computer increases right so you see that when you choose 16 now you can identify 65,000 computers right because there are 16 more bits now and if you do a little bit of math you're gonna see 2 raised to the power 16 it's pretty close to $65,000 now there are a bunch of IP addresses which digitalocean might have have in reserve or whatever but yeah that's the general idea so you can use this nice little converter if you want so I can have something like you know let's say 10.0.0.0 and if I have 16 I'm gonna go ahead and calculate it you're gonna see that I can actually have 65,536 digitalocean shows me 65535 IP shot but yeah we can work with that so yeah this is the this is the most idea for the most part and the private IP range you can see digitalocean reports all three classes Class A Class B Class C IP addresses Class A being the IP addresses with the most I piece with them Class B is 172 plus C is 192 168 1 6 8 right so yeah for the most part this is what you want generate an IP range for me so that's what we're gonna do for the name I'm gonna go ahead and choose V PC first first we PC something like that oops right and you can enter a description my first we PC or whatever you think would be a suitable description anyone's who go ahead and create that you're gonna see your first V PC is created right here right and you're gonna see some resources attached to it I have one in San Francisco that is being used by code damn so this is the private virtual private cloud for code damn this is the default one and the default one is basically what was the previous known feature as private networking in digitalocean right so just like I said VPC is a new thing in digitalocean it was not available before so they just converted all the existing networks existing existing private networks to the default VPC so first V pcs here you're gonna see that it just shows you nice and easy things but the main advantage of V PC comes when you actually add resources right when you actually I've had a drop let's when you actually add databases stuff like that do a virtual private cloud then you can actually harness the power of virtual private clouds even even in cases of like configuring a gateway or something but for the most part you if you're a small start-up or whatever you don't really want to get into a lot of security at the first thing wait as the first thing because you would have a lot of other things as well to address so yeah for the most part that's it for resources we're gonna see how we can communicate between droplets in the next video so that's all for this video I'm gonna see you in the next one really soon hey everyone welcome and in this video we're gonna be seeing how you can communicate within the worship private cloud on your droplets and I just want to show you this as the video where you can see that you can actually communicate with the with the droplets themselves if they are a part of virtual cloud and they cannot communicate if they are not the pod so let's just go ahead may not default projects and right here what I'm gonna do is I'm gonna start off by creating three droplets so let's just start and let's see how we can make our way forward with that so I'm gonna choose Ubuntu and 5-dollar instance I'm gonna go with San Francisco because that is where our force V PC is so I'm gonna create that right and you can see that it verifies that addresses are available or not by default you're gonna see this is the range which digitalocean gave me that is 10 2010 1 2000 with a subnet of 20 which means that I have right now 4090 addresses available so once we have that in place digitalocean would automatically assign them an IP address so we should not be worrying about that then for the next thing SSH keys we have already set this up I'm gonna choose digitalocean tutorial and finally I want three droplets here right I'm gonna say V PC one will be C 2 V PC 3 it's smart enough to do that and then no tags for now and select project as mayhem all right so this looks good right let's just go ahead and spin this up so once I go ahead and click on create droplet you're gonna see we have three droplets up coming and if I just go ahead and refresh maybe or just wait let me just go ahead and refresh because dissolution actually gives the IP address right away but sometimes it does not so yeah yep so you can see all of these are having the V PC has the force V PC right and they have the private addresses addresses as the following so that you can actually see this has 10 1 2002 then 1 2002 sorry then 1 2003 and this should be 10 1 2004 right so yeah I mean we have that let's just go ahead and ssh into all three all right so now you can see that I have 3 terminals with me that is the V PC 1 V PC do we bc 3 ssh sessions and let's just go ahead and install nginx on all of them so that we have something available on port 80 so I'm gonna say app install nginx on the first one and I'm gonna say app install oops I think we need to do app update and app install why nginx on all these right and I'm just gonna go ahead and copy this as well here and as well here so what's it's going to do is it's just going to set up nginx and start it as well so that we when we hit on port 80 of all of these we have something coming back as the response right so if I go ahead and call local host local host food 80 you're gonna see that we get a nice little Ingenix response similarly from all the other servers as well because well that's what nginx does right so anyway once we have that let's just go ahead and figure out their private IP addresses you we can see it from the dashboard but we can also see it with ifconfig you can krepp the 10 range and you're gonna see this VPC one is 10 1 2002 which matches the private IP listed here so yeah dashboard is correct if you were wondering so anyway for this we have 0 3 & 4 the last one we have 0 4 so what happens now if I go ahead and say 10 120 0 three for example and put hit-boy ad we see that we still get the nice little engine next response and for the zero four as well we get it right similarly for this if I go ahead and write call 10:1 2002 which is the V PC one port 80 you see that we are able to communicate similarly for this as well so call 10:1 2002 over 80 yep and 4:03 house well awesome so what I'm gonna do next is actually show you that a droplet out of out of this V PC would not be able to communicate so yeah I think we did not need our third droplet really because there's no easy way to remove a droplet pull it out from vbc unless you take a snapshot and create a droplet again which will come a come to later on so let's just go ahead and create another droplet and I'm gonna make sure that we choose everything just like before except it won't be in the V PC so we were in San Francisco I guess and let's just go ahead and take a look as well so yeah we are in the first V PC but I'm not going to have this in a first vbz I'm gonna choose default SFO to so that we at least get an IP address because if I go with no V PC it won't have a private IP address at all so you won't be able to like you know actually communicate with internal things at all so I'm gonna go with default and I'm gonna add digital ocean here and that would be out how we PC something like that you know and let's just go ahead and create this so once you do that and once you wait for the out V PC to boot let me just go ahead and copy this meanwhile and I'm gonna go ahead and right here I'm gonna SSH into this bad boy and let's just wait for the droplet to boot first right because you can't really boot you can't really SSH into a droplet which is actually being in the process of being created so yep there it is and if I go ahead and ssh into it now we should be able to see our good message of authentication let's just give it a couple of more seconds your droplet might you know just show you some tantrums but it will walk you initially so here we are now this droplet is not in the Wii PC land with us but it does have a private address right so you open up this one this one you can see it has ten 138 66 230 so let's just go ahead and try to just confirm that ifconfig crept in and yep that is exactly what we saw so let's just go ahead and install app install nginx and we need apt update as well before that and there we go so meanwhile what I'm gonna do is I'm going to try to call ten one thirty eight sixty six to thirty at the port 80 right so let's just let's just make sure its installed and let's just wait for it to hit hundred real quick and there we are so now if I go ahead and call a local host at port 80 we should be good if I call it you're gonna see that we are not able to reach to this particular droplet right if I try to call it from here nope if I try to call it from here nope nobody out of these three is able to reach it sure you can try localhost here you can see it's working and you see that the private address of this droplet is also this but you can't directly communicate this without exposing it to Internet and good for us this actually has an Internet address as well so I can go ahead and call the public IP and hit the port 80 and will work just fine but you see the response is a bit slow the response would be a bit slow you know you're traversing the whole internet you just to reach a machine which is right next to you because it's not in the Wii PC and yeah that's how it's pretty much going to work similarly you cannot really reach 10:1 2002 from here as well so if you try to do that you cannot reach however you can reach it from its IP address that is it's ipv4 so that's not a problem right so this is how in a nutshell we PC works so you can have a bunch of private resources communicating with just each other just like probably if you own a data center or something that's how you're gonna configure it and yeah that's how you that's how you're gonna do it right so that's all for this video I'm gonna see you in the next one so what is going on everybody my name is Mei hole and welcome back and in this section we'll be starting off with snapshots in digital ocean now snapshots is one of my favorite features because I'll use it a lot on my own sites like code damn and it's pretty much a good thing to have an account provider why what it is I'm gonna discuss all that in detail in this section let's get started so what is the digital ocean snapshot anyway well you see by the name of it you can say that make on-demand copies of droplets that's what digital ocean says so what this is in a nutshell is you take a droplet for example or running Shoplet like this you can or cannot power it off to preserve the data then what you do is you run some magic and what you create is a single file which is an exact copy an exact state of your droplet right so it's basically like doing some black magic or something which is going to create a exact copy of your sower not your hard disk not you know not just anything but your actual sower right so all the install program remains all the hidden files remains all the configurations you did on the server remains everything did the exact bit by bit right everything remains in even your operating system or whatever what you do next is that once you have that file well digitalocean technically does not give you that file but it just lets you interact with it through an API or you know through the interface itself you can go ahead and replicate this instance right so for example let's say you did a lot of work on this particular instance and now it's done right it's completed your work is completed but it took you a lot of time to set this instance up right and you might need that instance 15 days from now right and you might need it every seven days for example so are you willing to go ahead and delete the droplet every time and you know after seven days come on the side create that droplet set it up again which probably takes an hour or something and just after doing it doing your work for four or five hours and delete it again then after seven days repeated you know it's tedious to do that so what's the best approach in this case is you've set it up once you go ahead and create a snapshot of that particular disk image it's going to cost you some something but it's basically very cheap and what you do is that you go ahead and use that image you use that snapshot to create another droplet whenever you want right so you can see right here I have my own docker short named droplet here which has a size of 4.7 5 GB and it's in San Francisco region right so yeah I mean it's interesting to see how you can utilize snap shots and it actually cost you five cents per GB per month so for 4.75 you can estimate it's you know about 25 23 cents a month for me right which is not a lot if you compare it with running your droplet for the whole month right so running a complete droplet would cost you five dollars per month but this is going to cost you five cents per month per GB right and for the most part your droplet is going to be around 1 GB or 2 GB as as as a thing right so yeah you can also use snapshot as one of the backups thing right so digitalocean technically offers a backups by themselves but it's it's it's actually expensive honestly you see that it actually costs 20 percent of your actual backup so yeah I mean I mean if you are able to hack around a script or you know some sort of thing which takes a snapshot every week and delete the previous week snapshot it's it's much cheaper to opt in for something like this right so yeah that that's the main idea so yeah that that was an introduction to snapshots in that further videos we're gonna see how to create snapshot ourselves how to restore images from them and do a lot of fun things so that's all for this video I'm gonna see you in the next one what's going on everybody my name is Mei hole and welcome back and in this video we're gonna be creating our very first snapshot you see I have a digitalocean droplet running out VPC and this is the shell for the out BBC pink right so this is the active shell now what I want to do is I want to install you know we have engine X install with on this droplet already you know that I can go ahead and create some file like secret dot txt now I don't want to like configure the whole server but yeah I can have something like this right so we have an engine EXO we're running so you see service status engine X you're gonna see oops service engine X status you're gonna see that it's active it's running it's loaded right we have a secret txt file as well every level with us let's just go ahead and create a snapshot out of this droplet so I'm gonna go ahead and write power off here we're just going to shut down my droplet it's a good thing to do before you are creating snapshots so that the server is actually able to write anything which is buffered in the RAM to the hard disk so that there's no data loss or data corruption right and once you do that you're gonna go ahead and see that this icon turns actually grayish and you have the off here now what I'm gonna do is go to snapshots and I'm gonna click on create take the snapshot that you can give it a name my first snapshot and take the snapshot now mind you this might take some time if the size of your droplet is very large right for example if you're running anywhere closer than four five six jeebies then it's going to take some time about I guess for five minutes so yeah so the idea is that once you have the snapshot with you you can replicate this anywhere in the world by world I mean anywhere in the world with the digital ocean data centers right and you can delete the original instance and does not matter you're gonna be able to save the state of that and restore it any time when you create the instance with the snapshot so I'm just gonna show you the final result here of the snapshot you cannot unfortunately download the snapshot file I would have loved to download it as well and you know just keep it as a backup or something but yeah probably this is some proprietary thing or whatever but yeah they do not allow you to download your snapshots yet so you see we are close to finishing and you can see that the size of the snapshot is 1.21 GB now you might ask me that why the sizes too large when we did not really do anything well for starters this is actually a copy of the whole system not your not just your changes or not just your your own work so it includes the Ubuntu operating system it includes the engine exit if you loose a text file everything so that accumulates to about of gb or something right wrist is your own data so after this size this depends on more or less your own data so once we have the snapshot we can go ahead and create droplets from it but I'm gonna show you how we do that in the next video so that's all for this one and I'm gonna see you pretty soon in the next one hey everyone welcome back my name is Mei hole and in this one we're gonna be actually creating our droplet back from our for snapshot so it's pretty simple you just have to go ahead and create a droplet just like you used to but instead of instead of choosing Ubuntu as your base image as your distribution what you're gonna do is go to snapshots and choose your snapshot here right so you see we named our snapshot as my first snapshot and you see that digit solution has actually determined the operating system running on this droplet on this image that is a bun - so there's that that's it now once you do that you're gonna be able to see you're gonna be able to customize this thing one-shot tip that is I created the snapshot on a five dollar instance right so I can go ahead and select any size but if I had created this snapshot on an eighty dollar instance then mind you you cannot create you cannot create droplets which have the configuration less than 16 GB and six abuse or which have the configuration less than the hard disk size right not the CPU and RAM I don't think so but the hard disk is definitely there the reason for that is the data is not really stored in a sequential manner right so you always have to choose the droplet in that case digital disable it itself but just so you know you cannot select a droplet of size $40 per month if you have a snapshot of size $80 per month right because you're trying to fit data which is sparse over 320 gb of SSD over 160 GB of SSD right so that's that so yeah for now I'm just going to go ahead and choose $5 per month and you can see that I'm locked down in San Francisco because this is where that snapshot is available but you can definitely move snapshot around the regions as well that's not a problem you can do that so if you want you can customize its BBC network I'm just going to keep it no BBC at the moment ssh keys yep we want the same ssh key and yep this would be just a single droplet my first recovery would be the name and i'm just going to give it into may hold more on and create droplet so once we do that you're gonna see that we have my first recovery booting up we can simultaneously also start out vb seats so that we can actually ssh into this thing and see if it's if it's same or not right so meanwhile it's starting let me just go ahead and see if I can SSH into it that's the right ipv4 address so let's see so meanwhile what I want is for the public IP address let's set up as a such route at the rate public IP address and I want the key to be this one you see we are in to out BBC and you can see that we still have our secret txt file with us and we still have nginx running nicely right now if I go ahead and boot into my first recovery which is working now you're going to see that I did not install anything this is my first time SSH into this thing but the engine X is working out of the box magic if you go ahead on this site directly you're gonna see that engine X actually serves you the home page it's great right you can also see that if you LS into this we have this file magically from the out BBC right we never created this file on my first recovery but it's still there so you see that basically out BBC actually not I'll be busy but snapshot actually just copies each and everything as it is right so yeah I mean that's how droplets work that's how snapshots work in droplets and that's how you can restore a complete droplet without actually keeping it running for the whole month or for the whole time all along right super efficient super cost-saving if you have periodic works with cloud and you know you don't want to run keep running the cloud computer always that's all for this video and I'm gonna see you in the next one really quick hey everyone welcome back and in this video we're gonna be starting off with something known as digital ocean spaces which is like one of my favorite things out of all digital ocean features so I pretty much think that everyone who has worked with cloud even a little has heard about what AWS s3 is right s3 is like the most popular solution out there to store files on right if you're if you're running it as a company of course so s3 stands for simple storage service I guess and what they do is they they are actually a block storage service now there's a different difference between volume and block storage but we're gonna get into that later on so what digitalocean did is that they created their own service but instead of reinventing the whole thing what they did is that they used their infrastructure their architecture all along but they used the s3 api the programming api used to interact with s3 from the s3 itself right so I think that's that's a good move because that allows a lot of people who are working on AWS to very swiftly shift the digital ocean especially if they're just using it for s3 and given that AWS charges a hell lot for data transfer so yeah let's just go ahead and take a look at what is three years and how you work with it all along in this little section hey everyone welcome back and in this video let's just go ahead and take a look at two most popular solutions on how storage works not as block storage and object storage now if you go ahead inside volumes here you're gonna see that you actually have an option to create a block storage now you know when you click on this adds to add volume you can even see that it says that volumes are highly available units of block storage right so what what the hell does this word block actually means well block storage is one kind of storage number one number two is there's another kind of storage called as object storage now the difference between these two storages is first thing block storage is more like your regular hard disk or your regular SSD right which you're familiar with with your computer's so you see that you login into your systems you have all those files and folders you know folders inside folders and folders inside folders and so on you have a hierarchy of system you know files are created in a certain order in a certain manner there's a certain hierarchy you go to the C Drive then you go to program files all that good stuff right so that is a file system file system in place right and that works over the top of this block storage so this concept of having a file system in place you know nicely organizing files I'm not going to get into technicalities of how it works how it differs on a technical level but just to give an overview of idea your file system your operating system the laptop you are on the mobile for you are on the server when you SSH into it is using block storage block storage is very good for you know having humans interact with hard disk for storage stuff because you have that all nicely laid convention of you know hierarchies and files and folders there's another type of storage which was developed out of needs for having a scalable solution for storages and that is known as object storage now nobody really offers object storage like that they offer it as a so is right so spaces is digital oceans service as an object - as an object storage right you can even see it right here it's an object storage it's an object storage leaving the technical things apart what it does is that it allows you to store the whole chunk or file your whole file as it is on the hard disk on the metal without a file system now of course when you do that it's it's very difficult to extract it out using an operating system or anything because your operating system does not know how to work with that that was particular piece of metal right how do we extract that information where does it start where does it end and all that good stuff there are ways to you know to fix that but it leads to a performance hit or whatever and all that causes but the first thing is that object storage is not even built for having to attach to an operating system right so what what the space is does and what s3 does as well whereas all the other storage is transfer is that when you create an object on object storage in our case on the digital ocean spaces it's going to actually give you a URL to access that and for the most part you need only that thing because for the most part when you're using spaces or s3 or any other solution which is object storage what you want is you want probably a large file or maybe a lot of small files as well to be publicly accessible or privately accessible right so maybe you want to have a streaming video site like YouTube or something maybe you want to I don't know allow people to upload stuff right so you don't want them to upload that stuff directly to your servers because number one you can exhaust your server space there and number two is that it's just not efficient for your server to be running with the user data because what happens is if your instance is destroyed or I don't know if you delete it by accident or whatever so you lose all that data with block storage that is avoided because that is managed by the cloud provider right with all the resilience and backups built in so yeah this is the basic idea between object storage and block storage spaces digital ocean spaces is the digital ocean version of mock storage which it borrows from the s3 idea right so yeah there's that so that's all for this video and I'm gonna see you very soon in the next one all right guys let's just go ahead and create our first space so I'm gonna go ahead and create the space just like by saying that and you can see that you can go ahead and select a region in which you want to create a space and right now as you can see it's pretty much limited to just three probably they are running under space or whatever but yeah you can go ahead and quit in Singapore Amsterdam or San Francisco for now it might be different when you see it yourself but yeah that's it for me so yep that's the first step the second step is actually configuring a CDN right so a CDN well I can go all day into that but for the most part what it does is that it allows your users your end-users to fetch the resources faster because they do not have to complete a whole round trip around the planet to reach to your main server to get that particular content right in this case it would be the data center where you're going to be storing your data so for example if you choose Singapore and someone from let's say America is trying to access a file store on this space then his his connection has to travel all around the world to reach Singapore and then send it back but if you enable CDN there might be a cached object of that thing available in New York right so then they skip that whole traveling thing it saves a bunch of milliseconds but yeah it's good so we're gonna enable that later on but for now I'm just gonna proceed the next thing is allowing file listing now for the most part what you want is well it what not for the most part it really depends on case to case you can enable file listing or you can restrict file listing as well so what enable file listing does is that it makes the objects on your space available as a list through a URL right so digitalocean can give you a space URL and you know you can just go ahead and visit that URL and you'll be able to just browse your whole object storage just like you would do with a regular file system just like FTP would work as a matter of fact so yeah I'm gonna enable it for now and finally you need to choose a unique name right so it should be a globally unique name not just under your account so I'm gonna say code am is the best right hopefully nobody has taken that and yep and you can see that it gives me your spaces origin URL I'm just gonna go ahead with my personal project create a space digitalocean space is pretty cheap cost $5 a month for 250 gb storage and one terabyte of data transfer if you exceed the space no problem that's that that has a different pricing but yeah that's what you get out of the box for five dollars a month 250 GB of storage per month and not per month but yeah 250 GB of storage overall and one terabyte of free data transfer per month so when I go ahead and visit this you're gonna see that I get a nice little XML thing and you see that we do not have anything really here so this is your spaces interface and this is how you can upload files this is one way of uploading file there's another way using the API switch we can get to later on but one of the ways if you have a bunch of files to upload right away is using this particular interface on digital ocean so we can upload a file really quick and see how this looks like in the next video so let's just go ahead and watch that video really quick so what is going on everybody my name is May ho and welcome back and in this video we're gonna be uploading our first file on spaces so I'm just gonna go ahead and click on the upload files button like a good boy and let's just go ahead and select any image like for example I have my disome H as you know I'm so small and I'm just gonna keep it public for now now you can set the file to be private or public now why would you do private in in what case and how would you access that well that is something which I want to discuss in the next video but in this video I'm just gonna keep it public and upload it so once you click on upload you're gonna see that it just uploads it just like any nice site would do and gives you the size and last modified and everything and we have the name as well when you hover over the file it's going to give you a URL and a preview as well so you can go ahead and click on this URL and I'm gonna see my smart handsome face right so there I am sitting chillin whatever and I think it's way too much soon yep so there I am and what you can do is you can take a look in the URL it's exactly the same name as your file with the same extension right so nothing funny going around here nothing renaming or whatever digitalocean is just taking whatever you have given to it and just showing it directly in the object storage now this file right here is now available on internet you can share this URL to anybody in the world and they can go ahead and you know just see this and the good fact is this file the file you uploaded can have any reasonable size I mean like tens and hundreds of jeebies even right so it's pretty great you can even upload whole folders as well you know one great place to store all your book collection or maybe your games collection as well so there's that so yeah that's how you're gonna upload finally that's how you're gonna get URL for that and for the most part you can also delete this file if you don't want it any longer so you can just go ahead and delete it and that's it you're gonna see that we have a bunch of things here as well you can go ahead and rename it because just like I said it starts with the same name which you give in it so I'm gonna rename it to me hole and once I do that this URL would no longer be working now yeah I just needed to fresh refresh in the cache and once you go ahead and hit me hole the cheap JPEG now you're gonna see you get my nice awesome face again so so as to speak if I go ahead on the route URL now you're gonna see that I have this thing with me right now let's just discuss a little bit about this this XML file in the next video really quick all right so we see this nice little XML file with us and right off the bat you can see that the namespace the XML namespace it's following is from s3 so just like I said digitalocean uses its own infrastructure but it uses the s3 API in order to coordinate in order to manage that object storage which is a tried tested and battle-tested API right so as to say a battle-tested implementation s3 is like the de facto standard for working with block storages at least in the cloud space so yeah once you visit a page like this there you have your file listing enabled so you remember that right here inside the settings when we created the space we had that checkbox on you know this file listing available so yep this was this thing right so what it did is that it allowed you to see this XML file right here and when you see in the contents you're gonna see that we have the file name the last modified thing some sort of ETA information and the size of the file this is in bytes storage class is standard this is again coming from the s3 thing s3 has a lot of storage classes available digitalocean just ships with a single storage class so as to avoid confusion and yeah it's always going to be standard here unless of course digitalocean updates there space is API as well so yeah that's that's basically for the contents pod you upload more files you're gonna see a lot of more things as well here so if I go ahead and create probably create a folder or something you're gonna see folder 1 and if I go ahead and refresh this it's just going to take a little bit of time to update stuff but it would eventually show you that folder as well that nested folder right so they go ahead and upload my same photo again make sure this is public I'm gonna go ahead and see that right here I get that folder now right so I get this file right here I get the size right here and it's all all good and fun so you see we have three keys now it's folder itself so it's has size zero so there's that then we have the actual file with us so yeah that's how the XML file interpretation works for the most part you would want to disable it because you do not really want a lot of people to see what is your whole bucket storing so you want to disable it right and how you disable it is just by going to your spaces settings just like I showed you and clicking on edit restrict file access it's safe and you should be good now if you go ahead and refresh this you're gonna get a nice little access to 9 message so that's it now nobody can list the files although they can still access the file just as they would earlier so yeah that's me right there chillin so ok so that's all for this video in the next one you're gonna be seeing how the private files work in spaces and how you can make it work as well so I'll see you then pretty quickly in the next one so what is going on everybody welcome back and in this video we're gonna be seeing how private files work in digitalocean and how you can actually make the best use of them so what happens is a lot of times you don't really want all the files to be public sometimes you for example sometimes you have some sort of video content just like this which I'm shooting right now to be only available to members right and you don't want them to share links or maybe you know just share them to social media sites because once your link is shared you can basically no longer prevent anyone from seeing it right so what you can do instead is you can upload that file as a private file which would then make it not available on its own URL well then what's the benefit well the thing with private files however is that you can access them with a special thing known as a signature and what the signature would do is that it will provide you access to that particular file for a very small period whatever you decide like 10 minutes 15 minutes 30 minutes an hour a day of week even more like right so yeah you can provide as much access as you want as little access as you want as well the thing is the file link when it's expires your user or whatever was using that file can no longer actually you view that file so let's just go ahead and take a look at that a lot of talking is going on so let me just go ahead and upload me again because I'm so fabulous and I'm gonna make this private this time so right I'm gonna go ahead and upload this once it's uploads you can see we have the same file but this time if I go ahead and copy this name right here or let's just go ahead and see if I have had an URL cache itself seven yup you see when I try to do that I get access denied instead of the file instead of me showing the file I get an access denied so now how do we actually view this file which is with us right so you see that if I go ahead and hold over this I still get the preview with me and if I take a look you see if I copy the URL it's still that incomplete URL which shows me access denied so how is digitalocean actually getting this preview for me when I cannot access this myself so for that what we can do is just hover over it and I can right-click and copy or maybe open image a new tab now if I open it you're gonna see I get mine I still think but what has happened what has changed you see the difference between these two URLs is number one this is actually looking a little bit different than this one well it for the most part it does not really matter but in this case it matters because the way digitalocean generated this URL but yeah it's more or less the same thing don't worry about this code damn is the best part being in the sub domain or being in the path right it would work just fine so just so you know let me just go ahead and show you that as well I'm going to go ahead and cut this part right here and I'm gonna paste this right here as the path and there you go you can see it still works just fine right so anyway this is our signed URL with us and let me just go ahead and large and that for you so that all of you guys can see that so you see this is our signed URL so we are familiar with this much right this was our previous name what enables us to view that actual thing view that actual image is this part right here so this is an actual signature right it is a file signature used by s3 and spaces and you can clearly see it's an X M as an algorithm so yeah it's basically using AWS s3 some sort of s3 algorithms to generate all this stuff the idea is you can go ahead and generate these URLs programmatically and set the duration when it expires in this case you can see it saves us Amazon expires in three six zero zero and yeah that is basically how much this is in seconds I don't know just divided by 60 or something right so you will get 60 minutes as the answer so you this this URL is going to expire in an hour so yeah that's how it works now to share this resource right here you most most likely would be using some sort of you know some sort of API or generating the signed URL in some sort of programmatic way and yeah for the most part that is its purpose so if you go ahead and take a look at this URL it's looking fine okay it looks like we missed something while copying that so anyway this is the part but if I go ahead and change anything out of this URL for example the credential key or maybe for example if I try to tamper with the let's see three six zero zero zero expiry key you see that the signature stops matching right and I cannot really access the resource so yeah that's how you're gonna access signed URLs we're gonna see more how now you can generate signed URLs in the other section in the digitalocean api's but yeah that's it for the most part that's all for this video and I'm gonna see you pretty soon in the next one thank you so much guys for following along the whole series it's been a great journey for me and hopefully for you too exploring your first cloud exploring a lot of new features a lot of things digitalocean has to offer creating and setting up your own for servers so it's pretty exciting stuff so this was the basic series for a digitalocean keep an eye on the courses code damn has to offer because there would be some intermediate and advanced courses coming up on cloud computing as well so that's all for this course and if you liked it try out the next courses in our learning path and I'll see you very soon on other courses on koat.com
Info
Channel: codedamn
Views: 20,496
Rating: undefined out of 5
Keywords: digitalocean, digitalocean crash course, start with cloud computing, cloud computing, digitalocean course
Id: 9ZUHSW1tTiU
Channel Id: undefined
Length: 127min 56sec (7676 seconds)
Published: Sun Jun 21 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.