Category Archives: Ansible

In computing, Ansible is an open-source software provisioning, configuration management, and application deployment tool. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows.

ArgoCD: declarative Projects, Applications, and ArgoCD deploy from Jenkins

19 May 2021
 

 An application, cluster, or repository can be created In ArgoCD from its WebUI, CLI, or by writing a Kubernetes manifest that then can be passed to kubectl to create resources. For example, Applications are Kubernetes CustomResources and described in Kubernetes CRD applications.argoproj.io: [simterm] $ kubectl get crd applications.argoproj.io NAME CREATED AT applications.argoproj.io 2020-11-27T15:55:29Z [/simterm] And… Read More »

AWS: CloudFormation – using lists in Parameters

8 May 2020
 

 In addition to the AWS Elastic Kubernetes Service: a cluster creation automation, part 1 – CloudFormation and AWS Elastic Kubernetes Service: a cluster creation automation, part 2 – Ansible, eksctl posts – now I’d like to pass a Parameter as a List with multiply values to a CloudForamtion stack. The idea is to get all… Read More »

AWS Elastic Kubernetes Service: a cluster creation automation, part 2 – Ansible, eksctl

1 May 2020
 

 The first part – AWS Elastic Kubernetes Service: a cluster creation automation, part 1 – CloudFormation. To remind the whole idea is to create an automation process to create an EKS cluster: Ansible uses the cloudformation module to create an infrastructure by using an Outputs of the CloudFormation stack created – Ansible from a template will… Read More »

Kubernetes: monitoring with Prometheus – exporters, a Service Discovery, and its roles

26 April 2020
 

 The next task with our Kubernetes cluster is to set up its monitoring with Prometheus. This task is complicated by the fact, that there is the whole bunch of resources needs to be monitored: from the infrastructure side – ЕС2 WokerNodes instances, their CPU, memory, network, disks, etc key services of Kubernetes itself – its… Read More »

AWS Elastic Kubernetes Service: a cluster creation automation, part 1 – CloudFormation

24 April 2020
 

 The task is: create automation to roll out an AWS Elastic Kubernetes Service cluster from scratch. Will use: Ansible: to automate CloudFormation stack creation and to execute eksctl with necessary parameters CloudFormation with NestedStacks: to create an infrastructure – VPC, subnets, SecurityGroups, IAM-roles, etc eksctl: to create a cluster itself using resources created by CloudFormation… Read More »

Jenkins: Docker Compose deployment from Ansible with ECR authentication

26 September 2019
 

 In addition to the AWS: create an Elastic Container Registry and Jenkins deploy job post – the next part, where we will create a new Jenkins job to deploy a Docker Compose file to run our Docker image. Docker Compose file will be updated by an Ansible role called docker-deploy, which will set the desired… Read More »

NGINX: multi-branch deployment with Ansible, NGINX map and HTTP Headers

26 June 2019
 

 We have a standard LEMP setup NGINX, PHP-FPM. Application – Yii-framework, deployed from Jenkins using Ansible role with the synchronize module on backend hosts in a /data/projects/prjectname/frontend/web,  directory which is set as a root for an NGINX virtual host. The task is to have the ability to deploy the same application on the same backend… Read More »

Redis: replication, part 4 – writing an Ansible role fore the Master-Slave replication with Redis Sentinel provisioning

15 April 2019
 

 The next post from the Redis replication series. Previous parts: Redis: replication, part 1 – an overview. Replication vs Sharding. Sentinel vs Cluster. Redis topology. Redis: replication, part 2 – Master-Slave replication, and Redis Sentinel Redis: replication, part 3 – redis-py and work with Redis Sentinel from Python The task now is to write an… Read More »

Redis: Sentinel – bind 0.0.0.0, the localhost issue and the announce-ip option

10 April 2019
 

 Originally, in a Sentinel’s configs, I have used the bind 0.0.0.0 to make them accessible from external hosts. Because of this when I started rolling out this setup on a real environment faced with an issue when Sentinels could not determine a Master host and other Sentinel hosts. In this post – such an issue… Read More »

Ansible: get a target host’s IP

9 April 2019
 

 The task is to get a host’s IP during executing an Ansible task. Below – two examples of how this can be done. Example 1 – hostvars See the documentation here>>>. Code: – name: Test hosts list debug: msg: “{{ hostvars[inventory_hostname][‘ansible_default_ipv4’][‘address’] }}” Run it: [simterm] … TASK [test : Test hosts list] **** ok: [dev.backend-app1-internal.example.com]… Read More »