Day 3 Keynote Made Here Together Cloud Next 18

Show video

Welcome. To the best day of the year, welcome, to day 3 of next. This is it this is my favorite, part this, is the developer, keynote excited, guests, on developers in the room alright, we're, gonna have a lot of fun today a lot of code a lot, of demos but, I thought I'd start let's get to know each other sound good so uh like let's go show of hands let's, really do this who's, a developer in the room raise your hand if you're a developer all. Right how. About operators. We love our operators, to get. Some operators, in the room how. About some language stuff. Any. Job of developers, yeah. I got a lot of Java developers nodejs. Wow. A lot of nods yes um, go first go. Go. First love them some go okay policy. Ah let's, see where you work who's with, an enterprise big, company, yeah. Well. Done startups. Okay. This is important is anyone, looking for a job. This. This guy right here okay talk to all those people around you they're hiring so. You're all I'll get you set up look, it's, a great time to be a developer like, every. Industry is changing right. Software. Is right in the middle of a lot of those changes and and, you you the developers, you're right in the heart of it you're driving, all that, and. Think about the tools that you use the. Tools that we use are changing, everyday also open. Source has been just a huge part of that transformation think. About it when's, the last time you actually set up a server right. That's, an API call now how, about a configure. To configure an, operating system image, you. Don't do that right that's all containers, it's all just a library of container images now how, about how about set up a whole fleet you set up all fleet already, terraform, it right, that's the way it works now so. The other thing that I think is a really interesting change is the, very the very rule, of a developer, is changing, you don't just write code you're. Working with big data you're, working with event streams and IOT data you're, starting to do science, and machine learning who's written their first machine learning app so far yeah. It's just emerging. Super, exciting, to help help, you all go in this journey together you're. You're, getting to know your users you're doing user experience, you're managing products. Not just projects. And ultimately. You're, working as a team to ship great experiences. Out to users and customers and. I think it's a pretty amazing change, now. Cloud. Is enabling, all this right, we're. All served on this journey to evolve, together to this new world we. We all have access to this amazing technology. You know you could just get it as a service everything is available as a service, so. I'm, pretty sure the next five years are gonna be even more exciting, than the last five years. To. Tell that story we, wanted to talk to some community, members get, some voices from our community, any any community members here in the room from the Google developer communities, out around the world right on, okay. We made a little video to, show you some of their stories and some of the things they're working on so with that I want to roll a little bit of video for you. Funny. Enough you start with a simple conversation. So. Imagine it's Election Day 30, 40. Million people sure. It's what. Our software doors, allow, them register, these people, check, for duplicates, or, if there are any signs of fraud. Can, we have a loyalty program where, an average. Person can earn points every, time they shop for groceries and this currency effectively. Becomes a second source of wealth to pay for everything, from your electricity bills to school fees and doctor's, bills. Two of my cousin sisters, suffer, from, breast cancer and. I wound up losing them that's when I thought we, need to do something with technology, to build a new way of doing, breast, cancer screening, in.

My Graduate school I was one, of two women in, a class of 45 and, it, kind of got, me thinking that, this, is not what it's supposed to be we. Have this, patient called Maria she's six years old, then, she was having these daily seizures she, lived in a remote area in Brazil where there's no specialists. And no, one in the city could help her. I'm, a developer, during the day but then during the evening I wear my cape and I do Google. Stuff. Well, things are most amazing, is being, on Google cloud as a neighborhood Osby online and available. 100%, of the time it's automated health checks security. Checks and logs monitoring, I use, tools like Star Driver to keep me on top of all of that Google. And the Android, platform have become, kind, of a backbone of our entire product ecosystem. Where, we could actually fill, this royalty. Program, powered, by mobile phones we, use deep learning and the, technology, stack partenza, flow to interpret. Thermography. Which. Basically, measures the temperature on the chest and then, figures out if there is any abnormal, tissue activity, and this, can be five to eight years before a lump is form of faith who actually helping, people to get access to doctors that they couldn't have without the stack for example this case with Maria with Google cloud we connect to the clinic device, measuring. Maria brainwaves, sent. To the best trial neurologists, in the country 3,000, kilometers away in San Paolo and she found a cure for Maria, and this, was awesome I run the Google developer group Vancouver chapter I see girls from high school they actually show up at our meetups, they know nothing about the product, and after like one hour of two hours of time they, can build something from, scratch I'm. One of the organizers. Of GDG, called London we are the most active GDG. Cloud, in the world and I love how you can achieve all these dreams, and passions, and ideas, you have using the Google top pop or. Whatever. You you do in life try to solve a meaningful problem, more, than ever people are asking, for purpose, on the work that they do you're, not just building product, you're building product that can change people's, lives Michael. We, will excel, in technology. Women. Will get their seats at the table I feel that Google just empowered, me from, that moment it's been love. As, pillow. So. Cool thank. You Thank, You Amanda and femi and all the community, members so great to hear your stories so. Look we're gonna kick off today we're gonna be a great day but I really, wanted to start with a promise, to you a promise. That Google is going to really do three things the. First is, continued, to deliver amazing, innovation. Things, like Auto ml, and. CPUs. Silicon, for tensorflow at massive, scale, the. Second thing we're gonna do is we're committed to open source and an open cloud you. Know Google's, got about 20 years of experience doing open source and being part of the open source community under our belts and we're, looking forward to doing the next 20 years with you and then, the third thing is that community, theme and we wanted to really launch that at this conference we, believe in being part of the developer community we are engineers, at Google we sit all over the world with all of you and we want to continue to be really connected, with you as we as we figure out this next generation of technology, so. For. The rest of the morning we, have one simple, rule and that is, show don't, tell we got a lot of great code it's gonna be a lot of fun and let's get started yeah, right. On I want. To introduce a, great executive, at, Google, a vice president engineering Melanie mcfist is going to talk to you about tools Thanks.

Thanks. So much Adam I'm. So, happy to be here today my. Name is melody McDonald and I'm passionate, about developers, because I am one and, I. Also worked for many years in, operations. Where I carried a pager and I, became very familiar, with the fair phrase it works, well on my machine, so. I leave developer, and operator tools, at Google this includes, Google engineers. Chrome. And open-source developers. Android. Developers, and developers using, Google's cloud platform. Now. Each one of us probably has a different definition of DevOps at. Google our understanding. Is that DevOps, includes two things end to, end automated. Tooling, from. Source to. Build and test to. Releasing, with integrated, observability. And the, culture, that supports and enables, developers. DevOps. Is near and dear to my heart because. It's about automating. Away the toil while, empowering the humans. Makes. Us productive and, maybe, just a little bit, happy, so. How many humans, in the room today. Yeah. Well. Humans, develop, software, and operate, services and, at, Google we've spent a significant, ever, understanding. Productivity. Different. Developers, need different levels of insight, and care and as. Developers, we, want to choose the best DevOps, tools to, get our work done, but. That choice can be hard sometimes. Imagine. Being a new developer, and having, to pick your language or framework that you need to use or. Where, to deploy your app, vm. Kubernetes. Or, which. Cloud platform, to use well. That one should be easy right, Google. Cloud platform that's. Why we're here and with. So many choices at, every stage, selecting. The right DevOps, tools can be overwhelming, and waste our time at. Google, our goal. Is to make these DevOps, tooling decisions, easier for, you, that, way you can go back to doing what you love, writing. Code and bringing, your idea to life quickly. But. Moving fast shouldn't come at the expense of security. Or stability because. Without that any, speed, improvements, are useless.

Industry. Research shows that, high-performing. DevOps teams, achieve. Both faster. Releases, and better, stability, they. Deploy. 46. Times more, frequently, than their low-performing, peers, and. Their. Production, deployments, are seven, times less, likely to result in a degraded service so, think about that you get faster, releases, with better stability, and what. Explains, this behavior, well. Comes back to this combination of, end-to-end tooling. And the DevOps. Culture, at. Google. We've embraced and, adopted. DevOps. Cultural, principles, first. Use. Data, to guide your decisions, dig, into the code look, at logs look at traces, to understand, what's going on, how. The shared fate and collaboration. Between the, humans the developers, and operators because, we know we're more powerful when we work together. Choose. Transparency. Over secrecy. And siloing, everyone. Sees the same data, and information by. Integrating, observability. Into your apps and. Finally. Embrace. Blameless, post-mortems. To, encourage, continuous, improvement, within your teams we. Have to accept, and learn from our failure I mean this is software, development, right we're gonna have bugs, so. All of this is super, easy to say but. When you live it it's magic. This. Is how we, build trust between developers. And operators. We. Have to trust each other to make it happen for our users, so. I want to show you today, and and DevOps to lean to help you build. Deploy. And, monitor. Your apps quickly, and safely our. DevOps, tools consist of cloud. Source repositories. A single. Place to store manage and track your code. Cloud, build a fully. Managed, continuous. Integration and, delivery platform. That, lets you build and test your applications. In the cloud at any, scale, and, stackdriver. Management. Tools for developers, and operators, so. Let's, walk through a day in the life of a software developer and operator we're, gonna build an end an automated, pipeline, using, GCP, devops tools with. Well-known open, source tools like github and spinnaker. We're. Gonna go from finding. A problem and stackdriver to. Using code search functionality, and cloud source repositories. To find the code we're. Gonna fix the code we're, gonna commit the change to get hub, we're. Gonna kick, off a build using cloud build and then, we're going to deploy the gke using, spinnaker, and we're, gonna do all that in just 10 minutes. Morgan. Melody, awesome, to see you great to see you here hello, everybody, all right. So, let's, get started, so. This, is hipster, shop you may remember it from Tuesday's keynote, we're gonna purchase an item and. It is a lot slower than it was on Tuesday I think it you know its popularity, increased over the last few days so. We're gonna start our investigation looking. At stock driver trace which. Is part of our APM, suite our, APM, suite lets you do production debugging. Profiling. And tracing. On applications, running anywhere, and with. Google LED projects, like open census, we're making it incredibly, easy to, extract telemetry, from your applications. Whatever. Tools you decide to use. So. After, looking at some traces, we seen a couple of things first. For, a single customer request we, see many child requests, so we're just gonna batch those up it's gonna make it more efficient, but. The second, thing that we noticed here is that. The request to the catalog, service are incredibly, whoa very. Slow. This. One's about 2.6. Seconds just for one of them okay. Well we're gonna have to dig in on this so, we're gonna go from stackdriver trace, to stack driver profiler, which. Profiles, applications. Continually, with no appreciable overhead, we've. Been using profile, Google for many years and now our customers get, to use the same functionality. So. This icicle, graph it shows, you the resources, consumed, by. The function, on the horizontal, axis and the call hierarchy on the vertical access so, because things are slow we're gonna go check out CPU, time here and. What. We can see, looking, at profiler. Is that there's a really slow G RPC, get product method which is spending all of its time waiting, on this function parse. Catalog, I think it's taking what is it now. Yeah. It's, bad that's bad yeah that's. Very bad so. Let's go look at parse cattle the code for parse catalog so. This application code, is actually hosted on github and it's continuously. Mirrored, to cloud source repositories. Where, you can use function, functionality, like powerful code search and indexing so. We're gonna come here to cloud source repositories, we're gonna search for that function we saw in profiler, and there.

It Is. Real. Quick, so. Let's take a look at the blame layer, wait. Morgan, Morgan, you. Told me to slow it down. He's. Responsible, for this one so, we're gonna hop to github, and. Check. Out that there's a pull request that's, been created that fixes these performance, issues. And. It's. For Morgan yep, got, to fix my own bugs. Amazing. So. Highly not pull approve, the pull request from Morgan and this. Is gonna automatically. Trigger, a cloud. Build run which. You can see in the cloud build UI. All. Right, there. It is so. Zendesk. Lyft and over a thousand, customers use cloud build daily, to ship new functionality. So, as a reminder we're doing this all live the. Builds gonna take a couple minutes so let's cross our fingers on, this, one at. Google we create over 4 million builds, in the cloud every, day because, it's flexible it's secure, and. Scales. But. Right, now let's go back and look at the pull request that we just approved. We. Can see that cloud build also ran a test, build when the pull request was, created and we did this because we wanted to make sure that the pull request wasn't, broken. Now. All of this is being done through, our new cloud, build github, partnership, which we are excited to announce today. With. This partnership, developers. Are able to use cloud build CI capabilities. To, validate, changes, run, tests, and get, results right, within the github UI in a frictionless, way. So. It's super, easy to get started as long. As you have a github repo with, a docker file in the root directory. Github. Will automatically. Suggest cloud, build and its CI capabilities. You can see it here. And. You. Can get started running builds in just seconds. Cloud. Build makes high velocity, software, development, safe, easy and, secure. It. Really unleashes, your team's productivity, so. Let's check, the, build. It's. Almost, done almost done hopefully. This. Is where we need the DJ to be playing a little bit of music one. Of the nice things about cloud Bill does it show logs right in the console which you can see here and, so it's finishing the final step right now it's pushing it up to GC R and now we're done all right, live. Demo folks. So. All the tests passed we're. Good to go, but I keep mentioning security. So I want to show you cloud. Build will actually, do, security, scanning for you so. We're gonna kick off a scan and actually it's so, fast we, didn't find any vulnerability, it's we're good to deploy that and if, Morgan if you can show an example of maybe a past project with some yes you can see here we wouldn't deploy these images because we need to fix the issues first. All. Right so we've done our build we've done our tests, we check for vulnerabilities. Cloud. Build is now going to trigger a spinnaker, pipeline, to, the image google. Has been a core contributor, to the spinnaker open-source, project. This. Was created, to make multi, cloud, deployments. Safe, fast, and secure, so. Today we're gonna see automated.

Canary Analysis, which, reduces, the risk associated, with, deploying. To production. So. While we're performing the automated canary analysis, we're, gonna automatically, promote things because we don't have a lot of time today but. What you're gonna see this, is an actual pipeline, that's running and it has three stages in, the. First stage the canary build is pushed to a single instance of the app and some, traffic is routed to it in the. Second, phase we, would normally check, things like metrics. To, see how it's developing, but, we've kind, of automatically. Pushed this board because it'd take about 30 minutes for us to do, this task, and. In the third stage the build will promote the canary to, all the remaining production, instances, and, as you can see the. Different stages the, color turns, from blue to, green as, it progresses, through the canary analysis. So. I'm sure everyone here is familiar with automated. Canary, announced our canary analysis, itself but. Quite often when we do this it's manual and ad-hoc and therefore, it's prone to our own human bias and error with. Spinnaker, you can now automatically. Promote or fail, the canary. Minimizing. Your deployment, risk, while. Continuing, to release as fast as you possibly can, so. Assuming. That these chains just look good spinnaker, will automatically, push or rollback the canary. Using. Spinnaker, ways, was able to create over a thousand. Production, deliberate. Pipelines while, reducing their deployment, errors by almost 95%, that's, pretty amazing. So. The deployment, is. Almost. Done but. We want to show you one last thing which. Is the stack driver profiler, has this really great comparison. Feature which. Lets you look at CPU. Consumption, patterns, that change with inversions and so, you can see we're running, this on some older data but you can see how slow functions, will shrink. These are highlighted, in blue. So. Let's, go back to, the spinnaker pipeline. Just. A couple seconds left couple, seconds, left so, I can show you on this profiler view of the parts, catalog function that was taking up so much CPU time before it's now effectively, fallen to zero which is probably where it should be so, this comparison view lets us validate that on that second, build that we built even notice from older data that. We fixed that problem, so. Let's go take a look at spinnaker again. We'll. Go a couple more seconds, couple. More seconds. Now. This is rolling out on spinnaker, to I think five or six different instances on kubernetes so like melody mentioned we took a canary. Build so we took over one of those instances with the test build ran, some checks on it for the purpose of this demo we just made that always pass, once. That passes then we go, and deploy that to the remaining instances within kubernetes. Oh, it's. Green it's. Green live, demo folks. My. Fingers were crossed behind my back so let's. Go back to the hipster shop surf around it's. A lot faster a lot faster all, right there we go and an automated, tooling you see gcp, DevOps. Thanks, a lot Morgan thank, you awesome buddy. All. Right well we want to continue to collaborate on open source tools like basil and go and.

We Want to work closely together within the ecosystem but. Collaborating, in the ecosystem. Means being open and working well with the tools and technologies, that you already used today so. I would just want to take a second, and highlight two ways that, we're committed to be in the open cloud. Terraform. From hashey Corp is a leading technology in, writing, and creating infrastructure. As code we're. Committed, to making first-class. Support for products like terraform, and we have a dedicated. Team within, Google, to, support our partners like hashey Corp, our. Friends, at git lab have built a complete, open-source. DevOps stack we. Started working with them a couple months ago to integrate, with GC gke, and, it. Next, we're showing how you can use cloud build to scale your get lab builds, we're. Also helping to move get lab comm to run on top of GC p I believe. That through these collaborations. Within the ecosystem we are gonna make it better together. So. Today you saw stack, driver APM, tools including, trace and profiler. Profiler. Just went to beta on GC p and our, alpha participants, have said. They were saving, about 10%. Of their compute, bill with, a less, than an hour of work, snap. Was able to achieve some pretty incredible optimizations. You saw, a fast code search using. Cloud source repositories. And you. Saw cloud build the launch of cloud build, automatically. Run builds, and tasks, in the cloud at any scale. That. Included, vulnerability, scanning. Shopify. Uses, this feature to, scan over 6,000. Builds a day and three hundred and thirty thousand, images. In the registry, every. Day and that's just it's amazing, to think about that scale. Finally. You saw spinnaker. Help. With deployments. And have awesome, features like automated, canary analysis. Businesses. Like, HSBC. And snap. And, eBay. And PayPal use. Our DevOps tools every, day to ship new, features, and functionality. We. Hope you will try out these GCP tools today Google. Spent the last two, decades iterating. On developer, and operator tools. Every. Developer, and operator deserves. This level of automation, speed. And scale, we're. Even more excited about the things that we're working on that you're gonna see in the coming year let's. Hope you let's help you focus on the things that you love bringing. Your ideas to life so. Next up Kelsey Hightower is going to do a great demo, and talk through some of the tools so I mentioned today thanks. So much for your time and have an awesome conference. Oh. Wow. This is like a alternative. Tron universe, I've been using kubernetes. So long I finally, ended up in the container. Alright. So all. Week, we've been learning, about all these new technologies, sto Envoy. Kubernetes. Like, how do you put all these things together so, I. Work, at Google and when I think about Google Cloud I think about things all the way from my laptop of my Chromebook to, the Maps API and tools like dialog flow so, what I want to do is walk through some of these things on how I think about putting these things together now. I also want to show you some of the tricks that I do so, I'm going to start from the bottom and build, a weather application from. Zero starting. With the database all the way up to the endpoint now, we only have about 15 minutes we're gonna see if we can get this all done in time so, the first thing we want to do is kind of start with this example, so. Here's a terminal everyone like terminals, is that cool. Someone's. Like where's my GUI we'll. Get there, all. Right so what I want to do is maybe start with a few. Leather weather locations, so these are all of our regions in the US our newest region being Los Angeles California and the, goal is I want to take these names and get. Weather data now, here's a problem I can't, just give these names to the Weather Service I actually have to give them geo coordinates ok now. I have. A couple of options here I can actually use the Maps API. So, the Google, Cloud Maps platform, does provide a places API that, can trade those names in and get back some coordinates or something close and then. Once I have those I can actually send those to the weather gov, and actually, get back coordinates here's the thing I don't. Have a lot of time to write all of this code now once, you become a senior engineer, I'm going to teach you a couple of tricks now this is what all senior, engineers do you guys ready for the first. Protip, now. You got to write some code now this is what we do you.

Do, This if. You haven't heard of Stack Overflow. You. Have no clue what's going on all. Right so let's. Do this Google, Maps. Platform. Like. This is high-quality code, that you can find on this thing man trust me, and. We'll do weather and then. Okay, let's go over here alright how do we do this, Oh code. This. Looks legit. Alright. I'm. Not sure who this Terrence Ryan guy is but. You. Know. Now. This. Is the Internet so what you got to do is you got to scan for those security, vulnerabilities, all, right you gotta gotta. Make sure this stuff is legit hold on let's make sure we can grab this let's. See what we're gonna do here so let's grab this code come. On I don't care about cookies. It's. The Internet how dangerous, could it be. Where's. My copy and paste like why they trying to sell me stuff I'm trying to get my job done oh. Come. On. Like. The hardest part of this alright look at this ads alright, we, should be in business now. Alright. So let's grab this what you want to do is you want to scan for security, vulnerabilities as you go through this that. Looks legit, tuck. Into a database sure, why not, cool. Let's. Just grab that so. Here's the thing oh we. Didn't grab it. Kylie. I should be fired. This. Is why we use gifts, all. Right copy so, one thing is good. Programmers, copy. Great. Programmers, paste. All. Right so we got our code now the next thing we need to do is set up a database now I am the world's most, average DBA. So. For me I'm going to use a, hosted. Database service and I like to keep it open source so, my favorite database is Postgres, and what. I'm gonna do here listen, if you're a developer you need to set up the database there is no shame in clicking, the button click. Database. BAM, like a pro okay you've, got to own it so I, got this database set up and I created a user I actually do not know how to create a user so I usually click this button cuz I can't have to look it up all the time so once, I have the user create it I have, a little amv file so I can use natural tools, so the thing I like about this I can use my existing, tools, to, do my job so the first we're going to do here is we're supposed to get the environment, variables for, my connection, string in my environment and then, we're going to see if we can connect to the actual database and I can let's, make sure we don't have any tables set up so we're starting from scratch now. The next thing I need to do is actually set up the database schema all. Right so there's some sequel. List dope by the way if you don't know sequel, you should learn it. Okay. So P SQL and then we're just run this create database command oh we need to get our credentials so, PG that, env and then, let's do this and then. Come, on oh oh, we, got a database, schema and. Let's make sure we don't have any data in there all, right we're starting from scratch so. The next thing we're going to do is you're going to change into that directory where we've downloaded that, production, rady code from the internet and what. We're going to do is we're going to give it traditions, okay so this should be Cola jit this guy is a nice guy I'm pretty sure so, I'm going to put those credentials in my environment and then what we want to do now is just do something local so I bill code I like to test locally I do, not develop in the container I test, things on my local machine so. Here what I want to do is do a quick build and I'm. Using the new Vigo stuff so I can actually do. Development. Work without using a go path so for, me I'm writing everything can go linked and, then what I want to do is just build the application, oh and. It compiles, that's. Legit so. Let's try it let's see what we can do so remember the goal is gonna take locations. And we want to trade them for geo. Coordinates so we can then talk to the Weather Service so let's try that now so, we'll do weather data. All. Right so look at this is like science geo, coordinates okay all. Right and then we're getting the weather data so if everything is legit we should be able to do a query and, we have the weather data in our database all. Right so, we're in business. All. Right now that we got our weather data we need somewhere, to actually. Run our code and also, if you have the idea of running this command from your laptop in production. Every day that's, not how you do it you, might want to run this code in a cluster somewhere so, we need some infrastructure, so.

The Next thing you do is we. Need a kubernetes, cluster there's, no other place better, to run your code than, kubernetes, marketing. I've done my job all, right so. So. Here's. A kubernetes, cluster but there's something interesting here so there's a couple of tricks that I like to do here's. My kubernetes question one thing you can do that's really nice in TCP you, can actually have multiple node, pools so this is the tin, one 10.5. Cluster, I have, 13 nodes here but I actually have those notes split between two different. Node pools now the reason why I'm doing this is I'm, using their first general pool for my web apps my batch jobs, long-running, services, but, this other node pool I'm a big fan of Envoy so, you've been hearing a lot about iste ió but underneath sto this, is nice reverse proxy called envoy and I'm boy if you can think about it's like a cloud native replacement, for engine X or H a proxy it has all the things that I need to do things like rate limiting, and timeouts, and retries, but, I like to actually run envoy as my edge load, balancer, even, in GCP it's the same load balancer I run on my laptop so I want some parity so, what I'm doing is I'm actually running each of my Envoy. Instances, across these three nodes using what we call a daemon set and then the last thing I do to set up my infrastructure, I create, a load balancer that, points suggest those three machines so, if you think about it I have a network appliance running. Inside of my cluster no. Extra hops no IP tables straight, to Envoy then, directly to my apps so. With the infrastructure, in place we can start to think about deploying, our code so, let's go back to the command line quickly so, the next thing I want to do is I don't want to execute this from, my machine so. Here's a cron job every. Five minutes this is going to kick that code off for me automatically. So my goal is just to push this con job up but remember the price of admission to, kubernetes. Is a, container image here's, my second trick that I like to do I have, this saying don't, ship, build. Environments, ship artifacts, so, when I ship when I build my containers. I actually, just build my binaries, locally, upload. The artifact, and only. Have docker packaged it in an image with the scratch base image all, right so my image is roughly. Are about seven Meg's and then watch how fast the builds are if I do it this way so the first thing I'm going to do is build that application, locally take. That binary push. It up to Google, cloud. Build and cloud, builder is going to do all the work for me you'll notice another thing here I don't have a docker installed, on my machine I can. Just push my bills there and get all of my images so in just a few seconds we'll have a container image we're ready to go and then we can actually use that cron job in kubernetes we'll keep it running soku CTO applied, - f cron. Dot yeah mo, all. Right so you'll notice there will be no pods created, until we hit that five-minute mark but we'll start watching just to see when things come up, so. In about five minutes you'll see the cron job kick off and cooperage will keep a few of them around just in case I need to troubleshoot, alright. So the next thing we're going to do is when I move a little bit faster now is I. Need to put an API in front of this so, we're going to do here is say coop CTL apply F, and I, have this weather API service, and then. What I'm going to do here is just deploy that and that's. Gonna be a little bit faster because I want it right now I already have the image on the container registry it's, going to pull it into the cluster and it's going to start running now.

Here's The next cool thing that you can do in gke, we've. Done a lot of work to make pods first-class. Citizens. Inside, of Google Cloud so, you'll notice here every, pot and kubernetes, gets its own IP address now, the one thing that we do is we make those IPS native, using a technology we call IP aliases, and what IP a leases does it takes all of those container IPS and make, them first-class in my be PC so, my development boxes a is, a VM inside of my V PC so, what I should be able to do is actually, without any port. Forwarding, or extra hops I should, be able to make a call to my API servers using, the container IP and, look at that directly. Talking to the container using a very natural development flow, where I can work on another app why talking to apps inside of the cluster that's, pretty, dope if you didn't think so. Alright. So we're moving along here the next thing we want to do is get a web front-end again you kind of establish some patterns here build. It build a container push it up and describe the kubernetes what you want to do so here we'll build our weather front-end and then. We'll do this deployment now, here's where things get a little bit of interesting we're, not gonna run one copy we're gonna let kubernetes run three copies across that cluster for us now, once all of this is running, I have, Envoy in a pre-configured, IP and, a DNS address, that's pointing to this, particular back here so, what I'm gonna do now is pull this up and, we. Should be able to hit the weather back in Oh things, are looking good. Let's. See all, right everything. Seems to be working now here's the thing I've. Been the solo developer this whole time I know the front-end talks to the API server, and the API server, talks to the database but, what happens is someone else on your team needs, to check things out the. Nice thing is I've been using open census so again I don't actually have a service mesh but you can adopt all these technologies, a la carte so, if you want to add tracing to your application, you can bring in tools like the open census library, that allows you to decorate your function, calls or calls between apps and send, that data to tools, like Zipkin, or Jaeger in my, case I'm using Google, Cloud so we're going to send it's a stack driver trace I'm, gonna pop over here to the tracing console.

And. Then. We're going to find one of those recent traces so we can see one that just came in a roughly around now and, we'll click on it and. You can actually see the end-to-end traffic. Comes in to the front-end the API and, then API returns but not before talking to the database now here's a nice thing if, you trace this inside of your codebase and I click show events, I can, come down here and see the exact, sequel, query that's being executed at that particular hop, now. That gives you the ability to actually see what's going on and give people a lot more insight without checking, out the code. All. Right so, we got all the patterns in place. Infrastructure. Tracing. And now we need to think about something new now, we only have about five minutes left so we're gonna have to simulate this it's not when your boss shows up it's like hey we, need some new functionality, can, you get it done by, Friday all. Right so the task is on so, we have this infrastructure, we got this nice pattern set up and what, we want to do now start to think about something cool we can add in we got a web front-end but that's like so. 2017. You. Got to have a voice integration, with your app if you want to be cool if, you can't talk to your application, you're probably doing it wrong okay so. We want to do is think, about a tool called dialog flow you're. Not going to build your own natural language. Processing, system. From scratch some, of you are probably trying there's. A better way so, we're gonna use dialog flow so again let's walk through the pattern really quickly we're, going to write the application and. Then. We're going to build it and push it up now, remember, the container image is just a press of admission, so, we'll build this up now here's the other thing you, won't be the sole developer. Working. On this application forever. Maybe. There's someone else on the team that wants to contribute and maybe, they have no interest, in writing yamo files or using. Kubernetes from the command-line we've. Done a lot of work to make sure that kubernetes, works well, from the UI so.

We'll Come over here we'll, go to the kubernetes console, and we can click on workloads now. Notice here all the things I did on the command line are reflected, in the, gke console, now. If I, have a new person on the team that's not quite familiar with kubernetes, this could be their workflow we'll click deploy and, we've. Done something special here, we've integrated deeply. With GCP including. The Google container registry so, if I click on this I can, drop down and find that image that I just created it finds. All the right tags hit. Select and then, it fills out everything I need underneath let's. Give this a name, we'll. Call it the weather assistant. We. Have the right labels and if I have multiple clusters I can choose where should deploy now. If you want to see what's going on underneath the hood you can actually display that sweet, sweet yeah mo that, you love so much and then. We also give you a autoscaler to make sure you can respond to traffic changes and we'll. Hit deploy so. That's gonna do all the heavy lifting for me right through the UI and just like that it should be deployed we'll, switch over here and, we can see the weather assistant, is now, ready, serving, traffic, now. As next thing we're going to do is make sure that we're ready by checking the health check so. Here's the DNS name that I've assigned to, this particular app well. Hit it we, see everything is UPS working, and we can also see all my track is flowing, through envoy I should, be in good shape alright so we only have a few minutes left let's see if we can pull this last piece off so, I'm going to log into the dialogue flow console, this is also part of the Google cloud platform so. Dialogue Pro allows you to design. These voice integrations, with your application, so. We'll come here there's a couple things we need to do first. We need to make sure that our users have a good time with our application, so we're going to do is we're gonna define all this verified. Inputs and create. A few synonyms, just in case you want to say things like Los Angeles or Los, Angeles California USA.

To, Talk to the weather app the. Next thing we're going to do is describe their intent what. Does our user want to do so. Here, we want to have them check the temperature now, there's no way I'm going to define everything, or every, phrase our users would do so. Here, what I'm gonna do is give dialog flow a few training phrases and notice. How it's automatically, pulling out those regions, that match the entities that I described before so. We're ready to go now I want to send this to our web hub that we just got deployed, so. We'll come here we have a couple more steps we'll, go to fulfillment and in. Fulfillment. You'll see that, I'm just putting in that same URL that I had earlier that's pointing to my kubernetes. Stack all. Right you, have all kind of integrations, that you can do but, this time we just want to do the Google assistant, now. This whole time I've been using my, pixel. Book to do this demo and this. Is something I also think a part of the end-to-end experience at Google so, we want to test out this now I could use the simulator or I can, actually come down here and use, my laptop now, to. Prove that this is real we're going to look at the logs for the assistant, to make sure Kelsey isn't cheating. All right so coop CTL logs. Well, give it that container name and, we just chained the logs here so we can see it's listening but there's nothing there yet so if I hit the assistant, button on my pixel, book, we. Should be able to talk to this thing. Yeah. Whatever. All. Right talk to the talk, to the local weather service. Sure. Here's the test version of local weather. Hello. Kelsey. Hello. Looks. Like you have a pretty large crowd here, I hope, the demo gods are on your side I. Hope. So too, all. Right so let's give this a go. What's. The current temperature, in Los Angeles California. The. Current temperature, in Los Angeles California USA, is, 82, degrees Fahrenheit. Thank. You. Okay. I gotta admit that, was pretty dope. And. What, that you kind of saw the into end Google experience starting with my laptop all, the way to the data model I can use open source tools like cloud sequel, Postgres, then, I can actually use the industry standard, kubernetes. Backed by Cooper Naoki, ke then, I have my choice of load balancer so I can use for familiar tools like I'm for Engine X and then, I can use things like open census to add some visibility, to, my application. And visualize, all that and stackdriver trace and then, I can move on to try new ideas like adding voice integration, to my application, all within, the Google cloud platform and with.

That I'd like to introduce our next speaker Audra, who's going to come out and talk more about languages. Thank you. Hi. I'm, Asha, Annihilator. Programming, language's efforts on the Google cloud developer, advocacy scene developer. Advocacy, team I like. Working in developer relations at, Google because this was job let's engineers like myself, spend. Her time helping people build cool things and giving back to our tech communities. My. Community has given me a lot over the years and I'm really grateful that I get this chance to give back and I. Work on languages because I'm kind of a giant language, nerd. I'd. Love to talk to you about all the languages I enjoy using but they only gave me time to talk to you about two of them today so the, first language we're gonna talk about is. Go-go. Is growing, so much right now Taron, estimated, 1 million, Gophers, worldwide. But. More practically when I go to my local DevOps meetup go, is the language we talk about the most, folks. Are using it for lots of stuff like building micro services and improving their operations and, so. I'm like hey guys what's with the gum and it, gave me lots of reasons they liked it first. Off it's, the languages of the containers world almost. Everything Kelsey just showed was, written and go including. Docker and kubernetes and go. Is great for systems level programming because it's fast and it was built from the ground up with concurrency, support for. Those coming from languages, where concurrency was kind of tacked on later, having. Concurrency, was a first-class concept, is really delightful and. Folks. Also like the gos developer, friendly there. Are very few keywords and, it uses familiar syntax, and. Gophers rave about how easy it is to write how it has the speed of a compiled language and all the benefits of static typing and all. Of that leads, to faster performance reduced. QA time and fewer errors in production. Personally. My favorite thing about go is the. Welcoming, and supportive community. Of passionate Gophers, throughout the world. So. Today I want to talk about the, new go cloud project from Google. This. Library provides Gophers with cloud agnostic, abstractions, for services like relational, data stores runtime, configs, and blob storage. So. That's. A bunch of words but let's, say you have an application uses google cloud storage and storage on some other provider. Currently. You have to have two different branches in your code one for each provider you. Have to remember that maybe one provider uses the method list bucket contents, to see what's in a bucket and the other uses, something I don't know maybe describe bucket, and, it's, doing the same thing but I don't want to have to keep all that in my head I am lazy and, the. Go cloud project helps, with this by providing one set of objects, and methods that work with multiple cloud providers, you. Don't have to learn an API for each provider you. Can use one method and the go cloud project takes care of translating, it to the right method for that cloud, or. Maybe even multiple methods, and, the. Return data is consistent, between clouds, you don't have to worry about doing all sorts of cloud specific, type checking. The. Big thing though is that with the go cloud project your application, code doesn't, need to be aware of what backends you're using or even, if you're using multiple clouds. The. API provides, allows you to set your application. Code from, the configuration needed, to concept to the connect, to the cat out loud so, you can focus on the fun stuff like adding new features. Ino, from the advocacy team is with us today and he's gonna demonstrate the cloud front go cloud project. So. Ino, has an application. That. Uploads a photo to cloud storage on either GCP or AWS. And. Of, course we're gonna upload a picture of a gopher. So. Here's, the application code that runs that. And. You can see that in each method, we. Have a top-level, conditional, for choosing between the two clouds we have to support and.

Under. Each branch the code is similar but it's not entirely the same each, cloud is initialize a little differently and it, provides objects with different methods for handling the results you get back from storage, and I've. Written code like this but, I'm not particularly proud of it because it's really gross, and here's. The thing we. Can do a lot better. So. Here's, a version of the code that uses the go cloud project. The. First thing you're gonna see is that that top-level, conditional, is gone. What, we've done is we separated, the application, laundry from the storage configuration, and to. Make it really clear. Here's. The diff between the two versions. Adam. Promised yellow def here's. The diff. You. Can see that there's a lot less code in the version that uses the go cloud library and, even better the. Code that uses the library has. A better design because we've separated the two concerns better, engineering practices, lead to more maintainable code thank. You you know. If. You've ever had to support multiple clouds in a single application you know that using a four library like the go cloud project is a much easier way to do things and it encourages, good engineering practice, but. Library authors can also build on top of the go cloud project to, ensure that folks on any provider, can, use their library, our. Hope is that this project will foster an ecosystem of libraries, built, with multi cloud portability in mind. The. Go cloud project is of course open source currently. Supports AWS, and GCP but. More clouds are coming soon and of, course, contributions. Welcome. So. The second language I want to talk about today is JavaScript. JavaScript. Was the most popular language, on github last, year there. Were so, many more JavaScript commits, as there were for any other language it's really remarkable and, I. Know I've written a bunch of JavaScript in my career and I'm assuming most of you have as well. Google. Has been a champion of the JavaScript, language for a really long time some. Of Google's JavaScript projects, include angular amp. Polymer. And the v8 engine it's at the heart of nodejs. And. Javascript. Is one of those fantastic languages. That you can use just about anywhere for just about anything, if. You told me in 1995. That I'd be writing server-side, JavaScript, I wouldn't have believed you. But. The async features is something like nodejs help you build fast scalable, web, back applet that web application backends. And node.js, is also the default language for functions as a service but. It can be used for non web. Applications, too like robotics, and. Javascript is as popular as ever from building rich client-side. Interactive, experiences. So. If you go out and learn javascript there really isn't much you can't do. The. Community has been asking for nodejs on App Engine standard, and we're happy to say that it's in beta, no. Date can be used just like your other App Engine language and you can use most of your favorite and PM modules, and if. You don't know App. Engine is GCPs platform as a service product it's, been around for a long time we just celebrated the 10th anniversary and it. All of, the fans of App Engine like, the ease-of-use auto-scaling. Security, and how, well it integrates with all the other GCP products like datastore, and. With. This nodejs, now runs on every single compute, that, GCP offers I told. You you can do anything with known. So. It's, really important, to me and all, of my friends over there dressed in red on the cloud developer relations team. The. Google is an active, participant, and a good citizen in our developer communities. After. All the best tools are written by developers who understand, a community's, needs and idiosyncrasies, and. We. Like to put our code where our mouth is and we.

Do That by contributing to improving the languages and surrounding, ecosystems. So. That's why Google cloud is a platinum sponsor of the node foundation, and, it's also why there are many Googlers participating. In node in. A variety of roles giving. Their time and expertise, to help guide the future of the language. So. They'd only give me a couple of minutes today and so I was only able to talk about a few of the popular languages, and, even then I only, focused, on their server-side uses, but. Client, mobile development are important and growing too so. Next you're going to hear from Sam and Francis and they're gonna talk about firebase, development, and development with gzp products for mobile. Thanks, aha our. Mission for firebase is to help mobile, app team succeed, by providing you a platform, to help solve the key problems, across, the lifecycle of your app from. Building your app to, improving your app quality to, growing your business. We've. Come a long way since two, years ago when we expanded, firebase, from a real-time database to a broad app development, platform, and it's, so exciting to see there are now over 1.2. Million apps actively. Using firebase, every. Month including. Many of the top Android, and iOS apps like, the New York Times box. And Pandora, now. As you've heard earlier Google. Cloud offers, a wide variety of products, to help you build secure, and scalable, infrastructure. So. When it comes time to build your mobile app for your business, firebase. Integrates, smoothly with GCP to help you build better and, faster. To. Show you how easy it is to build an app with firebase I like to welcome one of my teammates Sam, to, join us. Hello. Thank, You Francis, so. One. Of the first problems that most mobile app developers, face is, finding a way to store and sync their data in the cloud ideally. Without managing, any infrastructure, cloud. Firestore was built to solve this problem on every, platform that you work on it's. A fully managed no sequel database built on Google's global infrastructure, now. Let's say I'm the developer of a financial services app called a next wallet my. Users have been asking me for a long time to add a mobile app to complement, the web app firebase. Helps you build apps on Android iOS, and the web but today I'm just gonna focus on building an Android app, so.

Here. Are in the firebase console, you can see I've already got all my data in cloud fire store this, is a list of my recent transactions, I went to Sam's place and I spent about $45. Moving. Over to Android, studio I want. To load all of my transactions, here, I won't display the users recent transactions, so, let's do that here. Okay. So what I'm doing here is I'm getting the ID of the currently signed in user and then, you can see here I'm forming a query using, the firestore, Android SDK we're. Asking for the users latest 50 transactions. Ordered, by time you'll. Also notice I can query this data directly from my app without building any API, servers, or proxies, I'm accessing. The remote data as if it was in a local database, so. If. I run this in the emulator. You. Can see that all of the transactions, from the console are now displayed, an app and this, connection is completely real-time, by default so. If I go to the console and change, the name on one of the places change, Sam's. Place to Sam's awesome. Place it, updated in the app before we could even switch screens. So. With. Barely any code my mobile app is showing the same data as my web app in real time. Now. If you're used to accessing. A database via REST API you. May have found it strange I did not include any tokens, or headers in my request, that's. Because cloud firestore, automatically, detects, that I'm signed in with firebase authentication and, includes. That all state transparently, so every, request from my app to Cloud firestore, is checked by firebase rules which. Is a declarative, system, for controlling access to firebase resources, so, let's see the rules that are keeping this app safe, so. These are my custom security rules here. I'm making sure that users can only read and write their own data and here. I've locked down rights to transactional, information to prevent any sort of spoofing it's. Really, powerful to have direct client access to your data without, running any authentication. Servers or API proxies, it. Completely, streamlines, your development process and even more importantly it reduces, the surface for. Bugs or for vulnerabilities. Now. With sensitive applications like, this finance app you. Can't do everything on the client-side if, we need to add some, critical business logic I'll want to run it in a trusted location, so. The newest feature in my app is that users, can pay their bills and unlike. Viewing recent transactions, this, is a really privileged, operation, so. Moving, here I'll. Write a server list nodejs function, to pay a bill from the users bank account and then, market has paid and I'll deploy this whole thing to Club functions, you. Can see here that I've got a function it's called pay bill and, after.

The Bill is paid it marks the paid state to true in fire store, now. In the. Android, app. We. Can simply call this function by its name pay bill the same name I defined and we can pass in the ID of the bill we want to pay after. The function runs, I'll get this callback here, with, the result just. Like with the data called a cloud fire store our authentication, state is passed seamlessly, in the request so. Users can only access their own bills so. Now let's use it let's, pay a bill. Hit. This here and what just happened was the cloud function, ran and made the update which, was detected, by the client, in real time so. In just the last few minutes we set up a secure scalable, on real-time connection to our data and also, deployed a cloud function to perform trusted, actions which, is pretty impressive right. Once. Your once. Your app is billed you'll, likely be looking to improve your app stability, and performance since. The first-impression gap makes is crucial. To the long-term success of your business I've. Seen through Google Play that 42%. Of one-star reviews, mentioned. Instability. Or bugs. Whereas. 73%. Of five-star, reviews mentioned. Design, usability. Or speed, so. Having a stable and speedy app is essential. To your success so. Let's switch it back over to Sam to take a look some of the ways that firebase helps you improve your app quality. So. As, a mobile developer I have to release my code into the wild and it could end up on any kind of device or any network I need, to know how it's performing and, more importantly I need to know when it's crashing, if, I wait to hear about crashes, and bad Play Store reviews that's way too late so. All I have to do to track crashes in this app is add, the single line dependency, on crashlytics, I don't have to write a line, of real Android, code now. Let's go into the firebase console, and see what crashes are happening for my users, so. Here I can see that I had a crash but, I don't know why yet. Let's take a look at the trace I can. See that it was a fatal exception I can see the exact line where it occurred I can.

Also See some information about the device where it happened, and the environment, through. An integration with slack I could get new crashes like this sent to me and my team in real time now. Here in the logs panel, I can. See we have a list of analytics events that, preceded the crash, event. Logging from Google Analytics to crash Lois's crashlytics. Is automatic, and it provides really helpful context, it's. Now I have a ton of information on what the user is doing to cause the crash which, allows me to debug my app more efficiently I could, spend more of my time and my team's resources, on building features for my users and. Now. That we can measure if the app is stable I still. Need to directly measure the goals of my business so, for, the new build a future I want to make sure that users are able to find the tab in the app pay. The bill and that it all runs successfully. Firebase. Provides free unlimited mobile analytics and, automatically, measures common events in your app but, I want to add custom analytics for each bill pay event for. The attempt success and the failure so I can track user behavior, here so. If we move back into Android studio in, the. Bill paid flow I'll add calls. Around the common parts, of the flow so you're. All logged the attempt. Here. All logged in succeeds, and. Here, all logged when it fails you. Can, see that for each event I just pick a name and then I pass a bundle, of parameters. Now. That the codes running if I go back into the app and pay, a bill those. Events will fire. Heading. Back into the console I can see these events coming in in real time. By. Defining custom events you can measure the things that uniquely matter to your business, analytics. Is the backbone of firebase and the foundation, for a successful business. Having. The right analytics, is the first step to ensure your users, are happy and your, app is doing the job you want it to do but. Once you have the data you want to put it to work for your business with. Firebase, you can export, your analytics, data into, bigquery join. It with other data sources and perform, deeper analysis. You, can also take action right, directly, from the firebase console, and it comes to the built in a/b testing, framework so, for example you can send push notifications or. Test different configurations, of your app without, having to redeploy to the App Store or Google Play, with. A be testing, you can define different variants. Set, the primary and secondary goals, for your experiments, and the, system will automatically, do the hard work for you to help you find the optimal, variant and. Once you have the winner you, can roll that experience, out to the rest of your user base without, another app deployment. Firebase. Also helps you take targeted, action by leveraging machine learning, now. It's one thing to take action based on past user, behavior, but. With firebase, predictions, you, can apply ml to your analytics, data to, take targeted actions, based on predicted. Future, behavior so. For example you, can send special offers to users poor likely, to leave your app or in, Sam's example, he can send push notifications, targeted. To users who are likely to miss a bill payments, so. Predictions, was the first step that we took to bring the power of Google's ml to work for you two. Months ago we, took our second step with, the release of ml, kits in public, beta with. Ml kits we're bringing together machine, learning technologies, from across, Google, and, making that available to every mobile developer, working on Android, and iOS. Ml. Kit comes with five AP eyes out of the box like, image labeling, and text recognition and you, can run these ap eyes on device, for low latency processing, or in. The cloud for, higher levels of accuracy, and if. You have more sophisticated, needs you, can upload your own custom, tensorflow, lite model and serve that through Google's, global infrastructure. Your. App can dynamically, retrieve, these models and evaluate, them on device so, that means you don't need to bundle the model with your app binary, and you. Can update it without pushing it and app updates and, since. Ml kit is available through firebase, it, makes it easy for you to take advantage of the broader firebase, platform, for. Example. Experimenting. With different custom models using a be testing, or storing. Your bitch label into cloud firestore, or, understanding. The impact on user engagement with, Google Analytics we. Are so excited about the possibilities, that machine, learning unlocks whether, it's the supercharger. Growth or build amazing, user experiences, we, want to harness Google, this advances, to help you build and grow, apps and with. That I like to hand it over to you Fang to, talk more about cloudy I thank. You.

Thank. You Francis hi. Everyone my, name is you fan glow and I'm a developer advocate here at Google cloud, over. The past four years that, I've been at Google machine. Learning, has taken on a greater and greater prominence. In both, Eric's internal, usage as well as, in our external offerings, today. I want, to provide you with a users guide to thinking, about machine. Learning problems we'll, talk about how to find the right tools for your task depending. On your needs and we'll, discuss four groups of tools, and workflows that can be used to drive insights, to, build your applications, machine. Learning api's, data. Processing, model. Building and scaling. Up let's, start with api's say. You have some video or sound data now you want to annotate with labels and transcripts, historically. This would have been a challenging, and manual, task the. Video, intelligence, API allows, you to turn a video into, a set of labels and scenes, to, build understanding while. The speech API can, turn sound into. Text, this. Means you can now focus on doing, something useful with, your newly tagged, audio and video files instead. Of getting stuck on how to label and transcribe, it all, additionally. There, is the video API the natural, language API and the Translate API which. Trend handle, images text. And the many la

2018-08-03

Show video