OpenShift for Java EE Developers

Post on 16-Jul-2015

530 views 1 download

Tags:

Transcript of OpenShift for Java EE Developers

1

2

“The cloud never comes from the quarter of the horizon from which we watch for it.“Elizabeth Gaskell

http://www.flickr.com/photos/viamoi/3650717808/

3

4

Virtualized

On-Demand

Pay-Per-Use

Elasticity

CPU, RAM, Network…

Operating-System…

Tools and Runtimes…

Applications…

IaaS PaaS SaaSOnPremise

Pre-Configured and Managed for you

Fully Managed by you

Only Configured by you

5

6

7

• Nov 2010: Makara acquired

• In 2011: merged into OpenShift project

• May 2012: Open Sourced

• Dec 2012: OpenShift Primer (e-book)

• 2013: Online Public PaaS / Enterprise Private PaaS / xPaaS Services

• Apr 2014: OpenShift Primer revision 2 (e-book)

• June 2014: OpenShift Online Market Place, extend reach to LTAM / APAC

• Sep 2014: European hosting

• Coming soon: v3 with Docker, Kubernetes, etc...

8

http://docs.openshift.org/origin-m4/oo_cartridge_developers_guide.html#cartridge-directory-structure

9

Node.js, DIY, Jenkins, PHP, Ruby, Python, Perl

10

11

12

13

Developer Instance

IDE

Build Tool

Unit Testing

Integration Testing

Integration Instance Production Instance

Source Code Repository

Build Tool

Unit Testing

Integration Testing

Deployment Deployment Deployment

Jenkin

s

Jenkin

sS

tagin

g

14

Developer Instance

IDE

Build Tool

Unit Testing

Integration Testing

Integration Instance Production Instance

Source Code Repository

Build Tool

Unit Testing

Integration Testing

Deployment Deployment Deployment

Jenkin

s

Jenkin

sS

tagin

g

Ste

p 1

-L

ocal

Develo

pm

en

t E

nvir

on

men

t

15

Developer Instance

IDE

Build Tool

Unit Testing

Integration Testing

Integration Instance Production Instance

Source Code Repository

Build Tool

Unit Testing

Integration Testing

Deployment Deployment Deployment

Jenkin

s

Jenkin

sS

tagin

g

Ste

p 2

–C

on

tin

ou

sIn

teg

rati

on

16

Developer Instance

IDE

Build Tool

Unit Testing

Integration Testing

Integration Instance Production Instance

Source Code Repository

Build Tool

Unit Testing

Integration Testing

Deployment Deployment Deployment

Jenkin

s

Jenkin

sS

tagin

g

Ste

p 3

–A

uto

mate

d

17

18

http://blog.arungupta.me/enable-arquillian-existing-javaee-project-techtip54/

mvn --batch-mode archetype:generate

-DarchetypeGroupId=org.javaee-samples

-DarchetypeArtifactId=javaee7-arquillian-archetype

-DgroupId=org.samples.javaee7.arquillian

-DartifactId=arquillian

19

mvn test -Pwildfly-remote-arquillian

curl http://download.jboss.org/wildfly/8.1.0.Final/wildfly-

8.2.0.Final.zip

unzip wildfly-8.2.0.Final.zip

./wildfly-8.2.0.Final/bin/standalone.sh

20

21

22

23

24

25

26

>rhc port-forward -a jbosswildfly

To connect to a service running on OpenShift, use

the Local address

Service Local OpenShift

------- -------------- ---- ------------------

java 127.0.0.1:3528 => 127.2.174.129:3528

java 127.0.0.1:8080 => 127.2.174.129:8080

java 127.0.0.1:9990 => 127.2.174.129:9990

Press CTRL-C to terminate port forwarding

27

28

29

30

>git commit -m "Added Test"

[master 16408b3] Added Test

4 files changed, 60 insertions(+)

create mode 100644 .gitignore

create mode 100644 src/main/java/SayHelloBean.java

create mode 100644 src/test/java/SayHelloBeanTest.java

>git push

Counting objects: 11, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (6/6), done.

Writing objects: 100% (6/6), 469 bytes | 0 bytes/s, done.

Total 6 (delta 4), reused 0 (delta 0)

remote: Executing Jenkins build.

remote:

remote: You can track your build at https://jbosswildflyjenkins-

meisele.rhcloud.com/job/jbosswildfly-build

remote:

remote: Waiting for build to schedule......Done

remote: Waiting for job to

complete.......................................................Done

remote: SUCCESS

remote: New build has been deployed.

remote: -------------------------

remote: Git Post-Receive Result: success

remote: Deployment completed with status: success

To ssh://550a1386fcf93320c2000125@jbosswildfly-

meisele.rhcloud.com/~/git/jbosswildfly.git/

1477102..590cdd2 master -> master

31

32

33

34

Developer Instance

IDE

Build Tool

Unit Testing

Integration Testing

Integration Instance Production Instance

Source Code Repository

Build Tool

Unit Testing

Integration Testing

Deployment Deployment Deployment

Jenkin

s

Jenkin

sS

tagin

g

Ste

p 3

–A

uto

mate

d

35

36

https://github.com/worldline/openshift-maven-plugin

37

https://developer.jboss.org/wiki/Enable-openshift-ciFullExampleUsingOpenshift-java-client

38

39

40

41

42

https://blog.openshift.com/getting-started-with-sftp-and-openshift/

http://java.dzone.com/articles/openshift-how-create-web-0

http://wildfly.org/news/2014/04/25/Getting-Started-WildFly-OpenShift/

https://github.com/worldline/openshift-maven-plugin

https://community.jboss.org/wiki/Enable-openshift-ciFullExampleUsingOpenshift-java-client

https://github.com/openshift/openshift-java-client

https://forums.openshift.com/maven-plugin-to-deploy-jee-app-or-whatever-directly-to-openshift-folder

github.com/javaee-samples/javaee7-samples

https://blog.openshift.com/getting-started-with-sftp-and-openshift/

http://containers.codemiller.com

http://reinvent-hripps.rhcloud.com/#/2

https://blog.openshift.com/openshift-v3-deep-dive-docker-kubernetes/

http://blog.arungupta.me/javaee-workflows-openshift-techtip64/

44

https://www.parleys.com/play/52aedc3fe4b0cc758a75808d/chapter0/about

http://developerpress.com/OpenShiftPrimerRevision2-175421

45

https://www.openshift.com/promotions/ebook

46

47

48