Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open...

14
Benefits of Eclipse Che When Developing Multi-Container Apps How to use existing production k8s environment in enterprise development Eugene Ivantsov Senior Software Maintenance Engineer Red Hat

Transcript of Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open...

Page 1: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

Benefits of Eclipse Che When Developing Multi-Container AppsHow to use existing production k8s environment in enterprise development

Eugene IvantsovSenior Software Maintenance EngineerRed Hat

Page 2: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED2

● Introduction to Eclipse Che● Cloud native development

challenges● Solution Eclipse Che offers● Demo: deploying a microservice app

to a k8s cluster, developing in Che using the same yaml definitions, updating deployments in k8s cluster

AGENDA:This presentation covers:

Page 3: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED3

Open Source

Eclipse Foundation project since 2016. ~4.5k stars, ~100

releases, ~90 contributors, ~800 forks

Workspace server

Runs on and supports OpenShift, Kubernetes and Docker as runtime engines.

New infras can be plugged in

Cloud IDE

Code, compile, run debug and collaborate on projects in your browser. GWT and TypeScript IDEs are available

What Is Eclipse Che?

Page 4: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED4

LOCALHOST ENVIRONMENT NEVER REPLICATES PROD ENVIRONMENTS

Containers behave in the same way anywhere they are run

The ProblemContainerized production VS localhost development

!=apiVersion: extensions/v1beta1kind: Deploymentmetadata: labels: app: microservice-app-example name: users-apispec: replicas: 2template: metadata:

PRODUCTION DEPLOYMENTS ARE WELL DEFINED AND PREDICTABLE

Something that works on localhost may fail in containerized production env

Page 5: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED5

CHE RUNS PROD IN DEV MODE

The Solution

=apiVersion: extensions/v1beta1kind: Deploymentmetadata: labels: app: microservice-app-example name: users-apispec: replicas: 2template: metadata:

Brings IDE tooling, source code and data management on top of prod yaml definition

Develop in your production!

Page 6: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED

How It WorksChe workspace engine magic:

Prod containers defined in env recipe

IDE

Build

Tooling

● Shared volumes● Services● Separate build and run● Remote debug

Page 7: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED

Workspace Environment● Consist of containers, single/multi-container pods

● Defined by a recipe: k8s yaml, docker image, composefile

● Shared volumes to exchange source code changes and artifacts

● Servers to expose services (publishing ports, OpenShift routes, k8s

ingress etc)

Page 8: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED

IDE● Fast JavaScript IDE

● Client-Server architecture

● Pluggability

● Plugin registry

● Custom IDE per workspace

● Use of various IDEs (e.g. Theia https://github.com/theia-ide/theia)

Page 9: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED

Tooling● LSP support

● Local LS mode

● Language server as side-cars (TCP mode, shared volumes)

● Registering new Language Servers

● Terminal and exec agent sidecars

Page 10: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED

Build Containers● Use custom build images (e.g. the ones used in CI)

● Shared volumes - build artifacts available in run containers

● Resource management - RAM allocation for a particular project

● One service per container

Page 11: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED11

Production Che Workspace CI/CD

Cloud Native Development with Che

Page 12: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED12

Deploy microservice app to MiniKube Push to GitHub

CI job triggeredDevelop in Che

Demo TimeWhat will we see?

Page 13: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

INSERT DESIGNATOR, IF NEEDED

Get Started With Eclipse Che

13

Sources https://github.com/eclipse/che

Dev List [email protected]

Docs https://eclipse.org/che/docs

Mattermosthttps://mattermost.eclipse.org/

Page 14: Multi-Container Apps Benefits of Eclipse Che When Developing · 3 INSERT DESIGNATOR, IF NEEDED Open Source Eclipse Foundation project since 2016. ~4.5k stars, ~100 releases, ~90 contributors,

THANK YOUplus.google.com/+RedHat

linkedin.com/company/red-hat

youtube.com/user/RedHatVideos

facebook.com/redhatinc

twitter.com/eclipse_che