S3 Object Storage on Linode | Getting Started

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome back to linode in today's video we are going to go over the concept of object storage object storage is a feature of lino that lets you store well objects but more specifically it gives you a way of adding additional storage capability to your lynnodes and your apps and you could use it to store anything from iso images pictures website files backups or even important application files for your apps so let's go ahead and dive into object storage and see how it works object storage is a great technology to use to store objects and objects in this context are files so if you have any files that you would like to store you know like iso images backup files video files whatever you may have object storage is a great way of doing that so by default object storage is not enabled on new accounts so if you want to use this feature you will need to turn it on if you do enable object storage on your account just keep in mind that there will be at least a five dollar minimum fee to have this service on your account and the billing starts immediately regardless of how you enable it there's two different methods which i'll get into in a moment but just keep in mind that you do need to pay a minimum of five dollars a month to have this feature enabled now there's two ways that you can enable object storage the first way you could create a key pair for object storage or you can create a bucket a bucket is essentially where files go in object storage i'll show you how the feature works in just a moment but essentially what you do is you create a bucket and then you're able to store files inside that bucket and if you do create a bucket then that's the second way that you enable object storage on your account if you create a bucket then the feature is turned on immediately now it doesn't matter how you enable object storage on your account either way you do need to create a bucket just keep that in mind so first of all i'm going to walk you guys through the process of creating a key pair for object storage so let's go ahead and get started so here on the left we have a link to object storage so i'll click on that and then we have two tabs one for buckets and then the other for access keys so i'll create an access key that's pretty easy we just click the create an access key button right here we should give it a label so you could call it whatever you'd like i'll just call mine bucket access key simple enough click submit and then you'll see this message right here that's telling you basically what i've already mentioned that there's going to be at least a flat rate of five dollars a month to have this service on your account and what you get with that is 250 gigabytes of storage then you get one terabyte of outbound data transfer and then beyond that it's two cents per gigabyte per month so if that's okay with you then you click enable object storage and now it looks like the key is generating and there it is now as it says here it's only going to display your secret key once so what you'll want to do is just save this in a safe place because you won't be able to get this back if you click ok and then you don't get a chance to jot this down now notice that the verbiage be sure to keep it in a safe place is bolded and that's just showing you how important this is because if someone gets a hold of the secret key they can start interacting with your object storage on your account and you definitely don't want that so i'll click ok and we now have the feature on our account we also have a bucket access key that we can use to interact with object storage then here it's telling us that we are currently being billed for object storage but we don't have any buckets if you don't have any buckets on your account you can't use this service so since we're paying for it well we may as well make use of it and to do that we go here to the bucket section and we can add a new bucket so i'll add a bucket and then here we need to first give it a label for the label field we are choosing what to call our bucket and we definitely want to give it a label that is descriptive for its purpose but unlike other label fields this actually has to be unique for the entire cluster now i'll explain what i mean by cluster in just a moment so what i'm going to do is just call mine the node example bucket and i'll give it some numbers here to ensure that it's unique maybe that'll be good enough for the region i'll drop that down and we can choose which of these three regions that we want to create the bucket in so i'll create mine in new jersey and actually i'll bring that back up because when i talked about clusters earlier this is what i was referring to now at the time i'm recording this video we have three here might be more or a different number by the time you're seeing this but the name essentially has to be unique per cluster so if we have this name right here in the new jersey cluster then that means that anyone else that's creating a bucket in that same region will not be able to use that name and if that name already exists in that region when i finish this process and go to finalize this then i won't be able to use that but if the name doesn't exist in frankfurt or singapore then i'll be able to use it there because it has to be unique by the cluster and that's what i was referring to right here these three regions are their own clusters so let's see if the name is taken i'll click submit and what do you know the name was available so it let me choose it and now we have this bucket on my account that i can use to store objects so now that we have a bucket we may as well go ahead and use it so to upload data to the bucket or download from the bucket we can use the cloud dashboard to do that or if you generated an access key like we did earlier in the video then you'll be able to use the api to do this in your application or via the command line depending on your use case so to show you what the process looks like through the cloud dashboard you simply click on your bucket then you can click browse files and i actually have a notes file that i can use as an example this one right here i'll open that up and i was successfully able to add that to my bucket if you want to remove something from your bucket you could click on the three dots next to the item you'd like to remove and then you can go ahead and delete it you can also download the file if you'd like to pull that back down which will then trigger your browser to bring up the save dialog that will allow you to download the file to your computer as you can see the process through the dashboard is very very easy so next let's take a look at using the lino command line tools to interact with your bucket in my case i'm going to use the terminal on my local laptop to facilitate communicating with the bucket but the tools are installed via python pip so you don't have to be running linux but any platform that gives you the ability to use python pip will enable you to install the required package to interact with the service in my case i don't have the tools installed at all i don't even have pip on this system yet now my laptop is running popos currently which is built on top of ubuntu so what i'm going to do is install the required ubuntu package that enables me to use pip but what i'm going to do is run sudo apt install python3 pip just like that i'll put in my super secret password i'll confirm by pressing enter and there we go now so far this process isn't specific to linode we're essentially just installing the pip tool for python so now we should be able to install the lino command line tools and then interact with our bucket so what i'm going to do is run pip 3 install linode hyphen cli dash dash upgrade and the dash dash upgrade option is not required if it's already installed this will make sure that you have the latest version now i don't even have it installed at this point but the upgrade option shouldn't hurt anything to leave that on here so i'll press enter and there we go i now have the lynnode command line tools installed on my local laptop now before we can interact with this service we will need to install another module this one is not specific to linux but it is used by linux and it's actually used by other cloud providers as well it's fairly common and it's called bottle so what we'll do is we will run pip 3 install bottle just like that and you can see that was pretty quick now depending on how you have your terminal set up it may not recognize the lynnode cli command as you can see here mine isn't and that just means that pip is copying lynnode cli to a place that is not in your path it's beyond the scope of this video to show you how to configure that so what i'm going to do is paste where that's located on my system which is this right here in my case it's in my home directory in the dot local directory there's a bin directory and there we have the linode cli binary to use this service we will need to create a personal access token and this is different from the key pair that we've created earlier in the video we haven't created this yet so back here on the dashboard we can click on the name of our account right here click on my profile click on api tokens so as you can see here i have a few api tokens that we can use but what i'll do is create a brand new one so you can see the process so i'll click here to add a personal access token and then for the label i'll just keep it simple i'll just call it bucket api token for expiry we can leave that to the default of six months which means that after six months this token will be unable to be used we can actually set it to never if we never want that to expire or for example one month if we want to have that expire sooner now to interact with this service what you'll need to do is enable read only for the account and basically the best rule of thumb is to not enable any permissions that you don't need because if someone gets a hold of this api token they'll do exactly what you've configured the key to be able to do just keep that in mind but when it comes to object storage the minimum that we need to configure here is read only for account and we could do read only if we want to only be able to download things from the object storage but what i'm going to do is select read and write that should be good enough i'll click create token then the token is displayed and just like it says here this will never be shown again so if i click ok without jotting this down then i'll never be able to get this back i'll need to create a brand new one so what i'll do is copy that to the clipboard and then i'll be able to provide it to the command line tools to allow it to interact with my account so go back down here to the terminal then i'll paste in the token right here then enter and next it's going to ask you for the default region and the bucket that i've created is in us east so i will choose option 6. now this is the default you can override this so just keep that in mind if the region where you created your bucket isn't where you want your default region to be but anyway i'll press enter then we could choose the default type of linode and if i scroll up here you can see some of the different types i'm going to choose option number one that's the nano i'll just have it default to the cheapest option i can always override that if i would like to create a linux with a different plan i'll press enter then i can choose the default image and this is optional you don't have to select this but i will i'll just go ahead with option number 24 for ubuntu 2004 and there we go now we have the command line tools all set up and ready to go now nothing that i've done so far is specific to object storage the questions that came up are just because i haven't yet set up the lino tools on this machine but now that i do have the lino tools all set and ready to go we can now interact with object storage and now let's see some examples of using the linode command line interface to interact with our bucket so again we are using the lynnode hyphen cli command to interact with our account next we're going to type the name of the service that we want to interact with and of course it's object storage which is abbreviated down to obj then i'll type dash dash help so we can see some examples and then i'll press enter so here we can see some example commands that we can use to interact with a service for example del removes a file from the bucket ls lists buckets or objects we have put for uploading something to object storage and so on so let's go ahead and play around with it so again we will use the linode cli tools interact with object storage let's try ls so i'll press enter and since this is the first time that i'm actually reading data from my account from the object storage i need to choose the default cluster and i created the cluster in us east i may as well choose that so one and then enter and we can see right here that since we ran ls it is listing the buckets that are in my account and i only have this one right here the lynnode example bucket that i've created earlier so we can see that the command line tools are actually working just fine now if i recall that command i can actually do la instead of ls which will list all the objects in all buckets and we can see that we have inside the lynodexample bucket the notes file that i've created earlier so i'm going to copy that to the clipboard for the next example and then what i'm going to do is change the la to git and then i've pasted in the name of the bucket and then i'll type the name of the object that i want to get then i'll press enter and if i list my storage i have the notes file right here and just like you'd probably expect i can do the reverse and upload something to the bucket as well so i'll just echo a simple message here to a local file called note2.txt and there's the contents of the file so i'll recall the previous command and i'll change this around a bit i'll change the get to put and then the name of the local file which was note2.txt and then the name of the bucket where i want to upload that file to and according to this it looks like that was a success so back on the dashboard i'll go ahead and click ok again you definitely want to make sure that you have jotted this down somewhere safe because you'll never see it again but if i go here to object storage then click on the bucket name and here on the list we see note2.txt so that was successfully uploaded and at this point you have seen examples of using block storage via the lino dashboard as well as the command line interface so you should be good to go with all the basics you need to take advantage of this awesome service so there you go that was an overview of object storage i hope that was helpful as you can see object storage is awesome there's many different use cases that you can use it for but i'll leave it up to you to use your imagination and set it up for your needs and as always make sure you click that like button and if you haven't already subscribed make sure you do because we have more awesome content coming very soon thanks for watching [Music] you
Info
Channel: Linode
Views: 4,973
Rating: undefined out of 5
Keywords: object storage, cloud computing, cloud storage, cloud hosting, object storage tutorial, linode server setup, linode object storage, linode cli, s3 object storage, s3 object, cloud computing architecture, cloud storage types, cloud computing basics, cloud computing tutorial, cloud computing explained, S3, data storage, linode, hybrid cloud storage, multicloud storage, multi cloud storage, s3 compatible storage, object storage service, linux, linode s3, alternative cloud
Id: q88OKsr5l6c
Channel Id: undefined
Length: 16min 28sec (988 seconds)
Published: Wed Nov 18 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.