Skip to content

Commit

Permalink
bug: set fullstack-cluster-setup to default true in fsnetman for inst…
Browse files Browse the repository at this point in the history
…alling minio & prometheus-stack (#480)

Signed-off-by: Jeromy Cannon <[email protected]>
Co-authored-by: Nathan Klick <[email protected]>
  • Loading branch information
jeromy-cannon and nathanklick authored Nov 2, 2023
1 parent 4ce54d0 commit 72cfe41
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fullstack-network-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fullstack-network-manager is a CLI tool to manage and deploy a Hedera Network us
❯ cat ~/.npmrc
@hashgraph:registry=https://npm.pkg.github.com
```
- Run `nmp install -g @hedera/fullstack-network-manager`
- Run `npm install -g @hedera/fullstack-network-manager`

- Run `fsnetman` from a terminal as shown below
```
Expand Down
9 changes: 8 additions & 1 deletion fullstack-network-manager/src/commands/cluster.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ export class ClusterCommand extends BaseCommand {
let chartName = "fullstack-cluster-setup"
let namespace = argv.namespace
let chartPath = `${core.constants.FST_HOME_DIR}/full-stack-testing/charts/${chartName}`
let valuesArg = this.prepareValuesArg(argv.prometheusStack, argv.minio)

this.logger.showUser(chalk.cyan('> setting up cluster:'), chalk.yellow(`${clusterName}`))
await this.chartInstall(namespace, chartName, chartPath)
await this.chartInstall(namespace, chartName, chartPath, valuesArg)
await this.showInstalledChartList(namespace)

return true
Expand Down Expand Up @@ -283,6 +284,8 @@ export class ClusterCommand extends BaseCommand {
builder: yargs => {
yargs.option('cluster-name', flags.clusterNameFlag)
yargs.option('namespace', flags.namespaceFlag)
yargs.option('prometheus-stack', flags.deployPrometheusStack)
yargs.option('minio', flags.deployMinio)
},
handler: argv => {
clusterCmd.logger.debug("==== Running 'cluster setup' ===")
Expand All @@ -300,4 +303,8 @@ export class ClusterCommand extends BaseCommand {
}
}
}

prepareValuesArg(prometheusStackEnabled, minioEnabled) {
return ` --set cloud.prometheusStack.enabled=${prometheusStackEnabled} --set cloud.minio.enabled=${minioEnabled}`
}
}
16 changes: 15 additions & 1 deletion fullstack-network-manager/src/commands/flags.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,18 @@ export const valuesFile = {
default: "",
alias: 'f',
type: 'string'
}
}

export const deployPrometheusStack = {
describe: 'Deploy prometheus stack',
default: true,
alias: 'p',
type: 'boolean'
}

export const deployMinio = {
describe: 'Deploy minio operator',
default: true,
alias: 'o',
type: 'boolean'
}

0 comments on commit 72cfe41

Please sign in to comment.