Skip to content

Instantly share code, notes, and snippets.

:octocat:
Writing YAML + HCL and googling errors

Julien Bisconti veggiemonk

:octocat:
Writing YAML + HCL and googling errors
Block or report user

Report or block veggiemonk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@veggiemonk
veggiemonk / altantis.Dockerfile
Created Jul 19, 2019
Atlantis terragrunt terraform and gcloud container
View altantis.Dockerfile
FROM golang:alpine AS builder
ENV TERRAGRUNT_VERSION=0.19.9 \
TERRAGRUNT_VERSION_SHA256SUM=9226cffc6b67b48c78e659b8ed1228e41b01c6fa4bd55e26e3b56c4d488db7ea \
TERRAFORM_VERSION=0.12.5 \
TERRAFORM_VERSION_SHA256SUM=babb4a30b399fb6fc87a6aa7435371721310c2e2102a95a763ef2c979ab06ce2
WORKDIR /go/src/github.com/runatlantis/atlantis/
RUN apk --no-cache add \
View PodDisruptionBudget.yaml
kind: PodDisruptionBudget
metadata:
name: my-app
spec:
maxUnavailable: 1
selector:
matchLabels:
app: my-app
@veggiemonk
veggiemonk / Dockerfile
Last active Jul 11, 2019
Build GO app in multi-stage container
View Dockerfile
FROM golang:alpine AS builder
ARG GITHUB_USER
ARG REPO_NAME
WORKDIR /go/src/github.com/$GITHUB_USER/$REPO_NAME/
COPY . .
RUN apk add --no-cache \
@veggiemonk
veggiemonk / git_update_subfolder.sh
Last active Jul 9, 2019
organize your git repo like go
View git_update_subfolder.sh
#!/bin/bash
for r in *;
do {
echo ">>> $r" && \
cd $r && \
(git pull || echo 0) && \
cd ..
};
done;
@veggiemonk
veggiemonk / README.md
Last active Jun 26, 2019
TERRAFORM workshop 2
View README.md

Terraform

  1. take the code from the previous workshop -> https://gist.github.com/veggiemonk/097890ff101a995f3c31f4d25b69665e
  2. install terraform 0.12 => https://releases.hashicorp.com/terraform/0.12.3/terraform_0.12.3_linux_amd64.zip
  3. convert it to Terraform 0.12 by using the command terraform 0.12upgrade
  4. make sure it works (terraform plan, terraform apply and terraform destroy)
  5. spit into modules. https://www.terraform.io/docs/modules/index.html
  6. manually go into the console, create a small VM and try to import it into the terraform state -> see https://www.terraform.io/docs/import/usage.html
  7. destroy everything.
@veggiemonk
veggiemonk / container-common-fluff.go
Last active Jul 9, 2019
FLUFF - connecting pipes
View container-common-fluff.go
package main
import (
"context"
"fmt"
"net"
"net/http"
"os"
"os/signal"
"runtime"
View .zsh_alias
alias ez="vim ~/.zshrc && source ~/.zshrc"
alias c="clear"
alias path='echo -e ${PATH//:/\\n}'
alias dpsa="docker ps -a"
alias dcup="docker-compose up"
alias dcupd="docker-compose up -d"
alias dcdn="docker-compose down"
alias dclf="docker-compose logs -f"
alias server="python3 -m http.server"
View 1_terraform_workshop_tips.md

Terraform

Install

mkdir -p $HOME/bin
cd $HOME/bin
wget https://releases.hashicorp.com/terraform/0.11.9/terraform_0.11.9_linux_amd64.zip
unzip terraform_0.11.9_linux_amd64.zip
export PATH="$PATH:$HOME/bin"
You can’t perform that action at this time.