From 377f6431b26048cbcebf28e2bb36cdf585459e74 Mon Sep 17 00:00:00 2001 From: illuminatus Date: Wed, 1 Nov 2023 21:20:58 -0700 Subject: [PATCH 1/3] use updateWithCustomConfig to deploy mithril scripts --- scripts/cnode-helper-scripts/guild-deploy.sh | 7 +++++-- scripts/cnode-helper-scripts/mithril-client.sh | 0 scripts/cnode-helper-scripts/mithril-relay.sh | 0 3 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/cnode-helper-scripts/mithril-client.sh mode change 100644 => 100755 scripts/cnode-helper-scripts/mithril-relay.sh diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index d2bd63f11..b6e891e00 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -588,7 +588,7 @@ populate_cnode() { pushd "${CNODE_HOME}"/scripts >/dev/null || err_exit - [[ ${FORCE_OVERWRITE} = 'Y' ]] && echo -e "\nForced full upgrade! Please edit scripts/env, scripts/cnode.sh, scripts/dbsync.sh, scripts/submitapi.sh, scripts/ogmios.sh, scripts/gLiveView.sh and scripts/topologyUpdater.sh (alongwith files/topology.json, files/config.json, files/dbsync.json) as required!" + [[ ${FORCE_OVERWRITE} = 'Y' ]] && echo -e "\nForced full upgrade! Please edit scripts/env, scripts/cnode.sh, scripts/dbsync.sh, scripts/submitapi.sh, scripts/ogmios.sh, scripts/gLiveView.sh and scripts/topologyUpdater.sh scripts/mithril-client.sh scripts/mithril-relay.sh scripts/mithril-signer.sh (alongwith files/topology.json, files/config.json, files/dbsync.json) as required!" updateWithCustomConfig "blockPerf.sh" updateWithCustomConfig "cabal-build-all.sh" @@ -606,6 +606,9 @@ populate_cnode() { updateWithCustomConfig "setup_mon.sh" updateWithCustomConfig "setup-grest.sh" "grest-helper-scripts" updateWithCustomConfig "topologyUpdater.sh" + updateWithCustomConfig "mithril-client.sh" + updateWithCustomConfig "mithril-relay.sh" + updateWithCustomConfig "mithril-signer.sh" find "${CNODE_HOME}/scripts" -name '*.sh' -exec chmod 755 {} \; 2>/dev/null chmod -R 700 "${CNODE_HOME}"/priv 2>/dev/null @@ -618,7 +621,7 @@ parse_args() { [[ "${S_ARGS}" =~ "p" ]] && INSTALL_OS_DEPS="Y" [[ "${S_ARGS}" =~ "b" ]] && INSTALL_OS_DEPS="Y" && WANT_BUILD_DEPS="Y" [[ "${S_ARGS}" =~ "l" ]] && INSTALL_OS_DEPS="Y" && WANT_BUILD_DEPS="Y" && INSTALL_LIBSODIUM_FORK="Y" - [[ "${S_ARGS}" =~ "m" ]] && INSTALL_MITHRIL="Y" && WANT_BUILD_DEPS="Y" + [[ "${S_ARGS}" =~ "m" ]] && INSTALL_MITHRIL="Y" [[ "${S_ARGS}" =~ "f" ]] && FORCE_OVERWRITE="Y" && POPULATE_CNODE="F" [[ "${S_ARGS}" =~ "d" ]] && INSTALL_CNODEBINS="Y" [[ "${S_ARGS}" =~ "c" ]] && INSTALL_CNCLI="Y" diff --git a/scripts/cnode-helper-scripts/mithril-client.sh b/scripts/cnode-helper-scripts/mithril-client.sh old mode 100644 new mode 100755 diff --git a/scripts/cnode-helper-scripts/mithril-relay.sh b/scripts/cnode-helper-scripts/mithril-relay.sh old mode 100644 new mode 100755 From 69ab973f3f178b10ae8496011ebc40e207feecb0 Mon Sep 17 00:00:00 2001 From: illuminatus Date: Wed, 1 Nov 2023 21:49:04 -0700 Subject: [PATCH 2/3] bump mithril release v2342.0 (tags/2342.0) --- scripts/cnode-helper-scripts/guild-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index b6e891e00..2d1a5f1fc 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -498,7 +498,7 @@ download_mithril() { # dynamic latest release updated automatically, uncomment and comment out the hardcoded release below if needed # mithril_release="$(curl -s https://api.github.com/repos/input-output-hk/mithril/releases/latest | jq -r '.tag_name')" # hardcoded latest release requiring a bump - mithril_release="2337.0" + mithril_release="2342.0" echo -e "\n Downloading Mithril Signer/Client ${mithril_release}..." rm -f mithril-signer mithril-client curl -m 200 -sfL https://github.com/input-output-hk/mithril/releases/download/${mithril_release}/mithril-${mithril_release}-linux-x64.tar.gz -o mithril.tar.gz || err_exit " Could not download mithril's latest release archive from IO github!" From b0d04679cf1ae4fbe76150f999b1d61e0b14c4c8 Mon Sep 17 00:00:00 2001 From: illuminatus Date: Wed, 1 Nov 2023 21:57:25 -0700 Subject: [PATCH 3/3] always create mithril directories, setup_folder() wont be called again --- scripts/cnode-helper-scripts/guild-deploy.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index 2d1a5f1fc..8ef4c9aa0 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -521,14 +521,9 @@ setup_folder() { echo -e "\nexport ${CNODE_VNAME}_HOME=${CNODE_HOME}" >> "${HOME}"/.bashrc fi - $sudo mkdir -p "${CNODE_HOME}"/files "${CNODE_HOME}"/db "${CNODE_HOME}"/guild-db "${CNODE_HOME}"/logs "${CNODE_HOME}"/scripts "${CNODE_HOME}"/scripts/archive "${CNODE_HOME}"/sockets "${CNODE_HOME}"/priv "${CNODE_HOME}"/mithril + $sudo mkdir -p "${CNODE_HOME}"/files "${CNODE_HOME}"/db "${CNODE_HOME}"/guild-db "${CNODE_HOME}"/logs "${CNODE_HOME}"/scripts "${CNODE_HOME}"/scripts/archive "${CNODE_HOME}"/sockets "${CNODE_HOME}"/priv "${CNODE_HOME}"/mithril/data-stores $sudo chown -R "$U_ID":"$G_ID" "${CNODE_HOME}" 2>/dev/null - if [[ ${INSTALL_MITHRIL} == 'Y' ]]; then - - $sudo mkdir -p "${CNODE_HOME}"/mithril/data-stores - $sudo chown -R "$U_ID":"$G_ID" "${CNODE_HOME}"/mithril 2>/dev/null - fi } # Download and update scripts for cnode