elastic / beats-docker

Official Beats Docker images
166 stars 55 forks source link

Feature: Add Ubuntu 16.04 base image support #66

Closed apolloclark closed 5 years ago

apolloclark commented 5 years ago

I forked the repo and converted it to Ubuntu 16.04 base image: https://github.com/apolloclark/packer-elk-docker

What’s the best way to open a PR for this?

jarpy commented 5 years ago

Interestingly enough, the Elastic Docker images used to be based on Ubuntu, but we switched to a CentOS base as a predictable and stable foundation.

We don't intend to support multiple base variants of our images at this stage, and if we did, we'd need to synchronize that support across the Elasticsearch, Logstash, Kibana, Beats and APM images. As you can imagine, that would create a lot of future work maintaining multiple base variants across all those product images.

Ideally, we hope that users won't much care what libraries are inside the container. After all, that's really the big promise of ready-to-run containers. Out of professional curiosity, what does an Ubuntu based image enable for you?

apolloclark commented 5 years ago

@jarpy Thanks for the info. I work as a consultant with various large enterprises, managing fleets of 10,000+ servers, setting up security logging and monitoring pipelines. Having the Docker container images be the same distro as the Container Host OS makes it easy for a large developer and OPs team to diagnose problems; versus figuring out CentOS, and CoreOS, and Alpine, etc.

I've also created a collection of Ansible roles for the various Elastic beats and services: https://galaxy.ansible.com/apolloclark

I wrote custom Ansible roles, because the official Elastic roles don't support all of the configuration options. The official Elasticsearch role, only supports 32 options, mine supports 60.

Ideally, I'd like to see this Elastic Container repo be easily dropped into a CI/CD system, like Jenkins, running an easily parallelizable build tool like Gradle. For security compliance reasons, in large enterprise fleets, all containers should be rebuilt with the latest OS security patches every 7 days. You can check out all the security vulnerabilities in a given container image Anchore-cli.

CentOS:latest security vulns https://hub.docker.com/_/centos/scans/library/centos/latest

Ubuntu:16.04 security vulns https://hub.docker.com/_/ubuntu/scans/library/ubuntu/16.04

jarpy commented 5 years ago

Thanks for the info. It's always good to hear about real world use cases at scale.

Highlighting this for @jethr0null (who I'm sure will read it anyway!).

apolloclark commented 5 years ago

@jarpy Definitely, thanks! My daily build pipeline is Jenkins + Gradle + Terraform + Packer + Ansible + Serverspec to AWS EC2, which I'm now converting to use Kubernetes + Docker: https://github.com/apolloclark/tf-aws

I prefer using Ansible, instead of the Dockerfile, since it makes it easy to templatize configuration variables in a YAML file, versus Bash env variables, which is easier to maintain. I prefer using Packer to build containers, since it let's me reuse a single provisioning tool across multiple providers (Docker, Virtualbox, VMWare, AWS EC2, Azure VM). Terraform lets me use a single tool across multiple cloud providers, to provision cloud resources like load balancers.

jarpy commented 5 years ago

Closing this issue. If we pursue alternative image bases, the work would be best tracked on the stack-wide product roadmap.