-
Notifications
You must be signed in to change notification settings - Fork 47
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
Packaging and deploying applications #761
Comments
We will no longer be building the guide into RHR docs. Instead, we'll create a new concept topic that covers the key concepts from the getting-started guide. |
There's a dodgy inclusion statement after the maven/gradle config examples. It's not resolved into whatever it should display. Aside from that, I'm happy with this. I'll sign it off so you can just fix the inclusion statement while others can start reviewing it. Thanks |
Rather than intro maven with this:
what about saying this:
I generally hear people talking about pom files, I don't know how aware people are (or need to be) that pom stands for Project Object Model. I'm wondering if we need to say this:
It implies to me that maven is primary and Gradle should be thought of in terms of Maven. What about writing an intro paragraph that talks about what the tools are used for and their common role, then talk about the independent parts. Something like this:
Even if you are deploying to the cloud you deploy the application to Liberty as a war file:
I don't know why the doc says you must change the port number, you do not need to:
You do typically need to set the host name, was that meant? We don't do what is advised in 'Packaging for containerization' in any of our common deployment practices. That makes me uneasy about this section. Can we get maven/gradle tabs like elsewhere in the site? I wouldn't use installation in this sentence:
There seems to be an adoc include error:
also:
Is this section necessary:
|
I think this is still trying to be a task (from "Building a WAR deployment artifact" onwards) but wouldn't be that successful as a task because it's not providing the detail that you'd get from the relevant guides. The Getting Started guide handles that at a basic level, then the containerising guide handles it more in-depth (I think), and the Maven and Gradle guides handle the details of the build tools. So think this should stay away from procedural and focus on explaining value/approaches, and why you'd do stuff. I think remove the WAR section. The two main options that are described in the intro are containerised packages for cloud (K8s/OpenShift, in this case), and server packages for trad environments. Containerization section Contrary to Graham's suggestion, I think the Containerization section should come first as that's more relevant. As you're not instructing how to do it, it doesn't really matter if creating WARs is the pre-req. Just describe why you'd create a containerised package and what it is. There are Open Liberty Docker images hosted on DockerHub and built on UBI and using Java 11 (probably don't need to mention the Java version but I mention it here because that's why I've given the UBI Docker image link instead of the Docker Official Images link. However, it may be appropriate to introduce both? The "official" images are built on Ubuntu but they currently don't go as far as Java 11 so maybe we shouldn't mention them for now at least. Also, they're both "official" as far as we're concerned - we upload them both - so I don't think UBI should be made to appear "unofficial". Anyway, my point is that you could introduce the Docker images that we supply as Open Liberty and that they can be used as the basis of your own Dockerfile, which would create a Docker image based on one of the Open Liberty images and then copy your application into the container when it starts. The application it copies in is a WAR file (a compressed archive file that contains xxxx) which has been built by Maven/Gradle tools. You could even show an example Dockerfile from the Getting Started guide either in the topic or just as a link (it's short enough it might be useful to just include it in the topic - could literally use an include statement rather than copying it). I don't think you need to show the POM or build.gradle (though you could link to example Maven POM in the GS guide repo, if you think it's useful?). Could link from here to the Getting Started guide section for a simple walkthrough of doing it, and/or to the containerizing guide for a more in-depth one (I assume). Can then host the container image on a repo such as DockerHub or similar and use that in a pipeline to deploy it to OpenShift etc (might be best checking the containerizing guide that I've not skipped a massive step there, but I think that's the basic idea). So, I don't think you need the detail that's above the maven/gradle examples, or really the maven/gradle examples.I don't think you need the first para after the gradle example. The last two paras in that section are useful but could be collapsed together to touch on dockerfile and layers. Regarding multi-layered, could say that if you put the OL installation/binaries in an earlier layer of the dockerfile (eg by using the docker image in DockerHub, then adding later lines in the dockerfile that run NB I checked with Alasdair about Server package section So then, I think we've done the most relevant bit and now we can cover the alternative approach for if you've got a more trad setup. First para is fine. Server packages for deploying to an Open Liberty server sub-section (needs a better heading than that though!) This is basically the war/zip/tar/tar.gz bit. Not sure exactly how to position the different formats but we basically talk about WAR files mainly (which are a zip file with metadata). Maybe just focus on WAR and say that you can use other archive formats if you prefer (but I don't know why you would). (also, I checked with Alasdair and he talked Graham out of tar.gz so don't talk about that afterall) You build the WAR file which contains your app and its server config, then deploy that WAR file on to a server you've created/started in your Open Liberty installation (I think the app starts automatically when you do that but you can start/stop the app manually, as well as start/stop the server+app manually; bascially you can do the things that the server command supports). If you change the app/config, you have to rebuild the WAR file and redeploy it to the server. When you build the WAR file, I think that all the features that are installed in your OL installation are included in the WAR file, unless you also run minify which strips out anything not listed in the server.xml. ** Runnable JAR files (also known as uberjar or fatjar) sub-section** However, while runnable JARs (or fatjars) are useful for easy deployment on traditional environments, they're less useful for containerizing because every time the container is rebuilt, the layers of the container that contain both Open Liberty and your application have to be rebuilt. If you use WAR files when containerizing (which don't contain the Open Liberty installation), only the application layer (ie your application) has to be rebuilt when the container is rebuilt (as shown in the Dockerfile example above where it pulls the Open Liberty part of the container from a pre-built image in DockerHub). (This last bit about disadvantages of JAR files is not directly relevant to trad environments but it's a strength of WAR format over JAR, and I think could be included here emphasise that, esp in the context of people moving towards containerizing apps. Alasdair agreed with including it.) And obvs links out to all the relevant server and featureUtiltiy commands and guides in each section. Minor wording thing in the intro:
|
@lauracowen Thanks for all the feedback. Very helpful! I think I got it all in this draft (I tried to, at least). Points to mention:
|
|
@lauracowen Thx for the feedback! Comments here:
|
@NottyCode Please read through this topic and provide feedback: https://draft-openlibertyio.mybluemix.net/docs/ref/general/#application-packaging.html. Also, could you address Laura's question above:
|
A war is an application packaging type and zip, jar, tar and tar.gz are server packaging types. So I don't think the suggested follow on makes sense, they are talking about different things. Although the fact that Laura asks suggests that it isn't right yet. |
@NottyCode ok - when would you use each then? why would you only package the server? |
@lauracowen if you package a server it packages the application as a part of it. |
Red Hat built the 'Packaging and deploying applications' guide on 10/16/2019. The PDF and HTML versions are attached here:
GettingStarted_RHRBuild_10:16:2019.zip
GettingStarted_RHRBuild_10:16:2019.pdf
We need to determine if there's a better way to display
pom.xml
,server.xml
,SystemReadinessCheck.java
, andSystemLivenessCheck.java
. Right now, they're included in the middle of the text, and some of them are included multiple times. We could try including them at the end of the guide in some sort of appendix. Then, each reference to one of these files/classes could link down to the appropriate file in the appendix section of the guide. This is assuming that the instances of each file are all the same. Restructuring the guides into this appendix/linking format could be a good starting point for usability testing to determine whether the linking would involve too much movement up and down the page.It also appears the legal notice needs to be updated, but that may have already been addressed indirectly when we updated the legal notice for the docs.
The text was updated successfully, but these errors were encountered: