-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial import from cardano-up/packages
Signed-off-by: Chris Gianelloni <[email protected]>
- Loading branch information
Showing
24 changed files
with
790 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# The below is pulled from upstream and slightly modified | ||
# https://github.com/webiny/action-conventional-commits/blob/master/README.md#usage | ||
|
||
name: Conventional Commits | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Conventional Commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: webiny/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: package-validate | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
validate: | ||
name: Validate packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: curl -sLo cardano-up $(curl -s https://api.github.com/repos/blinklabs-io/cardano-up/releases/latest | grep "browser_download_url.*linux-amd64" | cut -d: -f2,3 | tr -d \") && chmod +x cardano-up | ||
- run: ./cardano-up validate -D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: cardano-cli | ||
version: 8.20.3.0 | ||
description: CLI software for interfacing with Cardano node by Input Output Global | ||
installSteps: | ||
- docker: | ||
containerName: cardano-cli | ||
image: ghcr.io/blinklabs-io/cardano-cli:8.20.3.0 | ||
pullOnly: true | ||
- file: | ||
binary: true | ||
filename: cardano-cli | ||
source: files/cardano-cli.sh.gotmpl | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: cardano-cli | ||
version: 8.24.0.0 | ||
description: CLI software for interfacing with Cardano node by Input Output Global | ||
installSteps: | ||
- docker: | ||
containerName: cardano-cli | ||
image: ghcr.io/blinklabs-io/cardano-cli:8.24.0.0 | ||
pullOnly: true | ||
- file: | ||
binary: true | ||
filename: cardano-cli | ||
source: files/cardano-cli.sh.gotmpl | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: cardano-cli | ||
version: 9.0.0.0 | ||
description: CLI software for interfacing with Cardano node by Input Output Global | ||
installSteps: | ||
- docker: | ||
containerName: cardano-cli | ||
image: ghcr.io/blinklabs-io/cardano-cli:9.0.0.0 | ||
pullOnly: true | ||
- file: | ||
binary: true | ||
filename: cardano-cli | ||
source: files/cardano-cli.sh.gotmpl | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
declare -a valid_paths=( | ||
"/Users" | ||
"/Volumes" | ||
"/private" | ||
"/tmp" | ||
"/var/folders" | ||
) | ||
|
||
_args=() | ||
|
||
# Remap absolute paths to /host in the container | ||
while [[ $# -gt 0 ]]; do | ||
_arg=$1 | ||
if [[ $_arg =~ ^/ ]]; then | ||
_arg="/host${_arg}" | ||
fi | ||
_args+=( $_arg ) | ||
shift | ||
done | ||
|
||
_docker_args=() | ||
|
||
if [[ $CARDANO_NODE_SOCKET_PATH ]]; then | ||
# Use the host socket path if specified | ||
if [[ ! -e $CARDANO_NODE_SOCKET_PATH ]]; then | ||
echo "Specified CARDANO_NODE_SOCKET_PATH '${CARDANO_NODE_SOCKET_PATH}' does not exist!" | ||
exit 1 | ||
fi | ||
_docker_args+=( "-v" "${CARDANO_NODE_SOCKET_PATH}:/ipc/node.socket" ) | ||
else | ||
# Use the default context node socket if no socket path is provided | ||
_docker_args+=( "-v" "{{ .Paths.ContextDir }}/node-ipc:/ipc" ) | ||
fi | ||
|
||
if [[ $(uname -s) == Darwin ]]; then | ||
for _path in "${_darwin_allowed_paths[@]}"; do | ||
_docker_args+=( "-v" "${_path}:/host${_path}" ) | ||
done | ||
else | ||
_docker_args+=( "-v" "/:/host" ) | ||
fi | ||
|
||
# Run cardano-cli via Docker | ||
# We map the host filesystem and node socket into the container | ||
docker run \ | ||
-ti \ | ||
--rm \ | ||
-u $(id -u):$(id -g) \ | ||
-w /host$(pwd) \ | ||
-e CARDANO_NODE_SOCKET_PATH=/ipc/node.socket \ | ||
"${_docker_args[@]}" \ | ||
ghcr.io/blinklabs-io/cardano-cli:{{ .Package.Version }} \ | ||
"${_args[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: cardano-config | ||
version: 20240515 | ||
description: Configuration files for the Cardano node by Input Output Global | ||
installSteps: | ||
- docker: | ||
containerName: cardano-configs | ||
image: ghcr.io/blinklabs-io/cardano-configs:20240515-1 | ||
pullOnly: true | ||
outputs: | ||
- name: base | ||
description: Path to the Cardano Node configuration files | ||
value: '{{ .Paths.ContextDir }}/config' | ||
postInstallScript: | | ||
set -e | ||
mkdir -p {{ .Paths.ContextDir }}/config | ||
docker create --name {{ .Package.Name }}-{{ .Package.ShortName }} ghcr.io/blinklabs-io/cardano-configs:20240515-1 bash | ||
docker cp {{ .Package.Name }}-{{ .Package.ShortName }}:/config/{{ .Context.Network }}/ {{ .Paths.ContextDir }}/config/ | ||
docker rm {{ .Package.Name }}-{{ .Package.ShortName }} | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: cardano-config | ||
version: 20240702 | ||
description: Configuration files for the Cardano node by Input Output Global | ||
installSteps: | ||
- docker: | ||
containerName: cardano-configs | ||
image: ghcr.io/blinklabs-io/cardano-configs:20240702-1 | ||
pullOnly: true | ||
outputs: | ||
- name: base | ||
description: Path to the Cardano Node configuration files | ||
value: '{{ .Paths.ContextDir }}/config' | ||
postInstallScript: | | ||
set -e | ||
mkdir -p {{ .Paths.ContextDir }}/config | ||
docker create --name {{ .Package.Name }}-{{ .Package.ShortName }} ghcr.io/blinklabs-io/cardano-configs:20240702-1 bash | ||
docker cp {{ .Package.Name }}-{{ .Package.ShortName }}:/config/{{ .Context.Network }}/ {{ .Paths.ContextDir }}/config/ | ||
docker rm {{ .Package.Name }}-{{ .Package.ShortName }} | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: cardano-node-api | ||
version: 0.1.2 | ||
description: Multi-protocol API for interfacing with a local Cardano node | ||
dependencies: | ||
- cardano-config >= 20240515 | ||
- cardano-node >= 8.7.3 | ||
installSteps: | ||
- docker: | ||
containerName: cardano-node-api | ||
image: ghcr.io/blinklabs-io/cardano-node-api:0.1.2 | ||
env: | ||
CARDANO_NETWORK: '{{ .Context.Network }}' | ||
CARDANO_NODE_SOCKET_PATH: /ipc/node.socket | ||
binds: | ||
- '{{ .Paths.ContextDir }}/node-ipc:/ipc' | ||
- '{{ .Paths.ContextDir }}/config/{{ .Context.Network }}:/opt/cardano/config' | ||
ports: | ||
- "8080" | ||
- "9090" | ||
pullOnly: false | ||
outputs: | ||
- name: grpc | ||
description: Cardano Node API gRPC service | ||
value: 'http://localhost:{{ index (index .Ports "cardano-node-api") "8080" }}' | ||
- name: rest | ||
description: Cardano Node API REST service | ||
value: 'localhost:{{ index (index .Ports "cardano-node-api") "9090" }}' | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: cardano-node-api | ||
version: 0.2.0 | ||
description: Multi-protocol API for interfacing with a local Cardano node | ||
dependencies: | ||
- cardano-config >= 20240515 | ||
- cardano-node >= 8.7.3 | ||
installSteps: | ||
- docker: | ||
containerName: cardano-node-api | ||
image: ghcr.io/blinklabs-io/cardano-node-api:0.2.0 | ||
env: | ||
CARDANO_NETWORK: '{{ .Context.Network }}' | ||
CARDANO_NODE_SOCKET_PATH: /ipc/node.socket | ||
binds: | ||
- '{{ .Paths.ContextDir }}/node-ipc:/ipc' | ||
- '{{ .Paths.ContextDir }}/config/{{ .Context.Network }}:/opt/cardano/config' | ||
ports: | ||
- "8080" | ||
- "9090" | ||
pullOnly: false | ||
outputs: | ||
- name: grpc | ||
description: Cardano Node API gRPC service | ||
value: 'http://localhost:{{ index (index .Ports "cardano-node-api") "8080" }}' | ||
- name: rest | ||
description: Cardano Node API REST service | ||
value: 'localhost:{{ index (index .Ports "cardano-node-api") "9090" }}' | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: cardano-node | ||
version: 8.9.3 | ||
description: Cardano node software by Input Output Global | ||
dependencies: | ||
- cardano-config = 20240515 | ||
- cardano-cli >= 8.20 | ||
- mithril-client >= 0.8 | ||
installSteps: | ||
- docker: | ||
containerName: cardano-node | ||
image: ghcr.io/blinklabs-io/cardano-node:8.9.3 | ||
env: | ||
CARDANO_NODE_SOCKET_PATH: /ipc/node.socket | ||
NETWORK: '{{ .Context.Network }}' | ||
RESTORE_NETWORK: 'false' | ||
binds: | ||
- '{{ .Paths.ContextDir }}/config:/opt/cardano/config' | ||
- '{{ .Paths.ContextDir }}/node-ipc:/ipc' | ||
- '{{ .Paths.DataDir }}/data:/data' | ||
ports: | ||
- "3001" | ||
- "12788" | ||
- "12798" | ||
pullOnly: false | ||
- file: | ||
binary: true | ||
filename: nview | ||
source: files/nview.sh.gotmpl | ||
- file: | ||
binary: true | ||
filename: txtop | ||
source: files/txtop.sh.gotmpl | ||
outputs: | ||
- name: port | ||
description: Ouroboros Node-to-Node service | ||
value: '{{ index (index .Ports "cardano-node") "3001" }}' | ||
- name: socket_path | ||
description: Path to the Cardano Node UNIX socket | ||
value: '{{ .Paths.ContextDir }}/node-ipc/node.socket' | ||
preInstallScript: | | ||
set -e | ||
test -e {{ .Paths.DataDir }}/data/db/protocolMagicId && exit 0 | ||
mithril-client cardano-db download --download-dir {{ .Paths.DataDir }}/data latest | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: cardano-node | ||
version: 8.9.4 | ||
description: Cardano node software by Input Output Global | ||
dependencies: | ||
- cardano-config = 20240515 | ||
- cardano-cli >= 8.20 | ||
- mithril-client >= 0.8 | ||
installSteps: | ||
- docker: | ||
containerName: cardano-node | ||
image: ghcr.io/blinklabs-io/cardano-node:8.9.4 | ||
env: | ||
CARDANO_NODE_SOCKET_PATH: /ipc/node.socket | ||
NETWORK: '{{ .Context.Network }}' | ||
RESTORE_NETWORK: 'false' | ||
binds: | ||
- '{{ .Paths.ContextDir }}/config:/opt/cardano/config' | ||
- '{{ .Paths.ContextDir }}/node-ipc:/ipc' | ||
- '{{ .Paths.DataDir }}/data:/data' | ||
ports: | ||
- "3001" | ||
- "12788" | ||
- "12798" | ||
pullOnly: false | ||
- file: | ||
binary: true | ||
filename: nview | ||
source: files/nview.sh.gotmpl | ||
- file: | ||
binary: true | ||
filename: txtop | ||
source: files/txtop.sh.gotmpl | ||
outputs: | ||
- name: port | ||
description: Ouroboros Node-to-Node service | ||
value: '{{ index (index .Ports "cardano-node") "3001" }}' | ||
- name: socket_path | ||
description: Path to the Cardano Node UNIX socket | ||
value: '{{ .Paths.ContextDir }}/node-ipc/node.socket' | ||
preInstallScript: | | ||
set -e | ||
test -e {{ .Paths.DataDir }}/data/db/protocolMagicId && exit 0 | ||
mithril-client cardano-db download --download-dir {{ .Paths.DataDir }}/data latest | ||
tags: | ||
- docker | ||
- linux | ||
- darwin | ||
- amd64 | ||
- arm64 |
Oops, something went wrong.