Coder Social home page Coder Social logo

sudokamikaze / slave Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 81 KB

Fast & Comfort deployment of Jenkins slaves for building Android stuff e.g ROMs & recovery

License: GNU General Public License v3.0

Dockerfile 95.75% Makefile 4.25%
dockerfile jenkins-slave jenkins ansible android-build

slave's Introduction

Slave - Docker image for Jenkins slave creation & deploying

Table of contents

Installation

First of all, you must create a slave on your Jenkins and set to Launch agent via Java Web Start. After that you'll get your secret ID which you have to expose to container via ENV

Clone this repo

git clone https://github.com/Sudokamikaze/Slave.git

Ansible

Automated

Just run make in root directory of the project

Manual

Run this command and answer some questions before we can start

ansible-playbook \
    playbooks/inventory_gen.yml

After that, execute main playbook by running this command:

ansible-playbook \
    --ask-become-pass \
    playbooks/slave_deploy.yml

By the hands

There're some ENVs which have to be corrected:

ENV Description
Jenkins_Secret= You'll find your unique ID in Jenkins slave creation menu
Jenkins_Node_Name= Name that you'll set in Jenkins slave creation menu
Jenkins_Master_IP= IP of your main node Jenkins
Jenkins_Master_Port Port of it

When you acknowledged with this information let's begin building

Run docker build

    docker build \
    --no-cache \
    --build-arg Jenkins_Secret="Your_Secret here" \
    --build-arg Jenkins_Node_Name="Your node name here" \
    --build-arg Jenkins_Master_IP="Your Master Jenkins ip here" \
    --build-arg Jenkins_Master_Port="Your Master Jenkins port here" \
    -t slave:latest .
DO NOT FORGET THE `.` 

Create volume for projects data

docker volume create slave_data

Issue run command

   docker run -d -v \
   slave_data:/home/jenkins \
   --name=Jenkins_slave \
   --restart=always \
   --network=pipe-to-slave \ # NOTE, THAT STEP IS OPTIONAL
   -e Jenkins_Secret="YOUR_ID" \
   -e Jenkins_Node_Name="YOUR NODE'S NAME" \
   -e Jenkins_Master_IP="YOUR JENKINS' IP" \
   -e Jenkins_Master_Port="YOUR JENKINS' PORT" \
   slave:latest

That's it! You've made it!

slave's People

Contributors

sudokamikaze avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.