-
Notifications
You must be signed in to change notification settings - Fork 269
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
s2i-liberty #4
Conversation
# This image provides a base for building and running WildFly applications. | ||
# It builds using maven and runs the resulting artifacts on WildFly 10.1.0 Final | ||
|
||
FROM websphere-liberty:webProfile7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this using a red hat based base or debian?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the builder image can be any. The runtime image is created by IBM based on debian. I changed the user to our standard 1001. I think we want to keep the IBM's provided image as our base image because it increases the chances for our customers that IBM will support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks really nice. Just recommending a few changes to the Documentation.
@sabre1041 please review as well.
|
||
### Environment Specifications | ||
|
||
This demo should be run on an installation of OpenShift Enterprise V3.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change "OpenShift Enterprise" to "OpenShift Container Platform" as that's the official name as of 3.3
|
||
## Setup Instructions | ||
|
||
There is no specific requirements necessary for this demonstration. The presenter should have an OpenShift Enterprise 3.3 environment available with access to the public Internet and the OpenShift Command Line Tools installed on their machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, "OpenShift Container Platform"
oc login <OpenShift_Master_API_Address> | ||
``` | ||
|
||
Create a new project called *play-demo* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch "play-demo" for "liberty-demo"
The content used to produce the Liberty runtime image can originate from a Git repository. Execute the following command to start a new image build using the git source strategy.: | ||
|
||
``` | ||
oc new-build websphere-liberty:webProfile7~https://github.com/raffaelespazzoli/containers-quickstarts --context-dir=s2i-liberty --name=liberty-runtime-s2i --strategy=docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's change the git repo name to https://github.com/redhat-cop/containers-quickstarts
|
||
In this example we will use a pre-existing builder image that can build maven based apps: `registry.access.redhat.com/jboss-eap-7/eap70-openshift` | ||
|
||
#### Git Source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this heading to me implies "Hey let's build an app from source using our liberty base image", which in actuality, this is the step to docker build
the base image in OpenShift. I think we should change this heading to "Building the S2I Base Image", and then have a separate "Build from Git" heading that shows the oc new-app
command pointing to an application git repo, in addition to the "Binary Build" steps below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get this comment. can we talk about it? I applied the other feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can disregard this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed README only. Added some comments to the README. Also recommend changing the name of the file to the capitalize README to conform with conventions.
Looks good otherwise. Only suggestion is a validation step to demonstrate the application was successfully deployed (hit a web page etc)
|
||
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 use the [extended builds approach](https://docs.openshift.org/latest/dev_guide/builds.html#extended-builds). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should reference the OCP docs instead of origin
https://docs.openshift.com/container-platform/3.3/dev_guide/builds.html#extended-builds
- sourcePath: /opt/eap/standalone/deployments/hello-world-war-1.0.0.war | ||
destinationDir: artifacts | ||
``` | ||
notice that the source strategy has two additional sections: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we provide this modifications as a patch command that users can easily apply?
|
||
### Create a new Application | ||
|
||
To demonstrate the usage of the newly created builder and runtime images, a Jee example application will be built and deployed to Liberty using the Source to Image process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize JEE
The build that was triggered by the `new-app` command can be found by executing the following command: | ||
|
||
``` | ||
oc get builds -l=app=play-app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to hello-world assuming that is the correct label
|
||
* `oc new-app` - OpenShift command to create a a new application | ||
* `-i=hello-world` - Name of the ImageStream that contains the result of the build config that uses the extended s2i process | ||
* `--name=play-app` - Name to be applied to the newly created resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to hello-world
|
||
## Considerations on http session failover | ||
|
||
When liberty is deployed in a cloud environment certain limitation applies as explained in this [document](http://www.ibm.com/support/knowledgecenter/en/SSD28V_8.5.5/com.ibm.websphere.wlp.core.doc/ae/cwlp_paas_restrict.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sentence needs to be cleaned up. "When liberty is deployed in a cloud environment, there are certain limitations that apply as explained in this document"
https://github.com/raffaelespazzoli/containers-quickstarts Conflicts: s2i-liberty/Dockerfile
@raffaelespazzoli this looks much better. However, after I run the
|
@etsauer I tried to reproduce the error, but it works fine with me. Which approach are you trying? Also can you make sure you start from a clean project? |
@raffaelespazzoli The issue is most likely caused by the relaxed permissions of the Red Hat CDK. By default, all containers are run with the
|
@sabre1041 what would cause that? the dockerfile uses |
@etsauer no. by default in non-CDK installations, a user is randomly assigned from a range and the UID in the dockerfile is ignored as governed by the |
I added some instructions to the docker file which should fix the issue. |
@raffaelespazzoli validated latest updates allow container to start up successfully. README needs to add instructions on how to view the sample application. This requires the service to be exposed and in particular, the correct port (default is 7777, but application is available on 9080). In addition, application is available at |
@sabre1041 thanks, I addressed the port issue and added instructions on how to verify the application. |
@raffaelespazzoli this looks great. Would you be able to squash all of the commits? Then we should be good to merge |
@etsauer you will need to approve changes before we will eventually be able to merge |
Add jenkins collector
No description provided.