An example of a pipeline for working with the plugin for kubernetis. We build the maven project, create a docker image with the received artifact and push it into the docker image storage. Pipeline: Dockerfile – already created in the pipeline itself. envVar – taken from the secret of kubernetes
To display the copy status using the "dd" utility, the "status = progress" key is used, but in the old version of "dd" this key is not yet available, so you can use the "pv" utility to see progress Example:
Dockerfile:
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"