Skip to content

Instantly share code, notes, and snippets.

How to switch your ansible version in the same env?

Ansible is just a python package,if you have virtualenv installed on your host it is just a matter of creating a new venv for each ansible version you want, and then pip install it.

First, verify the installed Python version and path. Create a virtual environment using the python3 -m venv <environment-name> command. You can give any name to your Python virtual environment. I want to try the Ansible 2.10 version, so I named it in a way to identify the directory easily:

$mkdir ~/venvs/
$cd !$
$python3 -m venv ansible2.10

"A canary deployment, or canary release, is a deployment pattern that allows you to roll out new code/features to a subset of users as an initial test."

"Canary deployments are a pattern for rolling out releases to a subset of users or servers. The idea is to first deploy the change to a small subset of servers, test it, and then roll the change out to the rest of the servers. The canary deployment serves as an early warning indicator with less impact on downtime: if the canary deployment fails, the rest of the servers aren't impacted."

"Canary deployments can help you put your best code into production as efficiently as possible."

"Canary release is a technique to reduce the risk of introducing a new software version in production by slowly rolling out the change to a small subset of users before rolling it out to the entire infrastructure and making it available to everybody."

"Testing out a new feature or upgrade in production is a stressful process. You want to roll out changes frequently but without

# python script.py -f 2.9.9 -t 2.9.10
# v2.6.11 -> v2.11.10
# https://netbox.readthedocs.io/en/stable/release-notes/version-2.11/
import argparse
parser = argparse.ArgumentParser(description="A simple script to help with netbox upgrades")
parser.add_argument("-f",help="Version of netbox youre looking to upgrade FROM ‘ex 2.7.8'")
parser.add_argument("-t",help="Version of netbox youre looking to upgrade TO ‘ex 2.7.9’")
args = parser.parse_args()
goFrom = str(args.f)

As a part of my hands on labs.

Use case terraform here.

Official documentation about aws provider, here all providers here

The code that I used to create the a single test instance

provider "aws" {
@isweluiz
isweluiz / ubuntu20-repository
Created February 22, 2022 22:35
ubuntu,repository ubuntu=20LTS
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

Guidance on prometheus alerts for bosh cf-mysql-release

Alerts Galera Cluster

MySQLGaleraClusterSize

. Verification: Cluster size less than 3

mysql_global_status_wsrep_cluster_size &lt; 3
# Documentation
https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-issue-reparenting-changelogs/#jira-cloud-platform-rest-api-v3-https-developer-atlassian-com-cloud-jira-platform-rest-v3-intro
# Retrieve an issue
curl -u admin:admin http://localhost:8080/jira/rest/api/2/issue/TEST-10 | python -mjson.tool
curl -u admin:admin http://localhost:8080/rest/api/2/issue/TEST-10 | python -mjson.tool