OpenLiberty / OpenLiberty/docs
Good practices for containerisation
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 14
- Forks
- 58
- Avg merge
- 4m
- Merged PRs (30d)
- 35
Description
See conversation on Slack: https://ibm-cloud.slack.com/archives/C31DW78RG/p1605718603438500?thread_ts=1605709553.435300&cid=C31DW78RG
My initial thoughts on what this would/could include are:
- one app per Liberty instance per container (ie not multiple apps running on the same Liberty instance, and only one app/Liberty instance in a container)
- layers - how to divide up the container image layers
- we provide some pre-built images (link to the ones we recommend) which are production-ready to use, but if you don't use them and instead build your own images from scratch, you need to do what the hardening topics say about ensuring your images are secure.
- anything else you need to do or be aware of with security (hardening topics probably largely cover the detail of this?)
- externalise configuration with MP Config so that you can update configuration without needing to change Java code and recompile the app. By "you", it generally means so that Kubernetes etc can update configuration (eg host names and port numbers of databases?).
- dev-prod parity testing with Microshed - using MIcroshed or similar to ensure that testing of the app is under entirely the same conditions/env throughout the app's lifecycle - dev, test, production - so that you don't get weird bugs in production that you didn't see in dev and just can't reproduce in dev when you try.
- use Liberty config (server.xml) includes files and version control them (there are some notes about this in our config overview topic, I think)?
- use variable substitution in Liberty config for at least external resources (eg databases) so that nothing is hardcoded in the Liberty config. See slack thread that spawned this issue.
@yeekangc has raised an issue to ensure good containerisation practices are represented in the guides too so make sure to collaborate with his team to ensure consistency of what's mentioned/highlighted, and to make sure the list above is a good one(!).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked Slack conversation and the existing guides, including the config overview topic and the guidance on server.xml includes and variable substitution. Coordinate with @yeekangc’s team to align the recommended container practices, then document the agreed practices for image layers, security, configuration, and dev-production parity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java, kubernetes
- Domain
- cloud, devops, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100