Continuous Deployment First Lesson

Coalmont App Dev Journey

Nickantony Quach
Jan 15 · 5 min read

AppDev | Edit | About | Tools | Contact us

A | What’s Software Build?

Software Build in simpler term is an activity to translate the human-readable source code into the efficient executable program.

Basically, Build is the process of creating the application program for a software release, by taking all the relevant source code files and compiling them and then creating a build artifacts, such as binaries or executable program, etc. | Tell me more

B | What’s Software Deployment?

Software deployment is all of the activities that make a software system available for use.

The general deployment process consists of several interrelated activities with possible transitions between them. These activities can occur at the producer side or at the consumer side or both. Because every software system is unique, the precise processes or procedures within each activity can hardly be defined. Therefore, “deployment” should be interpreted as a general process that has to be customized according to specific requirements or characteristics. | Tell me more

C | What’s Continuous Delivery?

Continuous delivery is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time and, when releasing the software, doing so manually. It aims at building, testing, and releasing software with greater speed and frequency. The approach helps reduce the cost, time, and risk of delivering changes by allowing for more incremental updates to applications in production. A straightforward and repeatable deployment process is important for continuous delivery. | Tell me more

D | What’s Continuous Deployment?

Continuous deployment is a software engineering approach in which software functionalities are delivered frequently through automated deployments. CD contrasts with continuous delivery, a similar approach in which software functionalities are also frequently delivered and deemed to be potentially capable of being deployed but are actually not deployed. | Tell me more

E | Before Reading The Rest

Before reading the rest of this article, you should first read sections A through D on the following page.

Before reading the rest of this article, you should first read all sections on the following page.

F | Example of Continuous Deployment

The rest of this article is an example of continuous deployment.

G | Comparing Hosting Options on Google Cloud

Do the following steps to access information useful in comparing hosting options on Google Cloud.

  1. Getting Started with GCP
  2. Compare compute products
  3. Scroll down to review hosting options presented in 7 columns.

As of January 2020, the presented seven hosting options are:

  1. Compute Engine
  2. Kubernetes Engine
  3. Cloud Run for Anthos on Google Cloud
  4. Cloud Run
  5. App Engine Flexible Environment
  6. App Engine Standard Environment
  7. Cloud Functions

H | What’s Kubernetes?

Kubernetes (commonly stylized as k8s) is an open-source container-orchestration system for automating application deployment, scaling, and management. It was originally designed by Google, and is now maintained by the Cloud Native Computing Foundation. It aims to provide a “platform for automating deployment, scaling, and operations of application containers across clusters of hosts”. It works with a range of container tools, including Docker. Many cloud services offer a Kubernetes-based platform or infrastructure as a service (PaaS or IaaS) on which Kubernetes can be deployed as a platform-providing service. Many vendors also provide their own branded Kubernetes distributions. | Tell me more

Serverless like capabilities are being introduced with Kubernetes. You can now Scale down to zero when there is no usage and scale up when required.

Scale down to zero means you must not pay during idle time.

K | Sample Process of Selecting a Hosting Option

The following thought process was carried out in selecting a hosting option on Google Cloud Platform.

  1. Can this product scale down to zero instances and avoid billing me for periods of zero requests? The factor of Scale-to-zero eliminates the following hosting options: (#1) Compute Engine, (#2) Kubernetes Engine, (#3) Cloud Run for Anthos on Google Cloud, and (#5) App Engine Flexible Environment.
  2. Can you create multi-layer URL paths (such as /abc/def) and/or use your own domain name? The factor of Custom URL’s eliminates the last hosting option: (#7) Cloud Functions.
  3. The only remaining choices are (#4) Cloud Run and (#6) App Engine Standard Environment.
  4. Upon review of Cloud.google.com/run, the following was noticed.

Continuous Deployment from Git using Cloud Build: Learn how to automate build and deploy your code whenever new commits are pushed to a given branch of a Git repository.

With automation in build and deployment, Cloud Run (#4) seems to be a good choice, even before taking App Engine Standard Environment (#6) into consideration.

Therefore, it’s good to learn more about Cloud Run.

M | What’s Cloud Run?

Cloud Run is a fully managed compute platform that automatically scales your stateless containers. Cloud Run is serverless: it abstracts away all infrastructure management, so you can focus on what matters most — building great applications. | Cloud.google.com/run

Cloud Run was selected as a hosting option for Coalmont App Dev because it allows continuous deployment from Git. In other words, we can use Cloud Build to automate builds and deployments to Cloud Run. We can automate build and deploy your code whenever new commits are pushed to a given branch of a Git repository.

N | What is a Cloud Build Trigger?

A Cloud Build trigger automatically starts a build whenever you make any changes to your source code. You can configure the trigger to build your code on any changes to the source repository or only changes that match certain criteria. | Tell me more

P | Continuous Deployment from git using Cloud Build

You can use Cloud Build to automate builds and deployments to Cloud Run. You can accomplish this using a Cloud Build trigger to automatically build and deploy your code whenever new commits are pushed to a given branch of a git repository. This includes Cloud Source Repositories, GitHub, or any other repository supported by Cloud Build.

Q | End of Article

This is the end of the article. The rest is only for editors at Coalmont.

R | Editorial Notice

The letters i, j, L, and O are not used as a section number because the first three may look alike in several text fonts whereas the last one looks like zero at times.

Nickantony Quach

Written by

Founder of Ri4CTV, a channel on YouTube, Creator of Thumoslang, the nomenclature for social life, and Father of One, who works for the NFL

CoalMont

CoalMont

Our offense on a great Black Mountain

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade