Upgrade tool for 0.1 -> 0.2.1 (#320)

Allows dumping v0.1 state to a json file and restoring it into a new v0.2.1 fission installation.

Usage guide is at: /Documentation/docs-site/content/upgrade-from-v0.1.md
This commit is contained in:
Soam Vasani
2017-09-11 18:31:36 -07:00
committed by GitHub
parent 787396e904
commit 4287d14000
5 changed files with 567 additions and 15 deletions
+6
View File
@@ -122,6 +122,11 @@ func main() {
{Name: "list", Usage: "List all watches", Flags: []cli.Flag{}, Action: wList},
}
upgradeFileFlag := cli.StringFlag{Name: "file", Usage: "JSON file containing all fission state"}
upgradeSubCommands := []cli.Command{
{Name: "dump", Usage: "Dump all state from a v0.1 fission installation", Flags: []cli.Flag{upgradeFileFlag}, Action: upgradeDumpState},
{Name: "restore", Usage: "Restore state dumped from a v0.1 install into a v0.2 install", Flags: []cli.Flag{upgradeFileFlag}, Action: upgradeRestoreState},
}
app.Commands = []cli.Command{
{Name: "function", Aliases: []string{"fn"}, Usage: "Create, update and manage functions", Subcommands: fnSubcommands},
{Name: "httptrigger", Aliases: []string{"ht", "route"}, Usage: "Manage HTTP triggers (routes) for functions", Subcommands: htSubcommands},
@@ -129,6 +134,7 @@ func main() {
{Name: "mqtrigger", Aliases: []string{"mqt", "messagequeue"}, Usage: "Manage message queue triggers for functions", Subcommands: mqtSubcommands},
{Name: "environment", Aliases: []string{"env"}, Usage: "Manage environments", Subcommands: envSubcommands},
{Name: "watch", Aliases: []string{"w"}, Usage: "Manage watches", Subcommands: wSubCommands},
{Name: "upgrade", Aliases: []string{}, Usage: "Upgrade tool from fission v0.1", Subcommands: upgradeSubCommands},
}
app.Run(os.Args)