The following example was taken as a Playbook. This Playbook runs on the "docker" host group, installs the necessary packages for Docker, adds the Docker repository, installs Docker, launches it and adds it to autorun. Also adds the user "artem" to the group "docker" docker.yaml Apply Playbook:
A simple example of installing Ansible and adding a host. Install Ansible: RedHat systems: Deb systems: Generate an SSH key if it is not on the instance with Ansible: Add the public key to the host, which we will manage: Add the host to the list: And insert the following …
Continue reading " Ansible – Install"
To save all manifests, create a BASH script: With the following contents: Add the execution bit and run it: After executing in the current directory in the folder "k8s-manifests" will be saved all manifests ordered by namespaces and types.
To create Terraform files based on the existing infrastructure, we will use Terraformer In this example, the macOS system will be used, so we install terraformer using homebrew: Installation for other OSs can be found on the project page. Create a directory for storing plugins (for working with providers) Terraform …
Continue reading " Terraform – Generate files based on existing infrastructure"
Example Docker Compose file for WordPress docker-compose.yaml
For a container with phpMyAdmin, you need to add a variable with an absolute path: The "location" block for Nginx (change the proxy path to yours): Now phpMyAdmin will be available along the path: https://artem.services/phpmyadmin/
This example shows how to run 2 JAR files in one container. As the base image we will use "phusion/baseimage" First you need to create startup scripts, for convenience, in the example they will be called "start-first.sh" and "start-second.sh", in them we describe the launch of JAR files, for example start-first.sh start-second.sh …
Continue reading " Docker – Multiple processes in one container"
GCP will be the DNS provider. YOUR_GCP_PROJECT – Replace with the name of your GCP project Create an account: We give him access to the DNS service: We generate the key: Create a secret based on the generated key: Create 2 YAML files for ClusterIssuer. letsencrypt-staging.yml …
Continue reading "GKE – Issuer DNS01"
Installation instructions can be found here. Run: If there is no namespace, then create it. Add the HELM repository and update: Install Cert Manager using HELM:
Installation instructions can be found here. Install HELM locally: Installing Tiller with RBAC enabled Начиная с Kubernetes v1.8+, RBAC включен по умолчанию. Checking: Create Nginx Ingress Controller: If the following error occurs: Error: release nginx-ingress failed: namespaces "default" is forbidden: User "system:serviceaccount:kube-system:default" cannot get resource "namespaces" in API …
Continue reading "GKE – Nginx Ingress Installation Using HELM"