From 68cb0cdb50719e079bf867b60bed7255837ee0e8 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 30 Jan 2023 22:51:42 +0100 Subject: Updated www docs section --- content/docs/adyxax.org/www/_index.md | 9 +- content/docs/adyxax.org/www/install.md | 148 ++++----------------------------- 2 files changed, 19 insertions(+), 138 deletions(-) diff --git a/content/docs/adyxax.org/www/_index.md b/content/docs/adyxax.org/www/_index.md index 9439f1e..808ab18 100644 --- a/content/docs/adyxax.org/www/_index.md +++ b/content/docs/adyxax.org/www/_index.md @@ -7,14 +7,15 @@ description: adyxax.org main website. www.adyxax.org, wiki.adyxax.org and blog.a This is the website you are currently reading. It is a static website built using [hugo](https://github.com/gohugoio/hugo). -I often refer to it as wiki.adyxax.org because this site replaces a dokuwiki I used for a long time as my main website (and a pmwiki before that), but with [hugo]({{< ref "hugo" >}}) it has become more than that. It is now a mix of wiki, blog and showcase of my work and interests. +I often refer to it as wiki.adyxax.org because this site replaces a [dokuwiki](https://www.dokuwiki.org/dokuwiki) I used for a long time as my main website (and a [pmwiki](https://www.pmwiki.org/) before that), but with hugo it has become more than that: it is now a mix of wiki, blog and showcase of my work and interests. For a log of how I made the initial setup, see [this blog article.]({{< ref "switching-to-hugo" >}}). Things are now simpler since I [wrote my own theme]({{< ref "ditching-the-heavy-hugo-theme" >}}). ## Captain's log -- 2021-09-12 : Added the search feature -- 2021-07-28 : Migrated to k3s setup on myth.adyxax.org -- 2020-10-05 : Initial setup of hugo on yen.adyxax.org's OpenBSD +- 2023-01-28: [Website makeover]({{< ref "selenized.md" >}}) +- 2021-09-12: [Added the search feature]({{< ref "blog/hugo/search.md" >}}) +- 2021-07-28: Migrated to k3s setup on myth.adyxax.org +- 2020-10-05: Initial setup of hugo on yen.adyxax.org's OpenBSD ## Docs diff --git a/content/docs/adyxax.org/www/install.md b/content/docs/adyxax.org/www/install.md index 08d89a5..d7ee65b 100644 --- a/content/docs/adyxax.org/www/install.md +++ b/content/docs/adyxax.org/www/install.md @@ -11,143 +11,17 @@ tags: This is a static website built using hugo. -The CI/CD is a work in progress, for now the installation is made from a crude kubernetes manifest. The instructions have been updated for the search feature. +## Container images + +There are two container images: +- One for the hugo static website +- One for the search web service + +These are both built with `buildah` using [the same script](https://git.adyxax.org/adyxax/ev-scripts/tree/www/build-images.sh). ## Kubernetes manifests -```yaml -apiVersion: v1 -kind: Namespace -metadata: - name: www ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - namespace: www - name: www - labels: - app: www -spec: - replicas: 1 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - selector: - matchLabels: - app: www - template: - metadata: - labels: - app: www - spec: - containers: - - name: www - image: quay.io/adyxax/www:2021110901 - ports: - - containerPort: 80 - readinessProbe: - httpGet: - path: '/' - port: 80 - initialDelaySeconds: 1 - timeoutSeconds: 1 - livenessProbe: - httpGet: - path: '/' - port: 80 - initialDelaySeconds: 1 - timeoutSeconds: 1 - lifecycle: - preStop: - exec: - command: ["/bin/sh", "-c", "sleep 10"] - - name: search - image: quay.io/adyxax/www-search:2021110901 - ports: - - containerPort: 8080 - readinessProbe: - httpGet: - path: '/search/' - port: 8080 - initialDelaySeconds: 1 - timeoutSeconds: 1 - livenessProbe: - httpGet: - path: '/search/' - port: 8080 - initialDelaySeconds: 1 - timeoutSeconds: 1 - lifecycle: - preStop: - exec: - command: ["/bin/sh", "-c", "sleep 10"] ---- -apiVersion: v1 -kind: Service -metadata: - namespace: www - name: www -spec: - type: ClusterIP - selector: - app: www - ports: - - protocol: TCP - port: 80 - targetPort: 80 - name: www - - protocol: TCP - port: 8080 - targetPort: 8080 - name: search ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - namespace: www - name: www -spec: - ingressClassName: nginx - tls: - - secretName: wildcard-adyxax-org - rules: - - host: www.adyxax.org - http: - paths: - - path: '/' - pathType: Prefix - backend: - service: - name: www - port: - number: 80 - - path: '/search' - pathType: Prefix - backend: - service: - name: www - port: - number: 8080 ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - namespace: www - name: redirects - annotations: - nginx.ingress.kubernetes.io/permanent-redirect: https://www.adyxax.org/ - nginx.ingress.kubernetes.io/permanent-redirect-code: "308" -spec: - ingressClassName: nginx - tls: - - secretName: wildcard-adyxax-org - rules: - - host: adyxax.org - - host: wiki.adyxax.org -``` +[The whole manifest is here](https://git.adyxax.org/adyxax/www/tree/deploy/www.yaml). ## DNS CNAME @@ -171,3 +45,9 @@ acme.sh --config-home "$HOME/.acme.sh" --server letsencrypt --dns dns_cf --issue kubectl -n www create secret tls wildcard-adyxax-org --cert=$HOME/.acme.sh/adyxax.org/fullchain.cer \ --key=$HOME/.acme.sh/adyxax.org/adyxax.org.key -o yaml --save-config --dry-run=client | kubectl apply -f - ``` + +## CI/CD + +The build and deployment of the website is handled by `eventline` with the following git hooks called by `gitolite` when I git push: +- [www-build](https://git.adyxax.org/adyxax/ev-scripts/tree/www/www-build.yaml) +- [www-deploy](https://git.adyxax.org/adyxax/ev-scripts/tree/www/www-deploy.yaml) -- cgit v1.2.3