Skip to content

Instantly share code, notes, and snippets.

View arhea's full-sized avatar

Alex Rhea arhea

View GitHub Profile
@arhea
arhea / build.sh
Last active January 20, 2017 12:23
Docker AMI Build with Packer
#!/bin/bash
set -ex
echo "Gathering AWS Credentials..."
AWS_ACCESS_KEY=$(aws configure get aws_access_key_id --profile=$1)
AWS_SECRET_KEY=$(aws configure get aws_secret_access_key --profile=$1)
AWS_REGION=$(aws configure get region --profile=$1)
AWS_ACCOUNT_ID=$(aws ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text --profile=$1)
@arhea
arhea / Dockerfile
Created January 28, 2017 17:39
HA Cassandra Dockerfile
FROM cassandra:2.1
ENV ETCD_VERSION v3.0.15
RUN DOWNLOAD_URL=https://github.com/coreos/etcd/releases/download \
&& apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
&& curl -L ${DOWNLOAD_URL}/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
&& mkdir -p /tmp/etcd-${ETCD_VERSION} \
&& tar xzvf /tmp/etcd-${ETCD_VERSION}-linux-amd64.tar.gz -C /tmp/etcd-${ETCD_VERSION} --strip-components=1 \
&& cp /tmp/etcd-${ETCD_VERSION}/etcdctl /bin \
@arhea
arhea / packer.json
Created January 20, 2017 12:23
Ubuntu 16 Packer.json
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"aws_account_id": "",
"aws_region": ""
},
"builders": [
{
"type": "amazon-ebs",
@arhea
arhea / install.sh
Created May 9, 2017 14:49
ETA Blog - Install docker-secrets module
npm install docker-secrets --save
@arhea
arhea / docker-secrets-usage.js
Created May 9, 2017 14:50
ETA Blog - Usage
'use strict';
const secrets = require('docker-secrets');
# object containing key value pairs of secrets
console.log(secrets);
@arhea
arhea / capistrano-laravel-deploy.rb
Last active July 12, 2017 06:47
Capistrano 3 deploy script for Laravel 4.
# config valid only for Capistrano 3.1
lock '3.1.0'
set :application, "" # EDIT your app name
set :scm, :git
set :repo_url, "" # EDIT your git repository
set :keep_releases, 3
@arhea
arhea / rexray_install.sh
Created January 11, 2017 18:38
Install and Configure RexRay with Docker
#!/bin/bash
curl -sSL https://dl.bintray.com/emccode/rexray/install | sh
cat > /etc/rexray/config.yml <<'EOF'
rexray:
modules:
default-docker:
disabled: true
efs-docker:
@arhea
arhea / dump1090.bash
Created December 16, 2019 22:40
Install Piaware on Raspberry Pi Running Ubuntu
#!/bin/bash
# create directory
mkdir -p /usr/src
cd /usr/src
# update the os
apt-get update -y && apt-get upgrade -y
# install dependencies
@arhea
arhea / fips-cli.sh
Last active June 2, 2020 12:56
FIPS 140-2 Endpoint Tester
#!/bin/bash -e
usage() {
cat << EOF
usage: $0 <url> <path>
URL: <hostname>:<port>
Path: /
EOF
@arhea
arhea / eksctl.yml
Last active June 15, 2020 22:19
Forwarding Logs to Cloudwatch Using Firelens
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: logging-demo-cluster
region: us-east-2
vpc:
cidr: "10.1.0.0/16"
clusterEndpoints: