Skip to content

Instantly share code, notes, and snippets.

View Neutrollized's full-sized avatar
🎯
Focusing

Glen Yu Neutrollized

🎯
Focusing
View GitHub Profile
@Neutrollized
Neutrollized / cloudbuild.yaml
Last active February 6, 2023 18:46
Medium: Deploying HashiCorp Vault on Cloud Run using Cloud Build
---
steps:
- id: 'Lint Dockerfile'
name: 'ghcr.io/hadolint/hadolint'
entrypoint: '/bin/hadolint'
args: ['cloud-run/Dockerfile']
- id: 'Build container image'
name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', '${_GAR_REGION}-docker.pkg.dev/${PROJECT_ID}/${_GAR_REPO_NAME}/vault-server:${COMMIT_SHA}', '-f', 'cloud-run/Dockerfile', '.']
- id: 'Image efficiency scan'
@Neutrollized
Neutrollized / redis-server.nomad
Created January 25, 2023 18:59
Medium: Getting started with HashiCorp Nomad just got easier in v1.4
job "redis-server" {
datacenters = ["gcp-test"]
group "redis" {
count = 2
network {
port "db" { to = 6379 }
}
@Neutrollized
Neutrollized / redis-client.nomad
Last active January 28, 2023 04:03
Medium: Getting started with HashiCorp Nomad just got easier in v1.4
job "redis-client" {
datacenters = ["gcp-test"]
group "redis" {
count = 1
task "client" {
driver = "docker"
template {
@Neutrollized
Neutrollized / spring-music.nomad
Last active January 31, 2023 16:21
Medium: Migrating off of Pivotal Cloud Foundry? Consider HashiCorp Nomad!
job "spring-music" {
datacenters = ["gcp-test"]
priority = 80
group "spring-music" {
network {
port "access" { static = 28080 }
}
task "spring-music" {
@Neutrollized
Neutrollized / membrane-proxy.nomad
Last active February 4, 2023 15:53
Medium: Migrating off of Pivotal Cloud Foundry? Consider HashiCorp Nomad!
locals {
membrane_version = "5.0.1"
}
job "membrane-proxy" {
datacenters = ["gcp-test"]
priority = 80
group "membrane" {
network {
@Neutrollized
Neutrollized / spring-backend.nomad
Last active January 31, 2023 16:20
Medium: Migrating off of Pivotal Cloud Foundry? Consider HashiCorp Nomad!
job "spring-backend" {
datacenters = ["gcp-test"]
priority = 80
group "spring-backend" {
network {
port "api" { static = 8081 }
}
task "spring-backend" {
@Neutrollized
Neutrollized / minecraft.nomad
Last active February 1, 2023 01:24
Medium: Migrating off of Pivotal Cloud Foundry? Consider HashiCorp Nomad!
job "minecraft" {
datacenters = ["gcp-test"]
priority = 80
group "mc-server" {
network {
port "access" { static = 25565 }
}
# reserved disk
@Neutrollized
Neutrollized / istio-ingressgateway.yaml
Created February 28, 2023 00:25
Medium: Getting started with Anthos Service Mesh for GKE
apiVersion: apps/v1
kind: Deployment
metadata:
name: istio-ingressgateway
spec:
replicas: 2
selector:
matchLabels:
app: istio-ingressgateway
istio: ingressgateway
@Neutrollized
Neutrollized / productpage-gateway.yaml
Created February 28, 2023 00:47
Medium: Getting started with Anthos Service Mesh for GKE
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: productpage-gateway
namespace: bookinfo
spec:
selector:
istio: ingressgateway
servers:
- port:
@Neutrollized
Neutrollized / kaniko-executor-k8s-secret.yaml
Last active March 4, 2023 19:35
Medium: Workload Identity explained using kaniko
apiVersion: v1
kind: Pod
metadata:
name: kaniko-k8s-secret
spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:v1.9.1
args: ["--dockerfile=Dockerfile",
"--context=gs://${GCS_BUCKET}/path/to/context.tar.gz",