diff --git a/Makefile b/Makefile index d7078d1..1d1902e 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ WINDOWS=$(EXECUTABLE)_windows.exe LINUX=$(EXECUTABLE)_linux DARWIN=$(EXECUTABLE)_darwin VERSION=$(shell cat VERSION) -XPKG="github.com/jyny/outliner/pkg/cmd" +XPKG="github.com/jyny/outliner/command" all : build shell_completion cp ./build/outliner_$(shell go env GOOS) ./outliner @@ -19,7 +19,7 @@ build : mod embedded fmt env GOOS=windows GOARCH=amd64 go build -o ./build/$(WINDOWS) -ldflags="-X $(XPKG).version=$(VERSION)" . embedded : - @pushd pkg/agent > /dev/null && \ + @pushd pkg/deployer/ssh > /dev/null && \ go run gen/gen.go \ && popd > /dev/null diff --git a/README.md b/README.md index cb9bc6e..cc6f7de 100644 --- a/README.md +++ b/README.md @@ -24,17 +24,17 @@ Flags: Use "outliner [command] --help" for more information about a command. ``` + --- ## Contents - [Install or Download](#install-or-download) - [Mac OSX](#mac-osx) - - [Download binary from latest release](#download-binary-from-latest-release) + - [Download release from GitHub](#download-release-from-github) - [Setup](#setup) - [1. Get `API_TOKEN`](#1-get-api_token) - [2. Make a `.env` config file](#2-make-a-env-config-file) - - [3. Generate ssh key](#3-generate-ssh-key) - - [4. Ready to go](#4-ready-to-go) + - [3. Ready to go](#3-ready-to-go) - [Configurations](#configurations) - [config by `.env` file](#config-by-env-file) - [config by Environment Variables](#config-by-environment-variables) @@ -43,8 +43,6 @@ Use "outliner [command] --help" for more information about a command. - [Support Cloud(IaaS)](#support-cloudiaas) - [Development and Build](#development-and-build) ---- - ## Install or Download ### Mac OSX ``` @@ -61,8 +59,8 @@ $ brew install jyny/tap/outliner # apt isntall outliner ``` -### Download binary from latest release -[https://github.com/Jyny/outliner/releases/latest](https://github.com/Jyny/outliner/releases/latest) +### Download release from GitHub +Visit the [latest releases page](https://github.com/Jyny/outliner/releases/latest) ## Setup #### 1. Get `API_TOKEN` @@ -77,26 +75,15 @@ TOKEN_NAME_2 = TOKEN_VALUE_2 ... ``` -#### 3. Generate SSH key -outliner will generate ssh key, if Not found `id_rsa` and `id_rsa.pub` in `$HOME/.ssh/`. -run any command in outliner will do this after asking. -``` -$ outliner help -Continue to Generate New ssh key? (y/n) [y]: -``` -To generate key by yourself, see [Generating a new SSH key and adding it to the ssh-agent](https://help.github.com/en/enterprise/2.16/user/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) - -#### 4. Ready to go -##### * install by package manager like `homeberw` `pacman` `apt` etc. +#### 3. Ready to go +* install by package manager like `homeberw` `pacman` `apt` etc. 1. `$ outliner` -##### * install by download +* install by download 1. open terminal, go directory whrere you download outliner 2. maybe should add execute permission to binary (linux or mac) 3. `$ ./outliner_{OS}` ---- - ## Configurations ### config by `.env` file * `~/.outliner/.env` @@ -120,6 +107,7 @@ $ {TOKEN_NAME_1}={TOKEN_VALUE_1} outliner [command] | Digitalocean | | | Vultr | | + find full list in `pkg/cloud/{ProviderNmae}/activator.go` as below ``` var tokenNames = []string{ @@ -131,7 +119,6 @@ var tokenNames = []string{ ### Support configuration source outliner Support the following configuration source (list by Precedence order) - 1. with flag `-F, --file {FILE_PATH}` 2. Environment variables 3. `.env` file at `~/.outliner/` @@ -144,8 +131,6 @@ outliner Support the following configuration source (list by Precedence order) * Vultr (WIP) ... ---- - ## Development and Build #### 1. install package and build binary ``` diff --git a/pkg/cmd/create.go b/command/create.go similarity index 95% rename from pkg/cmd/create.go rename to command/create.go index 93273f5..970899c 100644 --- a/pkg/cmd/create.go +++ b/command/create.go @@ -1,4 +1,4 @@ -package cmd +package command import ( "github.com/spf13/cobra" @@ -18,7 +18,7 @@ func init() { viper.BindPFlag("spec", createCmd.Flags().Lookup("spec")) viper.BindPFlag("region", createCmd.Flags().Lookup("region")) viper.BindPFlag("provider", createCmd.Flags().Lookup("provider")) - rootCmd.AddCommand(createCmd) + RootCmd.AddCommand(createCmd) } var createCmd = &cobra.Command{ @@ -49,7 +49,7 @@ var createCmd = &cobra.Command{ } util.PrintCreateInstanceDone() util.PrintInstancesTable([]ol.Instance{inst}) - viper.Set("ip", inst.IPv4) + viper.Set("deploy_ip", inst.IPv4) }, PostRun: func(cmd *cobra.Command, args []string) { if util.ContinueInteractive() { diff --git a/pkg/cmd/deploy.go b/command/deploy.go similarity index 77% rename from pkg/cmd/deploy.go rename to command/deploy.go index 3f89318..73801ef 100644 --- a/pkg/cmd/deploy.go +++ b/command/deploy.go @@ -1,4 +1,4 @@ -package cmd +package command import ( "github.com/spf13/cobra" @@ -10,8 +10,8 @@ import ( func init() { deployCmd.Flags().StringP("ip", "i", "", "IP address of Server (required)") deployCmd.MarkFlagRequired("ip") - viper.BindPFlag("ip", deployCmd.Flags().Lookup("ip")) - rootCmd.AddCommand(deployCmd) + viper.BindPFlag("deploy_ip", deployCmd.Flags().Lookup("ip")) + RootCmd.AddCommand(deployCmd) } var deployCmd = &cobra.Command{ @@ -22,7 +22,7 @@ var deployCmd = &cobra.Command{ util.PrintDeployInstanceStart() }, Run: func(cmd *cobra.Command, args []string) { - ip := viper.GetString("ip") + ip := viper.GetString("deploy_ip") err := deployer.DeployService(ip) if err != nil { panic(err) @@ -33,13 +33,11 @@ var deployCmd = &cobra.Command{ panic(err) } util.PrintDeployInstanceDone() - inst, err := cloud.GetInstanceIDbyIP(ip) - if err != nil { - panic(err) - } - viper.Set("id", inst.ID) + viper.Set("inspect_ip", ip) + }, PostRun: func(cmd *cobra.Command, args []string) { + inspectCmd.PreRun(inspectCmd, []string{}) inspectCmd.Run(inspectCmd, []string{}) }, } diff --git a/pkg/cmd/destroy.go b/command/destroy.go similarity index 94% rename from pkg/cmd/destroy.go rename to command/destroy.go index 9d20589..ee098b1 100644 --- a/pkg/cmd/destroy.go +++ b/command/destroy.go @@ -1,4 +1,4 @@ -package cmd +package command import ( "github.com/spf13/cobra" @@ -12,7 +12,7 @@ func init() { destroyCmd.Flags().StringP("id", "i", "", "ID of Server (required)") destroyCmd.MarkFlagRequired("id") viper.BindPFlag("destroy_id", destroyCmd.Flags().Lookup("id")) - rootCmd.AddCommand(destroyCmd) + RootCmd.AddCommand(destroyCmd) } var destroyCmd = &cobra.Command{ diff --git a/command/inspect.go b/command/inspect.go new file mode 100644 index 0000000..5bed087 --- /dev/null +++ b/command/inspect.go @@ -0,0 +1,38 @@ +package command + +import ( + "github.com/spf13/cobra" + "github.com/spf13/viper" + + ol "github.com/jyny/outliner/pkg/outliner" + "github.com/jyny/outliner/pkg/util" +) + +func init() { + inspectCmd.Flags().StringP("ip", "i", "", "IP address of Server (required)") + inspectCmd.MarkFlagRequired("ip") + viper.BindPFlag("inspect_ip", inspectCmd.Flags().Lookup("ip")) + RootCmd.AddCommand(inspectCmd) +} + +var inspectCmd = &cobra.Command{ + Use: "inspect", + Short: "inspect Server", + Long: `inspect Server`, + PreRun: func(cmd *cobra.Command, args []string) { + ip := viper.GetString("inspect_ip") + inst, err := cloud.InspectInstanceByIP(ip) + if err == nil { + util.PrintInstancesTable([]ol.Instance{inst}) + } + }, + Run: func(cmd *cobra.Command, args []string) { + ip := viper.GetString("inspect_ip") + apicert, err := deployer.GetServiceCert(ip) + if err != nil { + panic(err) + } + util.PrintAPICertTable(apicert) + util.PrintAPICertJSON(apicert) + }, +} diff --git a/pkg/cmd/list.go b/command/list.go similarity index 97% rename from pkg/cmd/list.go rename to command/list.go index 9e9f827..9f95cbe 100644 --- a/pkg/cmd/list.go +++ b/command/list.go @@ -1,4 +1,4 @@ -package cmd +package command import ( "github.com/spf13/cobra" @@ -12,7 +12,7 @@ func init() { listCmd.AddCommand(specCmd) listCmd.AddCommand(regineCmd) listCmd.AddCommand(providerCmd) - rootCmd.AddCommand(listCmd) + RootCmd.AddCommand(listCmd) } var listCmd = &cobra.Command{ diff --git a/pkg/cmd/root.go b/command/root.go similarity index 81% rename from pkg/cmd/root.go rename to command/root.go index 156cfb2..210b192 100644 --- a/pkg/cmd/root.go +++ b/command/root.go @@ -1,4 +1,4 @@ -package cmd +package command import ( "os/user" @@ -7,13 +7,16 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/jyny/outliner/pkg/agent" ol "github.com/jyny/outliner/pkg/outliner" "github.com/jyny/outliner/pkg/util" - //"github.com/jyny/outliner/pkg/cloud/digitalocean" + // deployer agnet + "github.com/jyny/outliner/pkg/deployer/ssh" + + // cloud provider "github.com/jyny/outliner/pkg/cloud/linode" //"github.com/jyny/outliner/pkg/cloud/vultr" + //"github.com/jyny/outliner/pkg/cloud/digitalocean" ) // Persistent Flags @@ -24,23 +27,23 @@ var version = "" var cloud = ol.NewCloud() var deployer = ol.NewDeployer() -var rootCmd = &cobra.Command{ +// RootCmd commands +var RootCmd = &cobra.Command{ Use: "outliner", Short: "Auto setup & deploy tool for outline VPN server", Long: "Auto setup & deploy tool for outline VPN server", } -var RootCmd = rootCmd // Execute entry of commandline func Execute() { - if err := rootCmd.Execute(); err != nil { + if err := RootCmd.Execute(); err != nil { panic(err) } } func init() { cobra.OnInitialize(initOutliner) - rootCmd.PersistentFlags().StringVarP(&cfgFile, "file", "F", "", "config file (default is $HOME/.outliner/.env)") + RootCmd.PersistentFlags().StringVarP(&cfgFile, "file", "F", "", "config file (default is $HOME/.outliner/.env)") u, err := user.Current() if err != nil { @@ -69,15 +72,17 @@ func init() { } func initOutliner() { - // add new agent to deployer - deployer.Init(agent.New()) + // register deployer agent + deployer.RegisterAgent( + ssh.NewAgent(), + ) // Activate & register cloud providers err := cloud.RegisterProvider( util.Validater, - //digitalocean.Activator{}, linode.Activator{}, //vultr.Activator{}, + //digitalocean.Activator{}, ) if err != nil { panic(err) diff --git a/pkg/cmd/version.go b/command/version.go similarity index 86% rename from pkg/cmd/version.go rename to command/version.go index 96a4923..c6430a9 100644 --- a/pkg/cmd/version.go +++ b/command/version.go @@ -1,4 +1,4 @@ -package cmd +package command import ( "github.com/spf13/cobra" @@ -7,7 +7,7 @@ import ( ) func init() { - rootCmd.AddCommand(versionCmd) + RootCmd.AddCommand(versionCmd) } var versionCmd = &cobra.Command{ diff --git a/completion/gen.go b/completion/gen.go index 1d2e83f..de25d9a 100644 --- a/completion/gen.go +++ b/completion/gen.go @@ -1,15 +1,15 @@ package main import ( - "github.com/jyny/outliner/pkg/cmd" + "github.com/jyny/outliner/command" ) func main() { - err := cmd.RootCmd.GenBashCompletionFile("build/outliner_bash_completion") + err := command.RootCmd.GenBashCompletionFile("build/outliner_bash_completion") if err != nil { panic(err) } - err = cmd.RootCmd.GenZshCompletionFile("build/outliner_zsh_completion") + err = command.RootCmd.GenZshCompletionFile("build/outliner_zsh_completion") if err != nil { panic(err) } diff --git a/main.go b/main.go index a2d176e..2263a2e 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/jyny/outliner/pkg/cmd" + "github.com/jyny/outliner/command" "log" ) @@ -12,5 +12,5 @@ func main() { } }() - cmd.Execute() + command.Execute() } diff --git a/pkg/cmd/inspect.go b/pkg/cmd/inspect.go deleted file mode 100644 index 970f52f..0000000 --- a/pkg/cmd/inspect.go +++ /dev/null @@ -1,36 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - - ol "github.com/jyny/outliner/pkg/outliner" - "github.com/jyny/outliner/pkg/util" -) - -func init() { - inspectCmd.Flags().StringP("id", "i", "", "ID of Server (required)") - inspectCmd.MarkFlagRequired("id") - viper.BindPFlag("id", inspectCmd.Flags().Lookup("id")) - rootCmd.AddCommand(inspectCmd) -} - -var inspectCmd = &cobra.Command{ - Use: "inspect", - Short: "inspect Server", - Long: `inspect Server`, - Run: func(cmd *cobra.Command, args []string) { - id := viper.GetString("id") - inst, err := cloud.InspectInstance(id) - if err != nil { - panic(err) - } - apicert, err := deployer.GetServiceCert(inst.IPv4) - if err != nil { - panic(err) - } - util.PrintInstancesTable([]ol.Instance{inst}) - util.PrintAPICertTable(apicert) - util.PrintAPICertJSON(apicert) - }, -} diff --git a/pkg/agent/ssh.go b/pkg/deployer/ssh/agent.go similarity index 98% rename from pkg/agent/ssh.go rename to pkg/deployer/ssh/agent.go index 042b6bd..04f630c 100644 --- a/pkg/agent/ssh.go +++ b/pkg/deployer/ssh/agent.go @@ -1,4 +1,4 @@ -package agent +package ssh import ( "bufio" @@ -14,7 +14,7 @@ import ( "github.com/pkg/sftp" "golang.org/x/crypto/ssh" - "github.com/jyny/outliner/pkg/agent/consts" + "github.com/jyny/outliner/pkg/deployer/ssh/consts" ol "github.com/jyny/outliner/pkg/outliner" ) diff --git a/pkg/agent/consts/consts.go b/pkg/deployer/ssh/consts/consts.go similarity index 52% rename from pkg/agent/consts/consts.go rename to pkg/deployer/ssh/consts/consts.go index 32c1b5a..da049cc 100644 --- a/pkg/agent/consts/consts.go +++ b/pkg/deployer/ssh/consts/consts.go @@ -1,17 +1,17 @@ package consts +// VariableName for gen vfsdata +const VariableName = "Script" + // DeployScriptPath for gen vfsdata -const DeployScriptPath = "./script/" +const DeployScriptPath = "script" // ScriptName for gen vfsdata -const ScriptName = "./deploy.sh" - -// VariableName for gen vfsdata -const VariableName = "Script" +const ScriptName = "deploy.sh" // PackageName for gen vfsdata -const PackageName = "agent" +const PackageName = "ssh" // ssh key path -const SSHKeyPubPath = "/.ssh/id_rsa.pub" -const SSHKeyPvtPath = "/.ssh/id_rsa" +const SSHKeyPubPath = ".outliner/sshkey.pub" +const SSHKeyPvtPath = ".outliner/sshkey" diff --git a/pkg/agent/gen/gen.go b/pkg/deployer/ssh/gen/gen.go similarity index 84% rename from pkg/agent/gen/gen.go rename to pkg/deployer/ssh/gen/gen.go index f71997d..a7e364b 100644 --- a/pkg/agent/gen/gen.go +++ b/pkg/deployer/ssh/gen/gen.go @@ -4,7 +4,7 @@ import ( "github.com/shurcooL/vfsgen" "net/http" - "github.com/jyny/outliner/pkg/agent/consts" + "github.com/jyny/outliner/pkg/deployer/ssh/consts" ) func main() { diff --git a/pkg/agent/new.go b/pkg/deployer/ssh/new.go similarity index 87% rename from pkg/agent/new.go rename to pkg/deployer/ssh/new.go index d4a0143..941b4e1 100644 --- a/pkg/agent/new.go +++ b/pkg/deployer/ssh/new.go @@ -1,4 +1,4 @@ -package agent +package ssh import ( "crypto/rand" @@ -13,12 +13,11 @@ import ( "path/filepath" "strings" - "github.com/jyny/outliner/pkg/agent/consts" + "github.com/jyny/outliner/pkg/deployer/ssh/consts" ol "github.com/jyny/outliner/pkg/outliner" - "github.com/jyny/outliner/pkg/util" ) -func New() ol.Agent { +func NewAgent() ol.Agent { certok := true u, _ := user.Current() @@ -49,14 +48,10 @@ func New() ol.Agent { } func genNewCredential() (pub string, pvt string) { - if !util.ContinueKeyGen() { - util.PrintByeNoKey() - os.Exit(1) - } u, _ := user.Current() savePrivateFileTo := filepath.Join(u.HomeDir, consts.SSHKeyPvtPath) savePublicFileTo := filepath.Join(u.HomeDir, consts.SSHKeyPubPath) - os.MkdirAll(filepath.Join(u.HomeDir, "/.ssh/"), os.ModePerm) + os.MkdirAll(filepath.Join(u.HomeDir, "/.outliner/"), os.ModePerm) bitSize := 4096 privateKey, err := generatePrivateKey(bitSize) @@ -97,7 +92,7 @@ func generatePrivateKey(bitSize int) (*rsa.PrivateKey, error) { return nil, err } - log.Println("[Generating] Private Key generated") + log.Println("[Initializing] Private Key generated") return privateKey, nil } @@ -129,7 +124,7 @@ func generatePublicKey(privatekey *rsa.PublicKey) ([]byte, error) { pubKeyBytes := ssh.MarshalAuthorizedKey(publicRsaKey) - log.Println("[Generating] Public key generated") + log.Println("[Initializing] Public key generated") return pubKeyBytes, nil } @@ -140,6 +135,6 @@ func writeKeyToFile(keyBytes []byte, saveFileTo string) error { return err } - log.Printf("[Generating] Key saved to: %s", saveFileTo) + log.Printf("[Initializing] Key saved to: %s", saveFileTo) return nil } diff --git a/pkg/agent/script/deploy.sh b/pkg/deployer/ssh/script/deploy.sh similarity index 100% rename from pkg/agent/script/deploy.sh rename to pkg/deployer/ssh/script/deploy.sh diff --git a/pkg/agent/script_vfsdata.go b/pkg/deployer/ssh/script_vfsdata.go similarity index 97% rename from pkg/agent/script_vfsdata.go rename to pkg/deployer/ssh/script_vfsdata.go index 69f93f6..8847e6b 100644 --- a/pkg/agent/script_vfsdata.go +++ b/pkg/deployer/ssh/script_vfsdata.go @@ -1,6 +1,6 @@ // Code generated by vfsgen; DO NOT EDIT. -package agent +package ssh import ( "bytes" @@ -19,11 +19,11 @@ var Script = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo{ name: "/", - modTime: time.Date(2019, 9, 3, 12, 39, 13, 0, time.UTC), + modTime: time.Date(2019, 9, 5, 2, 50, 31, 0, time.UTC), }, "/deploy.sh": &vfsgen۰CompressedFileInfo{ name: "deploy.sh", - modTime: time.Date(2019, 9, 3, 12, 39, 13, 0, time.UTC), + modTime: time.Date(2019, 9, 5, 2, 50, 31, 0, time.UTC), uncompressedSize: 376, compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x90\xb1\x4e\xc4\x30\x0c\x86\xf7\x3e\x85\x75\xea\x70\x37\xa4\xde\x19\x58\x60\x81\x05\x24\x1e\xa0\xca\xa5\x26\x89\x68\x92\x62\x3b\x74\x00\xde\x1d\x5d\xaf\x14\x55\x8c\xfe\xf5\xfb\xd3\xa7\xff\xb5\x66\xa7\xb1\x64\x88\x59\xd4\x8e\x63\x3f\x14\xf7\x46\x7c\x3c\xc1\x67\x03\x00\xe0\x2a\x8f\x60\xe4\x05\x82\xea\x24\x37\x88\x9e\xb4\xbb\x76\x3a\x57\x12\xc2\x17\x48\x68\xbe\x9b\xe6\x1f\xa8\x54\x1d\x63\xa6\x95\x73\xb6\x12\xc0\x38\x38\xb4\xc7\xd9\x93\x82\x79\x7f\x32\x1b\x93\xed\xdc\xf9\xa8\xa1\x9e\xab\x10\xbb\x92\x95\xb2\x2e\xf8\xc7\xe8\xc5\xce\xe6\xae\x0c\x84\x2b\xd0\x08\xf1\x07\x31\x26\x2b\x4a\x8c\xc2\x0e\xaf\x49\x9f\x6c\xb6\x9e\x18\x7f\x0d\xc4\x71\x9c\x54\xfe\xee\xa5\xd6\x49\x38\x1d\x76\xc6\x33\x47\xa5\xfe\xf9\xe1\x7e\x75\x25\x17\x0a\xb4\x2d\xdc\x02\x6a\x9a\x70\x8a\xc3\xae\x9e\x6c\xcc\xdb\x3e\xdb\xef\x72\xed\x47\xdc\x45\xab\xfd\x85\x74\x01\xfc\x04\x00\x00\xff\xff\x4e\xc8\x2c\x54\x78\x01\x00\x00"), diff --git a/pkg/outliner/cloud.go b/pkg/outliner/cloud.go index b2e72f6..4cab595 100644 --- a/pkg/outliner/cloud.go +++ b/pkg/outliner/cloud.go @@ -90,8 +90,8 @@ func (c Cloud) WaitInstance(in Instance) error { return c.pool[in.Provider].WaitInstance(in) } -// GetInstanceIDbyIP Inspect Instance -func (c *Cloud) GetInstanceIDbyIP(IP string) (Instance, error) { +// InspectInstanceByIP Inspect Instance +func (c *Cloud) InspectInstanceByIP(IP string) (Instance, error) { for _, prvder := range c.pool { insts, err := prvder.ListInstance() if err != nil { @@ -106,8 +106,8 @@ func (c *Cloud) GetInstanceIDbyIP(IP string) (Instance, error) { return Instance{}, errors.New("Instance Not Found") } -// InspectInstance Inspect Instance -func (c *Cloud) InspectInstance(ID string) (Instance, error) { +// InspectInstanceByID Inspect Instance +func (c *Cloud) InspectInstanceByID(ID string) (Instance, error) { for _, prvder := range c.pool { insts, err := prvder.ListInstance() if err != nil { diff --git a/pkg/outliner/const.go b/pkg/outliner/consts.go similarity index 100% rename from pkg/outliner/const.go rename to pkg/outliner/consts.go diff --git a/pkg/outliner/deployer.go b/pkg/outliner/deployer.go index e3ab5f7..da5f8d0 100644 --- a/pkg/outliner/deployer.go +++ b/pkg/outliner/deployer.go @@ -7,8 +7,8 @@ type Deployer struct { agent Agent } -// Init deployer cert init -func (d *Deployer) Init(agent Agent) { +// RegisterAgent Register Agent to deployer +func (d *Deployer) RegisterAgent(agent Agent) { d.agent = agent } diff --git a/pkg/util/printer.go b/pkg/util/printer.go index cca7dfc..ea3f9f2 100644 --- a/pkg/util/printer.go +++ b/pkg/util/printer.go @@ -137,10 +137,6 @@ func PrintAPICertJSON(in ol.APICert) { fmt.Println() } -func PrintByeNoKey() { - fmt.Println("Comback when your ssh key Ready") -} - func PrintCreateInstanceStart() { log.Println("[Creating Server]") } diff --git a/pkg/util/prompter.go b/pkg/util/prompter.go index bd71ab6..ef4dd7c 100644 --- a/pkg/util/prompter.go +++ b/pkg/util/prompter.go @@ -13,7 +13,3 @@ func ContinueInteractive() bool { fmt.Println("This is same as `./outliner deploy -i {SERVER_IP}`.") return prompter.YN("Do you want to continue to Auto Deploying", true) } - -func ContinueKeyGen() bool { - return prompter.YN("Continue to Generate New ssh key?", true) -}