Skip to content

Instantly share code, notes, and snippets.

View paweloczadly's full-sized avatar

Paweł Oczadły paweloczadly

  • Kraków, Poland
  • 00:40 (UTC +02:00)
View GitHub Profile
@paweloczadly
paweloczadly / pawel-nginx.yaml
Last active May 14, 2020 11:30
Kubernetes deployment with updated file owner
apiVersion: v1
kind: Namespace
metadata:
labels:
istio-injection: enabled
name: pawel
---
apiVersion: v1
kind: ConfigMap
metadata:
@paweloczadly
paweloczadly / install-jenkins.sh
Last active July 16, 2019 18:11
Installs Jenkins with Job DSL plugin and example pipeline
#!/bin/bash
set -e
JENKINS_HOME=/var/lib/jenkins
JENKINS_URL=http://localhost:8080
apt-get update && apt-get install -y git wget curl gnupg2 openjdk-8-jdk
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
@paweloczadly
paweloczadly / warden_handle.sh
Last active November 29, 2016 11:58
warden_handle.sh
APP_NAME="my-cf-app"
cat /var/vcap/data/dea_next/db/instances.json | jq -r '.instances[] | select (.application_name == "$APP_NAME") | .warden_handle'
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
server {
location / {
root /usr/share/nginx/html;
}
location /item {
alias /usr/share/nginx/html;
}
location /post {
@paweloczadly
paweloczadly / docker-from-zero-to-hero.md
Last active September 12, 2016 11:22
SAP Hybris presentation in Gliwice

Docker from zero to hero

What actually is Docker? (Pawel)

5mins

History (Tomek)

  • Troche historii, jak kiedys transportowano
  • Na poczatku pakowano rzeczy paczki w roznych formatach
@paweloczadly
paweloczadly / deployment.yml
Last active May 26, 2016 16:59
Kubernetes lifecycle hook
lifecycle:
preStop:
exec:
command: ["/usr/sbin/nginx", "-s", "quit"] # graceful shutdown
@paweloczadly
paweloczadly / listDirs.go
Last active April 6, 2016 08:09
Displays all files recursive on separated goroutines
package main
import (
"fmt"
"io/ioutil"
"os"
"sync"
)
var wg sync.WaitGroup

Intro to Kubernetes

master, nodes = minions

What is Kubernetes?

  • orchestrates docker containers
  • handles scheduling onto multiple nodes
  • keeps desired state
  • groups containers for management and service discovery

Comparison of Actor execution models and why Elixir is better

Why Elixir is better?

Actor:

  • logical thread of execution
  • is built for some request
  • example implementation: thread per actor
  • thread per actor:
  • simple mapping