Skip to content

Instantly share code, notes, and snippets.

View etoews's full-sized avatar

Everett Toews etoews

View GitHub Profile
FROM alpine:3.5
COPY cat-etc-hosts.sh .
RUN chmod u+x cat-etc-hosts.sh
CMD ["./cat-etc-hosts.sh"]
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ghost
labels:
role: blog
spec:
replicas: 1
template:
metadata:
ADMIN_PASSWORD=devstack
MYSQL_PASSWORD=devstack
RABBIT_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
FLAT_INTERFACE=br100
PUBLIC_INTERFACE=eth0
VOLUME_BACKING_FILE_SIZE=20480M
@etoews
etoews / awsweeper.yaml
Created September 2, 2022 23:44
Example of an AWSweeper configuration file for https://github.com/jckuester/awsweeper
# awsweeper --dry-run awsweeper.yml
aws_alb_target_group:
aws_ami:
aws_api_gateway_api_key:
aws_api_gateway_client_certificate:
aws_api_gateway_domain_name:
aws_api_gateway_rest_api:
aws_api_gateway_usage_plan:
aws_api_gateway_vpc_link:
aws_apigatewayv2_api:
@etoews
etoews / secure-ubuntu-server.sh
Created February 2, 2015 18:25
Disclaimer: This is not the most secure configuration possible. This script is only intended to be more secure than the default configuration. No promises are made about this script preventing your server from getting hacked or your bike getting stolen. The bad guys are still out to get you. And running this script does not excuse you from writi…
#!/bin/bash
set -o errexit
# This script assumes you're running it initially as root and you've created it with a key pair. If you
# haven't, you'll be locked out of your server.
if [ -z "$1" ]; then
echo "Usage: $0 NON_ROOT_USER"
echo "Example: $0 foo"
@etoews
etoews / secure-server.sh
Created February 18, 2014 19:01
Secure an Ubuntu server
#!/bin/bash
# This script assumes you've created this server with a key pair. If you haven't, you're not getting back in.
# Switch to everett user
adduser --shell /bin/bash --gecos "User for managing feeds" --disabled-password --home /home/everett everett
adduser everett sudo
grep -q "^#includedir.*/etc/sudoers.d" /etc/sudoers || echo "#includedir /etc/sudoers.d" >> /etc/sudoers
( umask 226 && echo "everett ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/50_everett_sh )
mkdir /home/everett/.ssh
@etoews
etoews / neutron.sh
Created February 27, 2014 21:30
Create a Neutron network, subnet, and port and boot an instance with the port
OS_AUTH_URL=http://162.242.242.161:5000/v2.0/
OS_REGION_NAME=RegionOne
OS_USERNAME=admin
OS_TENANT_NAME=admin
OS_PASSWORD=devstack
NET_NAME="test1-net"
IP_CIDR=192.168.0.0/24
IP_START=192.168.0.10
IP_END=192.168.0.20
@etoews
etoews / croc-hunter.sh
Created May 21, 2017 01:04
Rough notes on getting this "Zero to Kubernetes CI/CD in 5 minutes with Jenkins and Helm" demo https://www.youtube.com/watch?v=eMOzF_xAm7w running on MS Azure Container Service.
# https://github.com/Microsoft/azure-docs/blob/master/articles/container-service/container-service-kubernetes-walkthrough.md
alias az="docker run --rm --volume ${HOME}:/root azuresdk/azure-cli-python az"
az login
RESOURCE_GROUP=kubernetes
LOCATION=southcentralus
DNS_PREFIX=phymata
CLUSTER_NAME=kubernetes
export OS_USERNAME=your-rackspace-username
export OS_PASSWORD=your-rackspace-password
mkdir openstack-sdk
cd openstack-sdk/
virtualenv -p python3 --no-site-packages venv
source venv/bin/activate
pip3 install openstacksdk
python3
@etoews
etoews / local.conf
Created April 18, 2014 20:40
DevStack local.conf for OpenStack Icehouse
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
# Services