GithubHelp home page GithubHelp logo

helmenv's Introduction

Helm environment

Thin wrapper for Helm to help you interact with k8s environments

Goals

  • Create a thin wrapper around deployments that works almost like Helm subcharts to compose test environments, with only small code part that helps you to configure your env more easily than writing hooks
  • Ability to use in both ephemeral deployments for CI as a lib and when creating standalone environment as a CLI

CLI usage

Install

make install_cli

Usage docs

envcli -h

Create new environment with a preset

envcli new -p examples/presets/chainlink.yaml -o my_env.yaml

You'll see all deployed charts info are now added to a preset yaml file

Now you can connect

envcli connect -e my_env.yaml

You can see all forwarded ports and get it by name from config now

Dump all the logs and postgres sqls

envcli dump -e my_env.yaml -a test_logs -db chainlink

Apply some chaos from template

envcli chaos apply -e my_env.yaml -t examples/standalone/pod-failure-tmpl.yml

Now you can find running experiment ID in examples/standalone/chainlink-example-preset

Remove chaos by id

envcli chaos stop -p examples/standalone/chainlink-example-preset -c ${chaosID}

Clear all chaos if you have multiple experiments running

envcli chaos clear -e examples/standalone/chainlink-example-preset

To remove env use

envcli remove -e my_env.yaml

Usage as a library

Have a look at tests in environment/environment_test.go

Spinning up your custom preset

If you want a custom preset that you can use only in your repo have a look at examples/programmatic

Charts requirements

Your applications must have app: *any_app_name* label, see examples in charts

All ports must have names, example:

ports:
    - name: http-rpc
      containerPort: 8544

TODO:

  • Deploy a chart
  • Expose required port by names for every chart
  • Have persistent connection config for all charts
  • Can connect/disconnect with particular chart and all of them at once
  • Test cli interactions: deploy/connect/disconnect/shutdown
  • Minimal programmatic e2e test for deployments
  • Test port forwarder forking on OS X
  • Test port forwarder forking on Linux
  • More tests with a different charts (services/dns) to check port forwarding
  • Test config interactions and overrides for viper and Helm values

Presets:

  • Chainlink <-> ETH preset
  • Chainlink <-> Relay preset
  • Chainlink <-> Multinode network x2 preset (reorg testing)

helmenv's People

Contributors

gheorghestrimtu avatar jleeh avatar kalverra avatar koteld avatar skudasov avatar tateexon avatar

Stargazers

 avatar

Watchers

 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.