Giter Site home page Giter Site logo

dce-go's People

Contributors

chungjin avatar dpaks avatar duaneobrien avatar hars10 avatar jiaminzhu avatar kkrishna avatar kmala avatar mbdas avatar mynameisosama avatar ridv avatar spachamsrisriniv avatar sudheerit11 avatar vipragupta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dce-go's Issues

set up CI

It would be great to set up CI (e.g. Travis) so that it gets executed every time a PR is created or updated. CI should run linting as well as all unit tests.

when run example with marathon got error

I0801 02:42:11.456279 7200 logging.cpp:194] INFO level logging started!
I0801 02:42:11.457401 7200 logging.cpp:199] Logging to /var/log/mesos
I0801 02:42:11.457464 7200 fetcher.cpp:531] Fetcher Info: {"cache_directory":"/tmp/mesos/fetch/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0","items":[{"action":"BYPASS_CACHE","uri":{"cache":false,"executable":false,"extract":true,"value":"https://github.com/mesos/docker-compose-executor/releases/download/0.1.0/sample-app.tar.gz"}},{"action":"BYPASS_CACHE","uri":{"cache":false,"executable":false,"extract":false,"value":"http://192.168.1.64:8090/config.yaml"}},{"action":"BYPASS_CACHE","uri":{"cache":false,"executable":false,"extract":false,"value":"http://192.168.1.64:8090/general.yaml"}},{"action":"BYPASS_CACHE","uri":{"cache":false,"executable":false,"extract":false,"value":"http://192.168.1.64:8090/executor"}}],"sandbox_directory":"/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6"}
I0801 02:42:11.464521 7200 fetcher.cpp:442] Fetching URI 'https://github.com/mesos/docker-compose-executor/releases/download/0.1.0/sample-app.tar.gz'
I0801 02:42:11.464573 7200 fetcher.cpp:283] Fetching directly into the sandbox directory
I0801 02:42:11.464634 7200 fetcher.cpp:220] Fetching URI 'https://github.com/mesos/docker-compose-executor/releases/download/0.1.0/sample-app.tar.gz'
I0801 02:42:11.464690 7200 fetcher.cpp:163] Downloading resource from 'https://github.com/mesos/docker-compose-executor/releases/download/0.1.0/sample-app.tar.gz' to '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/sample-app.tar.gz'
I0801 02:42:13.928701 7200 process.cpp:1246] libprocess is initialized on 172.16.1.17:40272 with 8 worker threads
I0801 02:42:14.029827 7200 fetcher.cpp:121] Extracted '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/sample-app.tar.gz' into '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6'
I0801 02:42:14.029963 7200 fetcher.cpp:580] Fetched 'https://github.com/mesos/docker-compose-executor/releases/download/0.1.0/sample-app.tar.gz' to '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/sample-app.tar.gz'
I0801 02:42:14.029992 7200 fetcher.cpp:442] Fetching URI 'http://192.168.1.64:8090/config.yaml'
I0801 02:42:14.030009 7200 fetcher.cpp:283] Fetching directly into the sandbox directory
I0801 02:42:14.030037 7200 fetcher.cpp:220] Fetching URI 'http://192.168.1.64:8090/config.yaml'
I0801 02:42:14.030053 7200 fetcher.cpp:163] Downloading resource from 'http://192.168.1.64:8090/config.yaml' to '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/config.yaml'
I0801 02:42:14.031924 7200 fetcher.cpp:580] Fetched 'http://192.168.1.64:8090/config.yaml' to '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/config.yaml'
I0801 02:42:14.031980 7200 fetcher.cpp:442] Fetching URI 'http://192.168.1.64:8090/general.yaml'
I0801 02:42:14.032016 7200 fetcher.cpp:283] Fetching directly into the sandbox directory
I0801 02:42:14.032052 7200 fetcher.cpp:220] Fetching URI 'http://192.168.1.64:8090/general.yaml'
I0801 02:42:14.032075 7200 fetcher.cpp:163] Downloading resource from 'http://192.168.1.64:8090/general.yaml' to '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/general.yaml'
I0801 02:42:14.048689 7200 fetcher.cpp:580] Fetched 'http://192.168.1.64:8090/general.yaml' to '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/general.yaml'
I0801 02:42:14.048729 7200 fetcher.cpp:442] Fetching URI 'http://192.168.1.64:8090/executor'
I0801 02:42:14.048740 7200 fetcher.cpp:283] Fetching directly into the sandbox directory
I0801 02:42:14.048763 7200 fetcher.cpp:220] Fetching URI 'http://192.168.1.64:8090/executor'
I0801 02:42:14.048807 7200 fetcher.cpp:163] Downloading resource from 'http://192.168.1.64:8090/executor' to '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/executor'
I0801 02:42:15.202059 7200 fetcher.cpp:580] Fetched 'http://192.168.1.64:8090/executor' to '/data/mesos/slaves/dc0144b9-1cbe-49a0-b5ee-096d0b2cbce7-S0/frameworks/be770577-dded-4778-83cf-b193c2716136-0000/executors/marathon-docker-compose-demo.04650ad6-7663-11e7-a1df-024262d6c900/runs/290402cb-7668-473b-b485-c49d24edf1f6/executor'
./executor: 1: ./executor: ����������: not found
./executor: 9: ./executor: Syntax error: "(" unexpected

Inconsistent imports for mesos-go

mesos-go updated the directory structure and thus, any library depending on mesos-go must alter the import statements to match the update.

For example,
github.com/mesos/mesos-go/mesosproto --> github.com/mesos/mesos-go/api/v0/mesosproto
github.com/mesos/mesos-go/executor --> github.com/mesos/mesos-go/api/v0/executor

Vagrant setup enhancement

  1. create file /etc/default/marathon and put MARATHON_DECLINE_OFFER_DURATION=5000
    This changes the default from 120 secs and competes aggressively with aurora.

  2. set /sys/fs/cgroup/memory/memory.user_hierarchy value to 1 from default 0

Panic on empty service in a compose file

When one of the compose file has an empty service for example, even though other compose files have the same service with details, DCE is failing. This is a valid compose file and docker compose will succeed.

#---#
#docker-compose-base.yml
 
version: '2'
services:
  ##Application container overrides
   test:
      <all the details about the service like image etc.,>
#---#
#docker-compose-extends-base.yml
 
version: '2'
services:
  ##Application container overrides
   test:

Ignore pulling images failures

Docker always pull images from repository to check if images with same tag get override.
Ignore pulling images failures helps reduce failures if images are cached already.

New Plugin Interface for custom hooks around Executor API methods

Background

DCE's current plugin mechanism is pod lifecycle centric, and allows custom extensions to be plugged in around the steps needed to launch a pod (i.e. custom plugins can be added pre/post of image pull, compose up steps)

Requirement

There are situations that demand custom logic executions outside of pod lifecycle, and aligned with the executor's API functions. For example, we have a requirement to execute some custom logic to post error related metrics whenever the the control exits LaunchTask implementation of dce-go.

This may be applicable for other executor API methods too but scope of this issue could deal with LaunchTask and allow extensibility for all API methods.

Proposed Design

Executor Hook

  • ExecutorHook allows custom implementations to be plugged post execution of Docker Compose Mesos Executor's API methods
  • Here is a representation of proposed ExecutorHook interface
type ExecutorHook interface {
   // PostExec is invoked  post execution of Docker Compose Mesos Executor's lifecycle function
   PostExec(taskInfo *mesos.TaskInfo) error
   // BestEffort is invoked in case a PostExec returned an error and are expected to return a bool to indicate
   // if the execution needs to continue with the next available hook or not
   BestEffort(execPhase string) bool
}
  • Config for executor hook is defined based on the method of the executor API as shown below. For current requirement explained above, supporting post execution of LaunchTask is only needed. But there are possibilities to introduce "Pre" hooks and for a different API method of the executor so the config structure is designed to support that.
...
execHooks:
   LaunchTask:
      Post: ["hook1", "hook2"]
...

So, on exit from LaunchTask, most definite thing that is done in the current DCE is to send status to mesos. So to perform the post executions, we can introduce a task status channel and have the hooks executed based on various status changes.

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.