question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Steps I took to install this to kubernetes

See original GitHub issue

I had some issues deploying this to kubernetes, so to at least try to document my steps for the next person, this is what I did:

  1. Add a standard deployment, define your mounts/PVC’s as you normally do. Add init as an argument to the container, such as:
    containers:
      - name: archivebox
        args: ["init"]
        image: archivebox/archivebox

(If you mount a block-device, using for example Rook, as your PVC, you’ll have a Lost+Found-folder in /data - archivebox will not do the init-phase then, I used a sleep-container (davralin/sleep), exec’ed into it and removed lost+found)

  1. After the initial run, change init to server, like so:
    containers:
      - name: archivebox
        args: ["server"]
        image: archivebox/archivebox

(dont forget to reapply with kubectl) 3. Exec into the container, and drop to archivebox’s dedicated user, like so:

su -l archivebox -s /bin/bash

This allows you to manage the installation, using archivebox add or whatever. I used archivebox manage createsuperuser to create a user, and then do the rest from the web-page.

This is the steps I did to deploy AB to my kubernetes-cluster, put the docs somewhere you think it’s appropriate. 😃

Let me know if I should add the manifests I used for the deployment anywhere.

The init-part was the hardest to be honest, because the container exists immediately when started - some kind of configuration-options (using env) for doing the initial init (and ignoring lost+found) would be much appreciated for the next person. (Could probably be done by an init-container, but I’m not there yet)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
davralincommented, Nov 28, 2020

Nice, so with those changes in place, this is my relevant manifest:

---
apiVersion: v1
kind: Namespace
metadata:
  name: archivebox
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  labels:
    app: archivebox
  name: archivebox
  namespace: archivebox
spec:
  storageClassName: rook-ceph-block
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 2Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: archivebox
  namespace: archivebox
spec:
  selector:
    matchLabels:
      app: archivebox
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: archivebox
    spec:
      initContainers:
      - name: init-archivebox
        image: archivebox/archivebox
        args: ['init']
        volumeMounts:
          - mountPath: /data
            name: archivebox
      containers:
        - name: archivebox
          args: ["server"]
          image: archivebox/archivebox
          ports:
            - containerPort: 8000
              protocol: TCP
              name: http
          resources:
            requests:
              cpu: 50m
              memory: 32Mi
          volumeMounts:
            - mountPath: /data
              name: archivebox
      restartPolicy: Always
      volumes:
        - name: archivebox
          persistentVolumeClaim:
            claimName: archivebox
---
apiVersion: v1
kind: Service
metadata:
  name: archivebox
  namespace: archivebox
spec:
  ports:
    - name: http
      port: 8000
  selector:
    app: archivebox
  type: LoadBalancer
1reaction
davralincommented, Nov 30, 2020

Now who can pass up free Github credits… 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started | Kubernetes
This section lists the different ways to set up and run Kubernetes. When you install Kubernetes, choose an installation type based on: ease ......
Read more >
Setup Kubernetes Step by Step - YouTube
Intellipaat DevOps course: https://intellipaat.com/devops-certification-training/In this video you will learn how to install Kubernetes and ...
Read more >
Installation of Kubernetes on Windows - KnowledgeHut
Step 1: Install & Setup Hyper-V · 1. Open the Control Panel. · 2. Select Programs from the left panel. How to Install...
Read more >
How to Install a Kubernetes Cluster on CentOS 7 - phoenixNAP
Steps for Installing Kubernetes on CentOS 7 · Step 1: Configure Kubernetes Repository · Step 2: Install kubelet, kubeadm, and kubectl · Step...
Read more >
Kubernetes integration: install and configure
In order to update an installation that was deployed using Helm command provided by the guided install , just go through the process...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found