sfolador/ecs-manage 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sfolador/ecs-manage

最新稳定版本:1.0

Composer 安装命令:

composer require sfolador/ecs-manage

包简介

Easily manage your ECS Cluster with this simple artisan command

README 文档

README

Easily manage your ECS Cluster with this simple artisan command

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package allows you to easily manage your ECS Cluster with a simple artisan command.

Requirements

You can use this package with Laravel 10.x, and you should have the AWS CLI installed and configured.

Please check if your AWS CLI is configured with the correct region and credentials.
Refer to this link: https://docs.aws.amazon.com/cli/v1/userguide/install-macos.html if you need more information on that specific subject.

Installation

You can install the package via composer:

composer require sfolador/ecs-manage

You can publish the config file with:

php artisan vendor:publish --tag="ecs-manage-config"

This is the contents of the published config file:

return [
     
     'environments' => [
        'staging',
        'production',
    ],
    
     'default_terminal' => 'iTerm'
];

Usage

php artisan ecs:manage

you will see an output that looks like this:

Select a cluster [mycluster-ecs]:
[0] mycluster-ecs

You should select the cluster you want to use. After selecting a cluster you should select and "environment":

 Select an environment:
  [0] staging
  [1] production

These options can be customized in the config file and will act as a filter on services. Once you select an "environment", you will see a list of services that match the selected "environment".

So, for example, if you selected "staging", the list of services will be:

This works very well if you have a naming convention for your services.

Select a service [sfolador-zero-staging-FARGATE]:
  [0 ] sfolador-zero-staging-FARGATE
  [1 ] sfolador-one-staging-FARGATE
  [2 ] sfolador-two-staging-FARGATE
  [3 ] sfolador-three-staging-EC2

Select a service and you will see a list of tasks that match the selected service:

 Select a task [xxxxxxxxxxxxxx]:
  [0] xxxxxxxxxxxxxx

Once you select a task, a terminal window will open and will try to connect to the selected task. The command that will launched in the terminal window is:

aws ecs execute-command --region SELECTED_AWS_REGION  --cluster SELECTED_CLUSTER --task SELECTED_TASK --command \"/bin/sh\" --interactive

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-12