exoer on the grill: exo add-ons factory using docker and codenvy
TRANSCRIPT
Presentation of the
Codenvy/Dockerto create eXo Add-on factories
Copyright 2015 eXo Platform
A presentation
by CWI/PRD Team
● Environment setup to develop eXo extensions is time consuming and resource intensive.
● Setup third party Maven repository
● Setup a complete eXo Platform Runtime to Deploy & Test the extension
● Powerful computer to run eXo Platform
Building eXo Add-on with Current Process
Copyright 2015 eXo Platform
Manual Steps
Agenda
Copyright 2015 eXo Platform
Enjoy...
1. eXo’s Goal - Encourage eXo Addon development2. Docker Introduction3. Codenvy/Factory Introduction4. Building eXo Add-on Factory thanks to Codenvy/Docker5. Live Demo
A developer can view the code and then modify it, build it, test it, debug it and run it without installing anything
eXo’s Goal - Encourage eXo Add-on Development
Copyright 2015 eXo Platform
● Deliver a ready-to-use IDE for fast on boarding.
● Available through a simple URL
● On eXo Add-ons Catalog: “Code & Run” button to launches factory
eXo’s Goal - Encourage eXo Add-on development
Copyright 2015 eXo Platform
Use of Codenvy Factories allows a “One Click Code & Run”
The introduction of
in brief
Copyright 2015 eXo Platform
Copyright 2015 eXo Platform
“An open source project to pack, ship and run any application as a lightweight container.”
Copyright 2015 eXo Platform
● For years, setup/installation/configuration packages/software have been complex activities:○ dependencies: Tomcat needs JVM○ versions management: Tomcat 7 needs JVM 7,
host server can have v6, v7, v8, how assure ?○ configuration: Tomcat ports, security○ update services, startup Become more important in dev/pre-prod/prod
Reasons to use Docker ?
Copyright 2015 eXo Platform
Reasons to use Docker ?
Copyright 2015 eXo Platform
Hope I don’t forget any child, I haz 7 ducks
-- Tomcat Mother Duck --
In prod, I haz 3 ducks more, which one is first ?
-- Tomcat Mother Duck --
DEVELOPMENT
PRODUCTION
Reasons to use Docker ?
Copyright 2015 eXo Platform
With
I embark them all, no need to remember :)
-- Tomcat Mother Duck --
● Docker is a new way of virtualizing, aiming to “build, ship, and run any app, anywhere”
Main Benefits: COST EFFECTIVE
VMs:- Each VM is 10Gb size 10 VMs =10x10= 100Gb resources.Docker (Linux Containers):<< 100Gb resources.
Docker in few words
Copyright 2015 eXo Platform
● Java is the code, docker is the config (Dockerfile)
sample:
Copyright 2015 eXo Platform
Like Java
● Git semantics: commit, push, pull
● docker pull exoplatform/exo-maven
● docker commit
● docker push
Copyright 2015 eXo Platform
Like Git
● Control versioning like Git (pull, commit, push, diff ...)
● Write once, run everywhere like Java (build, start, run, save ...)○ Run configs on your local as real as on server
● Can be integrated easily into various infrastructures: cloud, CI server (Codenvy, jenkins…)
Copyright 2015 eXo Platform
Working with Docker
eXo has a list of pre-built images
● docker pull exoplatform/ubuntu-jdk7-exo
● docker run -p 8080:8080 exoplatform/ubuntu-jdk7-exo
eXo Docker Images
Copyright 2015 eXo Platform
Some cases to use Docker in real world
Copyright 2015 eXo Platform
ADMIN
PLF imagepre-configured
Cloud Dev
Acceptance
Local dev
Support
QA campaigns
Quick fixes
consistency on 1 package
The introduction of
Copyright 2015 eXo Platform
● It started out as an additional feature to the eXo Platform in early 2009.
● Codenvy is a cloud environment for coding, building, debugging and running apps (IDE in the cloud)
● Codenvy allows any developer to run application in Docker, all from the browser without downloading anything on the desktop.
What is Codenvy?
Copyright 2015 eXo Platform
What is Codenvy?
Copyright 2015 eXo Platform
Impact in the software industry and the way we work● The way software vendors promote APIs and
SDKs.● Developers collaborate while building apps.
● Developers exchange with QA teams.
● Cloud development environments are managed by DevOps....
Codenvy
Copyright 2015 eXo Platform
● Creating a pre-configured environment for speeding development of new applications, add-ons, APIs or any other software
● Providing a development environment for modifying existing software and testing it out of the box
● Simplifying project collaboration for Development teams...
Codenvy Factory
Copyright 2015 eXo Platform
● There are three types of Codenvy Factories:
● Hack Factories● Tracked Factories (require a special account)● Branded Factories (require a special account)
Tracked and Branded Factories allow advanced customisations (ex: Welcome screens, branding, etc…) and provide powerful analytics features.
Tutorial: Building a Contribution Factory From Scratch
Codenvy Factory (cont.)
Copyright 2015 eXo Platform
Codenvy Factory (cont.)
Copyright 2015 eXo Platform
● In Codenvy a “runner” is the term to describe an execution runtime
● In order to deploy custom runners, Codenvy uses Docker recipes
Codenvy Factory (cont.)
Copyright 2015 eXo Platform
Codenvy custom Runner Docker File
exoplatform/ubuntu-jdk-exo
exoplatform/exo-presetup-account
exoplatform/exo-maven
Inhe
ritan
ce im
age
● Check out source code from the official eXo Github
● Customize Maven config for Codenvy
● Provide a Docker based runtime to Build, Deploy and Test the code Complete Maven based eXo build environmenteXo Platform 4.1 runtime completely setup and ready to try Add-on (with 4GB RAM)
Codenvy Factory
Copyright 2015 eXo Platform
Copyright 2015 eXo Platform
Codenvy Factory
LIVE DEMO CREATE YOUR FIRST FACTORY IN SOME STEPS
Requirements:
● A Codenvy account
● Codenvy CLI installed on your local machine
● Github account and DockerHub account linked to your Github account.
● Host the static resources (html...)
Getting started to build new factory
Copyright 2015 eXo Platform
Create new Codenvy Factory for eXo Marketplace Addon
● Codenvy Factory.json source
● Dockerfile
● Welcome HTML file
● Docker files repo & eXo Dockerhub
DEMO
Copyright 2015 eXo Platform
DEMO
Copyright 2015 eXo Platform
● Create factory➔ codenvy> create-factory /Users/namph/java/eXoProjects/exo-
docker/exo-addons/marketplace-extension/factory-markterplace.json➔ Factory URL: https://codenvy.com/f?id=3q8lxmzs4clmcdg8
● Visit eXo Add-ons Catalog
● Click on “Code new Add-on” ( ) button
● Implement your Add-on with template
● Click on “Run” ( ) button to build, deploy and start Web Server
Code new eXo Add-on thanks to Docker/Codenvy
Copyright 2015 eXo Platform
● Codenvy’s blog post: Create an new eXo Factory Using Codenvy and Docker
● Webinar: Codenvy Contribution Factory with eXo Chat
● eXo’s blog post: The new codenvy is a game changer and everybody benefits
● Tutorial: Codenvy Contribution Factory with eXo Chat
Find more resources
Copyright 2015 eXo Platform
● We can do even better with the new version Codenvy 2.1to make the factory cleaner, easier to maintain and maybe faster
● Improvement for eXo Factories by using “Try Now" and "Code Now" buttons instead of the current "Code & Run"
Go further
Copyright 2015 eXo Platform
Thank you !