exoer on the grill: exo add-ons factory using docker and codenvy

36
Presentation of the Codenvy/Docker to create eXo Add-on factories

Upload: exo-platform

Post on 14-Jul-2015

4.862 views

Category:

Software


4 download

TRANSCRIPT

Page 1: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

Presentation of the

Codenvy/Dockerto create eXo Add-on factories

Page 2: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

Copyright 2015 eXo Platform

A presentation

by CWI/PRD Team

Page 3: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 4: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

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

Page 5: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

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

Page 6: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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”

Page 7: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

The introduction of

in brief

Copyright 2015 eXo Platform

Page 8: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

Copyright 2015 eXo Platform

“An open source project to pack, ship and run any application as a lightweight container.”

Page 9: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

Copyright 2015 eXo Platform

Page 10: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 11: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

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

Page 12: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

Reasons to use Docker ?

Copyright 2015 eXo Platform

With

I embark them all, no need to remember :)

-- Tomcat Mother Duck --

Page 13: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 14: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● Java is the code, docker is the config (Dockerfile)

sample:

Copyright 2015 eXo Platform

Like Java

Page 15: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● Git semantics: commit, push, pull

● docker pull exoplatform/exo-maven

● docker commit

● docker push

Copyright 2015 eXo Platform

Like Git

Page 16: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 17: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

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

Page 18: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

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

Page 19: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

The introduction of

Copyright 2015 eXo Platform

Page 20: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 21: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

What is Codenvy?

Copyright 2015 eXo Platform

Page 22: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

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

Page 23: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 24: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 25: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

Codenvy Factory (cont.)

Copyright 2015 eXo Platform

Page 26: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 27: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 28: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

Copyright 2015 eXo Platform

Codenvy Factory

Page 29: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

LIVE DEMO CREATE YOUR FIRST FACTORY IN SOME STEPS

Page 30: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

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

Page 32: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

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

Page 33: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 35: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

● 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

Page 36: eXoer on the grill: eXo Add-ons factory using Docker and Codenvy

Thank you !