# Automation


Automation is defined by the Cambridge Dictionary as:

the use of machines and computers that can operate without needing human control

For a Computer to do something without a Human, it needs a "Program". A Program is an Artifact that is produced by a Compiler or an Interpreter that can then be executed by a Computer.

But there are many fields of Automation some of them are for example.

# Industrial Automation


Industrial Automation uses special Computers called ether:

  • ICS for Industrial Control Systems
  • DCS for Distributed Control System
  • PLC for Process Logic Controller
  • PLS for Process Logic System

Or nowadays

  • IIOT for **Industrial Internet of ThingsThe Goal is to always "Control" some Physical processes, moving things around, producing things or Controlling the conditions of stuff.
    Because it is Physical, there is more effort put into keeping processes "safe" for Humans and Environment around them for example on "Confidentiality".

# Robot Process Automation


Weirdly this does not have anything to do with "physical" systems but with the virtual system only.
It replaces manual repetitive reproductions done by a Human with some Software that reproduces exactly that.

# Software Automation


And Finally Software Automation.

# Continuous Integration


It is the process of continuously integrating changes in the code into a program.
The Output of a CI Pipeline is an executable or Runnable Artifact.

Sometimes CI is referred to as Trunk based Development.
Source

# Feature Toggle


An essential part of CI is Feature toggles,*** as code is merged into the program, it must not break stuff.
So the default code should run just fine, and your new code should not have an effect.
If you want to test the new code, you have to supply a “Flag” in form of a command line argument.

`python mycode.py -experimental`

Or a special Variable supplied, for example on a rest API.

`https://api.code.tld/v1.0/dosomething/query?=experimental`

# Continuous Delivery


While the CI's output is an artifact intended to be run or executed by a Computer, it is the CD's job to provision the Infrastructure and make all necessary changes to Servers, Networking and so on to make it happen.

# Infrastructure Automation


Part of the CD cycle is IaC or Infrastructure Automation.

Tools like Terraform, Ansible or k8s-manifest are used to make changes to Servers and Networking Gear to roll out changes needed for the program to function properly.

# Push vs. Pull


The CD Pipeline will automatically apply changes.

It's the question if you use a Push or Pull based deployment.

Push means the CD Pipeline executes a command and pushes changes to the environment. A good example would be Gitlab CD or Jenkins.

Pull means there is an agent on the k8s cluster for example that pulls changes into infra.
FluxCD and ArgoCD are good examples of that.

One giant benefit is that you do not have to permit somebody's laptop to a k8s cluster.
Just to git and git manages changes from them.

# Build Pipelines


For both CI and CD, there can be built pipelines in place.
A classic example of a CI Pipeline would be running Tests, Linting, and Compiling the code to a binary.
A classic example of a CD Pipeline would be pushing the binary to a Production Server.

# DevOps


DevOps is about collaboration for formerly separate groups (mindsets)

# GitOps


Use developer tools to drive operations
2017 Source

GitOps focuses on the Ops model.
GitOps can be used with DevOps but does not have to.

GitOps means having everything as code i.e. XaC or EaC.
Having a Git Repo for all configuration files, Ansible, Terraform, K8s, Helm...
Then running all these changes by Merge-Requests and having a dedicated CI/CD Pipeline with test, checks and approval processes.
GitOps
[Techworld with Nana]Basically version controls your Infrastructure.

# Documentation


What does automating documentation mean?
It means adopting common software development practices.
When you automate documentation, you are:

  • writing your documentation in Markdown;
  • using a continuous integration and continuous deployment (CI/CD) pipeline to run tasks such as correcting errors and deploying updates.
    Automate Documentation

# Swagger API docs


FastAPI has a feature to automatically produce swagger API documentation.
You just have to open the route /docs at the API server and you have automatically all your routes documented.

# Conclusion


A lot of Concepts and stuff to understand.
But at the end, I want to share some Templates I build that helped me put them into Practice.