Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): implement chart install, uninstall and upgrade commands #454

Merged
merged 24 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
550d2e4
fix: setup constants and log into tmp log files
leninmehedy Oct 24, 2023
19a9e4b
feat(cli): initial implementation of cluster commands
leninmehedy Oct 24, 2023
9dbf5f2
feat(cli): implement cluster list and info commands
leninmehedy Oct 24, 2023
aa46f8c
fix: remove redundant function param
leninmehedy Oct 24, 2023
10c6c91
fix: show init status to user after execution
leninmehedy Oct 24, 2023
600bad4
fix: polish usage desc
leninmehedy Oct 24, 2023
d3ad77a
fix: update user log
leninmehedy Oct 24, 2023
b29f1ce
feat: add colors in console messages.
leninmehedy Oct 24, 2023
c92c3ff
fix: reduce noise in log file because of chalk
leninmehedy Oct 24, 2023
c82af9a
style: update log message
leninmehedy Oct 24, 2023
db5763b
doc: add comment and code cleanup
leninmehedy Oct 24, 2023
b6858f0
fix: remove redundant message during delete to avoid confusion
leninmehedy Oct 24, 2023
85b9af9
style: polishing
leninmehedy Oct 24, 2023
d9ee506
fix: rename TMP_DIR to FST_HOME_DIR
leninmehedy Oct 24, 2023
f2150ad
feat: create a custom logger embedding the winston logger and use non…
leninmehedy Oct 24, 2023
a4c4140
fix: logger debug method
leninmehedy Oct 25, 2023
93a0724
feat: scaffold network deploy command
leninmehedy Oct 25, 2023
7efc0fe
feat: implement cluster setup
leninmehedy Oct 25, 2023
fe46be5
feat(cli): implement network deploy command
leninmehedy Oct 26, 2023
d9a3362
Merge branch 'main' into 448-cli-deploy-network-command
leninmehedy Oct 26, 2023
4d53b90
feat: implement chart install, uninstall and upgrade commands
leninmehedy Oct 26, 2023
f8d2cb5
fix: remove redundant log
leninmehedy Oct 26, 2023
780e897
fix: command desc
leninmehedy Oct 26, 2023
34f6715
style: code cleanup
leninmehedy Oct 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: scaffold network deploy command
Signed-off-by: Lenin Mehedy <lenin.mehedy@swirldslabs.com>
  • Loading branch information
leninmehedy committed Oct 25, 2023
commit 93a0724c18eeb01e6aaefffa05b1c8e3814874dc
3 changes: 3 additions & 0 deletions fullstack-network-manager/src/commands/index.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {ClusterCommand} from "./cluster.mjs";
import {InitCommand} from "./init.mjs";
import {NetworkCommand} from "./network.mjs"

/*
* Return a list of Yargs command builder to be exposed through CLI
Expand All @@ -8,10 +9,12 @@ import {InitCommand} from "./init.mjs";
function Initialize(opts) {
const initCmd = new InitCommand(opts)
const clusterCmd = new ClusterCommand(opts)
const networkCmd = new NetworkCommand(opts)

return [
InitCommand.getCommandDefinition(initCmd),
ClusterCommand.getCommandDefinition(clusterCmd),
NetworkCommand.getCommandDefinition(networkCmd),
]
}

Expand Down
59 changes: 59 additions & 0 deletions fullstack-network-manager/src/commands/network.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import {BaseCommand} from "./base.mjs";
import chalk from "chalk";


export const NetworkCommand = class NetworkCommand extends BaseCommand {

async deploy(argv) {
this.logger.showUser(chalk.green("Deploying FST network....%s"), chalk.yellow(JSON.stringify(argv)))
return false
}

static getCommandDefinition(networkCmd) {
return {
command: 'network',
desc: 'Manage FST network deployment',
builder: yargs => {
return yargs
.command({
command: 'deploy',
desc: 'Deploy a FST network',
builder: yargs => {
yargs.option('haproxy', {
describe: 'Deploy HAProxy',
default: true,
alias: 'p',
type: 'boolean'
})

yargs.option('envoy-proxy', {
describe: 'Deploy Envoy proxy',
default: true,
alias: 'e',
type: 'boolean'
})

yargs.option('mirror-node', {
describe: 'Deploy mirror node',
default: true,
alias: 'm',
type: 'boolean'
})
yargs.option('hedera-explorer', {
describe: 'Deploy hedera explorer',
default: true,
alias: 'x',
type: 'boolean'
})
},
handler: argv => {
networkCmd.deploy(argv).then(r => {
if (!r) process.exit(1)
})
}
})
.demand(1, 'Select a network command')
}
}
}
}