Giter Site home page Giter Site logo

bretfisher / dogvscat Goto Github PK

View Code? Open in Web Editor NEW
492.0 44.0 124.0 144 KB

Sample Docker Swarm cluster stack of tools

Home Page: http://dogvs.cat

License: MIT License

HTML 7.19% Shell 7.81% HCL 72.66% Smarty 1.31% Makefile 5.27% Python 1.67% PowerShell 1.46% Dockerfile 0.28% Jinja 2.36%
containers swarm docker prometheus elk monitoring rexray clustering

dogvscat's Introduction

Oh hi ๐Ÿ‘‹

apiVersion: v48
kind: Human
metadata:
  name: Bret Fisher
spec:
  purpose: Help others learn container DevOps
  sponsorship: bretfisher.com/members
  locations:
    - 
      type: YouTube Live Stream on Thursdays
      where: bret.live
    - 
      type: Newsletter
      where: bret.news
    - 
      type: Homepage
      where: bretfisher.com
    - 
      type: Discord Server
      where: devops.fan
    -
      type: Podcast
      where: bretfisher.com/podcast
  favorites:
    number: 42
    animal: ๐Ÿถ
    emoji: ๐Ÿคฆ
    food: ๐Ÿฅฉ
    drink: ๐Ÿฅƒ

๐Ÿ™‹โ€โ™€๏ธ You can Ask-Me-Anything in my ama repository, or tweet @BretFisher.

๐Ÿ’ฌ Join my 12k+ member DevOps community on Discord: devops.fan.

๐Ÿ“ฐ Read my Cloud Native Newsletter: bret.news

โ˜•๏ธ ๐Ÿค‘ Please support my DevOps YouTube Live show, podcast, and open source content by buying me a coffee every month at bretfisher.com/members!

๐Ÿง‘โ€๐Ÿซ My course repositories

My examples and templates (New stuff on top)

My tools (often used for learning Containers, Kubernetes, and Docker)

  • shpod - Common Kubernetes tools in a single pod.
  • httping - Ping with HTTP. Fantastic for testing zero-downtime rolling updates.
  • jekyll - Jekyll in a container.
  • vackup - Docker Volume backup and restore.
  • browncoat - A utility container for simulating failures like slow startup, failing healthchecks, etc.

dogvscat's People

Contributors

1c7 avatar bretfisher avatar imjosh avatar kaustavb12 avatar marco98 avatar mmatur avatar pascalandy avatar unclej84 avatar vincentsijben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dogvscat's Issues

Thank you

Here is the place to say thank you to folks who are working hard on this project.

ยซ One of the greatest ways to show your appreciation to open source projects you enjoy is to open an issue that let people say thank you ยป

Disclaimer: I don't have any kind of connexion or personal interest with maintainers(s) of this project. Pure gratitude here.

Cheers!

New Traefik/Consul doesn't work well with Portainer

Hi Bret,

Great work on this repo, I have been following it for some time! I was trying out the new Traefik HA and I have found that the Portainer stack does some weird things through this new Traefik stack.

  1. When creating the Admin user it shows that it could not create the user but it in fact has
  2. when adding an endpoint, selecting that endpoint to view the settings brings up blank settings
  3. Unable to view any containers, services etc
  4. A lot of 404 errors being returned in the browser console so it looks like some traffic is getting lost along the way.

This is not reproducible when using the single instance traefik. I have also tested older traefik and portainer versions but I still get the same results.

Add rolling update defaults to all services

Many of the services, especially for the demo apps like menu, ghost, and voting should have custom deploy settings for updates, such as rollback, healthchecks, etc. This first requires healthchecks everywhere:

  • add healthchecks to each service that needs HA rolling updates
  • update stack files with update settings needed for auto rollback, etc.

Add socat support to traefik proxy stack

For improved security, we should use socat to offload incoming web traffic hitting the traefik proxies, from being on Swarm managers. Ideally, managers are only "managing" and putting socat in the proxy stack can do that for us.

Mike talks about it in his block post here: https://blog.mikesir87.io/2018/07/letting-traefik-run-on-worker-nodes/

Thanks @pascalandy for the reference: https://github.com/pascalandy/docker-stack-this/blob/master/traefik_stack5/toolproxy.yml

I added a sample stack yaml here but don't think it worked the first time I tried, so needs to have more time testing to see how it should be configured for dogvscat: https://github.com/BretFisher/dogvscat/blob/master/stack-socat-proxy.yml

Update swarmprom

swarmprom has been archived by the owner for a while. This does however not mean that the stack does not work.

As we needed a working version, we adapted it in our own repos. Would you be interested in a PR to this repository that links to that code or even a PR that rips out the vendor specific things from our repository and moves the code here (we are using Hetzner in our repo)? I think this would help people a lot especially since this repository here is kind of the bible for docker swarm in production.

Create example of traefik on host network for obtaining ingress source IP's

The ingress routing mesh loses the client source IP, and some web apps need this. This enhancement would add an example/option for placing traefik on --network host so it can capture those source IP's and send them as host headers to backend services on an overlay network.

With traefik this makes the whole thing a bit more complex because we now must have a traefik replica on every node (global mode) which means we can't cheat with the TOML config file and cert files like we can with a single-replica traefik service. We'll need a config backend for traefik to make this work.

Add cache to Ghost blog service

Since the Ghost service can only have a single replica (Ghost design limitation), it's expected to have a caching proxy in front of it, which itself could be multi-replica for better LB/HA. I'm thinking the best options here are varnish or nginx, which would be another service in the Ghost stack file.

Create servers script has invalid virtualbox memory value

VBoxManage: error: Invalid RAM size: 2 MB (must be in range [4, 2097152] MB)

I'm assuming you meant to provision 2 GB of memory per virtual machine.

diff --git a/create-servers.sh b/create-servers.sh
index 0d6ec0b..fdb729f 100755
--- a/create-servers.sh
+++ b/create-servers.sh
@@ -27,7 +27,7 @@ done
 #for server in {1..3}; do
 #docker-machine create \
 #  --driver=virtualbox \
-#  --virtualbox-memory=2 \
+#  --virtualbox-memory=2048 \
 #  dvc${server} &
 #done

Step to create rexray secrets

Hi @BretFisher

Following the steps of deployment in README,
in Step 1, the REXRAY_DO_TOKEN env. variable is set and in Step 5, external secrets rexray_do_token is used during deployment of the rexray stack.

However this secret is not created at any step prior to Step 5.

A command such as echo $REXRAY_DO_TOKEN | docker secret create rexray_do_token - could be included in Step 5, prior to the stack deployment command or a new step 5 can be added can be added and subsequent steps renumbered.

I could open a PR for the same, if you agree.

PR: create labels

If it makes sense with you, I'll do a PR.

prerequisite

# machine name prefix
export node_prefix="alga"

label my nodes

#!/bin/bash
# set -x

# add label on managers
for server_id in {1..3}; do

  this_node=$(docker-machine ls | awk '{print $1}' | grep ${server_id} | tail -n1)

  docker-machine ssh ${node_prefix}${server_id} docker node update --label-add nodeid=${server_id} ${this_node}
  docker-machine ssh ${node_prefix}${server_id} docker node update --label-add nodename=${this_node} ${this_node}
  docker-machine ssh ${node_prefix}${server_id} docker node update --label-add nodetype="manager" ${this_node}
  docker-machine ssh ${node_prefix}${server_id} docker node update --label-add nodetag=${node_prefix} ${this_node}

done

# add label on workers (in the future I'll have more)
#.
#.
#.
#.

Make Ghost HA with GlusterFS "shared nothing" option rather then shared storage limitation

Right now, since Ghost Blog is designed to run on a single-host (a current design limitation) then caching and MTTR are the best ways to keep downtime to a minimum.

For storing content/images and content/data volumes on persistent storage, we're currently using digitalocean block storage with rexray, but a more inclusive option would be shared-nothing storage that's replicated between nodes using the default local volume driver.

I've not yet set this up with GlusterFS but it would be cool to have that running in a global service if possible, replicating a named volume (local driver) between 3 nodes, while the ghost service uses the same named volume on whatever node the task is running on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.