Skip to content

Instantly share code, notes, and snippets.

Jun 02 20:20:58 deis-03 sh[3772]: [2015-06-02 20:20:58,200] INFO Compute DeploymentPlan from Group(/,Set(),Set(),Set(),2015-06-02T20:19:56.936Z) to Group(/,Set(AppDefinition(/ramui,Some(while [ true ] ; do echo 'Hello Marathon' ; sleep 5 ; done),None,None,Map(),1,0.1,16.0,0.0,,Set(),List(),List(),List(10000),false,1 second,1.15,3600 seconds,None,Set(),Set(),UpgradeStrategy(1.0,1.0),Map(),2015-06-02T20:20:58.188Z)),Set(),Set(),2015-06-02T20:20:58.188Z) (mesosphere.marathon.upgrade.DeploymentPlan$:211)
Jun 02 20:20:58 deis-03 sh[3772]: [2015-06-02 20:20:58,202] INFO Computed new deployment plan: DeploymentPlan(2015-06-02T20:20:58.188Z, (Step(Vector(Start(App(/ramui, Some(while [ true ] ; do echo 'Hello Marathon' ; sleep 5 ; done))), 0))), Step(Vector(Scale(App(/ramui, Some(while [ true ] ; do echo 'Hello Marathon' ; sleep 5 ; done))), 1))))) (mesosphere.marathon.upgrade.DeploymentPlan$:265)
Jun 02 20:20:58 deis-03 sh[3772]: [2015-06-02 20:20:58,203] INFO Deploy plan:DeploymentPlan(2015-06-02T20:20:58.188Z, (Ste
@smothiki
smothiki / gist:bad29e5798e7ff79a73e
Created June 2, 2015 21:51
mesos marathon logs app sample
Jun 02 21:49:24 deis-01 sh[1868]: [2015-06-02 21:49:24,172] INFO Upgrade id:/ version:2015-06-02T21:49:24.166Z with force:false (mesosphere.marathon.state.GroupManager:124)
Jun 02 21:49:24 deis-01 sh[1868]: [2015-06-02 21:49:24,173] INFO Take next configured free port: 10000 (mesosphere.marathon.state.GroupManager:186)
Jun 02 21:49:24 deis-01 sh[1868]: [2015-06-02 21:49:24,175] INFO Compute DeploymentPlan from Group(/,Set(),Set(),Set(),2015-06-02T21:46:53.044Z) to Group(/,Set(AppDefinition(/sample,Some(sleep 600),None,None,Map(),1,0.1,16.0,0.0,,Set(),List(),List(),List(10000),false,1 second,1.15,3600 seconds,None,Set(),Set(),UpgradeStrategy(1.0,1.0),Map(),2015-06-02T21:49:24.166Z)),Set(),Set(),2015-06-02T21:49:24.166Z) (mesosphere.marathon.upgrade.DeploymentPlan$:211)
Jun 02 21:49:24 deis-01 sh[1868]: [2015-06-02 21:49:24,177] INFO Computed new deployment plan: DeploymentPlan(2015-06-02T21:49:24.166Z, (Step(Vector(Start(App(/sample, Some(sleep 600))), 0))), Step(Vector(Scale(App(/sample, Some(sleep 600))), 1)
@smothiki
smothiki / gist:a86eae8aec67aff3c287
Last active August 29, 2015 14:22
Proposal integrating kubernetes with deis

Once we start core-os machine with flannel. which gives a containers a feel of overlay network. Every container will have a unique IP.

  1. Container port shouldn't be bind mounted.
  2. Publisher should be able to publish container IP and Port as each APP container is unique.
  3. Only Jobstate.Up, Destroyed, Crashed, Error.
  4. Moving scale logic from models.py to schedulers accordingly.
  5. Allow custom interfaces and IPs while creating user-data.
  6. Make Registry URL based or run registry in every host.
  7. Create services for each App
    ##start k8sapps
    {{range $kapp := lsdir "/registry/services/specs/default"}}
    upstream {{base $kapp}} {
        {{$appdir := printf "/registry/services/specs/default/%s" $kapp}}{{range gets $appdir}}
        server {{$data := json .Value}}{{$data.spec.portalIP}}:80;
        {{end}}
    }
    server {
    server_name ~^{{ $kapp }}\.(?<domain>.+)$;
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;
class App:
def _scheduler(self):
module, auth, ApiEndpoint, options,key
def init():
#intialize the name,scheduler,version,bootstrap App
scheduler.init()
def start():
# 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;

##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]
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.