Skip to content

Instantly share code, notes, and snippets.

package docker
import (
"archive/tar"
"bytes"
"fmt"
"io"
"os"
"os/exec"
"path"
@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.

@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

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
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
package cmd
import (
"fmt"
"io"
"sync"
"github.com/deis/deis/deisctl/backend"
"github.com/deis/deis/pkg/prettyprint"
)
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`

# 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:Installing the Deis Platform
description:Learn how to install the Deis Platform

Install the Deis Platform

We will use the deisctl utility to provision the Deis platform from a CoreOS host or a workstation that has SSH access to CoreOS.

##Types of Schedulers Part 1 - Monolithic Schedulers

Monolithic schedulers are a single process entity that makes scheduling decisions and deploys the unit to be scheduled. It must be noted that such Monolithic schedulers do not support parallel tasks. some examples of monolithic schedulers are fleet, swarm. Apart from these, Kubernetes is an advanced type of monolithic scheduler. Kubernetes has a decoupled scheduling module which reads tasks from queue and schedules the Pods. ####Fleet Fleet is a scheduler for SystemD units and a default scheduler in coreOS. It uses the least loaded machine to schedule a unit. However, it is not a resource aware scheduler. We can specify constraints along with the SystemD template on how the unit has should be deployed. An example service file looks like

[Unit]