Giter Site home page Giter Site logo

sandbox's Introduction

k8s helm charts for the hollow sandbox.

This chart deploys multiple metal-toolbox/hollow services in docker KIND for +development and testing.

  • Serverservice and crDB
  • Conditionorc
  • Alloy
  • NATS Jetstream
  • Chaos mesh

Prerequisites

Build docker image and push to local registry

  1. In the serverservice repository, build the docker image,
export GIT_TAG="localhost:5001/serverservice:latest" && \
    GOOS=linux GOARCH=amd64 go build -o serverservice && \
    docker build -t "${GIT_TAG}" -f Dockerfile . && \
    docker push localhost:5001/serverservice:latest && kind load docker-image "${GIT_TAG}"
  1. In the Alloy, Conditionorc, Flasher git repositories run,
make build-image-devel

Deploy helm chart.

  • Run make local-devel
  1. Finally run helm upgrade
make local-devel
  1. To upgrade the install, run
make local-devel-upgrade

NATs Jetstream setup

The chart configures a NATS Jetstream that Serverservice, Orchestrator and the controllers sends messages on, the NATS Jetstream configuration is specified in values.yaml.

The services auth in the NATS Jetstream using JWT, to have this properly setup on a new sandbox install or update, follow the steps in nats-bootstrap.

Check out the cheatsheet to validate the Jetstream setup.

Chaos mesh

The utility exposes a cool dashboard to run chaos experiments like dropping packets from one app to another or such.

Install chaos mesh

helm install chaos-mesh  chaos-mesh/chaos-mesh -n=default --version 2.5.1 -f values.yaml

forward the dashboard port and run an experiment ! http://localhost:2333/experiments

make port-forward-chaos-dash

Uninstall chaos mesh

helm delete  chaos-mesh -n=default

Check out make help for a list of available commands.

❯ make

Usage:
  make <target>

Targets:
  local-devel          install helm chart for the sandbox env
  local-devel-upgrade  upgrade helm chart for the sandbox environment
  port-forward-conditionorc-api port forward condition orchestrator API  (runs in foreground)
  port-forward-alloy-pprof port forward condition Alloy pprof endpoint  (runs in foreground)
  port-forward-hss     port forward hollow server service port (runs in foreground)
  port-forward-crdb    port forward crdb service port (runs in foreground)
  port-forward-chaos-dash port forward chaos-mesh dashboard (runs in foreground)
  psql-crdb            connect to crdb with psql (requires port-forward-crdb)
  clean-nats           purge nats app and storage pvcs
  kubectl-ctx-kind     set kube ctx to kind cluster
  help                 Show help

sandbox's People

Contributors

joelrebel avatar doctorvin avatar

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.