Birch Street Computing -

about me

John M is a Linux fan in Lowell, MA.

I work at at a company writing software. I fool around with Free and Open Source software for fun & profit.

I was big into Last.fm and you can still see some of what I listen to there. I can also be found using github and recently sourcehut as well as bitbucket (historically). I don't care for most popular social media sites. If I have an account on one or the other it's probably either old and unused or was created just for tinkering.

promo

Links to things I like, use, or otherwise feel is worth sharing. Things I'd like to see get more popular.

Hello Operator

Recently, I have been working * on a new project. As the title indicates, this is an operator. Specifically, this is an operator for managing Samba. If you are not familiar with operators, the idea is basically software that runs in Kubernetes that in turn manages Kubernetes resources, typically taking custom resource (CR) types as input. Samba, is of course, the well known Open Source implementation of SMB protocols and the software to serve, manage, interoperate with SMB, Active Directory, and other Windows oriented things.

The project was started by Michael Adam, a Samba team member, and I started helping out around October last year. It was slow going at first, but we've picked up steam recently and is becoming one of my biggest areas of focus.

I hope to write more about this subject, so I am not planning to be very comprehensive in this post. I do want to make few links and make a few remarks on what I have been doing in these projects.

First, we've got three code repos that make up most of the unique code and files:

The Samba Operator repo contains the code for the operator itself. This is a Go language operator. It defines Custom Resources, via Kubernetes Custom Resource Definitions (CRDs), implements the "business logic" of interpreting those resources and turning them into Pods and other things that produce Shares for people to use. I want to come back to the subject of the design behind the CRs and the recent work we've put into that area in a subsequent post.

The Samba Container repo contains files that help build "generic" samba containers - basically OCI/Docker-style images containing various samba components. Currently, it produces images for a client (smbclient), a server (file-server: smbd, winbind, etc.), and work is in progress to add a Samba AD image. These are meant to work with the operator but are not specific to it. These can work locally with podman or docker or in any other compatible container system.

Because the file server has many interactions with the system it runs on, and there are various tools to configure aspects of both smbd and winbind, I started the sambacc project to try to create a layer that eases the user-facing steps needed to get the samba subsystems working in the container environment. It is a Python library and a command line tool. The CLI is somewhat unimaginatively called "samba-container". The sambacc package is meant to act as a "glue" layer between samba and the container environment. It also aims to provide a single, declarative, configuration that is (relatively) easy for both humans and code to work with.

I started sambacc late last year and after a few weeks of intense development, and some subsequent discussion with Michael Adam, we made the server image built by Samba Container based on sambacc. Currently, sambacc can configure samba (via smb.conf style parameters in the internal registry), it can set up users and groups (locally to the running container), it helps bring up the smbd and winbdind processes, and it has support for assisting with AD domain join.

Development on sambacc itself has slowed down a bit in the past few weeks as it is largely meeting my needs for enabling development on the operator itself. However, there's still lots and lots to do in all of these areas. I expect to do a bit of "see-sawing" as certain areas of the code mature and then I move onto other topics and find a need that would be better served by changes or additions in sambacc rather than the operator code itself. For example, I expect to soon add subcommands to samba-container to help create liveness and readiness checks for Kubernetes pods.

I'll close this out by suggesting anyone interested in these topics feel free to join in the conversation by making use of the github repos and post issues or use the discussions feature, or whatever floats your boat. :-) I hope this was a useful summary of the three main areas that make up our recent efforts - with a little emphasis on sambacc, because its very new, probably a bit less self explanatory and a project I started. :-)

*Standard disclaimer that while this is something I work on as part of $DAYJOB all the opinions here are my own and so forth.

Every blog page or article on this site is available under the CC-BY-SA license unless otherwise noted.