1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 09:46:23 +00:00

Merge branch 'markdown-to-markua'

This commit is contained in:
David Young
2019-01-21 08:47:10 +13:00
9 changed files with 60 additions and 8 deletions

View File

@@ -1,12 +1,11 @@
lang: python lang: python
# blocklist
branches: branches:
except: except:
- leanpub-preview - leanpub-preview
- leanpub-publish - leanpub-publish
script: script:
- scripts/markdown-to-markua.sh - scripts/markdown-to-markua.sh
after_success: after_success:
- scripts/push-markua-to-branch.sh - scripts/push-markua-to-branch.sh
env: env:
secure: "X0ruiXtzArHPaOAd5cQS0axHGwMM5HwqSHASr/KnzV1yZUPzJIrzJQYSCJmFPzk6zuboA2Tsa96zu+DftgA9N9WgzTYmjp8M10y9vcK4cpkfi5frs7GVorVLPQ5kcWwYPf/j+YzpP5OwrRSxDDG853GJ4OhoALcjmmBJk8NwIKZOkA6x2RvvcDRx6dc216QdhmouD5Hz0tImkE2rYdQNm44IN7OF6wekbEhOzN2Chz6yGit3duRvxBrNOPqmGqkFwtg0sxyQO0iBa4qvg88qrKQOIHwUG5y4rp8QcdqfRMv/lSNGEg1Mh7iDUHbZpvcAoXREXp9FMEY/SJ1uYkcEMn+GvLDQ/BOFwKjC/duWM3oMPgzjqI+gwpIdlTZt5+Qu9v4Z6+XJ5P+JIWZYtzudDVuOzVMSIzwk9y2a/ufYXGQdvGktf6H51WCcA8CO2muxLtDwDtV1okAVm+HXkgQ/pcwjqqq3n3RojN6Xxm+TJggn3HgU21qug/K1lukycwCjQbI8s0ey3soT1+oPc8Fl95n35eXTUY3DOd0u14e0Y3XKIbG9Rvyp9U8gJC2Ij6+EXSdHlFhvr5tJJLNwXkXjV3yMnLgtlSnuGBGHUpv0+XZuSsGqOropl/KDUurb2TGkIH7PjpBpFm6PhSbLViGXrupuxTvKLdsXBXospzODuEQ=" secure: X0ruiXtzArHPaOAd5cQS0axHGwMM5HwqSHASr/KnzV1yZUPzJIrzJQYSCJmFPzk6zuboA2Tsa96zu+DftgA9N9WgzTYmjp8M10y9vcK4cpkfi5frs7GVorVLPQ5kcWwYPf/j+YzpP5OwrRSxDDG853GJ4OhoALcjmmBJk8NwIKZOkA6x2RvvcDRx6dc216QdhmouD5Hz0tImkE2rYdQNm44IN7OF6wekbEhOzN2Chz6yGit3duRvxBrNOPqmGqkFwtg0sxyQO0iBa4qvg88qrKQOIHwUG5y4rp8QcdqfRMv/lSNGEg1Mh7iDUHbZpvcAoXREXp9FMEY/SJ1uYkcEMn+GvLDQ/BOFwKjC/duWM3oMPgzjqI+gwpIdlTZt5+Qu9v4Z6+XJ5P+JIWZYtzudDVuOzVMSIzwk9y2a/ufYXGQdvGktf6H51WCcA8CO2muxLtDwDtV1okAVm+HXkgQ/pcwjqqq3n3RojN6Xxm+TJggn3HgU21qug/K1lukycwCjQbI8s0ey3soT1+oPc8Fl95n35eXTUY3DOd0u14e0Y3XKIbG9Rvyp9U8gJC2Ij6+EXSdHlFhvr5tJJLNwXkXjV3yMnLgtlSnuGBGHUpv0+XZuSsGqOropl/KDUurb2TGkIH7PjpBpFm6PhSbLViGXrupuxTvKLdsXBXospzODuEQ=

View File

@@ -14,6 +14,7 @@ ha-docker-swarm/traefik.md
ha-docker-swarm/docker-swarm-mode.md ha-docker-swarm/docker-swarm-mode.md
ha-docker-swarm/duplicity.md ha-docker-swarm/duplicity.md
<<<<<<< HEAD
sections/recipes.md sections/recipes.md
recipes/autopirate.md recipes/autopirate.md
recipes/elkarbackup.md recipes/elkarbackup.md
@@ -38,6 +39,23 @@ recipes/privatebin.md
recipes/swarmprom.md recipes/swarmprom.md
recipes/wekan.md recipes/wekan.md
=======
sections/recipies.md
recipies/mail.md
recipies/gitlab.md
recipies/gitlab-runner.md
recipies/wekan.md
recipies/huginn.md
recipies/kanboard.md
recipies/miniflux.md
recipies/ghost.md
recipies/piwik.md
recipies/autopirate.md
recipies/nextcloud.md
recipies/portainer.md
recipies/turtle-pool.md
recipies/tiny-tiny-rss.md
>>>>>>> markdown-to-markua
sections/reference.md sections/reference.md
reference/oauth_proxy.md reference/oauth_proxy.md
@@ -45,3 +63,4 @@ reference/data_layout.md
reference/networks.md reference/networks.md
reference/git-docker.md reference/git-docker.md
reference/openvpn.md reference/openvpn.md
reference/troubleshooting.md

View File

@@ -51,7 +51,7 @@ Assuming 3 nodes, under normal circumstances the following is illustrated:
* The **traefik** service (in swarm mode) receives incoming requests (on http and https), and forwards them to individual containers. Traefik knows the containers names because it's able to access the docker socket. * The **traefik** service (in swarm mode) receives incoming requests (on http and https), and forwards them to individual containers. Traefik knows the containers names because it's able to access the docker socket.
* All 3 nodes run keepalived, at different priorities. Since traefik is running as a swarm service and listening on TCP 80/443, requests made to the keepalived VIP and arriving at **any** of the swarm nodes will be forwarded to the traefik container (no matter which node it's on), and then onto the target backend. * All 3 nodes run keepalived, at different priorities. Since traefik is running as a swarm service and listening on TCP 80/443, requests made to the keepalived VIP and arriving at **any** of the swarm nodes will be forwarded to the traefik container (no matter which node it's on), and then onto the target backend.
![HA function](images/docker-swarm-ha-function.png) ![HA function](../images/docker-swarm-ha-function.png)
### Node failure ### Node failure
@@ -63,7 +63,7 @@ In the case of a failure (or scheduled maintenance) of one of the nodes, the fol
* The **traefik** service is either restarted or unaffected, and as the backend containers stop/start and change IP, traefik is aware and updates accordingly. * The **traefik** service is either restarted or unaffected, and as the backend containers stop/start and change IP, traefik is aware and updates accordingly.
* The keepalived VIP continues to function on the remaining nodes, and docker swarm continues to forward any traffic received on TCP 80/443 to the appropriate node. * The keepalived VIP continues to function on the remaining nodes, and docker swarm continues to forward any traffic received on TCP 80/443 to the appropriate node.
![HA function](images/docker-swarm-node-failure.png) ![HA function](../images/docker-swarm-node-failure.png)
### Node restore ### Node restore
@@ -75,7 +75,7 @@ When the failed (or upgraded) host is restored to service, the following is illu
* Keepalived VIP regains full redundancy * Keepalived VIP regains full redundancy
![HA function](images/docker-swarm-node-restore.png) ![HA function](../images/docker-swarm-node-restore.png)
### Total cluster failure ### Total cluster failure

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 314 KiB

After

Width:  |  Height:  |  Size: 314 KiB

View File

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 333 KiB

View File

Before

Width:  |  Height:  |  Size: 310 KiB

After

Width:  |  Height:  |  Size: 310 KiB

View File

@@ -1,3 +1,30 @@
#!/bin/bash #!/bin/bash
echo "Nananana... Batman!" > manuscript/test.md
# Markua doesn't know what to do with 4 backticks (````), so convert to 3:
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/\`\`\`\`/\`\`\`/g"
# Markua doesn't like emojis, so remove them:
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👏//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/💬//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👍//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/💰//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🍷//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🏢//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/❤️//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🐢//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👋//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🐦//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/📖//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/✉️//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/📺//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🎥//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🎵//g"
find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/😁//g"
# Do nothing, yet. This is where the sed magic will go # Do nothing, yet. This is where the sed magic will go

View File

@@ -19,6 +19,13 @@ upload_files() {
git push --quiet --set-upstream origin-leanpub-preview leanpub-preview git push --quiet --set-upstream origin-leanpub-preview leanpub-preview
} }
# Not needed at this stage, since github integration still works. It's noted as being deprecated however,
# so might need this in future
#trigger_preview() {
# curl -d "api_key=${LEANPUB-API-KEY}" https://leanpub.com/geek-cookbook/preview.json
#}
setup_git setup_git
commit_website_files commit_website_files
upload_files upload_files
#trigger_preview