smartcontractkit / chainlink-env

Chainlink k8s environment library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chainlink environment

This is an environment library we are using in tests, it provides:

  • cdk8s based wrappers
  • High-level k8s API
  • Automatic port forwarding

You can also use this library to spin up standalone environments

Local k8s cluster

Read here about how to spin up a local cluster

Install

Set up deps, you need to have node 14.x.x, helm and yarn

Then use

make install_deps

Usage

Create an env in a separate file and run it

export CHAINLINK_IMAGE="public.ecr.aws/chainlink/chainlink"
export CHAINLINK_TAG="1.4.0-root"
export CHAINLINK_ENV_USER="Satoshi"
go run examples/simple/env.go

For more features follow tutorial

Develop

Running standalone example environment

go run examples/simple/env.go

If you have another env of that type, you can connect by overriding environment name

ENV_NAMESPACE="..."  go run examples/chainlink/env.go

Add more presets here

Add more programmatic examples here

If you have chaosmesh installed in your cluster you can pull and generated CRD in go like that

make chaosmesh

If you need to check your system tests coverage, use that

About

Chainlink k8s environment library

License:MIT License


Languages

Language:Go 99.7%Language:Makefile 0.2%Language:Shell 0.2%Language:Dockerfile 0.0%