Skip to content

Commit 532b174

Browse files
authored
change default capabilities directory in Docker (#1847)
1 parent ada4528 commit 532b174

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

book/src/framework/components/chainlink/node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Here we provide full configuration reference, if you want to copy and run it, pl
2323
# A list of paths to capability binaries
2424
capabilities = ["./capability_1", "./capability_2"]
2525
# Default capabilities directory inside container
26-
capabilities_container_dir = "/home/capabilities"
26+
capabilities_container_dir = "/usr/local/bin"
2727
# Image to use, you can either provide "image" or "docker_file" + "docker_ctx" fields
2828
image = "public.ecr.aws/chainlink/chainlink:v2.17.0"
2929
# Path to your Chainlink Dockerfile

book/src/framework/components/chainlink/nodeset.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Then configure NodeSet
5454
http_port_range_start = 10000
5555
# P2P API port range start, each new node get port incremented (host machine)
5656
p2p_port_range_start = 12000
57-
57+
5858
[nodesets.db]
5959
# PostgreSQL image version and tag
6060
image = "postgres:12.0"
@@ -71,7 +71,7 @@ Then configure NodeSet
7171
# A list of paths to capability binaries
7272
capabilities = ["./capability_1", "./capability_2"]
7373
# Default capabilities directory inside container
74-
capabilities_container_dir = "/home/capabilities"
74+
capabilities_container_dir = "/usr/local/bin"
7575
# Image to use, you can either provide "image" or "docker_file" + "docker_ctx" fields
7676
image = "public.ecr.aws/chainlink/chainlink:v2.17.0"
7777
# Path to your Chainlink Dockerfile
@@ -99,7 +99,7 @@ Then configure NodeSet
9999
[nodesets.out]
100100
# If 'use_cache' equals 'true' we skip component setup when we run the test and return the outputs
101101
use_cache = true
102-
102+
103103
# Describes deployed or external Chainlink nodes
104104
[[nodesets.out.cl_nodes]]
105105
use_cache = true
@@ -119,7 +119,7 @@ Then configure NodeSet
119119
# PostgreSQL connection string
120120
# in case of using external database can be overriden
121121
url = "postgresql://chainlink:[email protected]:33094/chainlink?sslmode=disable"
122-
122+
123123
# Can have more than one node, fields are the same, see above ^^
124124
[[nodesets.out.cl_nodes]]
125125
[nodesets.out.cl_nodes.node]

book/src/framework/nodeset_capabilities.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gh auth setup-git
1111
Download an example capability binary
1212
```
1313
export export GOPRIVATE=github.com/smartcontractkit/capabilities
14-
go get github.com/smartcontractkit/capabilities/kvstore && go install github.com/smartcontractkit/capabilities/kvstore
14+
go get github.com/smartcontractkit/capabilities/kvstore && go install github.com/smartcontractkit/capabilities/kvstore
1515
```
1616

1717
Create a configuration file `smoke.toml`
@@ -24,7 +24,7 @@ Create a configuration file `smoke.toml`
2424
name = "don"
2525
nodes = 5
2626
override_mode = "all"
27-
27+
2828
[nodesets.db]
2929
image = "postgres:12.0"
3030

@@ -34,7 +34,7 @@ Create a configuration file `smoke.toml`
3434
# path to your capability binaries
3535
capabilities = ["./kvstore"]
3636
# default capabilities directory
37-
# capabilities_container_dir = "/home/capabilities"
37+
# capabilities_container_dir = "/usr/local/bin"
3838
image = "public.ecr.aws/chainlink/chainlink:v2.17.0"
3939
```
4040

@@ -45,7 +45,7 @@ CTF_CONFIGS=smoke.toml go test -v -run TestNodeSet
4545

4646
Now you can configure your capability using `clclient.CreateJobRaw($raw_toml)`.
4747

48-
Capabilities are uploaded to `/home/capabilities` by default.
48+
Capabilities are uploaded to `/usr/local/bins` by default.
4949

5050
Summary:
5151
- We deployed a node set with some capabilities

framework/.changeset/v0.8.3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- change default capabilities directory to `/usr/local/bin`

framework/components/clnode/clnode.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ import (
2323
)
2424

2525
const (
26-
DefaultHTTPPort = "6688"
27-
DefaultP2PPort = "6690"
28-
DefaultDebuggerPort = 40000
29-
TmpImageName = "chainlink-tmp:latest"
30-
CustomPortSeparator = ":"
26+
DefaultHTTPPort = "6688"
27+
DefaultP2PPort = "6690"
28+
DefaultDebuggerPort = 40000
29+
TmpImageName = "chainlink-tmp:latest"
30+
CustomPortSeparator = ":"
31+
DefaultCapabilitiesDir = "/usr/local/bin"
3132
)
3233

3334
var (
@@ -301,7 +302,7 @@ func newNode(in *Input, pgOut *postgres.Output) (*NodeOut, error) {
301302
},
302303
}
303304
if in.Node.CapabilityContainerDir == "" {
304-
in.Node.CapabilityContainerDir = "/home/capabilities"
305+
in.Node.CapabilityContainerDir = DefaultCapabilitiesDir
305306
}
306307
for _, cp := range in.Node.CapabilitiesBinaryPaths {
307308
cpPath := filepath.Base(cp)

0 commit comments

Comments
 (0)