Reworked the adyxax.org docs articles
This commit is contained in:
parent
fccb131525
commit
4524327918
7 changed files with 67 additions and 83 deletions
|
@ -20,5 +20,5 @@ As a system and network administrator I believe I have a deep understanding of l
|
|||
|
||||
On a personal note I also believe there are way too many blogs that focus on the hello world aspects and quick and dirty deployments that show up in google results, I will try to change that a bit. Writing about the choices I made will also help me reflect on them as this infrastructure evolves and grows.
|
||||
|
||||
## Subsections
|
||||
## Services
|
||||
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
---
|
||||
title: "git"
|
||||
weight: 1
|
||||
description: >
|
||||
adyxax.org git server
|
||||
description: adyxax.org git server
|
||||
---
|
||||
|
||||
git.adyxax.org is a gitea instance. For about 10 years I used a gitolite installation but I finally went for a gui instead in order to host repositories for non tech people.
|
||||
## Introduction
|
||||
|
||||
git.adyxax.org is a [gitea](https://gitea.io/) instance. For about 10 years I used a gitolite installation but I finally went for a gui instead in order to host repositories for non tech people.
|
||||
|
||||
## Preparing the postgresql database
|
||||
|
||||
I am currently hosting this gitea instance on an OpenBSD server. Obviously postgresql is packaged on this system so the installation is as simple as :
|
||||
I am currently hosting this instance on an OpenBSD server. Obviously postgresql is packaged on this system so the installation is as simple as :
|
||||
{{< highlight sh >}}
|
||||
pkg_add postgresql-server
|
||||
su - __postgresql
|
||||
mkdir /var/postgresql/data
|
||||
initdb -D /var/postgresql/data -U postgres -A scram-sha-256 -E UTF8 -W
|
||||
exit
|
||||
rcctl enable postgresql
|
||||
rcctl start postgresql
|
||||
su - ___postgresql
|
||||
|
@ -35,8 +36,9 @@ rcctl enable gitea
|
|||
rcctl start gitea
|
||||
{{< /highlight >}}
|
||||
|
||||
## TODO Serving the website
|
||||
## Serving the website
|
||||
|
||||
TODO
|
||||
{{< highlight sh >}}
|
||||
nvim /etc/h2o/h2o.conf
|
||||
{{< /highlight >}}
|
|
@ -1,11 +1,12 @@
|
|||
---
|
||||
title: "nethack"
|
||||
linkTitle: "nethack"
|
||||
weight: 1
|
||||
description: >
|
||||
nethack
|
||||
description: nethack.adyxax.org game server
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
I am hosting a private nethack game server accessible via ssh for anyone who will send me a ssh public key. It all runs chrooted on an OpenBSD server.
|
||||
|
||||
## dgamelaunch
|
||||
|
||||
TODO
|
||||
|
@ -53,4 +54,3 @@ mount -R /dev /opt/nethack/dev
|
|||
gdb chroot
|
||||
run --userspec=nethack:games /opt/nethack/ /dgamelaunch
|
||||
{{< /highlight >}}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
title: "Services"
|
||||
linkTitle: "Services"
|
||||
weight: 1
|
||||
description: >
|
||||
Here are the services provided by adyxax.org
|
||||
---
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
---
|
||||
title: "checkmk"
|
||||
linkTitle: "checkmk"
|
||||
weight: 1
|
||||
description: >
|
||||
checkmk
|
||||
---
|
||||
|
||||
TODO
|
||||
|
||||
## Updating
|
||||
|
||||
- Download latest raw edition package from http://mathias-kettner.com/check_mk_download_version.php?HTML=yes&version=1.2.8p15&edition=cre and install it.
|
||||
- `run omd backup adyxax adyxax.bak`
|
||||
- `run omd update adyxax`
|
||||
- If all went well, apt purge the previous check_mk version to free space.
|
|
@ -1,47 +0,0 @@
|
|||
---
|
||||
title: "www"
|
||||
linkTitle: "www"
|
||||
weight: 1
|
||||
description: >
|
||||
adyxax.org main entry website. www.adyxax.org, wiki.adyxax.org and blog.adyxax.org all point here.
|
||||
---
|
||||
|
||||
This is the website you are currently reading. It is a static website built using [hugo](https://github.com/gohugoio/hugo). This article details how I
|
||||
installed hugo, how I initialised this website and how I manage it. I often refer to it as wiki.adyxax.org because I hosted a unique dokuwiki for a long
|
||||
time as my main website (and a pmwiki 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.]({{< relref "/blog/hugo/switching-to-hugo.md" >}})
|
||||
|
||||
## Installing hugo
|
||||
|
||||
I am currently hosting this website on an OpenBSD server. Hugo is packaged on this system so the installation is as simple as :
|
||||
{{< highlight sh >}}
|
||||
pkg_add hugo--extended
|
||||
{{< / highlight >}}
|
||||
|
||||
## Bootstraping this site
|
||||
|
||||
The website is on my gitea :
|
||||
{{< highlight sh >}}
|
||||
cd /var/www/htdocs
|
||||
git clone --recurse-submodules _gitea@git.adyxax.org:adyxax/www.git
|
||||
cd www
|
||||
{{< / highlight >}}
|
||||
|
||||
The docsy theme requires two nodejs programs to run :
|
||||
{{< highlight sh >}}
|
||||
npm install -D --save autoprefixer
|
||||
npm install -D --save postcss-cli
|
||||
{{< / highlight >}}
|
||||
|
||||
## hugo commands
|
||||
|
||||
To publish the website in the `public` folder :
|
||||
{{< highlight sh >}}
|
||||
hugo --minify
|
||||
{{< / highlight >}}
|
||||
|
||||
## TODO
|
||||
|
||||
TODO deploy on push to git.adyxax.org
|
||||
TODO web server config
|
53
content/docs/adyxax.org/www.md
Normal file
53
content/docs/adyxax.org/www.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
title: "www"
|
||||
description: adyxax.org main website. www.adyxax.org, wiki.adyxax.org and blog.adyxax.org all point here.
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
This is the website you are currently reading. It is a static website built using [hugo](https://github.com/gohugoio/hugo). This article details how I
|
||||
installed hugo, how I initialised this website and how I manage it. 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.
|
||||
|
||||
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" >}}).
|
||||
|
||||
## Installing hugo
|
||||
|
||||
I am currently hosting this website on an OpenBSD server. Hugo is packaged on this system so the installation is as simple as :
|
||||
{{< highlight sh >}}
|
||||
pkg_add hugo--extended
|
||||
{{< / highlight >}}
|
||||
|
||||
## Bootstraping this site
|
||||
|
||||
The website is on my [gitea instance]({{< ref "git.md" >}}), and leaves under the standard `/var/www/htdocs` path:
|
||||
{{< highlight sh >}}
|
||||
cd /var/www/htdocs
|
||||
git clone _gitea@git.adyxax.org:adyxax/www.git
|
||||
cd www
|
||||
{{< / highlight >}}
|
||||
|
||||
To publish the website in the `public` folder I use a custom makefile so that I do not have to remind myself of hugo flags :
|
||||
{{< highlight sh >}}
|
||||
make build
|
||||
{{< / highlight >}}
|
||||
|
||||
## Automated deployment
|
||||
|
||||
The deployment is automated with a simple `post-receive` git hook in the gitea repository :
|
||||
{{< highlight sh >}}
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
unset GIT_DIR
|
||||
|
||||
cd /var/www/htdocs/www/
|
||||
git remote update
|
||||
git reset --hard origin/master
|
||||
make build
|
||||
|
||||
echo 'website updated'
|
||||
{{< /highlight >}}
|
||||
|
||||
## Web server config
|
||||
|
||||
TODO
|
Loading…
Add table
Reference in a new issue