Skip to content

Instantly share code, notes, and snippets.

View dshamanthreddy's full-sized avatar
🎯
Focusing

shamanth reddy dshamanthreddy

🎯
Focusing
View GitHub Profile
@dshamanthreddy
dshamanthreddy / output
Created April 17, 2017 15:07 — forked from halberom/output
ansible - using lookup to get a date timestamp into a variable
...
TASK: [debug var=mydate] ******************************************************
ok: [localhost] => {
"mydate": "20140605101824"
}
...
@dshamanthreddy
dshamanthreddy / docker_kill.sh
Created October 9, 2017 18:43 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
@dshamanthreddy
dshamanthreddy / ansible_kms_encrypt_decrypt.md
Created October 31, 2017 19:04 — forked from darahayes/ansible_kms_encrypt_decrypt.md
KMS Encrypt and Decrypt filters in Ansible

KMS Encrypt and Decrypt Filters for Ansible

This Gist shows how you can encrypt/decrypt variables with KMS during your Ansible playbook execution. While google searching I couldn't find anything useful on the subject.

Let's say your project has a folder of playbooks called plays.

In that folder, create a folder called filter_plugins and insert kms_filters.py (included in this gist)

@dshamanthreddy
dshamanthreddy / reinvent-2017-youtube.md
Created December 8, 2017 04:08 — forked from stevenringo/reinvent-2017-youtube.md
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@dshamanthreddy
dshamanthreddy / Dockerfile
Created February 28, 2018 16:50 — forked from kvzhuang/Dockerfile
My Dockerfile, initial shell script and run shell script.
# DOCKER-VERSION 0.3.4
FROM ubuntu
MAINTAINER Kevin Zhuang <kvzhuang@gmail.com>
#RUN echo "This is a ubuntu Dockerfile."
#replace source.list with http://repogen.simplylinux.ch/
RUN echo "deb http://02.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse" > /etc/apt/sources.list
RUN apt-get update

02 - Introduction to Ingress Resources in Kubernetes

Deploying an Ingress Controller for exposing HTTP services

Expose the Kubernetes Dashbaord via Ingress

Wednesday 26/07/2017

tl;dr - An Ingress is a collection of rules that allow inbound connections to reach the cluster services.

tl;dr - The ingress-controller is just a reverse proxy that forwards incoming requests based on the URL and host header (if used).

@dshamanthreddy
dshamanthreddy / README.md
Created March 5, 2018 03:00 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
kind: Ingress
metadata:
name: nginx-ingress
spec:
rules:
- host: website1.com
http:
paths:
- backend:
serviceName: website1
@dshamanthreddy
dshamanthreddy / nginx-lb-aws.yaml
Created March 16, 2018 13:08 — forked from camilb/nginx-lb-aws.yaml
Kubernetes Nginx Ingress Controller for AWS
kind: Service
apiVersion: v1
metadata:
name: nginx-default-backend
namespace: kube-system
labels:
k8s-addon: ingress-nginx.addons.k8s.io
spec:
ports:
- port: 80

Jenkins Script Console Tutorial

Jenkins script console allows one to run groovy scripts/code to automate jenkins setup e.g installing plugins, setting configuration parameters. These groovy scripts can be run either through the web ui, or event loaded as scripts using curl from command line. With these groovy scripts, jenkins configurations can be completely automated.

Lets explore this script console and learn how to write/load simple scripts.

Exploring script console

From the jenkins UI, choose Jenkins => Manage Jenkins => Script Console . You should see script console installed, in which run the following,