Coder Social home page Coder Social logo

clivern / toad Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 288 KB

❄️ Containerized Application for Testing Purposes.

Home Page: https://github.com/Clivern/Beetle

License: MIT License

Dockerfile 5.55% Makefile 25.53% Go 68.93%
docker containerized-applications k8s kubernetes toad clivern

toad's Introduction

Toad Logo

Toad

Containerized Application for Testing Purposes

Documentation

Usage

Get the latest binary.

$ curl -sL https://github.com/Clivern/Toad/releases/download/x.x.x/Toad_x.x.x_OS_x86_64.tar.gz | tar xz

Run Toad:

$ ./Toad

Check the release:

$ ./Toad --get release

Health check:

$ ./Toad --get health

To run on stateful mode:

# If stateful, it will use redis by default
$ export IS_STATEFUL=true

# Redis configs
$ export REDIS_HOST=localhost
$ export REDIS_PORT=6379
$ export REDIS_PASSWORD=

Test it:

# Home
$ curl http://127.0.0.1:8080/ -v

# Health check
$ curl http://127.0.0.1:8080/_health -v

# Get State (Only Stateful Mode)
$ curl http://127.0.0.1:8080/do/get -v

# Change State (Only Stateful Mode)
$ curl http://127.0.0.1:8080/do/change -v

# Reset State (Only Stateful Mode)
$ curl http://127.0.0.1:8080/do/reset -v

# Enable Host (Only Stateful Mode)
$ curl http://127.0.0.1:8080/do/host_up -v

# Disable Host (Only Stateful Mode)
$ curl http://127.0.0.1:8080/do/host_down -v

# Enable All Hosts (Only Stateful Mode)
$ curl http://127.0.0.1:8080/do/all_up -v

# Disable  All Hosts (Only Stateful Mode)
$ curl http://127.0.0.1:8080/do/all_down -v

Deploy on Kubernetes

$ kubectl apply -f deployment/k8s/configs.yaml --record

$ kubectl get configmaps configs -o yaml

$ kubectl apply -f deployment/k8s/redis.yaml --record

$ kubectl apply -f deployment/k8s/toad.yaml --record

$ kubectl get deployments -o wide
$ kubectl get svc -o wide

$ kubectl get pods -o wide
$ kubectl logs $PodName

Deployment Strategies

Ramped: release a new version on a rolling update fashion, one after the other.

$ kubectl apply -f deployment/k8s/ramped/toad_ramped_strategy.yaml --record

Recreate: terminate the old version and release the new one.

$ kubectl apply -f deployment/k8s/recreate/toad_recreate_strategy.yaml --record

Blue/Green: release a new version alongside the old version then switch traffic.

$ kubectl apply -f deployment/k8s/blue_green/toad_blue_green_strategy.yaml --record

# Create service to load balance the old version (blue)
$ kubectl apply -f deployment/k8s/blue_green/switch_to_blue.yaml --record

# Create service to load balance the new version (green)
$ kubectl apply -f deployment/k8s/blue_green/switch_to_green.yaml --record

Canary: release a new version to a subset of users, then proceed to a full rollout.

$ ~

Kubernetes Ingresses

It allow you to flexibly route traffic from outside your Kubernetes cluster to Services inside of your cluster.

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.41.2/deploy/static/provider/cloud/deploy.yaml
$ kubectl get pods -n ingress-nginx \
  -l app.kubernetes.io/name=ingress-nginx --watch
$ kubectl get svc --namespace=ingress-nginx

$ kubectl apply -f deployment/k8s/ingress/toad.yaml --record

$ kubectl get ingress
$ kubectl describe ingress toad-ing1
$ kubectl describe ingress toad-ing2

$ curl http://example.com/toad1/
$ curl http://example.com/toad2/

$ curl http://example.com/toad1/_ready
$ curl http://example.com/toad2/_ready

$ curl http://toad1.example.com/
$ curl http://toad2.example.com/

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Toad is maintained under the Semantic Versioning guidelines and release process is predictable and business-friendly.

See the Releases section of our GitHub project for changelogs for each release version of Toad. It contains summaries of the most noteworthy changes made in each release.

Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/toad/issues

Security Issues

If you discover a security vulnerability within Toad, please send an email to [email protected]

Contributing

We are an open source, community-driven project so please feel free to join us. see the contributing guidelines for more details.

License

© 2020, clivern. Released under MIT License.

Toad is authored and maintained by @clivern.

toad's People

Contributors

clivern avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

toad's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

dockerfile
Dockerfile
  • golang 1.18.3
gomod
go.mod
  • go 1.14
  • github.com/gin-gonic/gin v1.8.1
  • github.com/go-redis/redis/v7 v7.4.1
  • github.com/satori/go.uuid v1.2.0
  • github.com/sirupsen/logrus v1.8.1

  • Check this box to trigger a request for Renovate to run again on this repository

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.