Skip to content

Instantly share code, notes, and snippets.

# required to run in a container
daemon off;
user nginx;
worker_processes {{ or (getv "/deis/router/workerProcesses") "auto" }};
pid /run/nginx.pid;
events {
worker_connections {{ or (getv "/deis/router/maxWorkerConnections") "768" }};
# multi_accept on;
title:Choosing a Scheduler
description:How to choose a scheduler backend for Deis.

Choosing a Scheduler

The :ref:`scheduler` creates, starts, stops, and destroys each :ref:`container`

package cmd
import (
"fmt"
"io"
"sync"
"github.com/deis/deis/deisctl/backend"
"github.com/deis/deis/pkg/prettyprint"
)
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
2015-08-06 00:27:14.792965 7f3060149700 0 -- :/1000127 >> 10.244.7.10:6789/0 pipe(0x7f305c02e010 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x7f305c024ad0).fault
2015-08-06 00:27:14.792965 7f3060149700 0 -- :/1000127 >> 10.244.7.10:6789/0 pipe(0x7f305c02e010 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x7f305c024ad0).fault
2015-08-06 00:27:17.792944 7f304bfff700 0 -- :/1000127 >> 10.244.84.8:6789/0 pipe(0x7f3050000c00 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x7f3050004ea0).fault
2015-08-06 00:27:17.792944 7f304bfff700 0 -- :/1000127 >> 10.244.84.8:6789/0 pipe(0x7f3050000c00 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x7f3050004ea0).fault
2015-08-06 00:27:20.795325 7f3060149700 0 -- :/1000127 >> 10.244.7.10:6789/0 pipe(0x7f30500080e0 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x7f305000c380).fault
2015-08-06 00:27:20.795325 7f3060149700 0 -- :/1000127 >> 10.244.7.10:6789/0 pipe(0x7f30500080e0 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x7f305000c380).fault
2015-08-06 00:27:23.795745 7f304bfff700 0 -- :/1000127 >> 10.244.1.10:6789/0 pipe(0x7f3050000c00 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x7
@smothiki
smothiki / sample.md
Last active November 10, 2017 03:48
Cpeh on Kubernetes

Ceph replication controllers

kubectl get rc
CONTROLLER   CONTAINER(S)   IMAGE(S)                                              SELECTOR                           REPLICAS
ceph-mds     ceph-mds       192.168.59.103:5000/deis/store-metadata:git-3016328   name=ceph-mds,type=cmd,version=1   3
ceph-mon     ceph-mon       192.168.59.103:5000/deis/store-monitor:git-27dcc99    name=ceph-mon,type=cmd,version=1   3
ceph-osd     ceph-osd       192.168.59.103:5000/deis/store-daemon:git-dc53ff2     name=ceph-osd,type=cmd,version=1   3

Ceph health

@smothiki
smothiki / isue1.md
Created August 12, 2015 23:26
ceph issues : my understanding
docker run --privileged=true --net host -v /var/lib/deis/store:/var/lib/deis/store -it busybox

here host /var/lib/deis/store and container /var/lib/deis/store are same docker makes things easy in reality container /var/lib/deis/store is some random directory() on the host which docker creates and does mount -bind /var/lib/deis/store <randdir>

but from inside container if we run mount -t ceph <ips>/: /var/lib/deis/store we are overriding the bind mount option and /var/lib/deis/store of container is no longer related to /var/lib/deis/store of host.

package docker
import (
"archive/tar"
"bytes"
"fmt"
"io"
"os"
"os/exec"
"path"
11:00 - 11:40 Immutable Data Science with Datomic, Spark and Kafka
1:40 - 2:20 "All In" With Determinism for Performance and Testing in Distributed Systems
3:40 - 4:20 Apache Kafka and the Next 700 Stream Processing Systems
sept 26
10:10 - 10:50 Streams: The data structure we need / One weird trick to lose five bugs off your distributed system instantly!
12:50 - 1:30 any talk that might interest me
3:40 - 4:20 Architectural Patterns of Resilient Distributed Systems
@smothiki
smothiki / initals.py
Created September 21, 2015 23:13
inita
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):