Skip to content

Commit 3e02f48

Browse files
authored
External environment integration data format and guide (#2436)
1 parent db7dc01 commit 3e02f48

2 files changed

Lines changed: 60 additions & 1 deletion

File tree

book/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- [Framework](./framework/overview.md)
55
- [Developer Environment](./framework/developer_environment/overview.md)
66
- [Configuration](./framework/developer_environment/toml.md)
7+
- [External Environment Configuration](./framework/developer_environment/toml_external_env_integration.md)
78
- [Basic Usage](./framework/getting_started.md)
89
- [Getting Started](./framework/getting_started.md)
910
- [Advanced Usage](./framework/configuration.md)
@@ -27,7 +28,6 @@
2728
- [Compatibility Testing](framework/compat.md)
2829
- [Copying Files](framework/copying_files.md)
2930
- [Running in Kubernetes](./framework/kubernetes.md)
30-
- [External Environment](framework/components/external.md)
3131
- [Observability Stack](framework/observability/observability_stack.md)
3232
- [Overview](framework/observability/observability_stack.md)
3333
- [Metrics](framework/observability/metrics.md)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# External Environment Integration
2+
3+
Developer environment exposes format which allows any external infra to be integrated.
4+
5+
## NodeSets + Blockchains + Fake
6+
7+
This is a basic example of data required to run developer environment commands on external infrastructure. Full list of fields can be found [here](https://smartcontractkit.github.io/chainlink-testing-framework/framework/developer_environment/toml.html)
8+
9+
Example `env-stage-1.toml`:
10+
```toml
11+
[fakes]
12+
[fakes.out]
13+
# URL to fakes server which represents some 3rd party which are mocked on external infrastructure
14+
base_url_host = 'https://chainlink-$product_name-fake:9111'
15+
16+
[[blockchains]]
17+
# One or more blockchains
18+
[blockchains.out]
19+
type = 'anvil'
20+
family = 'evm'
21+
chain_id = '1337'
22+
# One or more blockchain nodes
23+
[[blockchains.out.nodes]]
24+
ws_url = 'wss://blockchain-node-1:8545'
25+
http_url = 'https://blockchain-node-1:8545'
26+
27+
# One or more DON clusters
28+
[[nodesets]]
29+
name = 'my-external-don-1'
30+
nodes = 2
31+
# Nodeset config output
32+
[nodesets.out]
33+
# First CL node connection data
34+
[[nodesets.out.cl_nodes]]
35+
[nodesets.out.cl_nodes.node]
36+
api_auth_user = 'some_user'
37+
api_auth_password = 'some_password'
38+
url = 'https://chainlink-node-1:6688'
39+
[nodesets.out.cl_nodes.postgresql]
40+
url = 'postgresql://chainlink:thispasswordislongenough@chainlink-node-1-db:13000/db_0?sslmode=disable'
41+
# Second node, etc..
42+
[[nodesets.out.cl_nodes]]
43+
[nodesets.out.cl_nodes.node]
44+
api_auth_user = 'some_user'
45+
api_auth_password = 'some_password'
46+
url = 'https://chainlink-node-2:6688'
47+
[nodesets.out.cl_nodes.postgresql]
48+
url = 'postgresql://chainlink:thispasswordislongenough@chainlink-node-2-db:13000/db_1?sslmode=disable'
49+
50+
# Second NodeSet, etc..
51+
[[nodesets]]
52+
name = 'my-external-don-2'
53+
nodes = 2
54+
# All the other fields as in previous example above
55+
```
56+
57+
Deploy the infrastructure first, then use `up env-stage-1.toml` to orchestrate staging environment.
58+
59+
In case your product has more infrastructure components define TOML keys `[[my_custom_component]]` and provide all the required connection data, use the same config structure you are using in your local environment, read more [here](https://smartcontractkit.github.io/chainlink-testing-framework/developing/developing_components.html?highlight=component#developing-components)

0 commit comments

Comments
 (0)