Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code Build Run Observe on GCP

tiemma
November 02, 2018

Code Build Run Observe on GCP

A guide on taking code to production on GCP

tiemma

November 02, 2018
Tweet

More Decks by tiemma

Other Decks in Programming

Transcript

  1. I’m Bakare Emmanuel PS: I recycle this page on all

    my slides • DevOps Engineer @ DEIMOS ML • Volunteer Bootcamp Facilitator @Andela • DevOps and Linux Fan Boy • You can follow me on twitter @TiemmaBakare • General Weird Guy with some humour • People call me Bakman, so there’s also that! @ T i e m m a B a k a r e 2
  2. Things to note in this session • This is going

    to be a very practical one, I’d rather show than tell • All demo’s use the Node SDK, you can use Stackdriver in other languages using their own respective SDKs • If you aren’t used to Javascript, don’t worry. You can use it other languages • For those who don’t code, I’d explain the concepts to the best of my abilities.
  3. Things to note in this session • We'd be covering

    various tools for writing, deploying , running and monitoring our applications. • I'd do my best to cover on the building and run parts using Cloud Build and various Compute resources on Google Cloud • Lastly, I'd try to be funny. • I know my Mother says I'm not funny but what can a man do.
  4. What is StackDriver? Stackdriver is a logging and metrics tool

    which aims to help you analyze the logs your application develops to help you find and diagnose possible performance / error issues. If you want to see the full documented services, check here: https://cloud.google.com/stackdriver/docs/
  5. You can set this up to manage the features there

    likewise Monitoring Alerting Dashboard Monitoring Uptime Checks
  6. Error Reporting Error reporting involves what it says. We want

    to send errors that occurs in our application to Stackdriver so that they can be analyzed much better. To put this into perspective, how do you know when your data has nearly finished without you checking? That’s what this does, it helps you with gathering things that broke in your application so that you can see it after it happened and take action.
  7. Tracing In software engineering terms, Tracing involves a specialized use

    of logging to record information about a program's execution. It tells us things like how long the request took, what other APIs were called during its run, how long it took to render the template and all that. It’s like debugging API calls using a traceroute which is where I’m heading to.
  8. Stackdriver Logging By default, Stackdriver polls logs from all your

    server instances (App Engine, Compute Engine, Kubernetes Engine etc) and stores them in its logging ingestion system. Sometimes, we might have applications that don’t necessarily run on Google Cloud, so how we fix that? So we use the SDK as before!
  9. Never consider your print lines as logs When it comes

    down to logging, there’s a format to logging that’s very acceptable and this is always implemented by a library for consistency. Never take your print lines to standard output / console as logs, it’s very wrong and makes it hard to know what is an error versus an info. Always use a logging library, for this one I’m using Bunyan.
  10. References and Documentation 34 Stackdriver Dashboard [Requires a gCloud account]

    https://app.google.stackdriver.com Stackdriver Logging https://cloud.google.com/logging/docs Stackdriver Error Reporting https://cloud.google.com/error-reporting/ docs Stackdriver Debugger https://cloud.google.com/debugger/docs Stackdriver Tracer https://cloud.google.com/trace/docs Stackdriver Profiler [Couldn’t cover this due to time but it’s worth a check] https://cloud.google.com/profiler/docs
  11. Q&A Ask me anything! For example, what is your favorite

    food? Or preferably, what is your account number? Location