All Projects → jenkinsci → Mesos Plugin

jenkinsci / Mesos Plugin

Licence: apache-2.0
Mesos Cloud Jenkins Plugin

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Mesos Plugin

Cloud Reports
Scans your AWS cloud resources and generates reports. Check out free hosted version:
Stars: ✭ 255 (-11.46%)
Mutual labels:  cloud
Blockchain Network On Kubernetes
Demonstrates the steps involved in setting up your business network on Hyperledger Fabric using Kubernetes APIs on IBM Cloud Kubernetes Service.
Stars: ✭ 261 (-9.37%)
Mutual labels:  cloud
Arvados
An open source platform for managing and analyzing biomedical big data
Stars: ✭ 274 (-4.86%)
Mutual labels:  cloud
Multipass
Multipass orchestrates virtual Ubuntu instances
Stars: ✭ 3,978 (+1281.25%)
Mutual labels:  cloud
Travis Buddy
🚀 Seamless integration between TravisCI and GitHub
Stars: ✭ 262 (-9.03%)
Mutual labels:  cloud
Vmango
Your own personal IaaS cloud
Stars: ✭ 265 (-7.99%)
Mutual labels:  cloud
Arozos
General purposed Web Desktop Operating Platform / OS for Raspberry Pis, Now written in Go!
Stars: ✭ 252 (-12.5%)
Mutual labels:  cloud
Ictf Framework
The iCTF Framework, presented by Shellphish!
Stars: ✭ 281 (-2.43%)
Mutual labels:  cloud
Shield
A standalone system that can perform backup and restore functions for a wide variety of pluggable data systems
Stars: ✭ 262 (-9.03%)
Mutual labels:  cloud
Codenvy
Codenvy
Stars: ✭ 273 (-5.21%)
Mutual labels:  cloud
Ccodashboard
Welcome to the Continuous Cloud Optimization Power BI Dashboard GitHub Project. In this repository you will find all the guidance and files needed to deploy the Dashboard in your environment to take benefit of a single pane of glass to get insights about your Azure resources and services.
Stars: ✭ 256 (-11.11%)
Mutual labels:  cloud
Serverlessbydesign
A visual approach to serverless development. Think. Build. Repeat.
Stars: ✭ 254 (-11.81%)
Mutual labels:  cloud
Cloudbrute
Awesome cloud enumerator
Stars: ✭ 268 (-6.94%)
Mutual labels:  cloud
Cloudblock
Cloudblock automates deployment of secure ad-blocking for all of your devices - even when mobile. Step-by-step text and video guides included! Compatible clouds include AWS, Azure, Google Cloud, and Oracle Cloud. Cloudblock deploys Wireguard VPN, Pi-Hole DNS Ad-blocking, and DNS over HTTPS in a cloud provider - or locally - using Terraform and Ansible.
Stars: ✭ 257 (-10.76%)
Mutual labels:  cloud
Aws Auto Cleanup
Open-source application to programmatically clean your AWS resources based on a whitelist and time to live (TTL) settings
Stars: ✭ 276 (-4.17%)
Mutual labels:  cloud
Flex4apps
Flex4Apps main project repository
Stars: ✭ 255 (-11.46%)
Mutual labels:  cloud
Esp Aliyun
Aliyun Iotkit-embedded, support esp32 & esp8266.
Stars: ✭ 262 (-9.03%)
Mutual labels:  cloud
Vuewordcloud
Generates a cloud out of the words.
Stars: ✭ 284 (-1.39%)
Mutual labels:  cloud
Apps Script Samples
Apps Script samples for Google Workspace products.
Stars: ✭ 3,301 (+1046.18%)
Mutual labels:  cloud
Scoutsuite
Multi-Cloud Security Auditing Tool
Stars: ✭ 3,803 (+1220.49%)
Mutual labels:  cloud

Docker Pulls

Jenkins on Mesos

The jenkins-mesos plugin allows Jenkins to dynamically launch Jenkins slaves on a Mesos cluster depending on the workload!

Put simply, whenever the Jenkins Build Queue starts getting bigger, this plugin automatically spins up additional Jenkins agent(s) on Mesos so that jobs can be immediately scheduled! Similarly, when a Jenkins slave is idle for a long time it is automatically shut down.

Table of Contents

Prerequisite

You need to have access to a running Mesos cluster. For instructions on setting up a Mesos cluster, please refer to the Mesos website.

Installing the Plugin

  • Go to 'Manage Plugins' page in the Jenkins Web UI, you'll find the plugin in the 'Available' tab under the name 'mesos'.

  • (Optional) Install the metrics plugin which is an optional dependency of this plugin, used for additional but not essential features.

Configuring the Plugin

Now go to 'Configure' page in Jenkins. If the plugin is successfully installed you should see an option to 'Add a new cloud' at the bottom of the page.

  1. Add the 'Mesos Cloud'.
  2. Give the path to the address http://HOST:PORT of a running Mesos master. On DC/OS this can be as simple as https://leader.mesos:5050.
  3. Set the user name agents should start as. Ensure that the Mesos agents have have the user available.
  4. Set the Jenkins URL.
  5. Click Save.

You can click Test Conection to see if the Mesos client of the plugin can find the Mesos master.

If the Mesos master uses a secured connection with a custom certificate you can supply it under Use a custom SSL certificate.

Adding Agent Specs

An Agent Spec describes a Jenkins node for Mesos.

You can update the values/Add more 'Agent Specs'/Delete 'Agent Specs' by clicking on 'Advanced'. 'Agent Specs' can hold required information(Executor CPU, Executor Mem etc) for an agent that needs to be matched against Mesos offers. Label name is the key between the job and the required agent to execute the job. See Configuring Jenkins Jobs. For instance, heavy jobs can be assigned label 'powerful_agent'(which has 20 Executor CPU, 10240M Executor Mem etc) and light weight jobs can be assigned label 'light_weight_agent'(which has 1 Executor CPU, 128M Executor Mem etc).

The Jenkins Configuration as Code in dcos/conf/jenkins configures a Linux agent based on the amazoncorretto:8 Docker image and a Windows agent based on mesosphere/jenkins-windows-node:latest Docker image. See https://github.com/jeschkies/hello-world-fsharp/blob/master/Jenkinsfile for an example build.

DC/OS Authentication

The plugin can authenticate with a DC/OS enterprise cluster. Simply run the environment variables DCOS_SERVICE_ACCOUNT containing the service account name and DCOS_SERVICE_ACCOUNT_PRIVATE_KEY containing the private key for the service account. See On DC/OS Enterprise for details.

Configuring Jenkins Jobs

Finally, just add the label name you have configured in Mesos cloud configuration -> Advanced -> Slave Info -> Label String (default is mesos) to the jobs (configure -> Restrict where this project can run checkbox) that you want to run on a specific slave type inside Mesos cluster.

Docker Containers

By default, the Jenkins slaves are run in the default Mesos container. To run the Jenkins agent inside a Docker container, there are two options.

1) "Use Native Docker Containerizer" : Select this option if Mesos slave(s) are configured with "--containerizers=docker" (recommended).

2) "Use External Containerizer" : Select this option if Mesos slave(s) are configured with "--containerizers=external".

Docker Configuration

Volumes

At a minimum, a container path must be entered to mount the volume. A host path can also be specified to bind mount the container path to the host path. This will allow persistence of data between slaves on the same node. The default setting is read-write, but an option is provided for read-only use.

Parameters

Additional parameters are available for the docker run command, but there are too many and they change too often to list all separately. This section allows you to provide any parameter you want. Ensure that your Docker version on your Mesos slaves is compatible with the parameters you add and that the values are correctly formatted. Use the full-word parameter and not the shortcut version, as these may not work properly. Also, exclude the preceding double-dash on the parameter name. For example, enter volumes-from and my_container_name to recieve the volumes from my_container_name. Of course my_container_name must already be on the Mesos slave where the Jenkins slave will run. This shouldn't cause problems in a homogenous environment where Jenkins slaves only run on particular Mesos slaves.

Over provisioning flags

By default, Jenkins spawns slaves conservatively. Say, if there are 2 builds in queue, it won't spawn 2 executors immediately. It will spawn one executor and wait for sometime for the first executor to be freed before deciding to spawn the second executor. Jenkins makes sure every executor it spawns is utilized to the maximum. If you want to override this behaviour and spawn an executor for each build in queue immediately without waiting, you can use these flags during Jenkins startup: -Dhudson.slaves.NodeProvisioner.MARGIN=50 -Dhudson.slaves.NodeProvisioner.MARGIN0=0.85

Single-Use Slave

Freestyle jobs

In the Build Environment settings, you may select "Mesos Single-Use Slave" to schedule disposal of the slave after the build finishes.

Pipeline jobs

To schedule slave disposal from a Pipeline job:

node('mylabel') {
    wrap([$class: 'MesosSingleUseSlave']) {
        // build actions
    }
}

Plugin Development

Building the plugin

Build the plugin as follows:

$ ./gradlew check

This should build the Mesos plugin as mesos.hpi in the target folder. A test Jenkins server can be started with

$ ./gradlew server 

The integration tests require an installation of Mesos and Docker. You can run just the unit tests with

$ ./gradlew test

and the integration tests with

$ ./gradlew integrationTest

The code is formatted following the Google Style Guide.

Testing On DC/OS Enterprise

See the dcos folder.

Release

You must have publish rights and the credentials set in ~/.m2/settings.xml and ~/.jenkins-ci.org as described here.

To release this plugin

  1. Set the version in build.gradle.
  2. Publish the plugin with ./gradlew publish.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].