Jenkins slave running in ECS cluster start container slow - jenkins

I'm using jenkins slave in AWS ECS cluster, everytimes when I press build, slave container take 3mins to start, how can I speed up this?

Related

Schedule jenkins slaves across all nodes in kubernetes cluster (round robin)

my Kubernetes setup:
v1.16.2 on bare metal
1 master node: used for Jenkins Master + Docker registry
5 slave nodes: used for Jenkins JNPL slaves
I use kubernetes-plugin to run slave docker agents. All slave k8 nodes labeled as "jenkins=slave". When I use nodeSelector ("jenkins=slave") for podTemplate, kubernetes always schedule new pod on same node regardless the amount of started Jenkins jobs.
Please give me advice, how I can configure kubernetes or kubernetes-plugin to schedule each next build by round-robin (across all labeled nodes in kubernetes cluster)
Thank you.
This is generally handled by the inter-pod anti affinity configuration https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity. You would set this in the pod template for your builder deployment. That said, it's more common to use the Kubernetes plugin for Jenkins which runs each build as a temporary pod, rather than having long-lived JNLP builders.

Can't run jenkins slave on ECS fargate

I'm using Amazon Elastic Container Service plugin which allows running Jenkins slaves on AWS ECS. Functionality which allows running slaves on EC2 type of ECS works perfectly, but I can't run slaves on Fargate. Tasks in the cluster are not created and no any activity in the ECS cluster at all. Can anyone share configurations of Amazon Elastic Container Service plugin which successfully works with Fargate, or help with an issue?

Adding Vagrant VM as slave in Jenkins

I'm having ubuntu 16.04 as host machine.
On the top of it, there are 2 Vagrant VMs one acts as Master and another Slave.
On Master, I have Jenkins installed and running
On slave I have Docker installed. I can do Vagrant up and Vagrant ssh and run both machines at the same time.
I need to deploy a .war file which is created in Master VM on to the Docker container which runs on the slave machine. I tried to use syncedfolder option inn Vagrant and Volume in docker. I can copy the war file to webapps directory of docker container by linking those things.
But How do I add the slave Vagrant VM as a slave node in Jenkins which is running on Master VM and deploy to docker container directly from there.
Do I need to have Jenkins installed on slave VM or anything else?
But How do I add the slave Vagrant VM as a slave node in Jenkins which
is running on Master VM and deploy to docker container directly from
there.
Do I need to have Jenkins installed on slave VM or anything else?
Adding a node as a jenkins slave to the master is well documented and you can find the solution here: How to set up new Jenkins slave. Basically, the master needs only to have ssh access and it will install the jenkins slave agent on the node.
Once you have a node registered, you can scheduel builds to run on that node, where you can pretty much do anything. You will have access to all the docker commands via the shell build steps of regular FreeStyle Jobs.

How do I create a local kubernates cluster in a VM?

I have a set of docker images running in a Kubernates cluster on GKE. I have a Jenkins server running on a VM in GKE.
I have docker builds and GKE deploys running on the Jenkins server, but I would like to start up a 'local' cluster on the Jenkins server after successful builds, run my dockers in that cluster, run my tests towards the cluster, and then close down the local cluster before deploying the docker images to GKE.
I know about minikube, but they state that you are not able to run nested VM's, and I wonder if this blocks my dream of test my cluster before deploying it?
Do I have to run my local cluster on a physical server to be able to run my tests, or is there a solution to my problem?
Have you considered using kubeadm?
You can run a Kubernetes cluster within your Jenkins VM. Setup is a bit different than minikube and it's still in beta but it will let you test your cluster before the final deployment.

Mesos, Marathon, Docker, Wildfly

I have 3 node Mesos cluster with Marathon framework. On slaves i have Docker and I want deploy few Wildfly instances on one node.
How can i deploy few instances of Wildfly docker containers on one slave Mesos node by Marathon?
deploying a docker container using marathon is usually straight forward.
Do I understand correctly that want to deploy several containers onto a single slave? In that case you should look at marathon's contraints.

Resources