eremetic-framework / eremetic

A Framework for Mesos to run one-off tasks in docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add functionality to make http request to self

ror6ax opened this issue · comments

URI and FETCH seem to work before the task is run. It would be cool to have a possibility to run a task which is a webserver and get/post to it. Then set status depending on request response.

Hi, I'm afraid I don't quite get what you are asking, could you describe a bit more what you are trying to do?

The resources specified in fetch is downloaded by the agent before launching the task so you can not make a request to itself but I'm not sure what good that would do anyway so I this is probably where I misunderstand you.

My usecase is that a task is a web application.
I'd like to spin it up using the task, make one http request to it and kill the app.

ok. that should be doable. You can run a webserver if you specify that you need a port to be mapped to your task. Then you can query the task info to see what your endpoint is once the task is running and then you can send a request to it. And then after that cancel the task (or have it exit on it's own after processing that first request).

I think this should all be possible already by using the API as it looks today, the request would have to be sent from the tool that is talking to eremetic