Google Cloud Platform 101 (Cloud Next '18)

Google Cloud Platform 101 (Cloud Next '18)

Show Video

My. Name is Terry Ryan I'm a developer advocate for Google cloud platform and. This. Is going to be Google cloud platform 101. My. Goal. Here. Actually, before I get started in goals and I've explained stuff I want to know a little bit more about you who you guys are so, how many people here develop, on a daily basis. All. Right and how, many people here do systems, work on a daily basis. Okay. And how many people do both. Okay. Is it because you love DevOps and, is. It because your boss does hate you and won't hire more people. Okay. Anybody, here tell developers. Or systems people what to do like any managers, in the room, whoa. I should have checked, that before I made a manager jokes denied. All. Right well. Luckily. When you move to Google cloud you you can kind, of relieve your workers that's good all. Right that kind of gives me a good idea who you guys are and what's. Going on actually I'm gonna ask one mark into a question how, many people are currently on Google. Cloud platform already. Okay. How, many people have tried containers, already. Great. How many people have tried some sort of serverless solution already, all. Right great good. Mix I'm really really excited all right so what are my goals for this talk my goals for this talk are to tour Google. Cloud platform from, the perspective, of someone moving their. First app over to GCP and. That. Usually entails this particular, set of processes, and it's it's challenging, onboarding, to a new system is always difficult so. I really feel passionate about this, I really like to bring help bring people onto the cloud easier my. Secondary, goal which is not as important, to me is to explain all of the various things available of JCP, it's just too much it, would take too long I'd be like an auctioneer, so. Instead what I'm going to do is as I go through and we migrate, this app over I'm going to point out certain touch points like it makes sense that we talk about storage and we talk, about other computing. Things. Other than just virtual machines although that's what I'll be focused on virtual machines, okay. One, other thing I want to announce is that. Have an internal tool called Dory which does question and answers during our big meetings, someone. Sundar is answering, questions internal. Meetings at Google he uses this, tool we use, to kind of surface our issues, it. Is available, in the app so. If you go to the app and go to the session you can actually do, live like, basically ask questions, while I'm speaking I will, go back after the talk at, the end of the talk we'll have Q&A and if your question does not get answered during the talk I guarantee. To you personally, that I will go through and make sure they're all answered, so. Please, if you're interested, please participate that and we'll have live Q&A at the end alright. So how. Do people move to the cloud most, times when they try out a new cloud they do pretty. Much the same thing they pick up an app they have somewhere, else and they, just try, to move it to the cloud and see what happens right we call this a lift and shift you, know just moving stuff make it exactly, the same as it was just somewhere, else, so. I have a demo of a Minimum, Viable app.

I'm Going to switch over to the demo laptop. And. We'll drive so, this is a very bin home very. Minimal app it basically, is a tagging. App for photos right so I have these photos here I'm gonna go through an ad one just. To show you this is a live system, all. Right I'm gonna go through and say okay. Upload. We're gonna add some tags I, may. Have done this repeatedly, to the point where my browser just gives me these options, I'll head upload it's there it's. All saved all, right there. It is so we have a list of pictures we have a list of tags that humans create to tag those pictures pretty. Easy, pretty straightforward, pretty simple we're, gonna switch back to the presentation. All. Right and let's. Just talk about the architecture this is so. I know none of you guys none, of you folks in this room have. Ever done like you've, put all your stuff on a single server and run your production, app off a single server you know no one here does that we all know people that have done this right, so. This. Is what we're going to kind of use as a stand-in, for like, moving a real application it's pretty simple it's got its got application, code it's written in PHP it's. Got a database to store all the tagging information and, it's got file storage in order, to serve up the images work, to move it to this where we have a single server that, only runs the application, code and all the stateful, stuff is moved to. To. A cloud, provided, database, and images, and then, we'll talk will kind of take it from there and go and do more things with it so. Let's, talk about our virtual machines because that is really where this starts right you want to you want to run this, this. Code on a virtual machine just in our network so, compute. Engine is the tool for running virtual machines on Google cloud platform. You, can get one to 96 processors, 0.62, 624. Gigs of ram you know 65. Terabytes. Of persistent, storage 3. Terabytes, of attached. SSD. And, 208, gigs of, ram. Disk. Instead. Of kind of talking about all the features and stuff I actually am just we're going to build a VM right in front of you so. I'm gonna switch to the laptop again. We're. Gonna be doing that back and forth and. So. This is Google Google. Cloud. Platforms. Console, I'm gonna go ahead and create a new instance here and you'll. See here I can go let's, let's give it a name so, I remember I. Remember. To, delete me I'm gonna delete it and you see I can put it in any region I want that we have a data center I'm gonna choose central, because. That, is the one that is best for the demo. And. I have a number of zones right so, the first thing I do is I kind of start to make the shape of the machine how many processors, how much memory isn't it but. Let's. Say I have a thing where like well. 16 is too low I'll be performance, bound and 32. Would be overkill, because I would be paying for stuff I don't need I really need 20 for one, of things you can do on our platform which I really love is you can just dial in to exactly the number of cores you want right so I could say I want, 24, processors, that way I'm not paying you for stuff I don't use and I get the performance I need I'm. Gonna switch back though cuz I don't you know I, don't, need that many processors, I can, go and change my disk image. And. You'll see that I have a whole bunch of flavors of OS Ubuntu. Core. OS, containerized. Container. Optimized OS Red Hat only. Down here windows yes you can run Windows on Google cloud platform I'm. Gonna stick with what I got because I like the defaults let's, see well so am I gonna do, oh let's. See when I go to customize, something, I didn't show you before is that, if I want to I can add GPUs, I can. Also set, a minimum. Processor. Platform, so if I need the features of certain processors, I can I can get that on my on my VMs, I'm, gonna switch back to basic though and.

Then One. Of the last things I'm gonna do is. I'm going to allow. HTTP, traffic I'm actually gonna open up a firewall rule this. Is this. Is the only firewall, rule we have right available, right like when you're creating because, it makes sense right it's HTTP you always have to kind. Of expose you, very often have to expose those. One. Other thing I want to show you here is that at, the bottom this is one another my, favorite feature this at the bottom it says equivalent, rest or command, line if. I click on this I actually get, the the command. Line commands to create this VM, exactly. As I've configured it here but I can then take that reuse, it dump it into my scripts and build, like a fleet of machines if I want to so, I can I can use this to sort of learn, the CLI which is really kind of helpful and then, one last thing I love this we have run in cloud shell I'm. Gonna, show cloud shell because one of my favorite parts of, DCP. I'm. Actually spinning up a VM that is only just a lot of command control center, kind of VM it has all, of the all the tools to run Google Cloud like right there and it's, got a persistent, home disk so I can do things like I don't know g-cloud. Compute. Instance. List. Right, and, all, the tools are there and so I can see I can I could basically use all of the tools, to run Google cloud platform right, on this cloud shell, which. Is great because now I can maintain, and monitor my whole systems without, having to get all the stuff on my laptop for example I was, working one of the demos if you've been the showcase, we. All worked on that was really hard one, of the problems I had though was that I needed to build something in Python and I. Don't have the right version of Python on my machine and installing, the right version of Python on machine was evidently, just. More than I could do but. What was great was that cloud, shell already has it all set up and re works and so I was just able to pop over a cloud shell get my work done and do. Stuff without having a muck with my laptop so it's great okay. So I'm gonna go and create this VM. And, we like to say they take tens of seconds to start up when, a hotel room testing, this before it takes ten seconds when people are watching it takes longer I don't know how it knows so. Like look away look away. We. Got all right so delete means gonna be up in now, all right so that's. Somewhere, in the 10-second range I'm gonna I'm gonna call that so, another. Great thing about the console is I'm gonna go SSH, into my machine and I, didn't pull down any certs or, at least not me manually, they didn't pull down any certs I didn't have to hook up anything basically. It's available right within the browser and again, this is great like I can I can SSH, into these machines even, if I'm not at my home workstation. Let's. See so. Just, to show this is real. Apt-get. Update. Gotta. Spell it right and, oh. Yeah that's right I always forget that you. Have this to do it there, we go, there. We go. I, probably. Pissed off half the people in the room with that pronunciation, of Studio right sorry a, little.

Nerve-wracking Up here alright so there we go so we've gone through we've created a machine let's, now switch, back to the live. Present, or. Creating, a machine is relatively easy and straightforward here's, g-cloud, is the tool you use to interact with most of Google a platform g-cloud compute, instances. Create and then you can create whatever you want and the, next thing is to after, I create, a machine I need to run commands on I need to install software I need to configure things so, g-cloud compute SSH, the, name of the virtual machine and then whatever command you've got and then. To get stuff from, your. Machine to your VM to get the code on it you're, gonna want to run g-cloud compute, SCP. SCP. And then source and and destination just like you would with with. SCP normally so. These three commands based with, these three you know commands I can do everything I need right I can build a machine I can. Install, all the proper software I need on it and then, I can push my application, code to it now obviously they're different wait you can do you can do all this differently but, this just is bare-bones like let's just the easiest, way to get it done we, can do this. So. I. Don't like to talk about price but, I feel like with VMs, and our technology, price is a important. Differentiator so I want to talk about a little bit I promise. I won't get too salesy. So. One. Of the things that we do is when you start configuring machines, up in the right. Right, right hand right half side of the screen you. See an, estimate, alright and as I add resources, right I add more processors, the cost per month goes up and. It goes up and I'll go you know I went crazy right, cuz Google, pays for these right when I split them up so I like to I like, to make them big and you'll, see I've, got a charge now when you break down the charge one of the things that we do and it's really important to know is that we have a base charge if you're just running a machine kind of haphazardly, but if you run your machine for, a consistent, period of time up to a month. We. Will a, month, being 100% of the time you need to run and then the next month you get, another sustained use discount we, will knock a significant, portion off the price. Because. We appreciate having, consistent, load size appreciate. Being able to plan better because you, you. Have a set, size that you're gonna keep running in perpetuity. Now, this. Is great sustainable, use this guy was great and like for for things you weren't running all the time it's really good but there's another option let's, talk about we're, just called preemptable VMs and you'll notice that's, significantly. Less. But. There's a catch right because there's got to be a catch the. Catch is that a persistent, I'm sorry a. Preemptable. VM which is what you have to flip a little setting and it becomes preemptable preemptable. VMs will disappear, sometime in the next 24 hours and they're guaranteed to go away in 24 hours but they go away anytime so like I have literally started, up a preemptable, VM and then, one SSH, into it and it's gone and I was completely, confused. So. Why would you want these well a, lot. Of times we have work that we need to do kind of whenever, it gets done batch work big, data jobs well, you can push, the, use of those. Jobs as long as you have some sort of queue set up that is kind, of can be taller of a machine going down you. Can do them for one-fifth, the cost of the normal way of doing, that that, operation, as, long as as soon as the queue is you know as soon as the machine goes down the Q holds you, can always request another machine there's nothing stopping you from requesting, another preemptable machine and then boom you're you're, going through your queue at a pretty good rate and doing it at one-fifth the cost or. You could just spin up five times the number of machines that get it done and one fifth of time I think my. Math is a little bit a little. Bit oaky there all. Right so I talked about disk images we. Provide disk images but you can create your own typically. What I do is start with one of our images modify. Customize, make it make. It unique to what I want and then, freeze it and then I can create new machines from that which is really helpful but.

I Could also make them from scratch using VirtualBox, in a process that I have never done so. Good. Luck. But, it can be done. IP. Addresses you can get private and public IP addresses you. Can you can definitely turn off public IP addresses you can also get static or ephemeral one of the cool things I like is when you get an ephemeral IP address from us if something, happens and someone shares that ephemeral IP address and now that's the permanent IP address of the install and you're like you. Know but this could go away any time you can make any one of our ephemeral IP addresses just static you just say give me that and, that's mine now which. Is great or. You can just have a static one now they don't cost you anything unless you. Take. A static one and then Park on it because, you know we're all trying to avoid the IP for apocalypse right so we're, want, to make sure that if you have addresses, you're using them. Firewall. Kind, of briefly, talked about that you create a rule open. Open. Port, 3306. On, TCP, and then, you that rule tag, a name so that would be my SQL for those or playing along at home and. Then you tag machines, with those those rules and that's how you open up the firewall. Want. To take a slight detour and talk about cloud cloud, shell a really, live cloud shell it's a great developer, tool it's a really great way, of not having, to have this stuff on your machine all the time I didn't, show it but there's actually a, code. Editor that, you can use so you can actually edit code on the, fly. In, like you know kind of reasonable, syntax, highlighting everything really, helpful when you're in a pinch when, people. Are calling you and you are not near your computer or, your own personal computer. Alright. We're back. There's, one last consideration I want to talk about talking. About our VMs on our network and our setup. When. You create. One of our VMs on our network you, don't have to do any, setup to make one in one, data center talk to another by. Default, in one project all your machines talk to one another and they use are really, really high. Powered back-end. Network to do that and. So instead, of having to go to like a different zone and find like oh this data center has these machines and then this data has they're all in one project and so this means you can do kind of crazy fun things especially with our network so, I'm going to switch over to a demo and, I want to take a selfie if that's ok I'm. Gonna take a selfie with all of you I. Hope. That's ok if. It's not we'll blur out faces eventually that's, okay no one's alright so here we gar alright, we're gonna. And. Boom, yeah. Alright. And. So, let. Me we're use it this. Was this was the test right, I am clearly not pleased with any of you know, I'll, upload this and over fresh oh. Come. On oh. I. Didn't upload you actually have to upload like you have to press the button so. Here we go we're uploading, there. We go very, uh. All. Right you know what I'm, gonna roll with it. So. So, we're going to do is I'm taking this picture and you'll see that I have this. Map I have I have machines and all of these data centers and. I set them up really easy just with the script just like I showed you and what I'm gonna do is I'm gonna take this picture and bounce it around our network and every. Time it hits a different point on the network it, we're gonna stamp it as if it had like a little passport, stamp right and you can see it happening in live real-time we're.

Actually Traveling so we went from Taiwan to Tokyo to Sydney to Oregon to Iowa to Virginia to London to Frankfurt San Paulo faster. Than I could say it out loud we. Did it in 4.4, seconds, with, six. 600, milliseconds, or so of processing, what's, great about this is I didn't have to do anything, with the network to get this to work it, just worked out of the box, and, that's something that I really like. Having. Tried other providers, like I get. Spoiled, with this like not having to do a tremendous, amount of work which, I shouldn't really say that, I'm happy with that my boss is in the room but it's, ok I don't I do like working at this I don't like wiring, up networking with. That I'm gonna switch to the present. And. We're gonna move on to the next topic which is storage where do I put my stuff, so. At, the, file storage level we have two products, one with and we, announced, recently and. Cloud storage I'm going to talk through both of those options kind of talk why you choose one over the other so. Cloud storage, is bucket, based storage we didn't you know that's. Everybody. Does bucket based storage right it's kind of a common metaphor we didn't steal it for anybody. With. One set of interfaces even, though I have all these different types I'm going to talk about every. Time you deal with them whether you're going through the console or you're gone through. CLI. Tools or SDKs. It's. The same commands, just with different types of storage what, are those different types well we'll start with multi-regional, which is globally, available storage this, is your stuff that you want to push out as close to your users as possible right. You want it to be for web content or videos or mobile stuff right you want it to, be that when your users go to get it it is as close to them as possible as opposed. To regional, where what you really are trying to do is you're trying to keep it as close to the processing, as possible, right like this is Big Data jobs or, maybe. You need to stay in certain. Regions of the world data, it couldn't can't leave it or other. Reasons, right but. Here. The data is only, in one region and it's close to the machines you're using to process it now, this doesn't mean that you can't open up regional, data to the rest of the world like you can't like, someone in California, can, request something.

In The European data center no you totally can it's, just the latency is gonna be a little bit longer because it's, not duplicated, as close to the user as possible, now. We have two other options in the year line and cold line both, are longer-term storage, options, near line or, for backups and long tail media right there's stuff that you. You occasionally. Get to and. It's planned that you'd have regular access to it but, it's not something that you're getting every day and then. Cold lying I like they kind of say when. You're downloading stuff, in cold line from cold line in. One, browser window you have your resume open, in another right. Because it's for compliance and disaster recovery stuff, stuff that you hope you never have to pull so, you want to store that right because you have to store it but you want to store it as cheaply as possible and never ever use it so, that's what cold line is for. This. Is kind of the general costs for the in in the US and. They're. Different in different regions but the deltas are always pretty much the same multi-regional. Is two point six cents forgave a gigabyte, per month regional. Is two cents per gigabyte per month Nearline is one cent per gigabyte per month and then cold, line is the cheapest at point seven cents per gigabyte per month. There's. Also another cost involved which is retrieval. So, if I go and retrieve a file from multi regional regional we don't charge you for like just, accessing the file whereas, with a new your lining cold line because we would encourage you to kind of Park them and leave them. We. Have a one cent per gigabyte charge for pulling. Down from your line and a five cent per gigabyte charge, for pulling down from cold line and again that's probably the least of your problems then but just just, now. Alright. We have another option which is called cloud file store which we again. Released, recently. It's basically managed NFS and it's a shared file system, you, get really low latency because you connect it to the machines you're actually using. Usually, in the same data center there. Are two service tiers a premium and a standard. It's. Basically it's NFS the ten FS that we manage so. Should. We what should we use well. NFS, is attractive, especially if I'm using it somewhere. Inside but the fact of the matter is is I want to share this data with the world I, don't want to do a lot of work to do that if I do NFS, then I have to put. Some sort of system to share on top of it I have to manage that with with cloud storage as you'll see in a second it just shares immediately, and it's pretty easy so I'm gonna use cloud storage so, let me give. You a quick demo, of cloud storage I'm gonna switch to the laptop again, and. Here. We go on the laptop great I'm gonna go ahead and create a bucket. I'm, gonna call it tagger 102. I'm, just gonna create a default one and you'll see. That's. It that's all I had to do it's, already created I'm actually gonna upload files already. So. Let's just upload all the files. From our app. You'll. See that they push up they're, going fast. Fantastic. Now, they're in cloud storage and one. Of the things I love about this is right right so let's see cloud storage gladiator I'm, gonna share it publicly and when I do that I click public link boom.

Public, That's how fast it's like already there you, see I've got a URL for it now. One. Of the other files is a walk on app it cuz it's short I'm, gonna do a little you where I'll walk in here ooh. I. Did, not mean that pun and it came out though no it's terrible, and, you'll. See that I can URL walk and I don't get it because, those. Types of permission. Sharing happen that fast, so. Cloud. Storage is sort of drop-dead easy like it just boom works, so. With, that I'm going to switch back to. Presentation. All. Right so, gets up to cloud storage I could do it via command line using GS util which is equivalent to G cloud but, for file storage operations. I. Can share publicly, by using G, so till I am to, do those operations now one thing I'll point out is that I shared, one, file within a private bucket, I don't, recommend doing that cuz. That's when bad things happen right that's when human error will take over and I'll accidentally share something you don't, want to so, what I like to do is I have public bug buckets, and private buckets and I don't mix the two but. Your mileage may vary do do what you will but that's my advice. So. My. App needs. To talk to these things and to talk to the, app I need, to use your client libraries and. Our client libraries you see here are the languages that are listed we. Also have REST API s that are reasonably. Well documented. If. You need to do it from another language. But. I'm. Gonna use PHP because that's what I used to write this app and when to get done fast well. When you use PHP, to move files that have been uploaded used move uploaded file because it's right on the nose that's. The system command to do it and in C I take a source and destination now, to do, this in using. The SDK I can need to do a little bit more code right, I need to use the right library, I need, to create, a storage client create a storage bucket reference. And then upload, the file but, not. A tremendous, amount of more work in. Order to accomplish the same thing so, basically I just swapped that in and then our. App, is looking like this now I've moved all the images to a cloud-based solution. The, application, code is still living on the same machine as the database and we. Should fix that so let's go the next and talk about application, storage. Clearly. We get here we get the whole sequel vs. no sequel, conundrum. I oh. My. Phone is going off because I am in dumb, so. Sequel. Vs. no sequel again this could under them and I don't clearly have a winner although I do hate one of them but, I won't tell you which. The. Both of our valid both of them do things so let's talk about. Sequel. First so, cloud. Sequel is our tool for a sequel it, is a traditional, sequel server is vertically, scalable, we.

Provide Manage, backups and. Easy to set up replicas, and we, make it easy to do high availability. Vertically. Scalable means you can only get it so big and then if, you need more resources you, need a more powerful machine, you have to come up with some other solution, we. Also have something called cloud spanner, right which is for structured data its, sequel, it's both highly available and strongly consistent now those, of you that, know cap theorem may say that's, kind, of impossible and, cap theorem databases. Like what are you doing here so. What we did is we found the guy who wrote the cap theorem we hired, a minima VP and he's kind of like you, could say it. She's. Sort, of close to the truth. Basically, there are reasons why we can say that there's a big white paper you can read it it, is both of these things and it is amazing, it's globally, distributed and. Horizontally, scalable which means you could keep adding stuff if you need resources another place you can add them another place it's, important to note that this is cost effective it's scale. For. This app it. Would be like massive. Overkill, and my, boss would fire me because my bills would be much higher than the real value, of tab the app right, so. Make. Sure that it's cost-effective for you to use it but, if you have that type of scale it is amazing. Talk. About our no sequel option the two main ones that I like that I use a lot and I would use in this sort of application is cloud datastore or cloud fire store, both. Are document based, both, are indexable, and, it's. Hard to tell sometimes the difference between the two like when would you use one versus another so. I'll make it real easy if you're doing stuff server-side, you, probably want to use cloud datastore right you're you're. You're talking from Google cloud somewhere else on Google, cloud you. Want that to be cloud datastore if, on the other hand you're doing a lot with client work you're doing a lot where you, want to bypass the server completely and just have data stored directly from the client on to a datastore cloud. Fire stores right for you cloud fires sort of sort of a marriage of some of our cloud, datastore technology, and the, expertise, of the fire of firebase, team, and. So because of that has a great web, and mobile, sdk, and, really, works well with. Those environments. Okay. So which one should we use well I'm not switching to no sequel because it was built it was written in sequel and I'm just I'm not switching the no sequel that that, would be like. Much more than I'd want to do for an experiment like this I, cloud. Spanner is really overkill and so what I'm gonna do is use cloud sequel so, let me drive cloud sequel a little bit for you. Here's. Our sequel, machine I'm gonna go ahead and create an instance you'll. See it gives me a choice between my sequel, and post Postgres. I'm. Gonna choose MySQL. You'll. See here it gives me some kind of pre-configured. Options to make stuff easier I'm gonna go with a. Development. Server and then like mess. It up, let. Me do that I'm going to call this, Tager. Let's. See, and then, here's where I can have some fun I can configure the type of machine. And storage so I'm gonna start right. Now the the initial one is micro and you'll notice over here that I have the performance, kind. Of meter how, performant, this machine is going to be I'm gonna go ahead and change the processor, when I change the processor. You'll. See that I maxed out network throughput so if you want more network throughput add.

More Processors, to your sequel boxes on. Cloud see if, I want better I ops well, I can just on. You'll. See here that as I increase, the number of I ops the disk throughput. And I ops and all that goes up and as I add more, eventually. I max it out so, if you need higher performance, out of your sequel. Servers on, cloud sequel that's the way to do it and. Then. I can also enable automatic, storage, increases, which is great like if, I'm getting close to my disk instead, of having to have a big you, know instead of not that not, that being here is a problem but if if I'm worried, about that I can just enable so that it'll grow as my dataset grows so. Okay I am, going to cancel out of that and then I'm gonna switch back to presenting. To. Do all right. All. Right so how do I get my data into cloud sequel while I do a database dump right like I do my SQL, dump and. Then I do GS util and copy it to cloud storage of all places once. It's in cloud storage, I run, sequel import sequel, to. Import. That that file and then. After I import the file because you shouldn't leave your sequel, dumps. Lying around in a public place that could be made public you delete the file now. Oh safety, tour this pattern of pushing. Stuff to cloud storage and then pulling it down elsewhere in, Google, cloud platform it's, kind of common and. I kind of see cloud storage is sort of hub between, a lot of different technologies see this you have an application running cloud functions, you put a picture in cloud storage and then manipulate, it with vision API or. Something else this, pattern, of being. A hub also, applies, to cloud pub/sub which i'm not really going to show off because it doesn't make sense for this app but, cloud pub/sub does what for messages. What, cloud storage does for, files it basically acts as a conduit in between all so it is a messaging, bus that, does the, publisher. Subscriber, model you have many publishers or one publisher many subscribers or one and then, it'll, make sure that all the all those. Subscribers, get all the messages from all the. Publishers. Okay. I'll. Come back to that all right now some common problems with doing cloud sequel, first. One is you, do G cloud sequel, and. You, import, a, file, and you get an error right, this is internal error okay. I didn't. Think it'd be an external error but fine, alright internal error and then you dig into it and you set, up a verbose, mode and, it'll. Tell you guys. Guys. This was a MySQL. Error which. Is really not that much more helpful and. I have a verb filed I'm. Not bitter that they haven't fixed it but, how do you find how do you figure out this problem so. In, the cloud console, there's this thing called operations. Tab, glut operations, at the top you'll see that have an error and it even includes a line number so I can like track this down and maybe see what it is turns. Out that MySQL. Dump if. You had super privileges locally and you might have because you're experimenting with stuff and you accidentally, up them like I totally did in this case, you. Can't do that because we don't allow super privileges, on the box so, so. Watch out for that. Alright. So. What if you need something, we don't offer right. Like I, talked, about cloud sequel I talked about our our products, but like maybe, you need Redis or maybe you need. Mongo. Or Cassandra or something well, there's two options you could always build it by on hand usually build, it by hand using compute engine right because it's just a VM you can install stuff on it we. Also have a thing called cloud, marketplace, which, just, recently was renamed if you're, familiar other platforms cloud launcher it's now a cloud marketplace, and. There are pre-built solutions for things like the Sandra Redis Mongo couchdb. And more now, it's important to note that we will not manage, these for you right like we build them we need like one click build. These things but. Then managing. Them is on you not it. Won't be the way our sequel boxes are. All. Right so here we are all right we got our App from. A web application on a single server and now we're running all our state elsewhere, and we, have all our code on a single server this, opens up a whole lot of possibilities, for us right because. This. Is sort of the modern you know the 12 factor app at least part of it like, we have application. Code running one place and we don't have to we, don't have to store State anywhere and so we can start mucking around with what we're doing on this single server so.

Let's Talk about some of our computing options what do we use to build this stuff, so, how do we scale this system now. There are a couple different ways of scaling the system like what happens if tagger like it becomes a breakout success and won't happen I know it's fine won't, happen but. What if it does well, there. Are a couple ways of dealing with this the first way would be to use a completely compute, engine solution, which. Is a combination, of using. A managed instance group and a network load balancer, so, a managed, instance, group which I'll talk about a little bit more in a second is, basically a collection of VMs that. Perform. The same role and could be pointed, at one load, balancer and then. Our load balancers our look. Balancers which are pretty straightforward, that you don't kind of know what they are so, talk a little bit about them our instance groups we could say that they're managed or unmanaged I chose. Managed for that because one of the cool things about a managed instance group is you can say things like, alright. Because, all the machines are exactly the same you create a template and they'll create the same machine over and over again you. Can say like I want processor, utilization to, be at 60 if it, goes above 60 spin up another box and because. You have a template it can spit up another box and it's perfect and it perfectly, kind, of fits what you're doing you, can also do unmanaged, where like you, can build your own machines and add them to it but. Then they, could be different profiles, of processor. And memory and, that sort of thing so we can't really auto scale or auto heal them so. That's how you make a collection of VMs it all do the same task you, throw a load balancer on top of them right and you we, have the. The, interface will show you three different options will, show you HTTP. TCP, and UDP and, you. Can make any one of them local, sorry. Internal only so it doesn't it doesn't get exposed to the public Internet, so. HTTP, is our equivalent, of a l7, load, balancer TCP UDP is it equivalent of a l4, and then all of them can be made internal. Only, so. We're at a cloud conference, and I have not said docker, I have. Not said container and I'm not said server list of what's going on right I also, haven't said a I, so. Or Big Data right but I'm gonna focus. On container and server lists these are these are two terms that you. Typically. Want. To maybe consider, moving your container your. You're. Computing load -, so. What are containers for those who might not be familiar containers, basically consists of two things and this is if, they're a container expert through the room I'm sorry, I really, oversimplified. It but I wanted to make it really simple for people are not familiar with it so, um containers. Are made up of two parts one a package, file containing, all of the code and runtime components it takes to process your. Your, app or your micro service or whatever you're running and, then. You have an environment that tricks that package, into thinking it's the only machine that's running it's, only it's the only system, running on that machine, now. This isn't and this is in contrast to a VMware, like you carve off bits of the machine and say.

Use, 16 Meg's of RAM memory and, if it only uses 8 well. Then that extra memory is gone you can't kind of pull it back because it's been carved off so. Doing it this way. These these, containers, are all kind. Of tricked into using, the same kernel I, don't, I don't maybe that trick too maybe they're just induced, and courage or something but, what. That allows them to do is spin up very very fast because we don't have a whole operating system to tear up and tear down and, we. Can fit a lot more of them because, unlike a vmware, you allocate, blocks. Of resource, these, will just these are just processes, and they use exactly. As much memory and resources that as they need and then, the rest is still free for other containers, to pick up and use. So. There, are two container, solutions that I'd like to talk about it at Google, a platform, you obviously can spin up docker on a VM and like there's nothing wrong with that and we actually make it relatively, easy to do but, the two container solutions I like to talk about our good Cooper, neighs engine which. Is managed kubernetes anybody, here familiar with kubernetes. Okay. Yeah that's. Intimidating. So. Good you all know it kubernetes is for those of you that don't know CooCoo Bernays is a container, orchestration, system when you have one container it's, pretty easy to kind of keep track of when you start having 20. 30 containers that are all part of different systems that all need to be wired up to different networking. Solutions. It. Becomes challenging to keep track of them all and so Cooper Nettie's manages, that for Q um that's, really oversimplification. Now Cooper Nettie's itself is a, very large bit, of software to manage. Cooper nays engine is probably the easiest way to run it because we'll take care of like building all the machines for you and setting up smart defaults for monitoring logging, DNS service. Discovery and auto scaling. We. Also have this thing called App Engine flexible which is much more simple, you basically create a custom runtime docker image it's, got to serve up on port 8080 and once, you do that we will scale it to as little or as much as you need starting.

At One so we'll, leave it running all the time you have one container one service, that's running one endpoint and if you get a lot of traffic we'll just scale it out and if you get less traffic we'll scale it down much. More simple but it's it's it's better, when you have just a very simple thing it's, a quick and easy fix for a lot of this stuff, all. Right so what is serverless, all. Right service. Is the marketing term right. We all know it we're all in technology, we all know it's a marketing term because we know. There's. Not some sort of weird octopus, creature that these things are running on it's the server right there's a server somewhere and, we know that service is a lie but. It. Describes something. For you the user the, the person consuming, the service the server has disappeared. Right, because you don't interact with it you don't you. Don't ever have to worry about like setting it up or like did I provision enough or does it happen on memory like, we take care of that for you so. Service describes, a service where you pay as you go for only what you use and, you. Don't think where the systems running on it and that is actually a really cool thing even. If it is a marketing term all right so. Serverless. We, have two products that I kind of call the service products that Google have platform one is cloud functions, which is function based you write a function send. Mail or you have one function since email right you, then attach them to events, so. Someone, writes a file to cloud storage you can attach a cloud function to that and send mail you. Can attach, that event to a pubsub, message you can attach an event to a URL call so you can actually make URL. Calls based, on cloud functions, now. If you need more than just one function right, you need to chain a whole bunch of environment.

Stuff Together and create, a full application well, App Engine standard, is probably the way to go there right, we have a number of runtime for App Engine standard which we, announced today that, we, are we. Are releasing, some, new ones in the near few which is really exciting but, basically you have to write in these languages in, order to use app engine standard and. There's some restrictions like if your if. Your. Software. Is based on like a C executable, that you wrote ten years ago you, can't pull that into App Engine have happened and scale it but. If you keep, with those constraint capabilities, and you just write code in these runtime languages, we, will, incredibly. Credibly, rapidly, scale your application I. Have a demo I'm not going to show it where, I take an app engine app that, is cold that hasn't been KITT in a day. And I. Scale it from 0 to. 8500. Queries per second in, less than 5 minutes so. 8500, QPS is pretty high but what does it really mean 8500. QPS is about 30 million requests an hour or what wikipedia, does on an average hour. So. On, App Engine you can scale from, nothing. To a, Wikipedia, level. Traffic, site in less, than five minutes which is really really, cool and. Fun. So. The, question is is like so this this tagger service is saying should I switch this over to one of those and my, answer is well. It. Depends, right typical, weasel IT answer, it depends because. If. Probably. Not right like it's just a simple app that I'm running it's probably like a legacy app that I've rolled, over and I need to keep going I don't know that I would move it off a VM it's running fine just leave it on VM but, if like let's say I want growth in this app let's say I wanted to go bigger and better then. Maybe maybe. I would, push. It, to. Containers. Right and have it run with, a whole bunch of other similar services and get the most resources, out of my my, my. Hardware, that I'm you, know the virtual hardware that I'm pulling down also. If I have this this app that's not very frequently used. Running. A VM all the time may also be something that would be too much of a cost so I might switch it over service, and take advantage of the fact that server list you only pay for, what it's used it, would depend on how much it's used so my answers depends, but for this app I don't, see it lighting up any time in the future so I would probably leave it on the VM.

So. Conclusions. One. So. We started here I just kind of recap what we did we, had a single server app we moved it over to, this. Sort of configuration, single. Server which opened up a whole bunch of possibilities to us of maybe switching the containers or maybe switching the server lists and. We. Left our images, and our data elsewhere, which was great, we, did this with compute engine on. The single server side we did it with cloud sequel on the database side and cloud storage on, the image side, now. I switched. Those hexagons, because one, of the things that we do is we kind of showcase, all of our products and I want to talk about just how much we didn't talk about. So. We talked about a lot of the compute stuff which is great I'm happy we, talked about a number of this storage and database options we talked about networking and we, talked about Big Data the. Cloud pub/sub reference. Cloud. Vision API I, cut a demo so we didn't we didn't talk about that at all, we. Talked about cloud SDK we, talked about some of the management tools but, the entirety. Of cloud platform, is much, bigger there's a lot more stuff there I hope. That. As, you look through this sort of display of our stuff that you see places where you want to go I, hope that I kind, of showed you some of it but, we, can we, can see that there's a lot more and if only there is some place that you could go to which. Would provide you with answers about the rest of the platform like. I don't know like some sort of conference it. Would be great if you could answer some of these questions about what these things do.

2018-07-28 03:05

Show Video

Comments:

Awesome presentation! Thank you Terry. :)

Other news