liveBook · Manning

Automation

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

The execution of operational or development tasks by software with reduced manual intervention.

Automation replaces repeated manual work with software-run tasks. For a microservice, a practical goal is to turn a code push into testing and deployment rather than repeating deployment commands by hand. This becomes increasingly important as the number of services grows. section 8.0 section 12.6.4

GitHub Actions runs workflows in response to repository events, such as a push or pull request. A workflow is a YAML file containing jobs and steps; a runner executes those steps. Steps can run commands directly or invoke shell scripts. The same approach can support a CI pipeline for tests and a continuous deployment pipeline for Kubernetes. section 8.7.1 section 8.7.2 section 8.0

Start with a small working workflow, then give it useful work:

  • Fork a repository, enable workflows in its Actions tab, and clone your fork so your pushes can trigger its workflow. section 8.3
  • Configure a push trigger and, if useful for testing or rerunning with changed configuration, a manual trigger. section 8.7.6 section 8.7.10
  • Check out the repository before running a script that needs its files: the runner does not start with a copy of the code. section 8.7.6
  • Move from a command that prints a message to automated tests and deployment of a microservice. section 8.7.4 section 8.9

Verify a push-triggered run

A minimal workflow checks out the repository and runs a shell script that prints “hello world.” Change the message, commit, and push. Then open the GitHub Actions workflow history to see the run; the terminal used for git push does not show the result. The workflow can also be started from the Actions UI without another code change. section 8.7.6 section 8.7.8 section 8.7.10

For a growing microservice system, keep improving both deployment reliability and speed, and provide automated tests for features being converted. GitHub Actions is one option; similar repository-driven services also run configured commands. The basic workflow needs no advanced job scheduling, but deployment work assumes familiarity with Docker and kubectl. section 12.6.4 section 8.7.1 section 8.7.2 section 8.0

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Builds from a minimal runnable workflow toward deployment, but defers parallel jobs, job dependencies, and runner OS choices.
Examples
Uses a push-triggered Hello World workflow, a manual rerun, and a microservice deployment to Kubernetes.
What it assumes
Starts workflow setup with a GitHub account, while expecting Docker and kubectl confidence for the deployment example.
What you can do after
Apply it via GitHub Actions to trigger a microservice deployment by pushing code.
How it connects
Connects automation to GitHub Actions, shell scripts, continuous integration, continuous deployment, automated testing, and microservices.

Also explained in

Compare how 19 books explain automation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.