Hi, I think it would be great with an internal extension point for a "scheduler" where you easily can adapt to different sub-systems. I primarily think of AWS ECS at this point but there are others.
/Magnus 2015-01-23 18:33 GMT+01:00 Carlos Sanchez <[email protected]>: > Hi! > > I'm creating the Kubernetes plugin [1] to start slaves in Kubernetes or > Google Container Engine, which basically means launching Docker containers > across multiple hosts with just one API. > Some background: Kubernetes allows launching individual containers (Pods) > or creating a ReplicationController, which accepts a Pod template and a > number of how many containers you want to run, and can be resized > dynamically, a pool of containers. > > Initially I though about implementing the plugin using a > ReplicationController and resizing it as new slaves are needed, but seems > that Jenkins operation doesn't fit well with this idea. It would prevent > killing specific slaves, it would just be a pool. So I went ahead and moved > to launch Pods one by one. > > The issue I have now is about initialization time, where the container is > not accepting connections until the image is downloaded and started. The > Docker plugin has this comment [2] > > // Docker instances may have a long init script. If we declare > // the provisioning complete by returning without the connect > // operation, NodeProvisioner may decide that it still wants > // one more instance, because it sees that (1) all the slaves > // are offline (because it's still being launched) and > // (2) there's no capacity provisioned yet. > // > // deferring the completion of provisioning until the launch > // goes successful prevents this problem. > slave.toComputer().connect(false).get(); > > Should I do the same? > > There is also the issue that Kubernetes would be better suited for swarm > slaves. Opening ssh or ports in each pod is more complicated than just > doing the connection to the master from the container. > > Thanks! > > [1] > https://github.com/carlossg/jenkins-kubernetes-plugin/blob/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java > [2] > https://github.com/jenkinsci/docker-plugin/blob/master/src/main/java/com/nirima/jenkins/plugins/docker/DockerCloud.java#L239 > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/5e641038-b83b-4901-83a8-4bb54255498a%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/5e641038-b83b-4901-83a8-4bb54255498a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAMHD1XK_kThaUvbOYk9b5bJNTGun0nWd4s_KkQpiPxQ%2B24fmtg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
