From 6bb9e2f7d4114f3f71e52b32b16a8a5334c4b7cf Mon Sep 17 00:00:00 2001 From: AutoPenguin Date: Wed, 3 Jun 2020 03:17:53 +0000 Subject: [PATCH] Update for leanpub preview --- manuscript/book.txt | 76 +------------------ manuscript/ha-docker-swarm/design.md | 1 - .../ha-docker-swarm/docker-swarm-mode.md | 2 - manuscript/ha-docker-swarm/keepalived.md | 1 - manuscript/ha-docker-swarm/nodes.md | 3 - manuscript/ha-docker-swarm/registry.md | 2 - .../ha-docker-swarm/shared-storage-ceph.md | 14 ++-- .../ha-docker-swarm/shared-storage-gluster.md | 7 +- .../ha-docker-swarm/traefik-forward-auth.md | 4 - .../traefik-forward-auth/keycloak.md | 3 - manuscript/ha-docker-swarm/traefik.md | 6 -- manuscript/index.md | 2 - manuscript/kubernetes/diycluster.md | 6 -- manuscript/kubernetes/helm.md | 1 - manuscript/kubernetes/loadbalancer.md | 4 - manuscript/kubernetes/snapshots.md | 2 - manuscript/kubernetes/traefik.md | 2 - manuscript/recipes/autopirate.md | 1 - manuscript/recipes/autopirate/end.md | 1 - manuscript/recipes/autopirate/headphones.md | 2 - manuscript/recipes/autopirate/heimdall.md | 2 - manuscript/recipes/autopirate/jackett.md | 2 - .../recipes/autopirate/lazylibrarian.md | 2 - manuscript/recipes/autopirate/lidarr.md | 2 - manuscript/recipes/autopirate/mylar.md | 2 - manuscript/recipes/autopirate/nzbget.md | 3 - manuscript/recipes/autopirate/nzbhydra.md | 2 - manuscript/recipes/autopirate/nzbhydra2.md | 3 - manuscript/recipes/autopirate/ombi.md | 2 - manuscript/recipes/autopirate/radarr.md | 3 - manuscript/recipes/autopirate/rtorrent.md | 2 - manuscript/recipes/autopirate/sabnzbd.md | 4 - manuscript/recipes/autopirate/sonarr.md | 3 - manuscript/recipes/bitwarden.md | 4 - manuscript/recipes/bookstack.md | 2 - manuscript/recipes/calibre-web.md | 2 - manuscript/recipes/collabora-online.md | 4 - manuscript/recipes/duplicity.md | 4 - manuscript/recipes/elkarbackup.md | 7 -- manuscript/recipes/emby.md | 2 - manuscript/recipes/ghost.md | 2 - manuscript/recipes/gitlab-runner.md | 2 - manuscript/recipes/gitlab.md | 3 - manuscript/recipes/gollum.md | 4 - manuscript/recipes/homeassistant.md | 2 - manuscript/recipes/homeassistant/ibeacon.md | 1 - manuscript/recipes/huginn.md | 2 - manuscript/recipes/instapy.md | 3 - manuscript/recipes/ipfs-cluster.md | 3 - manuscript/recipes/kanboard.md | 2 - manuscript/recipes/keycloak.md | 5 -- .../keycloak/authenticate-against-openldap.md | 3 - manuscript/recipes/keycloak/create-user.md | 3 - .../recipes/keycloak/setup-oidc-provider.md | 3 - manuscript/recipes/kubernetes/kanboard.md | 3 - manuscript/recipes/kubernetes/miniflux.md | 5 -- manuscript/recipes/kubernetes/nextcloud.md | 3 - manuscript/recipes/kubernetes/phpipam.md | 2 - manuscript/recipes/kubernetes/privatebin.md | 3 - manuscript/recipes/kubernetes/template-k8s.md | 3 - manuscript/recipes/mail.md | 2 - manuscript/recipes/mattermost.md | 2 - manuscript/recipes/miniflux.md | 3 - manuscript/recipes/minio.md | 1 - manuscript/recipes/mqtt.md | 3 - manuscript/recipes/munin.md | 2 - manuscript/recipes/nextcloud.md | 4 - manuscript/recipes/openldap.md | 6 -- manuscript/recipes/owntracks.md | 2 - manuscript/recipes/phpipam.md | 2 - manuscript/recipes/piwik.md | 2 - manuscript/recipes/plex.md | 2 - manuscript/recipes/portainer.md | 1 - manuscript/recipes/privatebin.md | 1 - manuscript/recipes/realms.md | 3 - manuscript/recipes/swarmprom.md | 2 - manuscript/recipes/template.md | 3 - manuscript/recipes/tiny-tiny-rss.md | 2 - manuscript/recipes/wallabag.md | 2 - manuscript/recipes/wekan.md | 3 - manuscript/recipes/wetty.md | 2 - manuscript/whoami.md | 1 - scripts/markdown-to-markua.sh | 3 + 83 files changed, 12 insertions(+), 296 deletions(-) diff --git a/manuscript/book.txt b/manuscript/book.txt index 8988ec8..46e92c2 100644 --- a/manuscript/book.txt +++ b/manuscript/book.txt @@ -7,78 +7,4 @@ sections/ha-docker-swarm.md ha-docker-swarm/design.md ha-docker-swarm/nodes.md ha-docker-swarm/shared-storage-ceph.md -ha-docker-swarm/shared-storage-gluster.md -ha-docker-swarm/keepalived.md -ha-docker-swarm/docker-swarm-mode.md -ha-docker-swarm/traefik.md -ha-docker-swarm/traefik-forward-auth.md -ha-docker-swarm/traefik-forward-auth/keycloak.md -ha-docker-swarm/registry.md - -sections/chefs-favorites-docker.md -recipes/autopirate.md -recipes/autopirate/sabnzbd.md -recipes/autopirate/nzbget.md -recipes/autopirate/rtorrent.md -recipes/autopirate/sonarr.md -recipes/autopirate/radarr.md -recipes/autopirate/mylar.md -recipes/autopirate/lazylibrarian.md -recipes/autopirate/headphones.md -recipes/autopirate/lidarr.md -recipes/autopirate/nzbhydra.md -recipes/autopirate/nzbhydra2.md -recipes/autopirate/ombi.md -recipes/autopirate/jackett.md -recipes/autopirate/heimdall.md -recipes/autopirate/end.md - -recipes/duplicity.md -recipes/elkarbackup.md -recipes/emby.md -recipes/homeassistant.md -recipes/homeassistant/ibeacon.md -recipes/huginn.md -recipes/kanboard.md -recipes/miniflux.md -recipes/munin.md -recipes/nextcloud.md -recipes/owntracks.md -recipes/phpipam.md -recipes/plex.md -recipes/privatebin.md -recipes/swarmprom.md - -sections/menu-docker.md -recipes/bitwarden.md -recipes/bookstack.md -recipes/calibre-web.md -recipes/collabora-online.md -recipes/ghost.md -recipes/gitlab.md -recipes/gitlab-runner.md -recipes/gollum.md -recipes/instapy.md -recipes/keycloak.md -recipes/keycloak/create-user.md -recipes/keycloak/authenticate-against-openldap.md -recipes/keycloak/setup-oidc-provider.md -recipes/openldap.md -recipes/mail.md -recipes/minio.md -recipes/piwik.md -recipes/portainer.md -recipes/realms.md -recipes/tiny-tiny-rss.md -recipes/wallabag.md -recipes/wekan.md -recipes/wetty.md - -sections/reference.md -reference/oauth_proxy.md -reference/data_layout.md -reference/networks.md -reference/containers.md -reference/git-docker.md -reference/openvpn.md -reference/troubleshooting.md +ha-docker-swarm/shared-storage-gluster.md \ No newline at end of file diff --git a/manuscript/ha-docker-swarm/design.md b/manuscript/ha-docker-swarm/design.md index 6f9bcd1..240baa2 100644 --- a/manuscript/ha-docker-swarm/design.md +++ b/manuscript/ha-docker-swarm/design.md @@ -17,7 +17,6 @@ This means that: * At least 3 docker swarm manager nodes are required, to provide fault-tolerance of a single failure. * [Ceph](https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/shared-storage-ceph/) is employed for share storage, because it too can be made tolerant of a single failure. -!!! note An exception to the 3-nodes decision is running a single-node configuration. If you only **have** one node, then obviously your swarm is only as resilient as that node. It's still a perfectly valid swarm configuration, ideal for starting your self-hosting journey. In fact, under the single-node configuration, you don't need ceph either, and you can simply use the local volume on your host for storage. You'll be able to migrate to ceph/more nodes if/when you expand. **Where multiple solutions to a requirement exist, preference will be given to the most portable solution.** diff --git a/manuscript/ha-docker-swarm/docker-swarm-mode.md b/manuscript/ha-docker-swarm/docker-swarm-mode.md index c8ef8e5..95f8bd8 100644 --- a/manuscript/ha-docker-swarm/docker-swarm-mode.md +++ b/manuscript/ha-docker-swarm/docker-swarm-mode.md @@ -4,7 +4,6 @@ For truly highly-available services with Docker containers, we need an orchestra ## Ingredients -!!! summary Existing * [X] 3 x nodes (*bare-metal or VMs*), each with: @@ -127,7 +126,6 @@ networks: - subnet: 172.16.0.0/24 ``` -!!! note Setup unique static subnets for every stack you deploy. This avoids IP/gateway conflicts which can otherwise occur when you're creating/removing stacks a lot. See [my list](https://geek-cookbook.funkypenguin.co.nz/reference/networks/) here. Launch the cleanup stack by running ```docker stack deploy docker-cleanup -c ``` diff --git a/manuscript/ha-docker-swarm/keepalived.md b/manuscript/ha-docker-swarm/keepalived.md index 244f5d8..40980d5 100644 --- a/manuscript/ha-docker-swarm/keepalived.md +++ b/manuscript/ha-docker-swarm/keepalived.md @@ -10,7 +10,6 @@ This is accomplished with the use of keepalived on at least two nodes. ## Ingredients -!!! summary "Ingredients" Already deployed: * [X] At least 2 x swarm nodes diff --git a/manuscript/ha-docker-swarm/nodes.md b/manuscript/ha-docker-swarm/nodes.md index b64a2b2..0ef2db9 100644 --- a/manuscript/ha-docker-swarm/nodes.md +++ b/manuscript/ha-docker-swarm/nodes.md @@ -2,12 +2,10 @@ Let's start building our cluster. You can use either bare-metal machines or virtual machines - the configuration would be the same. To avoid confusion, I'll be referring to these as "nodes" from now on. -!!! note In 2017, I **initially** chose the "[Atomic](https://www.projectatomic.io/)" CentOS/Fedora image for the swarm hosts, but later found its outdated version of Docker to be problematic with advanced features like GPU transcoding (in [Plex](https://geek-cookbook.funkypenguin.co.nz/recipes/plex/)), [Swarmprom](https://geek-cookbook.funkypenguin.co.nz/recipes/swarmprom/), etc. In the end, I went mainstream and simply preferred a modern Ubuntu installation. ## Ingredients -!!! summary "Ingredients" New in this recipe: * [ ] 3 x nodes (*bare-metal or VMs*), each with: @@ -67,7 +65,6 @@ ln -sf /usr/share/zoneinfo/ /etc/localtime After completing the above, you should have: -!!! summary "Summary" Deployed in this recipe: * [X] 3 x nodes (*bare-metal or VMs*), each with: diff --git a/manuscript/ha-docker-swarm/registry.md b/manuscript/ha-docker-swarm/registry.md index 67c1743..7cdfa84 100644 --- a/manuscript/ha-docker-swarm/registry.md +++ b/manuscript/ha-docker-swarm/registry.md @@ -44,7 +44,6 @@ networks: external: true ``` -!!! note "Unencrypted registry" We create this registry without consideration for SSL, which will fail if we attempt to use the registry directly. However, we're going to use the HTTPS-proxied version via Traefik, leveraging Traefik to manage the LetsEncrypt certificates required. @@ -107,7 +106,6 @@ Then restart docker by running: systemctl restart docker-latest ``` -!!! tip "" Note the extra comma required after "false" above ## Chef's notes \ 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 ff0bd68..4416372 100644 --- a/manuscript/ha-docker-swarm/shared-storage-ceph.md +++ b/manuscript/ha-docker-swarm/shared-storage-ceph.md @@ -6,7 +6,6 @@ While Docker Swarm is great for keeping containers running (_and restarting thos ## Ingredients -!!! summary "Ingredients" 3 x Virtual Machines (configured earlier), each with: * [X] Support for "modern" versions of Python and LVM @@ -18,7 +17,6 @@ While Docker Swarm is great for keeping containers running (_and restarting thos ## Preparation -!!! tip "No more [foolish games](https://www.youtube.com/watch?v=UNoouLa7uxA)" Earlier iterations of this recipe (*based on [Ceph Jewel](https://docs.ceph.com/docs/master/releases/jewel/)*) required significant manual effort to install Ceph in a Docker environment. In the 2+ years since Jewel was released, significant improvements have been made to the ceph "deploy-in-docker" process, including the [introduction of the cephadm tool](https://ceph.io/ceph-management/introducing-cephadm/). Cephadm is the tool which now does all the heavy lifting, below, for the current version of ceph, codenamed "[Octopus](https://www.youtube.com/watch?v=Gi58pN8W3hY)". ### Pick a master node @@ -133,16 +131,15 @@ The process takes about 30 seconds, after which, you'll have a MVC (*Minimum Via It's now necessary to tranfer the following files to your ==other== nodes, so that cephadm can add them to your cluster, and so that they'll be able to mount the cephfs when we're done: -Path on master | Path on non-master ---------------- | ----- -`/etc/ceph/ceph.conf` | `/etc/ceph/ceph.conf` -`/etc/ceph/ceph.client.admin.keyring` | `/etc/ceph/ceph.client.admin.keyring` -`/etc/ceph/ceph.pub` | `/root/.ssh/authorized_keys` (append to anything existing) +| Path on master | Path on non-master | +|---------------------------------------|------------------------------------------------------------| +| `/etc/ceph/ceph.conf` | `/etc/ceph/ceph.conf` | +| `/etc/ceph/ceph.client.admin.keyring` | `/etc/ceph/ceph.client.admin.keyring` | +| `/etc/ceph/ceph.pub` | `/root/.ssh/authorized_keys` (append to anything existing) | Back on the ==master== node, run `ceph orch host add ` once for each other node you want to join to the cluster. You can validate the results by running `ceph orch host ls` -!!! question "Should we be concerned about giving cephadm using root access over SSH?" Not really. Docker is inherently insecure at the host-level anyway (*think what would happen if you launched a global-mode stack with a malicious container image which mounted `/root/.ssh`*), so worrying about cephadm seems a little barn-door-after-horses-bolted. If you take host-level security seriously, consider switching to [Kubernetes](https://geek-cookbook.funkypenguin.co.nz/kubernetes/start/) :) ### Add OSDs @@ -196,7 +193,6 @@ root@raphael:~# What have we achieved? -!!! summary "Summary" Created: * [X] Persistent storage available to every node diff --git a/manuscript/ha-docker-swarm/shared-storage-gluster.md b/manuscript/ha-docker-swarm/shared-storage-gluster.md index 4c0448d..8137310 100644 --- a/manuscript/ha-docker-swarm/shared-storage-gluster.md +++ b/manuscript/ha-docker-swarm/shared-storage-gluster.md @@ -2,7 +2,6 @@ While Docker Swarm is great for keeping containers running (_and restarting those that fail_), it does nothing for persistent storage. This means if you actually want your containers to keep any data persistent across restarts (_hint: you do!_), you need to provide shared storage to every docker node. -!!! warning This recipe is deprecated. It didn't work well in 2017, and it's not likely to work any better now. It remains here as a reference. I now recommend the use of [Ceph for shared storage](https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/shared-storage-ceph/) instead. - 2019 Chef ## Design @@ -13,7 +12,6 @@ This GlusterFS recipe was my original design for shared storage, but I [found it ## Ingredients -!!! summary "Ingredients" 3 x Virtual Machines (configured earlier), each with: * [X] CentOS/Fedora Atomic @@ -30,7 +28,7 @@ To build our Gluster volume, we need 2 out of the 3 VMs to provide one "brick". On each host, run a variation following to create your bricks, adjusted for the path to your disk. -!!! note "The example below assumes /dev/vdb is dedicated to the gluster volume" + ``` ( echo o # Create a new empty DOS partition table @@ -50,7 +48,6 @@ echo '/dev/vdb1 /var/no-direct-write-here/brick1 xfs defaults 1 2' >> /etc/fstab mount -a && mount ``` -!!! warning "Don't provision all your LVM space" Atomic uses LVM to store docker data, and **automatically grows** Docker's volumes as requried. If you commit all your free LVM space to your brick, you'll quickly find (as I did) that docker will start to fail with error messages about insufficient space. If you're going to slice off a portion of your LVM space in /dev/atomicos, make sure you leave enough space for Docker storage, where "enough" depends on how much you plan to pull images, make volumes, etc. I ate through 20GB very quickly doing development, so I ended up provisioning 50GB for atomic alone, with a separate volume for the brick. ### Create glusterfs container @@ -58,6 +55,7 @@ mount -a && mount Atomic doesn't include the Gluster server components. This means we'll have to run glusterd from within a container, with privileged access to the host. Although convoluted, I've come to prefer this design since it once again makes the OS "disposable", moving all the config into containers and code. Run the following on each host: + ``` docker run \ -h glusterfs-server \ @@ -71,6 +69,7 @@ docker run \ --name="glusterfs-server" \ gluster/gluster-centos ``` + ### Create trusted pool On a single node (doesn't matter which), run ```docker exec -it glusterfs-server bash``` to launch a shell inside the container. diff --git a/manuscript/ha-docker-swarm/traefik-forward-auth.md b/manuscript/ha-docker-swarm/traefik-forward-auth.md index 0b0a061..ae30fee 100644 --- a/manuscript/ha-docker-swarm/traefik-forward-auth.md +++ b/manuscript/ha-docker-swarm/traefik-forward-auth.md @@ -8,7 +8,6 @@ To give us confidence that **we** can access our services, but BadGuys(tm) canno ## Ingredients -!!! summary "Ingredients" Existing: * [X] [Docker swarm cluster](https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/design/) with [persistent shared storage](https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/shared-storage-ceph) @@ -22,7 +21,6 @@ To give us confidence that **we** can access our services, but BadGuys(tm) canno ### Obtain OAuth credentials -!!! note This recipe will demonstrate using Google OAuth for traefik forward authentication, but it's also possible to use a self-hosted KeyCloak instance - see the [KeyCloak OIDC Provider](https://geek-cookbook.funkypenguin.co.nz/recipes/keycloak/setup-oidc-provider/) recipe for more details! Log into https://console.developers.google.com/, create a new project then search for and select "Credentials" in the search bar. @@ -82,7 +80,6 @@ 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 [patreon patrons](https://www.patreon.com/funkypenguin)_) a private "_premix_" git repository, which includes necessary docker-compose and env files for all published recipes. This means that patrons can launch any recipe with just a ```git pull``` and a ```docker stack deploy``` @@ -101,7 +98,6 @@ Browse to https://whoami.example.com (*obviously, customized for your domain and What have we achieved? By adding an additional three simple labels to any service, we can secure any service behind our choice of OAuth provider, with minimal processing / handling overhead. -!!! summary "Summary" Created: * [X] Traefik-forward-auth configured to authenticate against an OIDC provider diff --git a/manuscript/ha-docker-swarm/traefik-forward-auth/keycloak.md b/manuscript/ha-docker-swarm/traefik-forward-auth/keycloak.md index 7a0f887..628f68f 100644 --- a/manuscript/ha-docker-swarm/traefik-forward-auth/keycloak.md +++ b/manuscript/ha-docker-swarm/traefik-forward-auth/keycloak.md @@ -4,7 +4,6 @@ While the [Traefik Forward Auth](https://geek-cookbook.funkypenguin.co.nz/ha-doc ## Ingredients -!!! Summary Existing: * [X] [KeyCloak](https://geek-cookbook.funkypenguin.co.nz/recipes/keycloak/) recipe deployed successfully, with a [local user](https://geek-cookbook.funkypenguin.co.nz/recipes/keycloak/create-user/) and an [OIDC client](https://geek-cookbook.funkypenguin.co.nz/recipes/keycloak/setup-oidc-provider/) @@ -81,7 +80,6 @@ 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 [patreon patrons](https://www.patreon.com/funkypenguin)_) a private "_premix_" git repository, which includes necessary docker-compose and env files for all published recipes. This means that patrons can launch any recipe with just a ```git pull``` and a ```docker stack deploy``` ## Serving @@ -110,7 +108,6 @@ And re-deploy your services :) What have we achieved? By adding an additional three simple labels to any service, we can secure any service behind our KeyCloak OIDC provider, with minimal processing / handling overhead. -!!! summary "Summary" Created: * [X] Traefik-forward-auth configured to authenticate against KeyCloak diff --git a/manuscript/ha-docker-swarm/traefik.md b/manuscript/ha-docker-swarm/traefik.md index 977839d..f1306d6 100644 --- a/manuscript/ha-docker-swarm/traefik.md +++ b/manuscript/ha-docker-swarm/traefik.md @@ -15,7 +15,6 @@ To deal with these gaps, we need a front-end load-balancer, and in this design, ## Ingredients -!!! summary "You'll need" Existing * [X] [Docker swarm cluster](https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/design/) with [persistent shared storage](https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/shared-storage-ceph) @@ -30,7 +29,6 @@ To deal with these gaps, we need a front-end load-balancer, and in this design, The traefik container is aware of the __other__ docker containers in the swarm, because it has access to the docker socket at **/var/run/docker.sock**. This allows traefik to dynamically configure itself based on the labels found on containers in the swarm, which is hugely useful. To make this functionality work on a SELinux-enabled CentOS7 host, we need to add custom SELinux policy. -!!! tip The following is only necessary if you're using SELinux! Run the following to build and activate policy to permit containers to access docker.sock: @@ -92,7 +90,6 @@ swarmmode = true ### Prepare the docker service config -!!! tip "We'll want an overlay network, independent of our traefik stack, so that we can attach/detach all our other stacks (including traefik) to the overlay network. This way, we can undeploy/redepoly the traefik stack without having to bring every other stack first!" - voice of experience Create `/var/data/config/traefik/traefik.yml` as follows: @@ -122,7 +119,6 @@ networks: - subnet: 172.16.200.0/24 ``` -!!! tip I share (_with my [patreon patrons](https://www.patreon.com/funkypenguin)_) a private "_premix_" git repository, which includes necessary docker-compose and env files for all published recipes. This means that patrons can launch any recipe with just a ```git pull``` and a ```docker stack deploy``` @@ -181,7 +177,6 @@ touch /var/data/traefik/acme.json chmod 600 /var/data/traefik/acme.json ``` -!!! warning Pay attention above. You **must** set `acme.json`'s permissions to owner-readable-only, else the container will fail to start with an [ID-10T](https://en.wikipedia.org/wiki/User_error#ID-10-T_error) error! Traefik will populate acme.json itself when it runs, but it needs to exist before the container will start (_Chicken, meet egg._) @@ -226,7 +221,6 @@ You should now be able to access your traefik instance on http://:8080 ### Summary -!!! summary We've achieved: * [X] An overlay network to permit traefik to access all future stacks we deploy diff --git a/manuscript/index.md b/manuscript/index.md index ede1d9e..1c287da 100644 --- a/manuscript/index.md +++ b/manuscript/index.md @@ -25,7 +25,6 @@ So if you're familiar enough with the concepts above, and you've done self-hosti 2. You want to play. You want a safe sandbox to test new tools, keeping the ones you want and tossing the ones you don't. 3. You want reliability. Once you go from __playing__ with a tool to actually __using__ it, you want it to be available when you need it. Having to "*quickly ssh into the basement server and restart plex*" doesn't cut it when you finally convince your wife to sit down with you to watch sci-fi. -!!! quote "...how useful the recipes are for people just getting started with containers..." @@ -64,7 +63,6 @@ Impulsively **[click here (NOW quick do it!)](https://github.com/sponsors/funkyp Need some Cloud / Microservices / DevOps / Infrastructure design work done? I'm a full-time [AWS-certified](https://www.certmetrics.com/amazon/public/badge.aspx?i=4&t=c&d=2019-02-22&ci=AWS00794574) consultant, this stuff is my bread and butter! :breadfork_and_knife: [Get in touch](https://www.funkypenguin.co.nz/contact/), and let's talk business! -!!! quote "He unblocked me on all the technical hurdles to launching my SaaS in GKE!" By the time I had enlisted Funky Penguin's help, I'd architected myself into a bit of a nightmare with Kubernetes. I knew what I wanted to achieve, but I'd made a mess of it. Funky Penguin (David) was able to jump right in and offer a vital second-think on everything I'd done, pointing out where things could be simplified and streamlined, and better alternatives. diff --git a/manuscript/kubernetes/diycluster.md b/manuscript/kubernetes/diycluster.md index 56e3b45..b546b08 100644 --- a/manuscript/kubernetes/diycluster.md +++ b/manuscript/kubernetes/diycluster.md @@ -23,7 +23,6 @@ If you want to use minikube, there is a guide below but again, I recommend using 1. A Fresh Linux Machine 2. Some basic Linux knowledge (or can just copy-paste) -!!! note Make sure you are running a SystemD based distro like Ubuntu. Although minikube will run on macOS and Windows, they add in additional complexities to the installation as they @@ -56,7 +55,6 @@ sudo minikube config set vm-driver none #Set our default vm driver to none You are now set up with minikube! -!!! warning MiniKube is not a production-grade method of deploying Kubernetes ## K3S @@ -80,7 +78,6 @@ Ubuntu ticks all the boxes for k3s to run on and allows you to follow lots of ot Firstly, download yourself a version of Ubuntu Server from [here](https://ubuntu.com/download/server) (Whatever is latest) Then spin yourself up as many systems as you need with the following guide -!!! note I am running a 3 node cluster, with nodes running on Ubuntu 19.04, all virtualized with VMWare ESXi Your setup doesn't need to be as complex as mine, you can use 3 old Dell OptiPlex if you really want @@ -146,14 +143,12 @@ Number of key(s) added: 1 You will want to do this once for every machine, replacing the hostname with the other next nodes hostname each time. -!!! note If your hostnames aren't resolving correct, try adding them to your `/etc/hosts` file ### Installation If you have access to the premix repository, you can download the ansible-playbook and follow the steps contained in there, if not sit back and prepare to do it manually. -!!! tip Becoming a patron will allow you to get the ansible-playbook to setup k3s on your own hosts. For as little as 5$/m you can get access to the ansible playbooks for this recipe, and more! See [funkypenguin's Patreon](https://www.patreon.com/funkypenguin) for more!