snelling/maestro
Composer 安装命令:
composer require snelling/maestro
包简介
Simple IT automation tool
README 文档
README
Maestro is a simple IT automation tool to run bash scripts against local or remote servers. It will automatically pipe all output from any script run into your terminal.
KRAMER: You know you hurt the Maestro's feelings.
JERRY: Oh what, because I didn't call him Maestro?
KRAMER: That's right.
JERRY: Ya know I feel a little funny calling somebody Maestro.
KRAMER: Why?
JERRY: Because it's a stupid thing to be called.
- Seinfeld, Season 7 Episode 3
Install
Via Composer
composer global require snelling/maestro
This is still a work in progress, and probably will need to be installed by hand until I have officially tagged this repository.
Usage
Go to any directory and init a new maestro project with the command maestro init
➜ maestro init Config file & scripts directory created!
This command will create a new maestro/ folder, and put a few things in there for you.
➜ tree maestro
maestro
├── configuration.json
└── scripts
├── ls
└── pwd
1 directory, 3 files
The maestro/configuration.json file is used to define targets. A target is a local or remote machine to run a command against.
{
"targets": {
"local": "127.0.0.1",
"web": "user@192.168.1.1"
}
}
You can list the available targets at any time by running maestro targets
➜ maestro targets
------- ------ -------------
Name User IP Address
------- ------ -------------
local 127.0.0.1
web user 192.168.1.1
------- ------ -------------
The maestro/scripts/ folder is where you will put any bash script that you would like to run against a target. By default we include two commands out of the box, ls and pwd. You can list all available scripts to run by running the command maestro scripts
➜ maestro scripts ------ ------------------------------------ Name Description ------ ------------------------------------ ls Runs ls -al command pwd Gets the current working directory ------ ------------------------------------
The name of the script is just the script filename. The description of the script is a bash comment inside the bash script. You need to add # @description <your description> to make a description show up in the maestro scripts command.
➜ cat maestro/scripts/ls #!/usr/bin/bash # @description Runs ls -al command set -e ls -al
Let's make a new script that gets a machine's hostname. Note how we include set -e at the top of the script to terminate output if there is an error.
➜ echo '#!/usr/bin/bash # @description Gets the hostname of the machine set -e hostname' >maestro/scripts/hostname
Then, we can verify it comes up as valid script by re-running the maestro scripts command.
➜ maestro scripts ---------- ------------------------------------ Name Description ---------- ------------------------------------ hostname Gets the hostname of the machine ls Runs ls -al command pwd Gets the current working directory ---------- ------------------------------------
Finally, you can run script against a target by running maestro run <script name> <target name>
➜ maestro run hostname local
Running script hostname on 127.0.0.1
[127.0.0.1]: localhost
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email sam@onroi.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
snelling/maestro 适用场景与选型建议
snelling/maestro 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 03 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Maestro」 「snelling」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 snelling/maestro 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 snelling/maestro 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 snelling/maestro 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CM Payment module for Magento 2
Laravel library to communicate with SIBS - Open Payment Platform.
⚠️ Deprecated – Maestro is now available as part of the new IAM SDK: https://developers.docusign.com/docs/sdks/ . The Docusign package makes integrating Docusign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-maestro-php-cli
Paymentsense Module for Magento 2 Open Source (Community Edition)
SilverStripe Payment Sisow Module for iDEAL, MisterCash, Sofort, Giropay, Bancontact, EPS, MasterCard, VisaCard, Maestro, Webshop Giftcard, Podium Giftcard, VVV Giftcard, ING Home Pay, PayPal, Focum, Klarna, Wire Transfer
Simple redis wrapper
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-23