Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
#!/usr/bin/env ruby | |
require 'fileutils' | |
# Originally -- Dave Deriso -- deriso@gmail.com | |
# Contributor -- G. Richard Bellamy -- rbellamy@terradatum.com | |
# If you contribute, put your name here! | |
# To get your team ID: | |
# 1. Go to your GitHub profile, select 'Personal Access Tokens', and create an Access token | |
# 2. curl -H "Authorization: token <very-long-access-token>" https://api.github.com/orgs/<org-name>/teams | |
# 3. Find the team name, and grabulate the Team ID |
#!/bin/bash -e | |
# Usage ./k8s-service-account-kubeconfig.sh ( namespace ) ( service account name ) | |
TEMPDIR=$( mktemp -d ) | |
trap "{ rm -rf $TEMPDIR ; exit 255; }" EXIT | |
SA_SECRET=$( kubectl get sa -n $1 $2 -o jsonpath='{.secrets[0].name}' ) |
FROM openjdk:8-jre-alpine | |
RUN mkdir -p /opt/app | |
WORKDIR /opt/app | |
COPY ./run_jar.sh ./app-assembly.jar ./ | |
ENTRYPOINT ["./run_jar.sh"] |
# Use envFrom to load Secrets and ConfigMaps into environment variables | |
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: mans-not-hot | |
labels: | |
app: mans-not-hot | |
spec: | |
replicas: 1 |
pipeline { | |
// run on jenkins nodes tha has java 8 label | |
agent { label 'java8' } | |
// global env variables | |
environment { | |
EMAIL_RECIPIENTS = 'mahmoud.romeh@test.com' | |
} | |
stages { | |
stage('Build with unit testing') { |
# The goal: create a list of maps of subnet mappings so we don't have to statically hard-code them in aws_lb | |
# https://www.terraform.io/docs/providers/aws/r/lb.html#subnet_mapping | |
locals { | |
# These represent dynamic data we fetch from somewhere, such as subnet IDs and EIPs from a VPC module | |
subnet_ids = ["subnet-1", "subnet-2", "subnet-3"] | |
eips = ["eip-1", "eip-2", "eip-3"] | |
} | |
# Here's the hack! The null_resource has a map called triggers that we can set to arbitrary values. | |
# We can also use count to create a list of null_resources. By accessing the triggers map inside of |