Best way to debug ansible is to dump the entire state out.
This is a play that would do the job
- name: Debug
hosts: localhost
connection: local
tasks:
- name: Display all variables/facts known for a host
debug:
rm -rf /var/lib/cloud/sem/* /var/lib/cloud/instance /var/lib/cloud/instances/* | |
cloud-init init | |
cloud-init modules -m final |
Best way to debug ansible is to dump the entire state out.
This is a play that would do the job
- name: Debug
hosts: localhost
connection: local
tasks:
- name: Display all variables/facts known for a host
debug:
Say you have a test.pem file all in one line, how to make it into a proper pem file? | |
``` | |
fold -w64 test.pem | |
``` | |
add to the beginning and end of buffer | |
-----BEGIN CERTIFICATE----- | |
-----END CERTIFICATE----- |
For the past year, the VA Enterprise Cloud team (VAEC) has been coordinating a massive effort to migrate the VA's on-premise applications to the cloud. By taking advantage of cloud technologies, VA is looking to reduce IT costs and to improve the scalablility and reliability of its applications. Through Vets.gov and Caseflow, we the Digital Service team at the VA is an early adopter of AWS within the agency. With our experience in AWS Govcloud, the Digital Service SRE team was consulted to review the VA's Initial Cloud Reference Architecture for AWS. During the one hour meeting, we spotted an opportunity to streamline the architecture to save over a 100 million dollars over 10 years.
The VA is a massive organization with over 377,000 employees. There are nearly 600 on-p
In the VA Digital Service's Appeals Modernization effort, we developed a React on Rails applications called Caseflow. We follow the industry's best practices with Continuous Integration and Continuous Deployment (CI/CD) using Travis and Jenkins. Our team develops features quickly, and deploy changes daily to production environment. However, our deployment pipeline was not always smooth. This is a story of a bug that haunted us for months.
Around January 2017, deploying Caseflow to production environment was an exhausting event. Our deployment pipeline uses the Immutable Server Pattern to create an Amazon Machine Image (AMI), and performs rolling deploys onto our AWS AutoScaling group. The newly deployed EC2 instances would serve traffic beautifully for five minutes, and the servers would tied up all its threads on queri
// This Express server is designed to support Efolder-Express Rails server to | |
// allow streaming data from S3 without first saving a local copy on disk. | |
const express = require('express') | |
const app = express() | |
const AWS = require('aws-sdk'); | |
AWS | |
.config | |
.update({region: 'us-gov-west-1'}); |
#!/usr/bin/python | |
import boto3 | |
import json | |
import os | |
client = boto3.client('ec2') | |
# filter.json | |
# [ |
#!/bin/bash | |
for i in {0..64} | |
do | |
echo displaying $i thread | |
rbtrace -p 2475 -e "Thread.list[$i].backtrace.join('\n')" | |
done |
Go to line | |
- Esc | |
- Line number | |
- shift-g | |
Auto complete | |
- Ctrl-n | |
Multi-line-edit | |
- Esc |
require 'json' | |
class Analyzer | |
def initialize(filename) | |
@filename = filename | |
end | |
def analyze | |
data = [] | |
File.open(@filename) do |f| | |
f.each_line do |line| |