Skip to content

Commit

Permalink
Merge pull request #77 from jamesiarmes/cli-example-output
Browse files Browse the repository at this point in the history
Added example output to cli documentation.
  • Loading branch information
nickveenhof committed Mar 11, 2016
2 parents 3c352f9 + 516b52c commit 9442d9b
Showing 1 changed file with 89 additions and 8 deletions.
97 changes: 89 additions & 8 deletions docs/user-guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Example:
Output:

```shell
my-service-staging
my-service-dev-user1
my-service-dev-user2
my-service-prod
```

## Create
Expand All @@ -39,12 +43,26 @@ Create a new environment.
Example:

```shell
./bin/environment create --name my-service-staging --verbose
./bin/environment create --name my-service-staging
```

Output:

```shell
[ ✓ ] [ 0m 0s ] Loading stack parameters file '/home/user/project/cloud_formation/parameters/my-service-staging.yml'.
[ ✓ ] [ 0m 0s ] Setting stack parameter overrides:
[ ✓ ] [ 0m 0s ] ArtifactBucket: my-service-staging
[ ✓ ] [ 0m 0s ] AvailabilityZone1: us-east-1a
[ ✓ ] [ 0m 0s ] AvailabilityZone2: us-east-1d
[ ✓ ] [ 0m 0s ] DesiredCapacity: 1
[ ✓ ] [ 0m 1s ] Created CloudFormation Stack my-service-staging.
[ ✓ ] [ 4m 49s ] CloudFormation Stack my-service-staging successfully created.
[ ✓ ] [ 0m 0s ] Created CodeDeploy Application my-service-staging.
[ ✓ ] [ 0m 1s ] Created CodeDeploy Deployment Group my-service-staging.
[ ✓ ] [ 0m 1s ] AutoScaling Group up to capacity!
[ ✓ ] [ 0m 0s ] Build script bin/build.sh exited successfully!
[ ✓ ] [ 0m 1s ] Uploaded s3://my-service-staging/my-service-staging-1457657945.tar.gz successfully.
[ ✓ ] [ 0m 49s ] Deployment d-UNF7JW2KE completed successfully!
```


Expand All @@ -67,12 +85,17 @@ Options:
Example:

```shell
./bin/environment create --name my-service-staging --verbose
./bin/environment update --name my-service-staging
```

Output:

```shell
[ ✓ ] [ 0m 1s ] Initiated update for CloudFormation Stack my-service-staging.
[ ✓ ] [ 6m 11s ] CloudFormation Stack my-service-staging successfully updated.
[ ✓ ] [ 0m 0s ] CodeDeploy Application my-service-staging already exists.
[ ✓ ] [ 0m 0s ] CodeDeploy CodeDeploy Deployment Group my-service-staging already exists.
[ ✓ ] [ 0m 1s ] AutoScaling Group up to capacity!
```

## Status
Expand All @@ -88,12 +111,47 @@ Get the status of an existing environment.
Example:

```shell
./bin/environment create --name my-service-staging --verbose
./bin/environment status --name my-service-staging
```

Output:

```shell
┌─ CodeDeploy Application: my-service-staging
│ Application and Deployment Group are configured correctly.
└──
CloudFormation Stack my-service-staging exists.
┌─ Stack Parameters
│ ArtifactBucket: my-service-bucket (overridden)
│ AvailabilityZone1: us-east-1a (overridden)
│ AvailabilityZone2: us-east-1d (overridden)
│ DesiredCapacity: 1 (overridden)
├─ Stack Outputs
│ URL: http://sample-LoadBala-VA232FB9FWFZ-1573168493.us-east-1.elb.amazonaws.com
├─ ASG: AutoScalingGroup
│ Name: my-service-staging-AutoScalingGroup-104IA9X5MF7GH
│ Using ELB health checks, with a 600s health check grace period.
│ Desired Capacity is 1 (Min: 1, Max: 5).
│ Has 1 Load Balancer(s): sample-LoadBala-VA232FB9FWFZ
├── Instances
│ i-5607c6cd 52.90.68.26 InService Healthy 0d 0h 8m 11s (launch config up to date)
├── Recent Activity
│ 2016-03-11 01:07:59 UTC Terminating EC2 instance: i-73fe99f7 Successful 100%
│ 2016-03-11 01:03:26 UTC Launching a new EC2 instance: i-5607c6cd Successful 100%
│ 2016-03-11 00:58:03 UTC Launching a new EC2 instance: i-73fe99f7 Successful 100%
└──
```


Expand All @@ -110,12 +168,15 @@ Create a build from the working directory, and deploy it.
Example:

```shell
./bin/environment create --name my-service-staging --verbose
./bin/environment deploy-code --name my-service-staging
```

Output:

```shell
[ ✓ ] [ 0m 1s ] Build script bin/build.sh exited successfully!
[ ✓ ] [ 0m 1s ] Uploaded s3://my-service-staging/my-service-staging-1457658789.tar.gz successfully.
[ ✓ ] [ 1m 28s ] Deployment d-PFMNSB5KE completed successfully!
```

## Build Version
Expand All @@ -132,12 +193,14 @@ Requires a version name parameter.
Example:

```shell
./bin/environment create --name my-service-staging --verbose
./bin/environment build-version 1.0.0 --name my-service-staging
```

Output:

```shell
[ ✓ ] [ 0m 0s ] Build script bin/build.sh exited successfully!
[ ✓ ] [ 0m 1s ] Uploaded s3://my-service-staging/1.0.0.tar.gz successfully.
```

## Deploy Version
Expand All @@ -154,12 +217,13 @@ Requires a version name parameter.
Example:

```shell
./bin/environment create --name my-service-staging --verbose
./bin/environment deploy-version 1.0.0 --name my-service-staging
```

Output:

```shell
[ ✓ ] [ 1m 0s ] Deployment d-M4FY304KE completed successfully!
```

## Delete
Expand All @@ -176,12 +240,15 @@ Delete an existing environment.
Example:

```shell
./bin/environment create --name my-service-staging --verbose
./bin/environment delete --name my-service-staging
```

Output:

```shell
[ ✓ ] [ 0m 1s ] Initiated deletion of CloudFormation Stack my-service-staging.
[ ✓ ] [ 11m 50s ] CloudFormation Stack my-service-staging successfully deleted.
[ ✓ ] [ 0m 0s ] Deleted CodeDeploy Application 'my-service-staging'.
```

## Doctor
Expand All @@ -197,10 +264,24 @@ For example, if you are using a deployment_mechanism that is using S3, it will c
Example:

```shell
./bin/environment create --name my-service-staging --verbose
./bin/environment doctor --name my-service-staging
```

Output:

```shell
Stack
✓ CloudFormation template found at '/home/user/project/cloud_formation/my-service.json'.
✓ CloudFormation template is valid.

Script
✓ Script 'bin/build.sh' exists.

S3Bucket
✓ Bucket 'my-service-staging' exists.
✓ Bucket is writable, new builds can be uploaded.

CodeDeploy
✓ CodeDeployRole exists.
✓ Resource 'AutoScalingGroup' exists in the CloudFormation template.
```

0 comments on commit 9442d9b

Please sign in to comment.