redpanda-data / redpanda

Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM!
https://redpanda.com
9.59k stars 584 forks source link

Create a native redpanda package for archlinux #1995

Closed nishant-ebot7 closed 6 months ago

nishant-ebot7 commented 3 years ago

Linux native packages for redpanda are available for systems which use yum/apt package managers. Would be really cool to have an aur/community package so that arch users can also natively install redpanda using pacman/yay.

JIRA Link: CORE-709

emaxerrno commented 3 years ago

thanks @nishant-ebot7 !

dotnwat commented 3 years ago

@nishant-ebot7 there seems to be one on AUR https://aur.archlinux.org/packages/redpanda/ but it looks like it may need updated.

nishant-ebot7 commented 3 years ago

@dotnwat exactly. Tagged you in slack thread for more context for the ticket

ghost commented 3 years ago

Alpine has a lot of advantages over Debian/Redhat based images when attempting to diagnose problems inside a Kubernetes cluster:

  1. Alpine ships with busybox, meaning that out of the box you get tools like ps, vi, less, nslookup, ping, awk, sed and all the basics you need for diagnosing network issues.
  2. Debian doesn't even ship with ps installed - out of the box you're dead in the water.
  3. Openshift and on-prem Kubernetes installations allow running 'debug' (sidecar like, namespace side-channel) pods in order to enter name/process/network space of problematic container to diagnose issues, great when this functionality works, however unsupported in GKE environment.
  4. Debian is bloated, the Redpanda image clocks in at the following sizes - yet redpanda binaries only take up 138MB (footnote) : docker.vectorized.io/vectorized/redpanda latest dd6180a37f09 2 weeks ago 283MB docker.vectorized.io/vectorized/redpanda v21.7.6 dd6180a37f09 2 weeks ago 283MB docker.vectorized.io/vectorized/redpanda v21.5.7 21d2e14d7fd1 2 months ago 645MB That's (minimum) 125MB of cruft and we don't even get the ps command. The alpine base image is 5.6 MB in size and ships with busybox. I checked with objdump and /opt/redpanda/lib and seems like there's not any significant system dependencies. Maybe you could even shrink the redpanda installation footprint by linking against system libs but I can understand why you'd opt for the simplicity of guaranteed ABI.

And some potential blockers

  1. Alpine links applications against musl rather than Glibc. Apparently mitigated by the gcompat package. I'm not a full-time C/C++ developer so I don't know how significant that is.

(footnote)

redpanda@553258102a18:/$ dpkg-query --listfiles redpanda  | while read i ; do if [ -f $i ]; then du -b $i ; fi; done  | awk 'START{total=0}{total =  total + $1 }END{print total / (1024 * 1024) }'
138.214
BenPope commented 3 years ago

Google's distroless Debian static is probably a better candidate.

We'd have to change the way we build node.