-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feedback] Nomad 0.11 lifecycle insufficient for 3 phase deploys #8039
Comments
There’s a good amount of discussion here #419 - but the short of it is that nomad does not currently support this. We ended up using terraform to implement this |
We are planning on adding a PostStop hook to the Nomad 0.12 series. Would this be helpful? |
As a separate one, multiple prestarts which need to be run sequentially/in a particular order. I can see two alternatives:
|
@yishan-lin adding more hooks just solves it for an N stage deploy, where N is the amount of hooks you have. One can imagine that a 5-phase deploy where only the last phase is the main container needing a postprepreprestart hook or something heinous like that. Docker-compose does this with the |
Heard loud and clear. We’ll be introducing PostStop and PostStart hooks into the 0.12 series but know that doesn’t address the underlying limitations of such a design. We’ll look to our airflow integration targeted in the fall to provide this functionality in a comprehensive manner to Nomad. |
I see that lifecycle works on task level. I would like it to work on a group level. Why? Right now we run some auxiliary apps that need a redis database. Preferably I would put redis in a different group, so it can be spawned on a different node if necessary. Also I might need a higher If I'm able to say: this group should be up before the other group, then we can register the redis task in consul, and use the |
Also currently blocked by this. I'm concerned that it seems the plan to support this simple use-case is to outsource to Apache Airflow. I have no interest in Airflow: I just need to specify a basic dependency chain, which is already possible in docker-compose or systemd. |
Nomad 0.11 introduced
lifecycle
stanza which is a much needed resource. According to the blogpost you are looking for feedbackOne use case this doeesn't cover is when you have 3 steps
Here is an example job
https://gist.github.com/spuder/54f4b54a86d4690a76bfc4ed8eecc415
I've set the following
While this mostly works, and the seed database job always runs before the web server, it doesn't guarantee that postgres will be up before the seed database job.
There needs to be a way to allow for 3 services to be chained together
The text was updated successfully, but these errors were encountered: