Few months ago, Codenvy released a great tutorial about “Creating an eXo Factory Using Codenvy and Docker” http://blog.codenvy.com/creating-codenvy-factory-exo-extensions-development which gave great details about how eXo, Codenvy and Docker can work together to give developers an easy way to code eXo add-ons.
In this presentation we will bring insights about how we used Codenvy’s Factories (with Docker recipes) to give developers a one-click easy way to begin coding eXo Add-ons.
eXoers on the Grill aims to provide some incentive & fresh air for our staff in order to constantly re-think our methods, spread good practices, promote some technology or tools, generate ideas, etc... All the teams are invited to contribute by picking up some hot topics of their choice and spread to other teams.
3. ● 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
ManualSteps
4. Agenda
Copyright 2015 eXo Platform
Enjoy...
1. eXo’s Goal - Encourage eXo Addon development
2. Docker Introduction
3. Codenvy/Factory Introduction
4. Building eXo Add-on Factory thanks to Codenvy/Docker
5. Live Demo
5. 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
6. ● 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”
10. ● 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
11. 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
12. Reasons to use Docker ?
Copyright 2015 eXo Platform
With
I embark them all, no need to remember :)
-- Tomcat Mother Duck --
13. ● 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
14. ● Java is the code, docker is the config (Dockerfile)
sample:
Copyright 2015 eXo Platform
Like Java
16. ● 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
17. 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
18. Some cases to use Docker in real world
Copyright 2015 eXo Platform
ADMIN
PLF image
pre-configured
Cloud Dev
Acceptance
Local dev
Support
QA campaigns
Quick fixes
consistency on 1 package
20. ● 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
22. 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
23. ● 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
24. ● 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
26. ● 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
Inheritanceimage
27. ● 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 environment
eXo Platform 4.1 runtime completely setup and ready to try Add-on
(with 4GB RAM)
Codenvy Factory
Copyright 2015 eXo Platform
30. 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
33. ● 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
34. ● 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
35. ● We can do even better with the new version Codenvy
2.1
to 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