Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yyoda committed Nov 1, 2022
1 parent 8ec9365 commit 7abeb52
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cd ./cmd/deployman && go build
```

# Requirements
- Requires `AWS_ACCESS_KEY/AWS_SECRET_ACCESS_KEY` or `AWS_PROFILE` environment variables.
- Requires `AWS_ACCESS_KEY/AWS_SECRET_ACCESS_KEY` or `AWS_PROFILE`, and `AWS_REGION` environment variables.
- You will need `deployman.json` in the same location as the deploynam The contents are as follows.

```json
Expand Down Expand Up @@ -269,8 +269,8 @@ Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--config="./deployman.json" [OPTIONAL] Configuration file path. By default, this value is './deployman.json'. If this file does not exist, an error will occur.
--verbose [OPTIONAL] A detailed log containing call stacks will be error messages.
--blue=BLUE Traffic weight for blue TargetGroup
--green=GREEN Traffic weight for green TargetGroup
--blue=BLUE [REQUIRED] Traffic weight for blue TargetGroup
--green=GREEN [REQUIRED] Traffic weight for green TargetGroup
```
### ec2 autoscaling
Expand All @@ -283,10 +283,10 @@ Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--config="./deployman.json" [OPTIONAL] Configuration file path. By default, this value is './deployman.json'. If this file does not exist, an error will occur.
--verbose [OPTIONAL] A detailed log containing call stacks will be error messages.
--target=TARGET Target type of AutoScalingGroup. Valid values are either 'blue' or 'green'. The 'ec2 status' command allows you to check the target details.
--desired=-1 DesiredCapacity
--min=-1 MinSize
--max=-1 MaxSize
--target=TARGET [REQUIRED] Target type of AutoScalingGroup. Valid values are either 'blue' or 'green'. The 'ec2 status' command allows you to check the target details.
--desired=-1 [OPTIONAL] DesiredCapacity
--min=-1 [OPTIONAL] MinSize
--max=-1 [OPTIONAL] MaxSize
```
### ec2 move-scheduled-actions
Expand All @@ -299,6 +299,6 @@ Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--config="./deployman.json" [OPTIONAL] Configuration file path. By default, this value is './deployman.json'. If this file does not exist, an error will occur.
--verbose [OPTIONAL] A detailed log containing call stacks will be error messages.
--from=FROM Name of AutoScalingGroup
--to=TO Name of AutoScalingGroup
--from=FROM [REQUIRED] Name of AutoScalingGroup
--to=TO [REQUIRED] Name of AutoScalingGroup
```
16 changes: 8 additions & 8 deletions cmd/deployman/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ var (
ec2swapDuration = ec2swap.Flag("duration", "[OPTIONAL] Time to wait until traffic is completely swapped. Default is '0s'. If this value is set to '60s', the B/G traffic is distributed 50:50 and waits for 60 seconds. After that, the B/G traffic will be completely swapped.").Default("0s").Duration()

ec2traffic = ec2.Command("traffic", "Update the traffic of the respective target group of B/G to any value. You can check the current status with the 'ec2 status' command.")
ec2trafficBlueWeight = ec2traffic.Flag("blue", "Traffic weight for blue TargetGroup").Required().Int32()
ec2trafficGreenWeight = ec2traffic.Flag("green", "Traffic weight for green TargetGroup").Required().Int32()
ec2trafficBlueWeight = ec2traffic.Flag("blue", "[REQUIRED] Traffic weight for blue TargetGroup").Required().Int32()
ec2trafficGreenWeight = ec2traffic.Flag("green", "[REQUIRED] Traffic weight for green TargetGroup").Required().Int32()

ec2autoscaling = ec2.Command("autoscaling", "Update the capacity of any AutoScalingGroup.")
ec2autoscalingTarget = ec2autoscaling.Flag("target", "Target type of AutoScalingGroup. Valid values are either 'blue' or 'green'. The 'ec2 status' command allows you to check the target details.").Required().Enum("blue", "green")
ec2autoscalingDesired = ec2autoscaling.Flag("desired", "DesiredCapacity").Default("-1").Int32()
ec2autoscalingMinSize = ec2autoscaling.Flag("min", "MinSize").Default("-1").Int32()
ec2autoscalingMaxSize = ec2autoscaling.Flag("max", "MaxSize").Default("-1").Int32()
ec2autoscalingTarget = ec2autoscaling.Flag("target", "[REQUIRED] Target type of AutoScalingGroup. Valid values are either 'blue' or 'green'. The 'ec2 status' command allows you to check the target details.").Required().Enum("blue", "green")
ec2autoscalingDesired = ec2autoscaling.Flag("desired", "[OPTIONAL] DesiredCapacity").Default("-1").Int32()
ec2autoscalingMinSize = ec2autoscaling.Flag("min", "[OPTIONAL] MinSize").Default("-1").Int32()
ec2autoscalingMaxSize = ec2autoscaling.Flag("max", "[OPTIONAL] MaxSize").Default("-1").Int32()

ec2moveScheduledActions = ec2.Command("move-scheduled-actions", "Move ScheduledActions that exist in any AutoScalingGroup to another AutoScalingGroup.")
ec2moveScheduledActionsFrom = ec2moveScheduledActions.Flag("from", "Name of AutoScalingGroup").Required().String()
ec2moveScheduledActionsTo = ec2moveScheduledActions.Flag("to", "Name of AutoScalingGroup").Required().String()
ec2moveScheduledActionsFrom = ec2moveScheduledActions.Flag("from", "[REQUIRED] Name of AutoScalingGroup").Required().String()
ec2moveScheduledActionsTo = ec2moveScheduledActions.Flag("to", "[REQUIRED] Name of AutoScalingGroup").Required().String()
)

func main() {
Expand Down

0 comments on commit 7abeb52

Please sign in to comment.