2019-12-25 20:08:08 +00:00
|
|
|
# Wiki Farm in Kubernetes
|
|
|
|
|
|
|
|
There are easier ways to get started with federated wiki. Here we are
|
|
|
|
using wiki to drive some learning about kubernetes.
|
|
|
|
|
2020-01-12 22:30:42 +00:00
|
|
|
# We're using MacOS, Docker Desktop, and k3d
|
2019-12-25 20:08:08 +00:00
|
|
|
|
2021-01-10 23:02:45 +00:00
|
|
|
brew install --cask docker
|
2020-01-12 22:30:42 +00:00
|
|
|
brew install k3d
|
2020-01-13 02:29:41 +00:00
|
|
|
|
|
|
|
mkdir -p ~/.wiki-k8s ~/workspace/fedwiki
|
|
|
|
k3d create \
|
2020-01-19 22:13:24 +00:00
|
|
|
--server-arg --tls-san="127.0.0.1" \
|
2020-01-13 02:29:41 +00:00
|
|
|
--publish 80:80 \
|
|
|
|
-v "$HOME/.wiki-k8s:/macos/.wiki-k8s" \
|
|
|
|
-v "$HOME/workspace/fedwiki:/macos/fedwiki" \
|
|
|
|
--name wiki
|
2019-12-25 20:08:08 +00:00
|
|
|
|
2020-01-19 22:22:03 +00:00
|
|
|
# example ~/.wiki-k8s/config.json
|
|
|
|
|
|
|
|
{
|
|
|
|
"admin": "any memorable password",
|
|
|
|
"autoseed": true,
|
|
|
|
"farm": true,
|
|
|
|
"cookieSecret": "any random string",
|
|
|
|
"secure_cookie": false,
|
|
|
|
"security_type": "friends",
|
|
|
|
"wikiDomains": {
|
2021-01-10 23:02:45 +00:00
|
|
|
"localhost": {
|
|
|
|
"id": "/home/node/.wiki/localhost.owner.json"
|
|
|
|
},
|
|
|
|
"example.com": {
|
|
|
|
"id": "/home/node/.wiki/example.com.owner.json"
|
2020-01-19 22:22:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-10 23:02:45 +00:00
|
|
|
# example ~/.wiki-k8s/localhost.owner.json
|
2020-01-19 22:22:03 +00:00
|
|
|
|
|
|
|
`.friend.secret` must match the `.admin` field from `config.json`
|
|
|
|
|
|
|
|
{
|
|
|
|
"name": "The Owner",
|
|
|
|
"friend": {
|
|
|
|
"secret": "any memorable password"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-12-25 20:08:08 +00:00
|
|
|
# Deploy Wiki
|
|
|
|
|
2021-01-18 07:10:15 +00:00
|
|
|
kubectl apply -f http://deploy.wiki.do/assets/wiki/wiki.yaml
|
2019-12-25 20:08:08 +00:00
|
|
|
|
|
|
|
# Play with the wiki
|
|
|
|
|
2021-01-10 23:02:45 +00:00
|
|
|
open http://wiki.localhost
|