Skip to content

Instantly share code, notes, and snippets.

View codygreen's full-sized avatar

Cody Green codygreen

View GitHub Profile
@codygreen
codygreen / CoreDNS_OSX.md
Last active March 4, 2022 19:05
CoreDNS on OS X for Nginx Ingress DNS Resolution

Setup

brew install coredns
mkdir ~/.config/coredns
cd ~/.config/coredns
git co https://github.com/codygreen/codygreen.local.git
ln -s ~/.config/coredns /usr/local/etc/
sudo brew services restart coredns
sudo mkdir -v /etc/resolver
printf "port 1053\nnameserver 127.0.0.1\n" > /etc/resolver/codygreen.local
@codygreen
codygreen / init-cloud-account.sh
Last active October 31, 2019 20:55
UDF Cloud Account AWS Share Credentials File
#!/bin/bash
home=/home/ubuntu
creds=$home/.aws/credentials
caURL="http://10.1.1.254/cloudAccounts"
apiKey=`curl -s $caURL | jq '.[][] | .apiKey'`
apiSecret=`curl -s $caURL | jq '.[][] | .apiSecret'`
region=`curl -s $caURL | jq '.[][] | .regions[]'`
sudo -u ubuntu mkdir -p $home/.aws
sudo -u ubuntu touch $creds
@codygreen
codygreen / bigip_revoke_license.tf
Last active September 5, 2019 16:51
Terraform: Revoke BIG-IP License from BIG-IQ
# NOTE: This is a snipit of code and not a complete terraform file
# Assumes BIG-IQ information is stored in an Azure Key Vault
# Get BIG-IQ Information
data "azurerm_key_vault_secret" "bigiq_host" {
name = "bigiq-host"
key_vault_id = "${data.azurerm_key_vault.vault.id}"
}
data "azurerm_key_vault_secret" "bigiq_user" {
name = "bigiq-user"
key_vault_id = "${data.azurerm_key_vault.vault.id}"
@codygreen
codygreen / pipeline_deploy_s3.template
Created August 28, 2019 12:07
AWS Codepipeline Deploy to S3 Snippet
- Name: Deploy
Actions:
- Name: DeploySource
InputArtifacts:
- Name: SourceOutput
ActionTypeId:
Category: Deploy
Owner: AWS
Version: "1"
Provider: "S3"
@codygreen
codygreen / delete_bigip_aws.yaml
Created January 9, 2019 05:43
Delete F5 CFT via Ansible
--- # Delete a BIG-IP in AWS
- name: Delete BIG-IP
hosts: localhost
gather_facts: false
tasks:
- name: delete a BIG-IP in AWS via CFT
cloudformation:
@codygreen
codygreen / deploy_bigip_aws.yaml
Last active January 25, 2019 17:22
Deploy F5 CFT via Ansible
--- # Deploy a BIG-IP in AWS
- name: Deploy BIG-IP
hosts: localhost
gather_facts: false
vars:
stack_name: "my-ansible-test"
region: us-east-2
template_url: https://s3.amazonaws.com/f5-cft/f5-existing-stack-payg-1nic-bigip.template
vpc: vpc-1234567890
@codygreen
codygreen / .travis.yml
Created August 12, 2018 14:50
TravisCI Configuration Example for K8S and Skaffold
sudo: enabled
services:
- docker
language: node_js
node_js:
- "8"
before_install:
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.7.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin/
@codygreen
codygreen / k8s-application.yaml
Created August 12, 2018 14:45
Kubernetes Configuration Example for Skaffold
apiVersion: v1
kind: Service
metadata:
name: appABC
labels:
app: appABC
spec:
type: NodePort
ports:
- port: 3000
@codygreen
codygreen / skaffold.yaml
Created August 12, 2018 14:37
Example Skaffold Configuration File
apiVersion: skaffold/v1alpha2
kind: Config
build:
artifacts:
- imageName: codygreen/application
deploy:
kubectl:
manifests:
- ./k8s/k8s-*