Files needed to build a PDP-11 container and deploy it in Kubernetes
 
 
Go to file
Dessa Simpson 8004438c87 don't spin cpu 2024-02-21 20:22:57 -07:00
docker don't spin cpu 2024-02-21 20:22:57 -07:00
k8s Add baked-in image capability 2023-10-30 02:12:32 -07:00
misc Add baked-in image capability 2023-10-30 02:12:32 -07:00
.gitignore Add baked-in image capability 2023-10-30 02:12:32 -07:00
README.md Add baked-in image capability 2023-10-30 02:12:32 -07:00
bootstrap-k8s.sh Add baked-in image capability 2023-10-30 02:12:32 -07:00

README.md

PDP-11 in Docker/Kubernetes

Docker

To build the container, run docker/build.sh [tag] with the tag you want to apply to the image.

Important: If you want to bake a disk image into the container which will be copied into /mnt and used if no image is found there on startup, make sure to put it as rq0.dsk in the build directory.

To run the container, use the following command adapted to your needs:

docker run -d --rm --privileged --name pdp -v `pwd`/rq0.dsk:/mnt/rq0.dsk <tag>

Kubernetes

To run in Kubernetes, first you need to build the docker image (preferably with a disk baked in) and push it to a registry your cluster has access to.

Once you've done that, run ./bootstrap-k8s.sh <tag>. tag should be a ref to the docker image, uploaded to a registry the cluster can access.

To expose the services on an external IP, first install MetalLB, and then use ./misc/configure-metallb.sh <ip>. ip should be an IP address on a broadcast domain the k8s nodes are on.

Imageless container

If you built the Docker container without a baked-in image, instead of using the normal bootstrap-k8s.sh, you'll need to use misc/bootstrap-k8s-imageless.sh as follows:

Run ./misc/bootstrap-k8s.sh <tag> <disk_filename>. tag should be a ref to the docker image, uploaded to a registry the cluster can access. disk_filename should be a gzip-compressed PDP-11 disk image, which will be extracted and attached to the pdp as rq0.

k3s

To use an external IP, MetalLB is required. Therefore, the cluster must not have ServiceLB enabled, as it will conflict. For k3s, just add --disable=servicelb to the server command line options. For k3d, create the cluster as follows:

k3d cluster create pdp --k3s-arg "--disable=servicelb@server:*"