Provide high quality multiarch docker images and k8s support

Area
Docker/Kubernetes

Describe the feature you’d like

I suggest a series of improvements and bug fixes in order to provide a high quality Cardano Docker image. In the not too distant future it may become a reality that Cardano nodes need to get integrated in corporate IT infrastructure. They may become destinations or sources for various corporate data streams and as such, it’d be good to have an offering that allows these organizations to integrate Cardano with already existing cloud infrastructure.

With Kubernetes as the de-facto standard for container deployment, orchestration, monitoring, scaling , etc, it should be as easy as this to integrate a Cardano node …

kubectl apply -f https://raw.githubusercontent.com/input-output-hk/cardano-node/master/cardano-node.yaml

This issue suggests the following improvements …

  • [#2361] Added support for arm64 and perhaps for other target platforms to follow
  • [#2353] Support for graceful shutdown in container environments
  • [#2362] Self contained topology updates (until there is native p2p support)
  • [#2363] Deployment scripts for Kubernetes and perhaps also for Docker Compose
  • [#2364] Comprehensive documentation on how to run Cardano in managed container environments

Describe alternatives you’ve considered

An alternative would be to have advanced image functionality be provided by 3rd party and let this repository continue to focus on bare metal installations and more or less leave the existing (x86_64) docker image as is.

IMHO, it’d however be much better to have this tech be provided upstream.

Additional context / screenshots

As far as I can tell, much of the above is low hanging fruit and if it’s ok with you, I’d volunteer to do this over the course of the following weeks/months. The multiarch bit may initially require a workaround until we have the regular nix build that works on arm64. The image cannot rely on an external process to do topology updates - this has to be done within. Initially we could perhaps use guild-operators for that (to be discussed). Kubernetes support and getting started docs should not be a big deal.

cheers
– thomas

6 Likes

Here is a status update …

PR [#2393] is the third installment of [#2360]

So far we have …

  • Preserved functionality via -e NETWORK
  • Node configuration through env vars, which is later needed for k8s integration
  • Integrated configurable topology update
  • Graceful shutdown on docker stop
  • Improved access to the CLI

There is a README about this here.

I really appreciate all the work you are doing for this and it has helped me a great deal with my raspberry pi stake pool setup, I really believe docker and k8s support is needed!

I would possibly think about working with the whole community on this by making this “providing high-quality multiarch docker image and k8s support” a proposal for project catalyst fund4 under the Dev Ecosystem challenge. https://cardano.ideascale.com/a/campaign-home/25868

I am a Community Advisor and would like to see something like this in the fund4 challenge and would like to assist in any way I can.

1 Like

It is almost done already. Issue [#2360] and PR [#2393] haven’t seen feedback from the core folks yet - so I don’t really know whether/when this is going upstream.

The big blocker is [#2391], which unfortunately I can’t fix myself. It currently prevents the build for the arm64 image.

For nessusio/cardano I found a workaround that doesn’t use Nix, but I guess this is not a viable solution for the upstream build.

I will work on the issues you have linked, but I am wondering if you have thought about making this whole K8s/docker/multi-architecture project to the Project Catalysts community?

I have seen some other proposals about Docker, but none of them have done the work you have or even mention multi-architecture support for things like arm64

I doubt there is enough meat to it to become an independent Catalyst project. For now, I’d be happy to take care of this topic for as long as needed. I applied to the “small pool funding” thing.

I personally do think this has merit for at least some community funding, I have voted for projects with fewer working solutions, but regardless I will be following your work and will contribute in any way I can.

I don’t know about Nix build though on RPi4, haven’t tried yet. I will try tomorrow.

You will likely hit that brick wall - on the Pi as well as on a beefy AWS arm64 machine.

1 Like

Hi Tom, I have linked you github/gitbook to the Arming Cardano telegram channel Telegram: Join Group Chat, we are a channel of Stake pool operators running on rpis. Many of us have experience that may be beneficial. I want to THANK YOU again for everything you provide to Cardano dev community!!!