diff --git a/.github/workflows/on-push-master-notify-discord.yml b/.github/workflows/on-push-master-notify-discord.yml index 8892615..a2bb6b7 100644 --- a/.github/workflows/on-push-master-notify-discord.yml +++ b/.github/workflows/on-push-master-notify-discord.yml @@ -24,6 +24,8 @@ jobs: The [Geek's Cookbook](https://geek-cookbook.funkypenguin.co.nz) has been updated! - Here's what's fresh: - :cupcake: [${{github.event.commits[0].message}}]({{ EVENT_PAYLOAD.compare }}) - + Here's what @{{ GITHUB_ACTOR }} just cooked: + + :partying_face: [${{github.event.commits[0].message}}]({{ EVENT_PAYLOAD.compare }}) + --- + \ No newline at end of file diff --git a/_snippets/recipe-cta.md b/_snippets/premix-cta.md similarity index 100% rename from _snippets/recipe-cta.md rename to _snippets/premix-cta.md diff --git a/_snippets/recipe-footer.md b/_snippets/recipe-footer.md new file mode 100644 index 0000000..f4bddac --- /dev/null +++ b/_snippets/recipe-footer.md @@ -0,0 +1,32 @@ +## Chef's notes 📓 + +///Footnotes Go Here/// + +### Tip your waiter (sponsor) 👏 + +Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) Sponsor me on [Github][github_sponsor] / [Patreon][patreon], or see the [contribute](/community/support/) page for more (_free or paid)_ ways to say thank you! 👏 + +### Flirt with waiter (subscribe) 💌 + +Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the [RSS feed](https://mastodon.social/@geekcookbook_changes.atom), or leave your email address below, and we'll keep you updated. (*double-opt-in, no monkey business, no spam) + +
+ +## Your comments? 💬 + + + + + + +[patreon]: https://www.patreon.com/bePatron?u=6982506 +[github_sponsor]: https://github.com/sponsors/funkypenguin \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/design.md b/manuscript/ha-docker-swarm/design.md index b11e967..a2aea1f 100644 --- a/manuscript/ha-docker-swarm/design.md +++ b/manuscript/ha-docker-swarm/design.md @@ -87,9 +87,8 @@ A day after writing this, my environment suffered a fault whereby all 3 VMs were Upon restore, docker failed to start on one of the VMs due to local disk space issue[^1]. However, the other two VMs started, established the swarm, mounted their shared storage, and started up all the containers (services) which were managed by the swarm. -In summary, although I suffered an **unplanned power outage to all of my infrastructure**, followed by a **failure of a third of my hosts**... ==all my platforms are 100% available with **absolutely no manual intervention**==. +In summary, although I suffered an **unplanned power outage to all of my infrastructure**, followed by a **failure of a third of my hosts**... ==all my platforms are 100% available[^1] with **absolutely no manual intervention**==. [^1]: Since there's no impact to availability, I can fix (or just reinstall) the failed node whenever convenient. - -## Chef's Notes 📓 \ No newline at end of file +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/docker-swarm-mode.md b/manuscript/ha-docker-swarm/docker-swarm-mode.md index cfc962c..56513fc 100644 --- a/manuscript/ha-docker-swarm/docker-swarm-mode.md +++ b/manuscript/ha-docker-swarm/docker-swarm-mode.md @@ -167,6 +167,8 @@ Launch shepherd by running ```docker stack deploy shepherd -c /var/data/config/s ## Summary +--8<-- "5-min-install.md" + What have we achieved? !!! summary "Summary" @@ -174,7 +176,4 @@ What have we achieved? * [X] [Docker swarm cluster](/ha-docker-swarm/design/) - ---8<-- "5-min-install.md" - -## Chef's Notes 📓 \ No newline at end of file +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/index.md b/manuscript/ha-docker-swarm/index.md deleted file mode 100644 index e69de29..0000000 diff --git a/manuscript/ha-docker-swarm/keepalived.md b/manuscript/ha-docker-swarm/keepalived.md index 08ecd42..1046e8d 100644 --- a/manuscript/ha-docker-swarm/keepalived.md +++ b/manuscript/ha-docker-swarm/keepalived.md @@ -81,8 +81,7 @@ What have we achieved? --8<-- "5-min-install.md" - -## Chef's notes 📓 - [^1]: Some hosting platforms (*OpenStack, for one*) won't allow you to simply "claim" a virtual IP. Each node is only able to receive traffic targetted to its unique IP, unless certain security controls are disabled by the cloud administrator. In this case, keepalived is not the right solution, and a platform-specific load-balancing solution should be used. In OpenStack, this is Neutron's "Load Balancer As A Service" (LBAAS) component. AWS, GCP and Azure would likely include similar protections. -[^2]: More than 2 nodes can participate in keepalived. Simply ensure that each node has the appropriate priority set, and the node with the highest priority will become the master. \ No newline at end of file +[^2]: More than 2 nodes can participate in keepalived. Simply ensure that each node has the appropriate priority set, and the node with the highest priority will become the master. + +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/maintenance.md b/manuscript/ha-docker-swarm/maintenance.md deleted file mode 100644 index 89d98ee..0000000 --- a/manuscript/ha-docker-swarm/maintenance.md +++ /dev/null @@ -1,83 +0,0 @@ -# Introduction - -## Adding a host - -## Adding storage - -gluster volume add-brick VOLNAME NEW_BRICK - -example - -# gluster volume add-brick test-volume server4:/exp4 -Add Brick successful - -# Replacing failed host - -Followed https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Replacing_Hosts.html - - -[root@glusterfs-server /]# gluster peer status -Number of Peers: 1 - -Hostname: ds1 -Uuid: db9c80da-11e4-461d-8ea5-66dd12ca897c -State: Peer in Cluster (Disconnected) -[root@glusterfs-server /]# - -Grab UUID above - -edit /var/lib/glusterd/glusterd.info -change: -UUID=aee45c2c-aa19-4d29-bc94-4833f2b22863 -to -UUID=db9c80da-11e4-461d-8ea5-66dd12ca897c - -My peer's id (ds2): -[root@glusterfs-server /]# gluster system:: uuid get -UUID: 38ca4e8b-8ef5-4165-9f41-5c8b3f0103cc -[root@glusterfs-server /]# - -vi /var/lib/glusterd/peers/38ca4e8b-8ef5-4165-9f41-5c8b3f0103cc - -UUID=38ca4e8b-8ef5-4165-9f41-5c8b3f0103cc -state=3 -hostname=ds3 - - - -Got volume info - - -[root@glusterfs-server /]# gluster volume info - -Volume Name: gv0 -Type: Replicate -Volume ID: 84e1169c-41dc-467a-9ae1-a474efaf789f -Status: Started -Snapshot Count: 0 -Number of Bricks: 1 x 2 = 2 -Transport-type: tcp -Bricks: -Brick1: ds1:/var/no-direct-write-here/brick1/gv0 -Brick2: ds3:/var/no-direct-write-here/brick1/gv0 -Options Reconfigured: -nfs.disable: on -transport.address-family: inet -[root@glusterfs-server /]# - - - ----- -[root@glusterfs-server /]# getfattr -d -m. -ehex /var/no-direct-write-here/brick1/gv0/ -getfattr: Removing leading '/' from absolute path names -# file: var/no-direct-write-here/brick1/gv0/ -security.selinux=0x73797374656d5f753a6f626a6563745f723a756e6c6162656c65645f743a733000 -trusted.gfid=0x00000000000000000000000000000001 -trusted.glusterfs.dht=0x000000010000000000000000ffffffff -trusted.glusterfs.volume-id=0x84e1169c41dc467a9ae1a474efaf789f - -[root@glusterfs-server /]# - - - -setfattr -n trusted.glusterfs.volume-id -v 0x84e1169c41dc467a9ae1a474efaf789f /var/no-direct-write-here/brick1/gv0 diff --git a/manuscript/ha-docker-swarm/nodes.md b/manuscript/ha-docker-swarm/nodes.md index 373045c..3e4608a 100644 --- a/manuscript/ha-docker-swarm/nodes.md +++ b/manuscript/ha-docker-swarm/nodes.md @@ -76,4 +76,4 @@ After completing the above, you should have: * At least 20GB disk space (_but it'll be tight_) * [X] Connectivity to each other within the same subnet, and on a low-latency link (_i.e., no WAN links_) -## Chef's Notes 📓 \ No newline at end of file +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/registry.md b/manuscript/ha-docker-swarm/registry.md index d57985a..ccfc08c 100644 --- a/manuscript/ha-docker-swarm/registry.md +++ b/manuscript/ha-docker-swarm/registry.md @@ -110,4 +110,4 @@ systemctl restart docker-latest !!! tip "" Note the extra comma required after "false" above -## Chef's notes 📓 +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/shared-storage-ceph.md b/manuscript/ha-docker-swarm/shared-storage-ceph.md index b3a3b95..a29ba71 100644 --- a/manuscript/ha-docker-swarm/shared-storage-ceph.md +++ b/manuscript/ha-docker-swarm/shared-storage-ceph.md @@ -39,6 +39,8 @@ mkdir -p /etc/ceph The process takes about 30 seconds, after which, you'll have a MVC (*Minimum Viable Cluster*)[^1], encompassing a single monitor and mgr instance on your chosen node. Here's the complete output from a fresh install: +[^1]: Minimum Viable Cluster acronym copyright, trademark, and whatever else, to Funky Penguin for 1,000,000 years. + ??? "Example output from a fresh cephadm bootstrap" ``` root@raphael:~# MYIP=`ip route get 1.1.1.1 | grep -oP 'src \K\S+'` @@ -216,9 +218,7 @@ What have we achieved? * [X] Resiliency in the event of the failure of a single node * [X] Beautiful dashboard -## The easy, 5-minute install - -I share (_with [sponsors][github_sponsor] and [patrons][patreon]_) a private "_premix_" GitHub repository, which includes an ansible playbook for deploying the entire Geek's Cookbook stack, automatically. This means that members can create the entire environment with just a ```git pull``` and an ```ansible-playbook deploy.yml``` 👍 +--8<-- "5-min-install.md" Here's a screencast of the playbook in action. I sped up the boring parts, it actually takes ==5 min== (*you can tell by the timestamps on the prompt*): @@ -226,6 +226,8 @@ Here's a screencast of the playbook in action. I sped up the boring parts, it ac [patreon]: https://www.patreon.com/bePatron?u=6982506 [github_sponsor]: https://github.com/sponsors/funkypenguin -## Chef's Notes 📓 -[^1]: Minimum Viable Cluster acronym copyright, trademark, and whatever else, to Funky Penguin for 1,000,000 years. + + + +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/shared-storage-gluster.md b/manuscript/ha-docker-swarm/shared-storage-gluster.md index a4c9e32..f72f7b7 100644 --- a/manuscript/ha-docker-swarm/shared-storage-gluster.md +++ b/manuscript/ha-docker-swarm/shared-storage-gluster.md @@ -164,9 +164,8 @@ After completing the above, you should have: * [X] Persistent storage available to every node * [X] Resiliency in the event of the failure of a single (gluster) node -## Chef's Notes 📓 +[^1]: Future enhancements to this recipe include: + 1. Migration of shared storage from GlusterFS to Ceph ()[#2](https://gitlab.funkypenguin.co.nz/funkypenguin/geeks-cookbook/issues/2)) + 2. Correct the fact that volumes don't automount on boot ([#3](https://gitlab.funkypenguin.co.nz/funkypenguin/geeks-cookbook/issues/3)) -Future enhancements to this recipe include: - -1. Migration of shared storage from GlusterFS to Ceph ()[#2](https://gitlab.funkypenguin.co.nz/funkypenguin/geeks-cookbook/issues/2)) -2. Correct the fact that volumes don't automount on boot ([#3](https://gitlab.funkypenguin.co.nz/funkypenguin/geeks-cookbook/issues/3)) \ No newline at end of file +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/traefik-forward-auth.md b/manuscript/ha-docker-swarm/traefik-forward-auth.md index 88bbe69..dab14c4 100644 --- a/manuscript/ha-docker-swarm/traefik-forward-auth.md +++ b/manuscript/ha-docker-swarm/traefik-forward-auth.md @@ -83,10 +83,7 @@ If you're not confident that forward authentication is working, add a simple "wh - traefik.frontend.auth.forward.trustForwardHeader=true ``` -!!! tip - I share (_with my [sponsors](https://github.com/sponsors/funkypenguin)_) a private "_premix_" git repository, which includes necessary docker-compose and env files for all published recipes. This means that sponsors can launch any recipe with just a ```git pull``` and a ```docker stack deploy``` 👍 - - +--8<-- "premix-cta.md" ## Serving @@ -107,9 +104,7 @@ What have we achieved? By adding an additional three simple labels to any servic * [X] Traefik-forward-auth configured to authenticate against an OIDC provider +[^1]: Traefik forward auth replaces the use of [oauth_proxy containers](/reference/oauth_proxy/) found in some of the existing recipes +[^2]: I reviewed several implementations of forward authenticators for Traefik, but found most to be rather heavy-handed, or specific to a single auth provider. @thomaseddon's go-based docker image is 7MB in size, and can be extended to work with any OIDC provider. - -## Chef's Notes 📓 - -1. Traefik forward auth replaces the use of [oauth_proxy containers](/reference/oauth_proxy/) found in some of the existing recipes -2. I reviewed several implementations of forward authenticators for Traefik, but found most to be rather heavy-handed, or specific to a single auth provider. @thomaseddon's go-based docker image is 7MB in size, and can be extended to work with any OIDC provider. \ No newline at end of file +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/traefik-forward-auth/keycloak.md b/manuscript/ha-docker-swarm/traefik-forward-auth/keycloak.md index f455ea7..e3d48dc 100644 --- a/manuscript/ha-docker-swarm/traefik-forward-auth/keycloak.md +++ b/manuscript/ha-docker-swarm/traefik-forward-auth/keycloak.md @@ -80,8 +80,7 @@ If you're not confident that forward authentication is working, add a simple "wh - traefik.frontend.auth.forward.trustForwardHeader=true ``` -!!! tip -I share (_with my [sponsors](https://github.com/sponsors/funkypenguin)_) a private "_premix_" git repository, which includes necessary docker-compose and env files for all published recipes. This means that sponsors can launch any recipe with just a `git pull` and a `docker stack deploy` 👍 +--8<-- "premix-cta.md" ## Serving @@ -114,6 +113,6 @@ Created: * [X] Traefik-forward-auth configured to authenticate against KeyCloak -## Chef's Notes 📓 +[^1]: KeyCloak is very powerful. You can add 2FA and all other clever things outside of the scope of this simple recipe ;) -1. KeyCloak is very powerful. You can add 2FA and all other clever things outside of the scope of this simple recipe ;) +--8<-- "recipe-footer.md" \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/traefik.md b/manuscript/ha-docker-swarm/traefik.md index a553faa..9a00c74 100644 --- a/manuscript/ha-docker-swarm/traefik.md +++ b/manuscript/ha-docker-swarm/traefik.md @@ -103,9 +103,7 @@ networks: - subnet: 172.16.200.0/24 ``` -!!! tip - I share (_with my [sponsors](https://github.com/sponsors/funkypenguin)_) a private "_premix_" git repository, which includes necessary docker-compose and env files for all published recipes. This means that sponsors can launch any recipe with just a ```git pull``` and a ```docker stack deploy``` 👍 - +--8<-- "premix-cta.md" Create `/var/data/config/traefik/traefik-app.yml` as follows: @@ -203,7 +201,7 @@ ID NAME IMAGE ### Check Traefik Dashboard -You should now be able to access your traefik instance on http://