Coder Social home page Coder Social logo

criteo-forks / dcos-commons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mesosphere/dcos-commons

0.0 9.0 0.0 76.78 MB

Simplifying stateful services

Home Page: https://mesosphere.github.io/dcos-commons/

License: Apache License 2.0

Python 16.18% Shell 1.62% Go 3.48% Java 76.59% HTML 2.02% Ruby 0.03% Dockerfile 0.07%

dcos-commons's Introduction

Quick Start | Developer Guide | FAQ | Javadocs | Contributing | Slack


DC/OS SDK is a collection of tools, libraries, and documentation for easy integration of technologies such as Kafka, Cassandra, HDFS, Spark, and TensorFlow with DC/OS.


Understanding the Hello World Service Specification

The service specification declaratively defines the helloworld service:

name: "helloworld"
pods:
  helloworld:
    count: {{COUNT}}
    tasks:
      server:
        goal: RUNNING
        cmd: "echo 'Hello World!' >> helloworld-container-volume/output && sleep 10"
        cpus: {{SERVER_CPU}}
        memory: 32
        volume:
          path: "helloworld-container-volume"
          type: ROOT
          size: 64

In the above YAML file, we have:

  • Defined a service with the name helloworld
  • Defined a pod specification for our helloworld pod using:
pods:
  helloworld:
    count: {{COUNT}}
    tasks:
      ...
  • Declared that we need atleast {{COUNT}} instances of the helloworld pod running at all times, where COUNT is the environment variable that is injected into the scheduler process at launch time via Marathon. It defaults to 1 for this example.
  • Defined a task specification for our server task using:
tasks:
  server:
    goal: RUNNING
    cmd: "echo 'Hello World!' >> helloworld-container-volume/output && sleep 10"
    cpus: {{SERVER_CPU}}
    memory: 32

We have configured it to use {{SERVER_CPU}} CPUs (which defaults to 0.5 for this example) and 32 MB of memory.

  • And finally, configured a 64 MB persistent volume for our server task where the task data can be persisted using:
volume:
  path: "helloworld-container-volume"
  type: ROOT
  size: 64

References


Contributions

Contributions are welcome! See CONTRIBUTING.


License

DC/OS SDK is licensed under the Apache License, Version 2.0.

dcos-commons's People

Contributors

gabrielhartmann avatar nickbp avatar benclarkwood avatar mbdcos avatar mrbrowning avatar mpereira avatar nimavaziri avatar mohitsoni avatar jsrodman avatar loren avatar susanxhuynh avatar mgummelt avatar renovate[bot] avatar takirala avatar paegun avatar ssk2 avatar kvish avatar falseperfection avatar triclambert avatar fapaul avatar keithchambers avatar mhrabovcin avatar nlsun avatar kaiwalyajoshi avatar porridge avatar ohrobin avatar jimmidyson avatar jeid64 avatar chhsia0 avatar seglo avatar

Watchers

Julien Pepy avatar Maxime Brugidou avatar James Cloos avatar Erèbe - Romain Gerard avatar Pierre Mavro avatar oaitmous avatar Pierre Souchay avatar Frédéric Boismenu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.