Would a Container or Atomic work better for certain packages for an application?
I know of Red Hat Containers and Atomic, however I'm trying to figure out what would work best for me.
I have a developer that needs to have an RHEL6.4 OS setup with certain packages, so that it will work with an application he works with.
Could I use a container for this? Vs me installing a RHEL6 as an OS and trying to install the packages and dependencies by hand.
I'm not sure what the best way to approach this.
Responses
This is pretty much what OpenShift Container Platform was designed for. For example, you could keep your code in git and use OCP to deploy it on a container based on whatever operating system setup you require. This has the advantage on being able to test the application on multiple operating systems with little management required. Plus you can use git webhooks to automatically rebuild your container application when a code change is made.
The only thing you might need to know is how to create and customize containers to suit your operating system needs. I say this because I think the current templates and containers are RHEL7 based, so you might need to know how to create and customize a RHEL6.4 based container.
For information, have a look at:
Okay, so a couple of things...
On containers and dependencies:
- So essentially, containers are simply an operating system isolated from the hosts where you can execute commands and services. The container is based on an image that contains the operating system and whatever dependencies you want. So, for example, if you want to run a HTTP server, you just run a few commands (e.g.
dockercommands) -- the host downloads the httpd image you need, runs a container based on the image, then launches the server. No package dependencies occur because this is taken care of when the image is created. So you can have a HTTP server (or whatever service) running pretty quickly and isolated from the host system. You can also deploy multiple containers all based on the same image, so I could have a HTTP server for one app and a HTTP server for another app but they essentially have the same operating system since they're created from the same image. - When you say "dependencies", do you mean package dependencies? Do you have a bit more info on the dependency issues you're facing? Knowing more info might help me assess whether containers will make the workflow easier for you and your developer.
On OpenShift and Git:
- So, using git was just an example. You can also deploy applications on containers with other methods (although using git is probably the easiest and most robust).
- You can also build your source to images using manual methods, using the S2I tool.
So, to sum up, it's possible that containers can solve issues with dependencies and help with your development workflow, but I might need some more info. Also, it is possible to accomplish a manual development workflow using containers, but I think using OpenShift Container Platform is better suited.
I hope this answers your questions better. Let me know what kind of dependency issues you have and I'll try and assess your situation as best I can. And if you had any additional questions on this topic, please let me know and I'll try and provide some more info.
Okay, great news, the Red Hat Software Collections already has a container for Python 2.7:
https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/python-27-rhel7
If you're looking to customize a Python 2.7 container with certain packages, you can build a new container image based on an existing one using a dockerfile. A dockerfile is essentially a set of instructions for building a new container image and it has a fairly straightforward syntax. Here are some resources to get you started:
- Building container images with standard base images from the RHEL Atomic docs
- Upstream Atomic documentation on building container images
Not only that, the Red Hat Software Collection even has the original dockerfiles used to build its images:
My advice is to take a look at these posts and example dockerfiles to get a sense of how to use a create your own custom image from a base image. Having said that, feel free to post any further questions here and I'll try my best to answer them.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
