Skip to content

Instantly share code, notes, and snippets.

@zparnold
zparnold / user_data.sh
Created October 9, 2017 14:13
A script to bootstrap Bamboo master server and attach an EFS instance to it.
#!/bin/bash
#### SET VARS
BAMBOO_VERSION=6.2.1
EFS_DNS=YOUR_EFS_ID.efs.YOUR_AWS_REGION.amazonaws.com
AWS_S3_BUCKET=your-aws-bucket-name
#### INSTALL DEPS
yum update -y
yum install -y java-1.8.0 docker git
@zparnold
zparnold / Dockerfile
Created October 24, 2017 22:15
Ygrene Redirector
FROM nginx
ADD nginxconfd.txt /etc/nginx/conf.d/
@zparnold
zparnold / Dockerfile
Last active November 2, 2017 17:15
Ygrene Rails Base
FROM phusion/passenger-ruby23:0.9.26
#OS Level stuff
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
mysql-client build-essential memcached nodejs git pdftk chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev vim wget nano awscli less unzip zlib1g-dev libxslt-dev
#PhantomJS
RUN wget "https://s3-us-west-2.amazonaws.com/ygrene-public-artifacts/phantomjs-2.1.1-linux-x86_64.tar.bz2" && \
@zparnold
zparnold / Dockerfile
Created November 14, 2017 04:19
Ygrene Scala Base
FROM tomcat:8
RUN mkdir -p /home/app
WORKDIR /home/app
@zparnold
zparnold / run.rb
Created January 15, 2018 20:14
If run as root on a server it will update the Yum repos to the latest, and then cleans up after itself
require 'tempfile'
require 'fileutils'
require 'open3'
def edit_file(location, update_config)
temp_file = Tempfile.new('newConfig')
begin
File.open(location, 'r') do |file|
file.each_line do |line|
if line.include? "="
@zparnold
zparnold / file.md
Created May 1, 2018 13:51
Notes for SIG Updates

SIG Apps

  • Ken Owens
  • Helm 2.9 stability release is out
  • Helm 3 proposal has been merged, come to the meeting to contribute
  • App Def working group
    • Labeling recommendations for various parts of Application Definition
    • Application CRD has been introduced to bring a more high-level view
    • There is also an apps survey result (come to the deep dive to find out)
    • There is a charter open for this SIG, look there for feedback
  • Beginning a discussion regarding developer tooling and how to make that experience better
@zparnold
zparnold / deploy.sh
Created June 28, 2018 17:08
Kubernetes Rails Deploy Script
#!/bin/bash
set -e
function getPods() {
local val='';
while [ true ]; do
val=`kubectl get pods -n ${NAMESPACE} --selector="name=${1}" -o $2`
if [[ $val != '' ]] || [[ $? -eq 0 ]]; then break; fi
done
echo "${val}"
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: rds
spec:
addresses:
- "172.20.0.0/16"
ports:
- name: tcp
number: 3306
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: stripe-external
spec:
hosts:
- "api.stripe.com"
tls:
- match:
- port: 443
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: stripe-external
spec:
hosts:
- "api.stripe.com"
ports:
- number: 443
name: https