Skip to content

Instantly share code, notes, and snippets.

Avatar

Cody Green codygreen

View GitHub Profile
@codygreen
codygreen / init-cloud-account.sh
Last active Oct 31, 2019
UDF Cloud Account AWS Share Credentials File
View init-cloud-account.sh
#!/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 Sep 5, 2019
Terraform: Revoke BIG-IP License from BIG-IQ
View bigip_revoke_license.tf
# 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 Aug 28, 2019
AWS Codepipeline Deploy to S3 Snippet
View pipeline_deploy_s3.template
- Name: Deploy
Actions:
- Name: DeploySource
InputArtifacts:
- Name: SourceOutput
ActionTypeId:
Category: Deploy
Owner: AWS
Version: "1"
Provider: "S3"
@codygreen
codygreen / deploy_bigip_aws.yaml
Last active Jan 25, 2019
Deploy F5 CFT via Ansible
View deploy_bigip_aws.yaml
--- # 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 / delete_bigip_aws.yaml
Created Jan 9, 2019
Delete F5 CFT via Ansible
View delete_bigip_aws.yaml
--- # 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 / .travis.yml
Created Aug 12, 2018
TravisCI Configuration Example for K8S and Skaffold
View .travis.yml
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 Aug 12, 2018
Kubernetes Configuration Example for Skaffold
View k8s-application.yaml
apiVersion: v1
kind: Service
metadata:
name: appABC
labels:
app: appABC
spec:
type: NodePort
ports:
- port: 3000
@codygreen
codygreen / skaffold.yaml
Created Aug 12, 2018
Example Skaffold Configuration File
View skaffold.yaml
apiVersion: skaffold/v1alpha2
kind: Config
build:
artifacts:
- imageName: codygreen/application
deploy:
kubectl:
manifests:
- ./k8s/k8s-*