Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a progress tracker during deployments #1742

Closed
efekarakus opened this issue Dec 7, 2020 · 1 comment
Closed

Display a progress tracker during deployments #1742

efekarakus opened this issue Dec 7, 2020 · 1 comment
Labels
type/design Issues that are design proposals. type/enhancement Issues that are improvements for existing features.

Comments

@efekarakus
Copy link
Contributor

Hi everyone!

Background

Copilot already provides a progress tracker for env init that is both [transparent], [educational]:

⠸ Creating the infrastructure for the test environment. 
- Virtual private cloud on 2 availability zones to hold your services     [Complete]
  - Internet gateway to connect the network to the internet               [Complete]
  - Public subnets for internet facing services                           [Complete]
  - Private subnets for services that can't be reached from the internet  [Complete]
  - Routing tables for services to talk with each other                   [Complete]
- ECS Cluster to hold your services                                       [Complete]

We'd like to [scale]a similar UX for our remaining commands.

Proposal

We’re proposing to display a progress tracker that’s similar to env init. Each stack resource will be rendered with a human-friendly description and status, but in a flat hierarchy.

⠧ Deploying service frontend to environment test               [In Progress]                10.0s
  - Listener to forward "/path" requests to the TG             [Not started]        
  ⠧ Target group to connect the LB and ECS Service             [In Progress]                10.0s
  ✔ Task definition to define your containers                  [Completed]                  5.6s
  ⠧ ECS Service to maintain your containers                    [In Progress]                10.0s

      Deployments       Pending     Stopped    Running      Desired
      Primary                 1           2          1            4
      Active                  0           3          1            4
      
      Stopped Tasks     Reason
      2 (9e460ae,       Task failed ELB health checks in
      zh82sd3, ...)     (target-group
                        arn:aws:elasticloadbalancing:us-      
                        west-2:615288112214:targetgroup/nginx
                        Targe-16DD4KDLKAI7U/a6d71c9b9c18b389)
                        
  ⠧ Upgrading your environment stack                           [In Progress]                10.0s
     ⠧ ALB to distribute traffic to your svcs                  [In Progress]                10.0s
  ⠧ Addons stack for additional AWS resources                  [In Progress]                10.0s
     ⠧ Aurora serverless "api" database                        [In Progress]                10.0s
     ⠧ Secret manager secret for username and password         [In Progress]                10.0s

The following resources will get a special view component:

  • If the resource being updated is the EnvControllerAction, then under it we will display stack events from the environment stack.
  • If the resource being updated is the AddonsStack, then we will display stack events from the addons stack under it.
  • Finally, if the resource being updated is of type AWS::ECS::Service,*then we will display deployment activities as illustrated above.

Milestones

  1. Display progress only for stack events
    1. Decouple ChangeSets creation from execution for deployments.
    2. Stream CloudFormation stack events due to a ChangeSet execution.
    3. Provide a text box component to display a StackResource event.
      ⠧ Deploying service frontend to environment test               [In Progress]                10.0s
      
    4. Provide a Stack to display all stack events.
      ⠧ Deploying service frontend to environment test               [In Progress]                10.0s
        - Listener to forward "/path" requests to the TG             [Not started]        
        ⠧ Target group to connect the LB and ECS Service             [In Progress]                10.0s
      
  2. Display progress of Addons stack
    ⠧ Addons stack for additional AWS resources                  [In Progress]                10.0s
       ⠧ Aurora serverless "api" database                        [In Progress]                10.0s
       ⠧ Secret manager secret for username and password         [In Progress]                10.0s
    
  3. Display progress of EnvControllerAction
    ⠧ Upgrading your environment stack                           [In Progress]                10.0s
       ⠧ ALB to distribute traffic to your svcs                  [In Progress]                10.0s
    
  4. Display progress of ECS deployment
    1. Count progress table
      Deployments       Pending     Stopped    Running      Desired
      Primary                 1           2          1            4
      Active                  0           3          1            4
      
    2. Status reason table
      Stopped Tasks     Reason
      2 (9e460ae,       Task failed ELB health checks in
      zh82sd3, ...)     (target-group
                        arn:aws:elasticloadbalancing:us-      
                        west-2:615288112214:targetgroup/nginx
                        Targe-16DD4KDLKAI7U/a6d71c9b9c18b389)
      
    3. Recommend follow up actions by error reason
@efekarakus efekarakus added type/enhancement Issues that are improvements for existing features. type/design Issues that are design proposals. labels Dec 7, 2020
@efekarakus efekarakus changed the title Displaying a progress tracker during deployments Display a progress tracker during deployments Dec 7, 2020
@kohidave kohidave pinned this issue Dec 8, 2020
mergify bot pushed a commit that referenced this issue Dec 10, 2020
)

Add a `stream` package that allows clients to subscribe their channel for new cloudformation stack events.

A typical client will use this package like this:
```go
streamer := &stream.StackStreamer{ } // Define your streamer.
streamer.Subscribe(channels...)      // Assign all channels that want to receive notifications.
go stream.Stream(ctx, streamer)      // Start streaming.
```

Related #1742

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
@efekarakus
Copy link
Contributor Author

@efekarakus efekarakus unpinned this issue Feb 10, 2021
thrau pushed a commit to localstack/copilot-cli-local that referenced this issue Dec 9, 2022
…s#1747)

Add a `stream` package that allows clients to subscribe their channel for new cloudformation stack events.

A typical client will use this package like this:
```go
streamer := &stream.StackStreamer{ } // Define your streamer.
streamer.Subscribe(channels...)      // Assign all channels that want to receive notifications.
go stream.Stream(ctx, streamer)      // Start streaming.
```

Related aws#1742

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/design Issues that are design proposals. type/enhancement Issues that are improvements for existing features.
Projects
None yet
Development

No branches or pull requests

1 participant