This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.15 AS build | |
RUN apk --no-cache add libc6-compat device-mapper findutils zfs build-base linux-headers python3 bash git wget cmake pkgconfig ndctl-dev && \ | |
apk --no-cache add thin-provisioning-tools --repository http://dl-3.alpinelinux.org/alpine/edge/main/ && \ | |
apk --no-cache add go==1.16.10-r0 --repository http://dl-3.alpinelinux.org/alpine/v3.14/community/ && \ | |
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \ | |
rm -rf /var/cache/apk/* | |
RUN wget https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-4.11.0.tar.gz && \ | |
echo "112bced9a67d565ff0ce6c2bb90452516d1183e5 libpfm-4.11.0.tar.gz" | sha1sum -c && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# (c) 2020 [email protected] | |
# SPDX-License-Identifier: Apache-2.0 OR MIT | |
# | |
# This script checks if all software requirements are met in a Linux environment | |
# in order to use 'docker buildx' to build multi-architecture images. | |
# For more information see: | |
# https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/ | |
function error() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
metadataServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
switch r.RequestURI { | |
case "/dynamic/instance-identity/document": | |
w.Write([]byte(document)) | |
case "/dynamic/instance-identity/pkcs7": | |
w.Write([]byte(pkcs7)) | |
case "/dynamic/instance-identity/signature": | |
w.Write([]byte(signature)) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: postgres | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: postgres |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"golang.org/x/net/context" | |
"golang.org/x/oauth2/google" | |
cloudresourcemanager "google.golang.org/api/cloudresourcemanager/v1beta1" | |
compute "google.golang.org/api/compute/v1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"golang.org/x/net/context" | |
"golang.org/x/oauth2/google" | |
cloudresourcemanager "google.golang.org/api/cloudresourcemanager/v1beta1" | |
compute "google.golang.org/api/compute/v1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $(gcloud projects list | tail +2 | awk '{print $1}'); do gcloud --project "$i" container clusters list 2>/dev/null | grep -v MASTER_VERSION | awk '{print $1}'; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud alpha container node-pools create pool-2 --cluster=cluster-teapot --enable-cloud-endpoints --disk-size=100 --num-nodes 5 --zone europe-west1-c --image-type "CONTAINER_VM" --machine-type n1-standard-1 --scopes=https://www.googleapis.com/auth/cloud-platform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud alpha container node-pools create pool-1 --cluster=cluster-teapot --enable-cloud-endpoints --disk-size=100 --num-nodes 5 --zone europe-west1-c --image-type "GCI" --machine-type n1-standard-1 --scopes=https://www.googleapis.com/auth/cloud-platform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# USAGE: | |
# ./shenza.sh appname "some reason" | |
appname="${1}" | |
reason="${2}" | |
if [ -z "${appname}" ]; then |
NewerOlder