Skip to content

Commit ef5f0a9

Browse files
authored
Merge pull request #6042 from IntersectMBO/jl/legacy-tracing-and-oci-update
Legacy tracing and OCI update
2 parents e37615c + c070e96 commit ef5f0a9

File tree

8 files changed

+55
-40
lines changed

8 files changed

+55
-40
lines changed

configuration/cardano/mainnet-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"TracingVerbosity": "NormalVerbosity",
6161
"TurnOnLogMetrics": true,
6262
"TurnOnLogging": true,
63+
"UseTraceDispatcher": false,
6364
"defaultBackends": [
6465
"KatipBK"
6566
],

configuration/cardano/mainnet-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ TurnOnLogging: True
5454
# be directed to the logs or monitoring backends.
5555
TurnOnLogMetrics: True
5656

57+
# Use legacy tracing
58+
UseTraceDispatcher: False
59+
5760
# Global logging severity filter. Messages must have at least this severity to
5861
# pass. Typical values would be Warning, Notice, Info or Debug.
5962
minSeverity: Info

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.5"
22

33
services:
44
cardano-node:
5-
image: inputoutput/cardano-node:${CARDANO_NODE_VERSION:-8.0.0}
5+
image: ghcr.io/intersectmbo/cardano-node:${CARDANO_NODE_VERSION:-10.1.2}
66
environment:
77
- NETWORK=${NETWORK:-mainnet}
88
volumes:
@@ -15,7 +15,7 @@ services:
1515
max-file: "10"
1616

1717
cardano-submit-api:
18-
image: inputoutput/cardano-submit-api:${CARDANO_SUBMIT_API_VERSION:-8.0.0}
18+
image: ghcr.io/intersectmbo/cardano-submit-api:${CARDANO_SUBMIT_API_VERSION:-10.1.2}
1919
environment:
2020
- NETWORK=${NETWORK:-mainnet}
2121
depends_on:

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/docker/README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,24 @@ https://github.com/input-output-hk/cardano-node-wiki/wiki/building-the-node-usin
77
# Build + Install the cardano node
88
nix build .#mainnet/node -o ~/bin/cardano-node
99
10-
# Build + Install the cardano Docker image
11-
nix run .#dockerImage/node/load \
12-
&& GITHASH=`git log -n1 --pretty='%H'` \
13-
&& docker tag inputoutput/cardano-node:$GITHASH inputoutput/cardano-node:dev \
14-
&& docker rmi inputoutput/cardano-node:$GITHASH
15-
16-
GITTAG=`git describe --exact-match --tags $GITHASH`
10+
# Build + Install the cardano Docker image from bash shell
11+
nix build .#dockerImage/node \
12+
&& RES=$(docker load -i result) \
13+
&& LOADED="${RES##Loaded image: }" \
14+
&& GITHASH=$(git log -n1 --pretty='%H') \
15+
&& docker tag "$LOADED" ghcr.io/intersectmbo/cardano-node:dev \
16+
&& docker rmi "$LOADED"
17+
18+
GITTAG=$(git describe --exact-match --tags $GITHASH)
1719
if [ $? -eq 0 ]; then
1820
echo "Current tag: $GITTAG"
19-
docker tag inputoutput/cardano-node:dev inputoutput/cardano-node:$GITTAG
21+
docker tag ghcr.io/intersectmbo/cardano-node:dev "ghcr.io/intersectmbo/cardano-node:$GITTAG"
2022
fi
2123
2224
# Bash into the node to look around
2325
docker run --rm -it --entrypoint=bash \
2426
-v node-data:/opt/cardano/data \
25-
inputoutput/cardano-node:dev
27+
ghcr.io/intersectmbo/cardano-node:dev
2628
2729
cardano-node run \
2830
--config /opt/cardano/config/mainnet-config.json \
@@ -50,7 +52,7 @@ docker run --rm -it \
5052
-p 3001:3001 \
5153
-e NETWORK=mainnet \
5254
-v node-data:/data/db \
53-
inputoutput/cardano-node:dev
55+
ghcr.io/intersectmbo/cardano-node:dev
5456
```
5557

5658
Run -e NETWORK=mainnet and check graceful shutdown SIGTERM with --detach
@@ -62,7 +64,7 @@ docker run --detach \
6264
-p 3001:3001 \
6365
-e NETWORK=mainnet \
6466
-v node-data:/data/db \
65-
inputoutput/cardano-node:dev
67+
ghcr.io/intersectmbo/cardano-node:dev
6668
6769
docker logs -f relay
6870
```
@@ -75,7 +77,7 @@ Check graceful shutdown SIGINT with -it
7577
docker run --rm -it \
7678
-p 3001:3001 \
7779
-v node-data:/opt/cardano/data \
78-
inputoutput/cardano-node:dev run
80+
ghcr.io/intersectmbo/cardano-node:dev run
7981
```
8082

8183
Check graceful shutdown SIGTERM with --detach
@@ -87,7 +89,7 @@ docker run --detach \
8789
-p 3001:3001 \
8890
-v node-data:/opt/cardano/data \
8991
-v node-ipc:/opt/cardano/ipc \
90-
inputoutput/cardano-node:dev run
92+
ghcr.io/intersectmbo/cardano-node:dev run
9193
9294
docker logs -f relay
9395
```
@@ -97,7 +99,7 @@ docker logs -f relay
9799
```
98100
alias cardano-cli="docker run --rm -it \
99101
-v node-ipc:/opt/cardano/ipc \
100-
inputoutput/cardano-node:dev cli"
102+
ghcr.io/intersectmbo/cardano-node:dev cli"
101103
102104
cardano-cli query tip --mainnet
103105
```

nix/docker/default.nix

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@
33
#
44
# To build and load into the Docker engine:
55
#
6-
# nix run .#dockerImage/node/load
6+
# nix build .#dockerImage/node
7+
# docker load -i result
78
#
89
# To launch with pre-loaded configuration, using the NETWORK env.
910
# An example using a docker volume to persist state:
1011
#
11-
# docker run -v /data -e NETWORK=mainnet inputoutput/cardano-node
12+
# docker run -v /data -e NETWORK=mainnet ghcr.io/intersectmbo/cardano-node
1213
#
1314
# Provide a complete command otherwise:
1415
#
15-
# docker run -v $PWD/configuration/defaults/byron-mainnet:/configuration \
16-
# inputoutput/cardano-node run \
17-
# --config /configuration/configuration.yaml \
18-
# --topology /configuration/topology.json \
16+
# docker run -v $PWD/configuration/cardano:/configuration \
17+
# ghcr.io/intersectmbo/cardano-node run \
18+
# --config /configuration/mainnet-config.yaml \
19+
# --topology /configuration/mainnet-topology.json \
1920
# --database-path /db
2021
#
2122
# Mount a volume into /ipc for establishing cross-container communication via node.socket
2223
#
23-
# docker run -v node-ipc:/ipc inputoutput/cardano-node
24-
# docker run -v node-ipc:/ipc inputoutput/some-node-client
24+
# docker run -v node-ipc:/ipc -e NETWORK=mainnet ghcr.io/intersectmbo/cardano-node
25+
# docker run -v node-ipc:/ipc -e NETWORK=mainnet ghcr.io/intersectmbo/some-node-client
2526
############################################################################
2627

2728
{ pkgs
@@ -38,7 +39,6 @@
3839

3940
# Other things to include in the image.
4041
, bashInteractive
41-
, buildPackages
4242
, cacert
4343
, coreutils
4444
, curl
@@ -48,12 +48,10 @@
4848
, iputils
4949
, socat
5050
, utillinux
51-
, writeScriptBin
52-
, runtimeShell
5351
, lib
5452
, exe
5553
, script
56-
, repoName ? "inputoutput/${exe}"
54+
, repoName ? "ghcr.io/intersectmbo/${exe}"
5755
}:
5856

5957
let
@@ -83,6 +81,7 @@ let
8381
mkdir -m 0777 tmp
8482
'';
8583
};
84+
8685
# Image with all iohk-nix network configs or utilizes a configuration volume mount
8786
# To choose a network, use `-e NETWORK testnet`
8887
clusterStatements = lib.concatStringsSep "\n" (lib.mapAttrsToList (env: scripts: let
@@ -109,7 +108,7 @@ let
109108
# Mainnet configuration used by the 'run' option
110109
mainnetConfigFile = builtins.toFile "mainnet-config.json"
111110
(builtins.toJSON commonLib.environments.mainnet.nodeConfig);
112-
mainnetTopologyFile = commonLib.mkEdgeTopology { edgeNodes = [ commonLib.environments.mainnet.relaysNew ]; valency = 2; };
111+
mainnetTopologyFile = commonLib.mkTopology commonLib.environments.mainnet;
113112

114113
in
115114
dockerTools.buildImage {
@@ -135,6 +134,7 @@ in
135134
ln -s ${cardano-node}/bin/cardano-node usr/local/bin/cardano-node
136135
ln -s ${cardano-cli}/bin/cardano-cli usr/local/bin/cardano-cli
137136
'';
137+
138138
config = {
139139
EntryPoint = [ "entrypoint" ];
140140
};

nix/docker/submit-api.nix

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@
33
#
44
# To build and load into the Docker engine:
55
#
6-
# nix run .#DockerImage/submit-api/load
6+
# nix run .#dockerImage/submit-api
7+
# docker load -i result
78
#
89
# cardano-submit-api
910
# To launch with provided mainnet configuration
1011
#
11-
# docker run -e NETWORK=mainnet inputoutput/cardano-submit-api:<TAG>
12+
# docker run -e NETWORK=mainnet ghcr.io/intersectmbo/cardano-submit-api:<TAG>
1213
#
13-
# To launch with provided testnet configuration
14+
# To launch with provided testnet configuration
1415
#
15-
# docker run -e NETWORK=testnet inputoutput/cardano-submit-api:<TAG>
16+
# docker run -e NETWORK=testnet ghcr.io/intersectmbo/cardano-submit-api:<TAG>
1617
#
1718
# Provide a complete command otherwise:
1819
#
19-
# docker run -v $PWD/config.yaml:/config.yaml inputoutput/cardano-submit-api:<TAG> \
20-
# --config /config.yaml --mainnet --socket-path /node-ipc/node.socket
20+
# docker run -v $PWD/config.yaml:/config.yaml ghcr.io/intersectmbo/cardano-submit-api:<TAG> \
21+
# --config /config.yaml --mainnet --socket-path /node-ipc/node.socket
2122
#
22-
# See the docker-compose.yml for demonstration of using Docker secrets instead of mounting a pgpass
23+
# See the docker-compose.yml for demonstration of using Docker secrets instead of mounting a pgpass
2324
#
2425
############################################################################
2526

@@ -50,7 +51,7 @@
5051
, lib
5152
, exe
5253
, script
53-
, repoName ? "inputoutput/${exe}"
54+
, repoName ? "ghcr.io/intersectmbo/${exe}"
5455
}:
5556

5657
let
@@ -79,6 +80,7 @@ let
7980
mkdir -m 0777 tmp
8081
'';
8182
};
83+
8284
# Image with all iohk-nix network configs or utilizes a configuration volume mount
8385
# To choose a network, use `-e NETWORK testnet`
8486
clusterStatements = lib.concatStringsSep "\n" (lib.mapAttrsToList (env: scripts: let
@@ -87,6 +89,7 @@ let
8789
elif [[ "$NETWORK" == "${env}" ]]; then
8890
exec ${scriptBin}/bin/${scriptBin.name} $@
8991
'') scripts);
92+
9093
nodeDockerImage = let
9194
entry-point = writeScriptBin "entry-point" ''
9295
#!${runtimeShell}
@@ -97,16 +100,19 @@ let
97100
echo "Managed configuration for network "$NETWORK" does not exist"
98101
fi
99102
'';
103+
100104
in dockerTools.buildImage {
101105
name = "${repoName}";
102106
fromImage = baseImage;
103107
tag = "${gitrev}";
104108
created = "now"; # Set creation date to build time. Breaks reproducibility
109+
105110
copyToRoot = pkgs.buildEnv {
106111
name = "image-root";
107112
pathsToLink = ["/"];
108113
paths = [entry-point];
109114
};
115+
110116
config = {
111117
EntryPoint = [ "${entry-point}/bin/entry-point" ];
112118
ExposedPorts = {

nix/nixos/cardano-node-service.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ let
8989
options = {};
9090
}
9191
else baseConfig //
92+
{
93+
UseTraceDispatcher = false;
94+
} //
9295
(optionalAttrs (baseConfig ? hasEKG) {
9396
hasEKG = baseConfig.hasEKG + i;
9497
}) //

0 commit comments

Comments
 (0)