UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

100 lines (83 loc) 5.69 kB
// SPDX-License-Identifier: Apache-2.0 import {type Version} from './src/types/index.js'; import {fileURLToPath} from 'node:url'; import path from 'node:path'; import {PathEx} from './src/business/utils/path-ex.js'; import fs from 'node:fs'; import * as constants from './src/core/constants.js'; import {SemanticVersion} from './src/business/utils/semantic-version.js'; /** * This file should only contain versions for dependencies and the function to get the Solo version. */ // Dependencies export const HELM_VERSION: string = 'v3.14.2'; export const KIND_VERSION: string = 'v0.29.0'; export const PODMAN_VERSION: string = 'v5.6.0'; export const VFKIT_VERSION: string = 'v0.6.1'; export const GVPROXY_VERSION: string = 'v0.8.7'; export const KUBECTL_VERSION: string = 'v1.32.2'; export const CRANE_VERSION: string = 'v0.21.4'; export const SOLO_CHART_VERSION: string = constants.getEnvironmentVariable('SOLO_CHART_VERSION') || '0.63.3'; export const HEDERA_PLATFORM_VERSION: string = constants.getEnvironmentVariable('CONSENSUS_NODE_VERSION') || 'v0.71.0'; export const S6_NODE_IMAGE_VERSION: string = constants.getEnvironmentVariable('SOLO_S6_NODE_IMAGE_VERSION') || '0.45.0'; export const MIRROR_NODE_VERSION: string = constants.getEnvironmentVariable('MIRROR_NODE_VERSION') || 'v0.153.1'; export const EXPLORER_VERSION: string = constants.getEnvironmentVariable('EXPLORER_VERSION') || '26.0.0'; export const HEDERA_JSON_RPC_RELAY_VERSION: string = constants.getEnvironmentVariable('RELAY_VERSION') || '0.76.2'; export const INGRESS_CONTROLLER_VERSION: string = constants.getEnvironmentVariable('INGRESS_CONTROLLER_VERSION') || '0.14.5'; export const BLOCK_NODE_VERSION: string = constants.getEnvironmentVariable('BLOCK_NODE_VERSION') || '0.31.0'; export const NETWORK_LOAD_GENERATOR_CHART_VERSION: string = constants.getEnvironmentVariable('NETWORK_LOAD_GENERATOR_CHART_VERSION') || '0.8.0'; export const MINIO_OPERATOR_VERSION: string = constants.getEnvironmentVariable('MINIO_OPERATOR_VERSION') || '7.1.1'; export const METRICS_SERVER_VERSION: string = constants.getEnvironmentVariable('METRICS_SERVER_VERSION') || ''; export const PROMETHEUS_STACK_VERSION: string = constants.getEnvironmentVariable('PROMETHEUS_STACK_VERSION') || '52.0.1'; export const GRAFANA_AGENT_VERSION: string = constants.getEnvironmentVariable('GRAFANA_AGENT_VERSION') || '0.27.1'; export const GRAFANA_PODLOGS_CRD_VERSION: string = constants.getEnvironmentVariable('GRAFANA_PODLOGS_CRD_VERSION') || 'v1.11.3'; export const PROMETHEUS_OPERATOR_CRDS_VERSION: string = constants.getEnvironmentVariable('PROMETHEUS_OPERATOR_CRDS_VERSION') || '24.0.2'; export const REDIS_IMAGE_VERSION: string = constants.getEnvironmentVariable('REDIS_IMAGE_VERSION') || '8.2.2'; export const REDIS_SENTINEL_IMAGE_VERSION: string = constants.getEnvironmentVariable('REDIS_SENTINEL_IMAGE_VERSION') || '8.2.2'; // -------------------------------------------------------------------- // // Edge (newer-than-default) versions used by the `--edge` preset in one-shot deploys. export const SOLO_CHART_EDGE_VERSION: string = constants.getEnvironmentVariable('SOLO_CHART_EDGE_VERSION') || SOLO_CHART_VERSION; export const HEDERA_PLATFORM_EDGE_VERSION: string = constants.getEnvironmentVariable('CONSENSUS_NODE_EDGE_VERSION') || HEDERA_PLATFORM_VERSION; export const MIRROR_NODE_EDGE_VERSION: string = constants.getEnvironmentVariable('MIRROR_NODE_EDGE_VERSION') || MIRROR_NODE_VERSION; export const EXPLORER_EDGE_VERSION: string = constants.getEnvironmentVariable('EXPLORER_EDGE_VERSION') || EXPLORER_VERSION; export const HEDERA_JSON_RPC_RELAY_EDGE_VERSION: string = constants.getEnvironmentVariable('RELAY_EDGE_VERSION') || HEDERA_JSON_RPC_RELAY_VERSION; export const BLOCK_NODE_EDGE_VERSION: string = constants.getEnvironmentVariable('BLOCK_NODE_EDGE_VERSION') || BLOCK_NODE_VERSION; // -------------------------------------------------------------------- // export const MINIMUM_HIERO_PLATFORM_VERSION_FOR_BLOCK_NODE_LEGACY_RELEASE: string = 'v0.62.3'; export const MINIMUM_HIERO_BLOCK_NODE_VERSION_FOR_NEW_LIVENESS_CHECK_PORT: SemanticVersion<string> = new SemanticVersion('v0.15.0'); export const MINIMUM_HIERO_PLATFORM_VERSION_FOR_BLOCK_NODE: string = 'v0.64.0'; export const MINIMUM_HIERO_PLATFORM_VERSION_FOR_GRPC_WEB_ENDPOINTS: string = 'v0.62.0'; // pre-release specified to allow all other pre-releases export const MINIMUM_HIERO_CONSENSUS_NODE_VERSION_FOR_LEGACY_PORT_NAME_FOR_BLOCK_NODES_JSON_FILE: string = '0.69.0'; export const LAST_HIERO_CONSENSUS_NODE_VERSION_NEED_CONFIG_TXT: string = 'v0.70.0'; export const MEMORY_ENHANCEMENTS_MIRROR_NODE_VERSION: string = '0.152.0'; export const MINIMUM_HIERO_PLATFORM_VERSION_FOR_TSS: string = 'v0.74.0-0'; export const MINIMUM_BLOCK_NODE_CHART_VERSION_FOR_MIRROR_NODE_INTEGRATION: string = '0.29.0-0'; export const MINIMUM_MIRROR_NODE_CHART_VERSION_FOR_MIRROR_NODE_INTEGRATION: string = '0.150.0-0'; export function needsConfigTxtForConsensusVersion(releaseTag?: string): boolean { const versionTag: SemanticVersion<string> = new SemanticVersion(releaseTag || HEDERA_PLATFORM_VERSION); return versionTag.lessThanOrEqual(LAST_HIERO_CONSENSUS_NODE_VERSION_NEED_CONFIG_TXT); } export function getSoloVersion(): Version { if (process.env.npm_package_version) { return process.env.npm_package_version; } const __filename: string = fileURLToPath(import.meta.url); const __dirname: string = path.dirname(__filename); const packageJsonPath: string = PathEx.resolve(__dirname, './package.json'); const packageJson: {version: Version} = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); return packageJson.version; }