Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"cluster-create" now can create cluster without key pairs
- Loading branch information
Showing
4 changed files
with
51 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
package clustercreate | ||
|
||
import "gopkg.in/alecthomas/kingpin.v2" | ||
import ( | ||
"github.com/coldbrewcloud/coldbrew-cli/core" | ||
"gopkg.in/alecthomas/kingpin.v2" | ||
) | ||
|
||
type Flags struct { | ||
InstanceType *string `json:"instance_type"` | ||
InitialCapacity *uint16 `json:"initial_capacity"` | ||
NoKeyPair *bool `json:"no-keypair"` | ||
KeyPairName *string `json:"keypair_name"` | ||
InstanceProfile *string `json:"instance_profile"` | ||
ForceCreate *bool `json:"force"` | ||
} | ||
|
||
func NewFlags(kc *kingpin.CmdClause) *Flags { | ||
return &Flags{ | ||
InstanceType: kc.Flag("instance-type", "Container instance type").String(), | ||
InstanceType: kc.Flag("instance-type", "Container instance type").Default(core.DefaultContainerInstanceType()).String(), | ||
InitialCapacity: kc.Flag("instance-count", "Initial number of container instances").Default("1").Uint16(), | ||
KeyPairName: kc.Flag("key", "EC2 keypair name").String(), | ||
InstanceProfile: kc.Flag("instance-profile", "IAM instance profile name for container instances").String(), | ||
NoKeyPair: kc.Flag("disable-keypair", "Do not assign EC2 keypairs").Bool(), | ||
KeyPairName: kc.Flag("key", "EC2 keypair name").Default("").String(), | ||
InstanceProfile: kc.Flag("instance-profile", "IAM instance profile name for container instances").Default("").String(), | ||
ForceCreate: kc.Flag("yes", "Create all resource with no confirmation").Short('y').Default("false").Bool(), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters