ALEXIS MOUSSINE-POUCHKINE: Did you
know that Google offers plugins for VS code and IntelliJ,
and that Google Cloud comes with a powerful build tool?
In this video, we'll cover developing and building
with GCP tools from IDEs to continuous integration
and continuous delivery, so stick around.
[THEME MUSIC]
If you've missed the earlier episode
on developer and management tools,
check out the first link in the description,
as it discusses the Google Cloud SDK and tools such as Cloud
Shell and G Cloud.
For those of you building applications
deployed as containers on Kubernetes, such as on GKE
or to Cloud Run, and would like to spend more time writing code
instead of YAML config files, then
you should really try Google Cloud Code.
Cloud Code is a set of ID extensions
for VS code and IntelliJ that let you rapidly iterate, debug,
and deploy code to contain a runtime such as GKE,
but also to other Kubernetes implementations.
Under the covers, Cloud Code uses
popular tools such as Skaffold, Minikube, Jib,
and, obviously, Kubectl, to provide you
with continuous feedback right inside your code editor.
It also supports remote debugging of your apps
while leveraging building IDE debugging features.
As you get started with Cloud Code,
you should try the built-in template.
That will help you create a Kubernetes application that
just works in seconds, and then deploy it
to a Kubernetes cluster.
[? Oneclick, ?] but also continuous deployment
to your local Kubernetes cluster, is supported via
Skaffold for a tight development interloop.
You can also decide to set up your application that
runs on Cloud Run using a stored template,
deploying your app to Cloud Run, and looking
at the status of your live applications resources.
Cloud Code will let you easily switch between different
build profiles to build containers
using your local Docker installation
or using tools like Cloud Build, which
we'll talk about in a second.
You can also edit config files with auto completion
and linting for Kubernetes, all with inline documentation.
With this feature, you may actually start to like YAML.
Generating diffs between local and remote config files
is another neat feature provided by the tool.
Cloud Code lets you view and stream
logs from any of your deployments, pods,
and containers, as well as inspect a cluster's resources
with a built-in Kubernetes explorer.
This is not only about container patched apps,
but also about making the numerous Google Cloud
libraries available to you as a developer straight in the IDE.
It is also about supporting all types of development artifacts
without having to build the container images,
thanks to growing support for build packs.
Building and deploying straight from your development
environment can be very productive,
but it can also feel a bit magical.
It is also not very well aligned with DevOps best practices,
since it does allow for automation
and can lead to errors due to different build environments.
In order to decouple the build and deploy process
from your development tools, GCP offers Cloud Build,
a fully managed CI/CD platform that
executes your builds on Google Cloud platform infrastructure.
Cloud Build typically requires a build config file,
a set of instructions expressed in JSON or YAML
describing what tasks need to be performed,
or simply a Docker file.
You can configure builds to fetch dependencies,
to run unit tests, static analysis, and integration
tasks.
You can also create artifacts with build
tools such as Docker, Gradle, Maven, and Bazel.
And finally, you can also deploy these artifacts
to your preferred runtime or artifact repository.
Cloud Build executes your build as a series of steps,
each executed in a Docker container that
is provided by Cloud Build, by the community, or by yourself.
Google provides and maintains pre-built images
called builders that you can reference in your build
steps to execute your tasks.
Builds are kicked off using the G Cloud CLI, the Cloud Build
API, or via some pre-configured source
repository hosted on GitHub or a Bitbucket.
In fact, Cloud Build provides a GitHub app,
which uses GitHub events to automatically invoke
builds on GitHub pushes and pull requests, and view your build
results on GitHub and cloud console,
all with seamless authentication.
As part of a build, container images
can be created and pushed to Google Cloud registry,
and applications can be continuously deployed
to Compute Engine, to Kubernetes engine, to Cloud Functions,
or to Cloud Run.
Cloud Build does not need to be about app source code.
Cloud Build can be used in conjunction
with infra as code tools, such as HashiCorp's Terraform
or with third party developer tools
such as JFrog's Artifactory.
Now that you have a truly versatile build and CI/CD
tool, and plugins for popular IDEs, what are you waiting for?
I really can't wait to see what you code and build with JCB.
If you like this video, please like, subscribe, comment,
share, and look forward to more Google Cloud Essentials videos.
[THEME MUSIC]