Developing, Deploying, and Monitoring in The Cloud
Developing, Deploying, and Monitoring in The Cloud
Deployment: Infrastructure as
Code
Monitoring: Proactive
instrumentation
Lab
Resources
Cloud Source Repositories
● Fully featured Git repositories hosted on
Google Cloud.
With Cloud Source Repositories, you can have any number of private Git repositories,
which allows you to organize the code associated with your cloud project in whatever
way works best for you. Google Cloud diagnostics tools like Debugger and Error
Reporting can use the code from your Git repositories to let you track down issues to
specific errors in your deployed code without slowing down your users. If you’ve
already got your code in GitHub or BitBucket repositories, you can bring that into your
cloud project and use it just like any other repository, including browsing and
diagnostics.
Cloud Functions
● Create single-purpose functions that
respond to events without a server or
runtime.
You are billed, to the nearest 100 milliseconds, only while your code is running.
Cloud Events are things that happen in your cloud environment. These might be
things like changes to data in a database, files added to a storage system, or a new
virtual machine instance being created.
Events occur whether or not you choose to respond to them. Creating a response to
an event is done with a trigger. A trigger is a declaration that you are interested in a
certain event or set of events. You create triggers to capture events and act on them.
Agenda
Development in the Cloud
Deployment: Infrastructure as
Code
Monitoring: Proactive
instrumentation
Lab
Resources
Cloud Deployment Manager
● Infrastructure management service.
Setting up your environment in Google Cloud can entail many steps: setting up
compute, network, and storage resources and keeping track of their configurations.
You can do it all by hand if you want to, taking an imperative approach. But it is more
efficient to use a template. That means a specification of what the environment should
look like, declarative rather than imperative.
Google Cloud provides Deployment Manager to let do just that. It’s an infrastructure
management service that automates the creation and management of your Google
Cloud resources for you.
To use Deployment Manager, you create a template file, using either the YAML
markup language or Python, that describes what you want the components of your
environment to look like. Then you give the template to Deployment Manager, which
figures out and does the actions needed to create the environment your template
describes. If you need to change your environment, edit your template, and then tell
Deployment Manager to update the environment to match the change.
Here’s a tip: you can store and version-control your Deployment Manager templates
in Cloud Source Repositories.
Agenda
Development in the Cloud
Deployment: Infrastructure as
Code
Monitoring: Proactive
instrumentation
Lab
Resources
Google Cloud's operations suite
Operations
suite
Cloud
Cloud Trace Cloud Profiler
Debugger
Google Cloud's operations suite gives you access to many different kinds of signals
from your infrastructure platforms, virtual machines, containers, middleware, and
application tier: logs, metrics, traces. It gives you insight into your application’s health,
performance, and availability, so if issues occur you can fix them faster.
Cloud Monitoring
Flexible dashboards and rich visualization tools help you to identify emergent issues.
Anomaly reporting, pattern detection, and exhaustion prediction provide insights into
longer-term trends that may require attention.
Advanced alerting capabilities, including the rate of change, cluster aggregation, and
multi-condition policies, help ensure you are notified when critical issues occur while
reducing the likelihood of false positives.
Integrated uptime monitoring and health checks ensure quick notification of failures.
It’s possible to drill down from alerts to dashboards to logs and traces in order to
identify the root cause of problems quickly.
Cloud Logging
Cloud Logging is a fully integrated solution that works seamlessly with Cloud
Monitoring, Trace, Error Reporting, and Debugger. The integration allows users to
navigate between incidents, charts, traces, errors, and logs. This helps users quickly
find the root causes of issues in their system and applications.
Logging is built to scale and works well at sub-second ingestion latency at terabytes
per second. Logging is a fully managed solution that takes away the overhead of
deploying or managing a cluster, thus allowing users to focus their energy on
innovation and building a product.
Logging provides a central place for all your logs. You can also configure Logging to
export logs to other systems automatically.
Logging allows you to analyze high-volume application and system logs in real time.
Advanced log analysis can be achieved by combining the power of the operations
suite with the data and analytics products of Google Cloud. For example, you can
create powerful real-time metrics from the log data and analyze log data in real time in
BigQuery.
Error Reporting
Error Reporting allows you to identify and understand application errors through
real-time exception monitoring and alerting.
Error Reporting allows you to see your application’s top errors in a dashboard.
Real production problems can be hidden in mountains of data. Error Reporting helps
you see problems through the noise by constantly analyzing exceptions and
intelligently aggregating them into meaningful groups tailored to your programming
language and framework.
Error Reporting is constantly watching your service and instantly alerts you when a
new application error cannot be grouped with existing ones. Directly jump from a
notification to the details of the new error.
The exception stack trace parser is able to process Go, Java, .NET, Node.js, PHP,
Python, and Ruby. You can also use Google’s client libraries and REST APIs to send
errors with Cloud Logging.
Cloud Trace
Cloud Trace is a distributed tracing system that collects latency data from applications
and displays it in the Cloud Console.
Using Cloud Trace, you can inspect detailed latency information for a single request
or view aggregate latency for your entire application. You can quickly find where
bottlenecks are occurring and more quickly identify their root cause.
The language-specific SDKs of Trace can analyze projects running on VMs. The
Trace SDK is currently available for Java, Node.js, Ruby, and Go, and the Trace API
can be used to submit and retrieve trace data from any source. A Zipkin collector is
also available, which allows Zipkin tracers to submit data to Trace. Cloud Trace works
out-of-the-box on many Google Cloud services like App Engine.
Cloud Debugger
Cloud Debugger is a feature of Google Cloud that lets you inspect the state of a
running application in real time, without stopping or slowing it down.
Debugger can be used with production applications. With a few mouse clicks, you can
take a snapshot of your running application state or inject a new logging statement. A
snapshot captures the call stack and variables at a specific code location the first time
any instance executes that code. The injected log point behaves as if it were part of
the deployed code writing the log messages to the same log stream.
Debugger is easier to use when source code is available. It knows how to display the
correct version of the source code when a version control system is used, such as
Cloud Source Repositories, GitHub, Bitbucket, or GitLab.
Users can easily collaborate with other team members by sharing their debug
session. Sharing a debug session is as easy as sending the Console URL.
Debugger is integrated into existing developer workflows. Users can launch Debugger
and take snapshots directly from Cloud Logging, Error Reporting, dashboards,
integrated development environments, and the gcloud command-line interface.
Cloud Profiler
Poorly performing code increases the latency and cost of applications and web
services every day. Cloud Profiler continuously analyzes the performance of CPU or
memory-intensive functions executed across an application.
Deployment: Infrastructure as
Code
Monitoring: Proactive
instrumentation
Lab
Resources
Lab Intro
Getting Started with Deployment
Manager and Cloud Monitoring
Duration: 45 minutes
Deployment: Infrastructure as
Code
Monitoring: Proactive
instrumentation
Lab
Resources
Resources
Cloud Source Repositories https://cloud.google.com/source-repositories/docs/
Deployment Manager https://cloud.google.com/deployment-manager/docs/
Google Cloud operations suite https://cloud.google.com/stackdriver/docs/