Skip to content

Instantly share code, notes, and snippets.

View arhea's full-sized avatar

Alex Rhea arhea

View GitHub Profile
@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:
@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 / 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 / install.sh
Created May 9, 2017 14:49
ETA Blog - Install docker-secrets module
npm install docker-secrets --save
@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 / setup.sh
Created January 20, 2017 12:23
Ubuntu 16.04 LTS Docker Setup
#!/bin/bash
set -ex
apt-get update -y && apt-get upgrade -y
apt-get install -y linux-image-extra-$(uname -r) \
linux-image-extra-virtual \
unzip \
git \
python \
@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 / 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 / rexray_example.sh
Created January 11, 2017 18:41
Using RexRay on Amazon Web Services
#!/bin/bash
# create example EFS mount point
docker volume create --driver=efs --name=example-efs
# create example EBS disk within this availability zone
docker volume create --driver=ebs --name=example-ebs
# run an example container with EBS mount
docker run -it --rm -v example-ebs:/data --volume-driver=ebs busybox sh