|
| 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