0% found this document useful (0 votes)
126 views19 pages

Developing, Deploying, and Monitoring in The Cloud

The document discusses various Google Cloud services for development, deployment, and monitoring of applications in the cloud. It describes Cloud Source Repositories for collaborative development using Git, Cloud Functions for serverless functions, Cloud Deployment Manager for infrastructure as code using templates, and services within Google Cloud's operations suite like Cloud Monitoring, Cloud Logging, Error Reporting, Cloud Trace, and Cloud Debugger to monitor application health and performance and troubleshoot issues.

Uploaded by

Giuseppe Tritto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views19 pages

Developing, Deploying, and Monitoring in The Cloud

The document discusses various Google Cloud services for development, deployment, and monitoring of applications in the cloud. It describes Cloud Source Repositories for collaborative development using Git, Cloud Functions for serverless functions, Cloud Deployment Manager for infrastructure as code using templates, and services within Google Cloud's operations suite like Cloud Monitoring, Cloud Logging, Error Reporting, Cloud Trace, and Cloud Debugger to monitor application health and performance and troubleshoot issues.

Uploaded by

Giuseppe Tritto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Developing, Deploying,

and Monitoring in the


Cloud
Agenda
Development in the Cloud

Deployment: Infrastructure as
Code
Monitoring: Proactive
instrumentation
Lab
Resources
Cloud Source Repositories
● Fully featured Git repositories hosted on
Google Cloud.

● Supports collaborative development of


cloud apps.

● Includes integration with Cloud Debugger.

Cloud Source Repositories provides Git version control to support collaborative


development of any application or service, including those that run on App Engine and
Compute Engine. If you are using Cloud Debugger, you can use Cloud Source
Repositories and related tools to view debugging information alongside your code
during application runtime. Cloud Source Repositories also provides a source viewer
that you can use to browse and view repository files from within the Cloud Console.

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.

○ Event examples: New instance


created, file added to Cloud Storage.

● Written in Javascript (Node.js), Python or


Go; execute in managed Node.js
environment on Google Cloud.

Cloud Functions is a lightweight, event-based, asynchronous compute solution that


allows you to create small, single-purpose functions that respond to cloud events
without the need to manage a server or a runtime environment. You can use these
functions to construct applications from bite-sized business logic. You can also use
Cloud Functions to connect and extend cloud services.

You are billed, to the nearest 100 milliseconds, only while your code is running.

Cloud Functions are written in Javascript (Node.js), Python or Go and execute in a


managed Node.js environment on Google Cloud. Events from Cloud Storage and
Pub/Sub can trigger Cloud Functions asynchronously, or you can use HTTP
invocation for synchronous execution.

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.

● Create a .yaml template describing your


environment and use Deployment Manager to
create resources.

● Provides repeatable deployments.

Cloud Deployment Manager is an infrastructure management service that automates


the creation and management of your Google Cloud resources for you.

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

Cloud Cloud Error


Monitoring Logging Reporting

Operations
suite

Cloud
Cloud Trace Cloud Profiler
Debugger

Google Cloud's operations suite provides powerful monitoring, logging, and


diagnostics for apps on Google Cloud. It equips you with insight into the health,
performance, and availability of cloud-powered apps, enabling you to find and fix
issues faster.

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

Identify trends, prevent issues Reduce monitoring overhead

Improve signal-to-noise Fix problems faster

Let’s start by looking at Cloud Monitoring, a full-stack monitoring service that


discovers and monitors cloud resources automatically.

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.

Monitoring provides a single integrated service for metrics, dashboards, uptime


monitoring, and alerting. This means you spend less time maintaining disparate
systems.

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

Seamlessly resolve issues Scalable and fully managed

All cloud logs in one place Real-time insights

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

Quickly understand errors Automatic and real-time

Instant error notification Popular languages

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

Find performance bottlenecks Fast, automatic issue detection

Broad platform support

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.

Trace continuously gathers and analyzes data from applications to automatically


identify changes to an application's performance. These latency distributions,
available through the Analysis Reports feature, can be compared over time or
versions, and Trace will automatically generate an alert if it detects a significant shift
in an application's latency profile.

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

Debug in production Multiple source options

Collaborate while debugging Use your workflows

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

Low-impact production profiling Broad platform support

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.

While it’s possible to measure code performance in development environments, the


results generally don’t map well to what’s happening in production. Many production
profiling techniques either slow down code execution or can only inspect a small
subset of a codebase. Profiler uses statistical techniques and extremely low-impact
instrumentation that runs across all production application instances to provide a
complete picture of an application’s performance without slowing it down.

Profiler allows developers to analyze applications running anywhere, including Google


Cloud, other cloud platforms, or on-premises, with support for Java, Go, Node.js, and
Python.
Agenda
Development in the Cloud

Deployment: Infrastructure as
Code
Monitoring: Proactive
instrumentation
Lab
Resources
Lab Intro
Getting Started with Deployment
Manager and Cloud Monitoring

Duration: 45 minutes

The objectives for this lab are for you to:


● Create a Deployment Manager deployment.
● Update a Deployment Manager deployment.
● View the load on a VM instance using Cloud Monitoring.
Agenda
Development in the Cloud

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/

You might also like