Giter Site home page Giter Site logo

Comments (3)

solidsnack avatar solidsnack commented on July 21, 2024

A daemon container like that should "just work". The integration tests cover a similar use case:

class PGScheduler(Scheduler):
    def __init__(self, sleep=10,
                       container="docker:///zaiste/postgresql",
                       trials=10):
        Scheduler.__init__(self, trials)
        self.container = container
        self.sleep = sleep
    def statusUpdate(self, driver, update):
        super(type(self), self).statusUpdate(driver, update)
        if update.state == mesos_pb2.TASK_RUNNING:
            def end_task():
                time.sleep(self.sleep)
                driver.killTask(update.task_id)
            thread = threading.Thread(target=end_task)
            thread.daemon = True
            thread.start()
        if self.all_tasks_done():
            self.sum_up()
            driver.stop()
    def resourceOffers(self, driver, offers):
        for offer in offers:
            if len(self.tasks) >= self.trials: break
            tid  = self.next_task_id()
            sid  = offer.slave_id
            task = task_with_daemon(tid, sid, self.container)
            self.tasks += [task]
            self.loggers[tid].info(present_task(task))
            driver.launchTasks(offer.id, [task])

https://github.com/mesosphere/deimos/blob/master/integration-test/deimos-test.py#L93

from deimos.

ssorallen avatar ssorallen commented on July 21, 2024

@jplock, did you have any problems running other Docker images? We use Deimos internally and run images not based off "libmesos/ubuntu". The container needs to have no knowledge it is being run on top of Mesos.

from deimos.

jplock avatar jplock commented on July 21, 2024

I think this was solved in a later deimos release so I think it can be closed.

from deimos.

Related Issues (20)

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.