Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s2i-liberty #4

Merged
merged 42 commits into from
Oct 14, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1d45bab
s2i-liberty initial commit
raffaelespazzoli Sep 27, 2016
3cef661
fixed repo
raffaelespazzoli Sep 27, 2016
04fa257
added readme
raffaelespazzoli Sep 28, 2016
dfc8d5a
deleted test directory
raffaelespazzoli Sep 28, 2016
ea42cbc
fixed missing bashang in run command
raffaelespazzoli Sep 28, 2016
97d40b5
Update readme.md
raffaelespazzoli Sep 30, 2016
12666fa
Update readme.md
raffaelespazzoli Sep 30, 2016
23bf58a
added two build approach
raffaelespazzoli Oct 6, 2016
6da266e
added ability to debug liberty
raffaelespazzoli Oct 6, 2016
923ac20
added echo statements to build
raffaelespazzoli Oct 6, 2016
5f74db7
debug port
raffaelespazzoli Oct 6, 2016
64325ec
a
raffaelespazzoli Oct 6, 2016
cb019e4
d
raffaelespazzoli Oct 6, 2016
e2bc269
d
raffaelespazzoli Oct 6, 2016
b073470
d
raffaelespazzoli Oct 6, 2016
c5e6088
jolokia
raffaelespazzoli Oct 7, 2016
17015a7
improved jolokia
raffaelespazzoli Oct 7, 2016
5811643
run debug
raffaelespazzoli Oct 7, 2016
1ea2747
debug run
raffaelespazzoli Oct 7, 2016
7970be5
run debug
raffaelespazzoli Oct 7, 2016
86ad4bf
debug run
raffaelespazzoli Oct 7, 2016
3060150
debug jolokia
raffaelespazzoli Oct 7, 2016
5deb6e3
jolokia debug
raffaelespazzoli Oct 7, 2016
fbf5906
jolokia debug
raffaelespazzoli Oct 7, 2016
2ae50b8
Merge branch 'master' of
raffaelespazzoli Oct 7, 2016
d5560c3
jolokia debug
raffaelespazzoli Oct 7, 2016
a416fb4
jolokia debug
raffaelespazzoli Oct 7, 2016
8d34e3f
jolokia debug
raffaelespazzoli Oct 7, 2016
24e192c
jolokia debug
raffaelespazzoli Oct 7, 2016
2ec145d
jolokia debug
raffaelespazzoli Oct 7, 2016
57f9d58
no jolokia
raffaelespazzoli Oct 8, 2016
13c05c5
improved cohexistance of chained builds and extended build
raffaelespazzoli Oct 8, 2016
e7500dd
debug
raffaelespazzoli Oct 8, 2016
fd7e11d
debug
raffaelespazzoli Oct 8, 2016
67a4a38
fixed readme
raffaelespazzoli Oct 8, 2016
a4cf45d
readme fixes
raffaelespazzoli Oct 8, 2016
ed21fdb
d
raffaelespazzoli Oct 8, 2016
7dacd1e
last fix
raffaelespazzoli Oct 8, 2016
2a0cb63
correction for allowing a random user in root group to run the image
raffaelespazzoli Oct 10, 2016
909ec16
added application verification
raffaelespazzoli Oct 11, 2016
e29a787
fixed the md
raffaelespazzoli Oct 11, 2016
11863f1
fix
raffaelespazzoli Oct 11, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added ability to debug liberty
  • Loading branch information
raffaelespazzoli committed Oct 6, 2016
commit 6da266eb4c8071b6013dc87579bc66905972da21
7 changes: 4 additions & 3 deletions s2i-liberty/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ LABEL io.openshift.s2i.scripts-url=image:///usr/local/s2i \
io.openshift.tags="runner,liberty"

ENV STI_SCRIPTS_PATH="/usr/local/s2i" \
WORKDIR="/usr/local/workdir"
WORKDIR="/usr/local/workdir" \
WLP_DEBUG_ADDRESS="8787"

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
Expand All @@ -34,8 +35,8 @@ COPY ./placeholder.txt $WORKDIR/config

WORKDIR $WORKDIR

EXPOSE 7777
EXPOSE 8787

USER 1001

CMD ["/opt/ibm/wlp/bin/server", "debug", "defaultServer"]
CMD ["/opt/ibm/wlp/bin/server", "run", "defaultServer"]
8 changes: 5 additions & 3 deletions s2i-liberty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ This demonstration describes how to produce a new Source to Image (S2I) runtime
OpenShift provides several out of the box Source to Image builder images. To support deployments in Liberty, a new s2i builder image will be created to support a simplified deployment to OpenShift. Once the new image is produced, an example application will be deployed.

We will demonstrate two approaches to achieve this objective:

1. two s2i builds. With this option the first s2i build builds an image with the right artifacts, the second s2i build grabs the artifacts from the first build and create the final runnable liberty image.

2. use the [extended builds approach](https://docs.openshift.com/container-platform/3.3/dev_guide/builds.html#extended-builds). This experimental feature chains the two previous build together creating a single build that does both the previous actions.

## Bill of Materials
Expand All @@ -50,7 +52,7 @@ None

* [Example JEE Application](https://github.com/efsavage/hello-world-war) - Public repository for a simple JEE hello world app.

## Two builds approach
## Two build approach

### Setup Instructions

Expand All @@ -76,7 +78,7 @@ Create a new project called *liberty-demo*
oc new-project liberty-demo
```

### Produce Runtime Image
### Produce s2i Liberty Image

The Liberty runtime image can be created using the [Git](https://docs.openshift.com/enterprise/latest/dev_guide/builds.html#source-code) or [Binary](https://docs.openshift.com/enterprise/latest/dev_guide/builds.html#binary-source) build source

Expand Down Expand Up @@ -201,7 +203,7 @@ Create a new project called *liberty-demo*
oc new-project liberty-demo
```

### Produce Runtime Image
### Produce s2i Liberty Image

The Liberty runtime image can be created using the [Git](https://docs.openshift.com/enterprise/latest/dev_guide/builds.html#source-code) or [Binary](https://docs.openshift.com/enterprise/latest/dev_guide/builds.html#binary-source) build source

Expand Down
197 changes: 0 additions & 197 deletions s2i-liberty/readme.md

This file was deleted.

5 changes: 4 additions & 1 deletion s2i-liberty/s2i/bin/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/bash
/opt/ibm/wlp/bin/server debug defaultServer

export JAVA_DEBUG="-Dwas.debug.mode=true -Dcom.ibm.websphere.ras.inject.at.transform=true -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${WLP_DEBUG_ADDRESS}"

/opt/ibm/wlp/bin/server run defaultServer