Skip to content

Instantly share code, notes, and snippets.

View kadel's full-sized avatar
:octocat:
I may be slow to respond.

Tomas Kral kadel

:octocat:
I may be slow to respond.
View GitHub Profile
@kadel
kadel / atomicapp-marathon.md
Last active November 30, 2015 12:57
Design notes for Maraton provider for AtomicApp

Marathon provider for AtomicApp

  • require specify Marathon API endpint via provider.config
  • use python-request for communication with Marathon API
  • there is no service discovery via environment variables like Kubernetes, at first we assume using mesos-dns
@kadel
kadel / ostestining.md
Last active December 16, 2015 17:26
openshift testing
@kadel
kadel / exec.py
Created January 8, 2016 17:25
Kubernets: exec using API
# https://pypi.python.org/pypi/websocket-client/
import websocket
import ssl
def on_message(ws, message):
print message
args = {"token": "",
"namespace": "testing",
"pod": "nonroot-nginx-1-pftqg",
@kadel
kadel / openshift-tls.md
Last active April 5, 2016 11:53
TLS/SSL verification when using OpenShift provider

TLS/SSL verification when using OpenShift provider

There was major refactoring of OpenShift provider in AntomicApp 0.3.0. In that version provider stopped using oc command and started using OpenShift API directly. In this version we permanently disabled TLS/SSL verification.

Now with 0.3.1 TLS/SSL verification is enabled by default and there are options that allow user to add CA certificate or disable verification completely.

We couldn’t find that file to show.
@kadel
kadel / openshift2nulecule.spec
Last active April 5, 2016 11:53
openshift2nulecule.spec
%define name openshift2nulecule
%define version 0.0.1
%define release 1
Summary: Tool to create Nulecule from OpenShift
Name: %{name}
Version: %{version}
Release: %{release}
License: LGPL3
BuildArch: noarch
@kadel
kadel / vagrant.config
Last active April 5, 2016 11:52
kubernetes config for connecting to vagrant
apiVersion: v1
clusters:
- cluster:
server: http://10.1.2.3:8080
name: k8s
contexts:
- context:
cluster: k8s
user: ""
name: k8s
@kadel
kadel / k8s_remote_connect.md
Last active August 13, 2018 08:37
Connect to Kubernetes from outside the Vagrant box

Connect to Kubernetes from outside the Vagrant box

inside vagrant box

get secret name for default service account

SECRET_NAME=$(kubectl get serviceaccounts default -o template --template="{{ (index .secrets 0).name }}")

get service token

@kadel
kadel / hellonginx.yml
Last active April 5, 2016 11:51
hello nginx deploymentConfig
apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: nginx
name: nginx
spec:
replicas: 1
selector:
app: nginx
[helloflask-app]
redis_master_port = 6379
image = tomaskral/helloflask
serviceport = 80
redis_master_host = redis-master
redis_slave_host = redis-slave
redis_slave_port = 6379
[redismaster-app]
image = centos/redis
hostport = 6379