Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microplugins with Docker

Microplugins with Docker

Julien Vey

April 17, 2015
Tweet

More Decks by Julien Vey

Other Decks in Programming

Transcript

  1. THE DOCKER MODEL DOCKER DAEMON UNIX SOCKET DOCKER REMOTE API

    DOCKER CLI creates an which exposes the that can be used by the
  2. A STANDARD INTERFACE require 'vagrant' module VagrantPlugins module Openstack class

    Provider < Vagrant.plugin('2', :provider) RUBY CLASSES
  3. A STANDARD INTERFACE package jenkins.plugins.git; public abstract class AbstractGitSCMSource extends

    SCMSource { protected SCMRevision retrieve(…) protected void retrieve(…) } JAVA INTERFACES & CLASSES
  4. A STANDARD INTERFACE DOCKER VOLUMES ├ config │ ├ config.json

    │ ├ key ├ src │ ├ main.go │ ├ main_test.go │ ├ Makefile DOCKER PLUGIN INPUT & OUPUT
  5. A STANDARD INTERFACE DOCKER VOLUMES ├ config │ ├ config.json

    │ ├ key ├ src │ ├ main.go │ ├ main_test.go │ ├ Makefile DOCKER PLUGIN A DOCKER PLUGIN B ├ binaries │ ├ main_darwin_amd64 │ ├ main_linux_x86 INPUT & OUPUT
  6. NEED TO LEARN ONLY ONE LANGUAGE BUT TIED TO THIS

    LANGUAGE LANGUAGE AGNOSTIC PROGRAMMING LANGUAGE CLASSIC DOCKER
  7. NEED TO BE WRAPPED CAN BE NATIVE LANGUAGE CAN BE

    CHOSEN ACCORDINGLY NATIVE TOOLS CLASSIC DOCKER
  8. DOCKER ├ private-key ├ out │ ├ main.go │ ├

    main_test.go │ ├ Makefile GIT PLUGIN CONTAINER $SCM_URL $SCM_BRANCH
  9. DOCKER FROM debian:jessie RUN apt-get update \ && apt-get install

    -y git ADD run.sh /run.sh RUN echo "IdentityFile /private-key" \ >> /etc/ssh/ssh_config CMD ["/run.sh"] #!/bin/bash git clone "$SCM_URL" --recursive /out cd /out && git checkout "$SCM_BRANCH" Dockerfile run.sh
  10. GIT PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH BUILD PIPELINE EXAMPLE ORCHESTRATOR CONTAINER docker run git_plugin
  11. GIT PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH BUILD PIPELINE EXAMPLE MAVEN PLUGIN CONTAINER ORCHESTRATOR CONTAINER docker run git_plugin docker run maven_plugin
  12. GIT PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH BUILD PIPELINE EXAMPLE MAVEN PLUGIN CONTAINER ├ output │ ├ main.war ORCHESTRATOR CONTAINER docker run git_plugin docker run maven_plugin
  13. GIT PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH BUILD PIPELINE EXAMPLE MAVEN PLUGIN CONTAINER SELENIUM PLUGIN CONTAINER ├ output │ ├ main.war ORCHESTRATOR CONTAINER docker run git_plugin docker run maven_plugin docker run selenium_plugin echo $?
  14. GIT PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH MERCURIAL INSTEAD OF GIT ? MAVEN PLUGIN CONTAINER SELENIUM PLUGIN CONTAINER ├ output │ ├ main.war ORCHESTRATOR CONTAINER docker run git_plugin docker run maven_plugin docker run selenium_plugin echo $?
  15. HG PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH MERCURIAL INSTEAD OF GIT ? MAVEN PLUGIN CONTAINER SELENIUM PLUGIN CONTAINER ├ output │ ├ main.war ORCHESTRATOR CONTAINER docker run hg_plugin docker run maven_plugin docker run selenium_plugin echo $?
  16. HG PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH MAVEN PLUGIN CONTAINER SELENIUM PLUGIN CONTAINER ├ output │ ├ main.war ORCHESTRATOR CONTAINER docker run hg_plugin docker run maven_plugin docker run selenium_plugin echo $? GRADLE INSTEAD OF MAVEN ?
  17. HG PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH GRADLE INSTEAD OF MAVEN ? GRADLE PLUGIN CONTAINER SELENIUM PLUGIN CONTAINER ├ output │ ├ main.war ORCHESTRATOR CONTAINER docker run hg_plugin docker run gradle_plugin docker run selenium_plugin echo $?
  18. HG PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH ANOTHER BUILD WORKFLOW ? GRADLE PLUGIN CONTAINER SELENIUM PLUGIN CONTAINER ├ output │ ├ main.war ORCHESTRATOR CONTAINER docker run hg_plugin docker run gradle_plugin docker run selenium_plugin echo $?
  19. HG PLUGIN CONTAINER ├ private-key ├ src │ ├ Main.java

    │ ├ pom.xml $SCM_URL $SCM_BRANCH ANOTHER BUILD WORKFLOW ? GRADLE PLUGIN CONTAINER SELENIUM PLUGIN CONTAINER ├ output │ ├ main.war YOUR OWN ORCHESTRATOR CONTAINER docker run hg_plugin docker run gradle_plugin docker run selenium_plugin echo $?