Bosh Job and Package dependency problem.


Xue Zhi Yong <zhiyxue@...>
 

I have five Docker image which have following runtime dependency:
The Docker image 1 and Docker image 2 must be run before Docker image 3, 4 ,5
I create five bosh Jobs for them, but bosh document said can't set dependency between jobs. So when the Docker image 4 job will failed when it's run before image 3.
I'm not sure if it works when I create package for Docker image 1, 2, 3, and job for Docker image 4,5. In these two jobs to start all direct depend and indirectly depend image.


Anyone can give correct package and job skeleton and dependcy?


Gwenn Etourneau
 

Right there is no dependency between job, but I think in the manifest you
can put an order

job:

-name: docker1
...

-name:docker2
....


etc...

But dependency don't really exist in bosh.

On Tue, Jun 9, 2015 at 6:04 PM, Xue Zhi Yong <zhiyxue(a)126.com> wrote:

I have five Docker image which have following runtime dependency:
The Docker image 1 and Docker image 2 must be run before Docker image 3, 4
,5
I create five bosh Jobs for them, but bosh document said can't set
dependency between jobs. So when the Docker image 4 job will failed when
it's run before image 3.
I'm not sure if it works when I create package for Docker image 1, 2, 3,
and job for Docker image 4,5. In these two jobs to start all direct depend
and indirectly depend image.

Anyone can give correct package and job skeleton and dependcy?




_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh


Xue Zhi Yong <zhiyxue@...>
 

But How to control these jobs run sequence?
I tried these jobs will run concurrently.

在 2015年6月9日,21:38,Gwenn Etourneau <getourneau(a)pivotal.io> 写道:

Right there is no dependency between job, but I think in the manifest you can put an order

job:

-name: docker1
...

-name:docker2
....


etc...

But dependency don't really exist in bosh.





On Tue, Jun 9, 2015 at 6:04 PM, Xue Zhi Yong <zhiyxue(a)126.com> wrote:
I have five Docker image which have following runtime dependency:

The Docker image 1 and Docker image 2 must be run before Docker image 3, 4 ,5
I create five bosh Jobs for them, but bosh document said can't set dependency between jobs. So when the Docker image 4 job will failed when it's run before image 3.
I'm not sure if it works when I create package for Docker image 1, 2, 3, and job for Docker image 4,5. In these two jobs to start all direct depend and indirectly depend image.

Anyone can give correct package and job skeleton and dependcy?




_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh
_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh


Lev Berman
 

You can not control the sequence when there are several compilation workers
but you can set the workers number to 1. In the manifest:

compilation:
workers: 1

Also, you can run all of the containers in one job.

On Tue, Jun 9, 2015 at 5:44 PM, 126 Mail Same Pass With Sins <
zhiyxue(a)126.com> wrote:

But How to control these jobs run sequence?
I tried these jobs will run concurrently.



在 2015年6月9日,21:38,Gwenn Etourneau <getourneau(a)pivotal.io> 写道:

Right there is no dependency between job, but I think in the manifest
you can put an order

job:

-name: docker1
...

-name:docker2
....


etc...

But dependency don't really exist in bosh.





On Tue, Jun 9, 2015 at 6:04 PM, Xue Zhi Yong <zhiyxue(a)126.com> wrote:

I have five Docker image which have following runtime dependency:
The Docker image 1 and Docker image 2 must be run before Docker image
3, 4 ,5
I create five bosh Jobs for them, but bosh document said can't set
dependency between jobs. So when the Docker image 4 job will failed when
it's run before image 3.
I'm not sure if it works when I create package for Docker image 1, 2, 3,
and job for Docker image 4,5. In these two jobs to start all direct depend
and indirectly depend image.

Anyone can give correct package and job skeleton and dependcy?




_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh

_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh


--
Lev Berman

Altoros - Cloud Foundry deployment, training and integration

Github
*: https://github.com/ldmberman <https://github.com/ldmberman>*


Sabha
 

IIRC, Bosh would kick off the jobs in the order you have declared (serial).
So, you can have jobs 1 and 2 go first, then the others... If there are
multiple job templates all bundled to run within the same vm or job
definition, those they are concurrent.

-Sabha



--
View this message in context: http://cf-bosh.70367.x6.nabble.com/cf-bosh-Bosh-Job-and-Package-dependency-problem-tp150p157.html
Sent from the CF BOSH mailing list archive at Nabble.com.


Xue Zhi Yong <zhiyxue@...>
 

In my case, I create job for each container and all are run within same vm. So the result is out of control.


Except run all containers in one job. Is it possible that change some job to package, then add them as dependency for other jobs?

At 2015-06-10 01:15:54, "Sabha" <sabhap(a)pivotal.io> wrote:
IIRC, Bosh would kick off the jobs in the order you have declared (serial).
So, you can have jobs 1 and 2 go first, then the others... If there are
multiple job templates all bundled to run within the same vm or job
definition, those they are concurrent.

-Sabha



--
View this message in context: http://cf-bosh.70367.x6.nabble.com/cf-bosh-Bosh-Job-and-Package-dependency-problem-tp150p157.html
Sent from the CF BOSH mailing list archive at Nabble.com.
_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh


James Bayer
 

the docker bosh release supports "depends on" to start containers in a
particular order:
https://github.com/cf-platform-eng/docker-boshrelease/blob/master/examples/docker-aws.yml#L88-L89

On Tue, Jun 9, 2015 at 5:51 PM, Xue Zhi Yong <zhiyxue(a)126.com> wrote:

In my case, I create job for each container and all are run within same
vm. So the result is out of control.

Except run all containers in one job. Is it possible that change some job
to package, then add them as dependency for other jobs?



At 2015-06-10 01:15:54, "Sabha" <sabhap(a)pivotal.io> wrote:
IIRC, Bosh would kick off the jobs in the order you have declared (serial).
So, you can have jobs 1 and 2 go first, then the others... If there are
multiple job templates all bundled to run within the same vm or job
definition, those they are concurrent.

-Sabha



--
View this message in context: http://cf-bosh.70367.x6.nabble.com/cf-bosh-Bosh-Job-and-Package-dependency-problem-tp150p157.html
Sent from the CF BOSH mailing list archive at Nabble.com.
_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh



_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh

--
Thank you,

James Bayer


Gwenn Etourneau
 

On Wed, Jun 10, 2015 at 2:10 PM, James Bayer <jbayer(a)pivotal.io> wrote:

the docker bosh release supports "depends on" to start containers in a
particular order:
https://github.com/cf-platform-eng/docker-boshrelease/blob/master/examples/docker-aws.yml#L88-L89

On Tue, Jun 9, 2015 at 5:51 PM, Xue Zhi Yong <zhiyxue(a)126.com> wrote:

In my case, I create job for each container and all are run within same
vm. So the result is out of control.

Except run all containers in one job. Is it possible that change some
job to package, then add them as dependency for other jobs?



At 2015-06-10 01:15:54, "Sabha" <sabhap(a)pivotal.io> wrote:
IIRC, Bosh would kick off the jobs in the order you have declared (serial).
So, you can have jobs 1 and 2 go first, then the others... If there are
multiple job templates all bundled to run within the same vm or job
definition, those they are concurrent.

-Sabha



--
View this message in context: http://cf-bosh.70367.x6.nabble.com/cf-bosh-Bosh-Job-and-Package-dependency-problem-tp150p157.html
Sent from the CF BOSH mailing list archive at Nabble.com.
_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh



_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh


--
Thank you,

James Bayer

_______________________________________________
cf-bosh mailing list
cf-bosh(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-bosh


Sabha
 

Probably add some extra scripting to check if task1 and task2 are started
before kicking off other tasks by doing a sleep-wakeup-check-sleep loop till
task1 and task2 are really running as they are all running on the same vm?



--
View this message in context: http://cf-bosh.70367.x6.nabble.com/cf-bosh-Bosh-Job-and-Package-dependency-problem-tp150p166.html
Sent from the CF BOSH mailing list archive at Nabble.com.