diff --git a/404.html b/404.html index fd9b4d78..53a315fb 100644 --- a/404.html +++ b/404.html @@ -8,7 +8,7 @@ - +
Before understanding home-manager, it is worth briefly discussing what nix is. nix is a package manager that originally spawned from a PhD thesis. Unlike other package managers, it uses symbolic links to keep track of the currently installed packages, keeping around the old ones in case you may want to rollback.
For example, I have used nix to install the package bind which includes dig
. You can see that it is available on multiple platforms. The absolute path of dig
can be found by running:
❯ ls -lh $(which dig)
-lrwxr-xr-x 73 root 31 Dec 1969 /run/current-system/sw/bin/dig -> /nix/store/0r4qdyprljd3dki57jn6c6a8dh2rbg9g-bind-9.16.16-dnsutils/bin/dig
-
Notice that there is a hash included in the file path? This is a nix store path and is computed by the nix package manager. This nix pill does a good job explaining how this hash is computed. All of the nix pills are worth a read, if you are interested in learning more about nix itself. However, using home-manager does not require extensive knowledge of nix.
+❯ ls -lh $(which dig)
+lrwxr-xr-x 73 root 31 Dec 1969 /run/current-system/sw/bin/dig -> /nix/store/0r4qdyprljd3dki57jn6c6a8dh2rbg9g-bind-9.16.16-dnsutils/bin/dig
+
Notice that there is a hash included in the file path? This is a nix store path and is computed by the nix package manager. This nix pill does a good job explaining how this hash is computed. All of the nix pills are worth a read, if you are interested in learning more about nix itself. However, using home-manager does not require extensive knowledge of nix.
Part of the nix ecosystem includes nixpkgs. Many popular tools can be found already packaged in this repository. As you can see with these stats, there is a large number of existing packages that are being maintained by the community. Contributing a new package is easy, and anyone can do it!
home-manager leverages the nix package manager (and nixpkgs), as well the nix language so that you can declaratively define your system configuration. I store my nix-config in git so that I can keep track of my packages and configurations, and retain a clean and informative git commit history so that I can understand what changed and why.
Let’s try to pull an image:
-$ podman pull alpine
-Trying to pull docker.io/library/alpine:latest...
-Getting image source signatures
-Copying blob sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e
-Copying config sha256:14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab
-Writing manifest to image destination
-Storing signatures
-14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab
-
+$ podman pull alpine +Trying to pull docker.io/library/alpine:latest... +Getting image source signatures +Copying blob sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e +Copying config sha256:14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab +Writing manifest to image destination +Storing signatures +14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab +
If you’re having an issue pulling images, you may need to remove
~/.docker/config.json
or remove the set of auths in the configuration as mentioned here.and then run and exec into the container:
-$ podman run --rm -ti alpine -Error: error preparing container 99ace1ef8a78118e178372d91fd182e8166c399fbebe0f676af59fbf32ce205b for attach: error configuring network namespace for container 99ace1ef8a78118e178372d91fd182e8166c399fbebe0f676af59fbf32ce205b: error adding pod unruffled_bohr_unruffled_bohr to CNI network "podman": unexpected end of JSON input -
What does this error mean? A bit of searching lead to this github issue.
+$ podman run --rm -ti alpine +Error: error preparing container 99ace1ef8a78118e178372d91fd182e8166c399fbebe0f676af59fbf32ce205b for attach: error configuring network namespace for container 99ace1ef8a78118e178372d91fd182e8166c399fbebe0f676af59fbf32ce205b: error adding pod unruffled_bohr_unruffled_bohr to CNI network "podman": unexpected end of JSON input +
What does this error mean? A bit of searching lead to this github issue.
Until the fix is released, a workaround is to just specify a port (even when it’s not needed):
podman run -p 4242 --rm -ti alpine
If you’re reading this from the future, there is a good chance specifying a port won’t be needed.
@@ -212,24 +212,24 @@ Error: error preparing container 99ace1ef8a78118e178372d91fd182e8166c399fbebe0f6 command: [/bin/echo, 'Hello world'] EOFNow run:
-$ podman-compose up -podman pod create --name=davegallant.github.io --share net -40d61dc6e95216c07d2b21cea6dcb30205bfcaf1260501fe652f05bddf7e595e -0 -podman create --name=davegallant.github.io_hello_world_1 --pod=davegallant.github.io -l io.podman.compose.config-hash=123 -l io.podman.compose.project=davegallant.github.io -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=hello_world --add-host hello_world:127.0.0.1 --add-host davegallant.github.io_hello_world_1:127.0.0.1 ubuntu /bin/echo Hello world -Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf) -Trying to pull docker.io/library/ubuntu:latest... -Getting image source signatures -Copying blob sha256:f3ef4ff62e0da0ef761ec1c8a578f3035bef51043e53ae1b13a20b3e03726d17 -Copying blob sha256:f3ef4ff62e0da0ef761ec1c8a578f3035bef51043e53ae1b13a20b3e03726d17 -Copying config sha256:597ce1600cf4ac5f449b66e75e840657bb53864434d6bd82f00b172544c32ee2 -Writing manifest to image destination -Storing signatures -1a68b2fed3fdf2037b7aef16d770f22929eec1d799219ce30541df7876918576 -0 -podman start -a davegallant.github.io_hello_world_1 -Hello world -
This should more or less provide the same results you would come to expect with docker. The README does clearly state that podman-compose is under development.
+$ podman-compose up +podman pod create --name=davegallant.github.io --share net +40d61dc6e95216c07d2b21cea6dcb30205bfcaf1260501fe652f05bddf7e595e +0 +podman create --name=davegallant.github.io_hello_world_1 --pod=davegallant.github.io -l io.podman.compose.config-hash=123 -l io.podman.compose.project=davegallant.github.io -l io.podman.compose.version=0.0.1 -l com.docker.compose.container-number=1 -l com.docker.compose.service=hello_world --add-host hello_world:127.0.0.1 --add-host davegallant.github.io_hello_world_1:127.0.0.1 ubuntu /bin/echo Hello world +Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf) +Trying to pull docker.io/library/ubuntu:latest... +Getting image source signatures +Copying blob sha256:f3ef4ff62e0da0ef761ec1c8a578f3035bef51043e53ae1b13a20b3e03726d17 +Copying blob sha256:f3ef4ff62e0da0ef761ec1c8a578f3035bef51043e53ae1b13a20b3e03726d17 +Copying config sha256:597ce1600cf4ac5f449b66e75e840657bb53864434d6bd82f00b172544c32ee2 +Writing manifest to image destination +Storing signatures +1a68b2fed3fdf2037b7aef16d770f22929eec1d799219ce30541df7876918576 +0 +podman start -a davegallant.github.io_hello_world_1 +Hello world +
This should more or less provide the same results you would come to expect with docker. The README does clearly state that podman-compose is under development.
Summary
Installing Podman on macOS was not seamless, but it was manageable well within 30 minutes. I would recommend giving Podman a try to anyone who is unhappy with experiencing forced docker updates, or who is interested in using a more modern technology for running containers.
One caveat to mention is that there isn’t an official graphical user interface for Podman, but there is an open issue considering one. If you rely heavily on Docker Desktop’s UI, you may not be as interested in using podman yet.
diff --git a/blog/2021/11/14/running-k3s-in-lxc-on-proxmox/index.html b/blog/2021/11/14/running-k3s-in-lxc-on-proxmox/index.html index 502bad60..1bfd5b14 100644 --- a/blog/2021/11/14/running-k3s-in-lxc-on-proxmox/index.html +++ b/blog/2021/11/14/running-k3s-in-lxc-on-proxmox/index.html @@ -8,7 +8,7 @@ - +Running K3s in LXC on Proxmox • davegallant @@ -211,30 +211,30 @@ k3sup install --ip $CONTAINER_IP --user root --k3sIf all goes well, you should see a path to the
kubeconfig
generated. I moved this into~/.kube/config
so that kubectl would read this by default.Wrapping up
Installing K3s in LXC on Proxmox works with a few tweaks to the default configuration. I later followed the Tekton’s Getting Started guide and was able to deploy it in a few commands.
-$ kubectl get all --namespace tekton-pipelines -NAME READY STATUS RESTARTS AGE -pod/tekton-pipelines-webhook-8566ff9b6b-6rnh8 1/1 Running 1 (50m ago) 12h -pod/tekton-dashboard-6bf858f977-qt4hr 1/1 Running 1 (50m ago) 11h -pod/tekton-pipelines-controller-69fd7498d8-f57m4 1/1 Running 1 (50m ago) 12h - -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -service/tekton-pipelines-controller ClusterIP 10.43.44.245 <none> 9090/TCP,8080/TCP 12h -service/tekton-pipelines-webhook ClusterIP 10.43.183.242 <none> 9090/TCP,8008/TCP,443/TCP,8080/TCP 12h -service/tekton-dashboard ClusterIP 10.43.87.97 <none> 9097/TCP 11h - -NAME READY UP-TO-DATE AVAILABLE AGE -deployment.apps/tekton-pipelines-webhook 1/1 1 1 12h -deployment.apps/tekton-dashboard 1/1 1 1 11h -deployment.apps/tekton-pipelines-controller 1/1 1 1 12h - -NAME DESIRED CURRENT READY AGE -replicaset.apps/tekton-pipelines-webhook-8566ff9b6b 1 1 1 12h -replicaset.apps/tekton-dashboard-6bf858f977 1 1 1 11h -replicaset.apps/tekton-pipelines-controller-69fd7498d8 1 1 1 12h - -NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE -horizontalpodautoscaler.autoscaling/tekton-pipelines-webhook Deployment/tekton-pipelines-webhook 9%/100% 1 5 1 12h -
I made sure to install Tailscale in the container so that I can easily access K3s from anywhere.
+$ kubectl get all --namespace tekton-pipelines +NAME READY STATUS RESTARTS AGE +pod/tekton-pipelines-webhook-8566ff9b6b-6rnh8 1/1 Running 1 (50m ago) 12h +pod/tekton-dashboard-6bf858f977-qt4hr 1/1 Running 1 (50m ago) 11h +pod/tekton-pipelines-controller-69fd7498d8-f57m4 1/1 Running 1 (50m ago) 12h + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +service/tekton-pipelines-controller ClusterIP 10.43.44.245 <none> 9090/TCP,8080/TCP 12h +service/tekton-pipelines-webhook ClusterIP 10.43.183.242 <none> 9090/TCP,8008/TCP,443/TCP,8080/TCP 12h +service/tekton-dashboard ClusterIP 10.43.87.97 <none> 9097/TCP 11h + +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/tekton-pipelines-webhook 1/1 1 1 12h +deployment.apps/tekton-dashboard 1/1 1 1 11h +deployment.apps/tekton-pipelines-controller 1/1 1 1 12h + +NAME DESIRED CURRENT READY AGE +replicaset.apps/tekton-pipelines-webhook-8566ff9b6b 1 1 1 12h +replicaset.apps/tekton-dashboard-6bf858f977 1 1 1 11h +replicaset.apps/tekton-pipelines-controller-69fd7498d8 1 1 1 12h + +NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE +horizontalpodautoscaler.autoscaling/tekton-pipelines-webhook Deployment/tekton-pipelines-webhook 9%/100% 1 5 1 12h +
I made sure to install Tailscale in the container so that I can easily access K3s from anywhere.
If I’m feeling adventurous, I might experiment with K3s rootless.