Skip to content

Instantly share code, notes, and snippets.

View rimusz's full-sized avatar

Rimantas (Rimas) Mocevicius rimusz

View GitHub Profile
@rimusz
rimusz / README.md
Created March 28, 2018 09:40 — forked from guenter/README.md
Demo Kubernetes on DC/OS

Setup

These instructions are for DC/OS 1.11.0 and Kubernetes package 1.0.0-1.9.3.

Service Accounts

Install the DC/OS Enterprise CLI, then create a keypair and a service account for Kubernetes. Securely store the private key in the DC/OS secrets store.

@rimusz
rimusz / quickDeployKuberentesCCM.sh
Created March 28, 2018 09:40 — forked from ToddGreenstein/quickDeployKuberentesCCM.sh
Quick deploy script for kubernetes if using CCM
#!/bin/bash
usage(){
echo " Usage: $0 url <clean> <tls>"
echo " url: http url to your DC/OS cluster master ip"
echo " clean: optional, will erase your DC/OS and kubectl configs and reconfigure"
echo " tls: optional, will deploy kubernetes using TLS"
echo " Minimum Config:"
echo " If using CCM the mininum configuration for the ""generic"" Kuberentes Install"
echo " 1 public slave node"
@rimusz
rimusz / test.go
Last active January 17, 2018 16:59
package main
import (
"encoding/json"
"fmt"
"html/template"
"net/http"
"os"
)
@rimusz
rimusz / firefox-open-tab.applescript
Created January 6, 2018 17:39 — forked from technosophos/firefox-open-tab.applescript
Open a Tab in Firefox on macOS with AppleScript
# To run:
# osascript firefox-open-tab.applescript http://technosophos.com
#
# References:
# https://support.mozilla.org/en-US/questions/1130718
# https://stackoverflow.com/questions/3645763/how-do-i-instruct-applescript-to-open-a-new-firefox-window-with-a-link
on firefoxRunning()
tell application "System Events" to (name of processes) contains "firefox"
end firefoxRunning
@rimusz
rimusz / simple-event.sh
Created January 6, 2018 17:38 — forked from technosophos/simple-event.sh
Simple Kubernetes Brigade event generator.
#!/usr/bin/env bash
set -euo pipefail
# The Kubernetes namespace in which Brigade is running.
namespace="default"
event_provider="simple-event"
event_type="my_event"
# This is github.com/deis/empty-testbed
@rimusz
rimusz / post-receive.sh
Created December 18, 2017 18:48 — forked from technosophos/post-receive.sh
Git post-receive hook that creates Brigade event
#!/bin/bash
while read oldrev newrev refname
do
short_sha=${newrev:0:8}
ulid=$(/usr/local/bin/ulid)
build_id="acid-worker-${ulid}-${short_sha}"
e_build_id=$(echo "$build_id" | base64 -w 0)
e_project_id=$(echo "$ACID_PROJECT_ID" | base64 -w 0)
e_acidjs=$(git show ${newrev}:acid.js | base64 -w 0)
### Requirements
apt install docker.io socat
### KUBECTL
wget https://storage.googleapis.com/kubernetes-release/release/v1.6.2/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/.
@rimusz
rimusz / cloudbuild.yaml
Created September 21, 2017 13:23 — forked from Philmod/cloudbuild.yaml
concurrent docker builds on Google Container Builder
steps:
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '-f'
- 'Dockerfile.alpine'
- '-t'
- 'gcr.io/$PROJECT_ID/large-docker-alpine:latest'
- '.'
waitFor: ['-']
@rimusz
rimusz / helm-rbac.md
Created September 11, 2017 17:26 — forked from mgoodness/helm-rbac.md
Helm RBAC setup for K8s v1.6+ (tested on minikube)
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
apiVersion: v1
kind: Service
metadata:
labels:
name: client-socket-ingress
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
name: client-socket-ingress