ibrows/be-simple-deployment-bundle
Composer 安装命令:
composer require ibrows/be-simple-deployment-bundle
包简介
Symfony2 applications deployment made easy
关键字:
README 文档
README
Up to date thanks to jonaswouters
A few words
###Description
- Deploy your project usinc rsync (must be installed) in ssh mode.
- Setup deployment on many servers.
- Easily create rules for rsync (ignore / force files).
- Schedule commands to run on ditant server via ssh (SSH2 PHP extension required).
###Links
- Stable releases : https://github.com/besimple/DeploymentBundle
- Nightly builds : https://github.com/jfsimon/DeploymentBundle
- Rest documentation : will come later
###Requirements
- Rsync package : http://samba.anu.edu.au/rsync/
- SSH2 extension : http://fr.php.net/manual/en/book.ssh2.php
How to install
-
Get the sources via GIT
-
Use clone method if not using GIT for your project
git clone git://github.com/besimple/DeploymentBundle.git vendor/BeSimple/DeploymentBundle
-
Use submodule method if this is the case
git submodule add git://github.com/besimple/DeploymentBundle.git vendor/BeSimple/DeploymentBundle
-
-
Register bundle in
AppKernelclass// app/AppKernel.php $bundles = array( // ... new BeSimple\DeploymentBundle\BeSimpleDeploymentBundle(), // ... ); -
Add
besimple_deploymententry to your config file# app/config.yml be_simple_deployment: rsync: ~ ssh: ~ rules: ~ commands: ~ servers: ~ -
Add
BeSimplenamespace to autoload// app/autoload.php $loader->registerNamespaces(array( // ... 'BeSimple' => __DIR__.'/../vendor', // ... ));
How to configure
###An example
be_simple_deployment:
rsync:
delete: true
rules:
eclipse:
ignore: [.settings, .buildpath, .project]
netbeans:
ignore: [nbproject]
phpstorm:
ignore: [.idea]
git:
ignore: [.git, .git*]
svn:
ignore: [.svn]
symfony:
ignore: [/app/cache/*, /app/logs/*, /app/config/parameters.yml, /web/bundles/*, /web/uploads/*, /web/js/*, /web/css/*]
hosting:
ignore: [/.htaccess, /.htpasswd, /web/.htaccess, /web/.user.ini, /web/manage.php, /web/phpinfo.php, /web/ntunnel_mysql.php]
system:
ignore: [._*, .DS_Store]
commands:
cache_clear:
type: symfony
command: cache:clear
assetic_dump:
type: symfony
command: assetic:dump
assets_install:
type: symfony
command: assets:install
ssh:
connect_methods:
server_to_client:
crypt: rijndael-cbc@lysator.liu.se, aes256-cbc, aes192-cbc, aes128-cbc, 3des-cbc, blowfish-cbc, cast128-cbc, arcfour
client_to_server:
crypt: rijndael-cbc@lysator.liu.se, aes256-cbc, aes192-cbc, aes128-cbc, 3des-cbc, blowfish-cbc, cast128-cbc, arcfour
servers:
dev:
host: dev.server.ch
username: username
pubkey_file: %deploy_dev_pubkey_file%
privkey_file: %deploy_dev_privkey_file%
passphrase: %deploy_dev_passphrase%
path: /home/user/www/dev.project.com/
rules: [eclipse, netbeans, phpstorm, git, svn, symfony, hosting, system]
commands: [cache_clear, assetic_dump, assets_install]
symfony_command: php -c web/.user.ini app/console --env=dev
prod:
host: prod.server.ch
username: username
pubkey_file: %deploy_prod_pubkey_file%
privkey_file: %deploy_prod_privkey_file%
passphrase: %deploy_prod_passphrase%
path: /home/user/www/prod.project.com/
rules: [eclipse, netbeans, phpstorm, git, svn, symfony, hosting, system]
commands: [cache_clear_dev, assetic_dump, assets_install]
symfony_command: php -c web/.user.ini app/console --env=prod
How to use
###Using the commands
The simpliest way to deploy your application is to use the command line, go into your project root folder and type the following commands :
# Test your deployment :
./app/console deployment:test [server]
# Launch your deployment :
./app/console deployment:launch [server]
You can use the verbose option (-v) to get all feedback from rsync and
remote ssh commands.
###Using the service
You can also use the deployment feature within your controller by invoking the 'deployment' service :
// Test your deployment :
$this->get('besimple_deployment')->test([$server]);
// Launch your deployment :
$this->get('besimple_deployment')->launch([$server]);
You can connect many events to know what's happening.
###Deployer events
- onDeploymentStart : fired on deployment start.
- onDeploymentSuccess : fired on deployment success.
###Rsync events
- onDeploymentRsyncStart : fired when rsync is started.
- onDeploymentRsyncFeedback : fired on each rsync
stdoutorstderrline. - onDeploymentRsyncSuccess : fired on rsync success.
###SSH events
- onDeploymentSshStart : fired when SSH command run.
- onDeploymentSshFeedback : fired on each SSH
stdoutorstderrline. - onDeploymentSshSuccess : fired on SSH command success.
ibrows/be-simple-deployment-bundle 适用场景与选型建议
ibrows/be-simple-deployment-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 33.08k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2012 年 12 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「deploy」 「deployment」 「ibrows」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ibrows/be-simple-deployment-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ibrows/be-simple-deployment-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ibrows/be-simple-deployment-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Manage Sonata Form, Data, List and ShowMapper over annotations
Automated deployment template for Laravel Envoy based on Capistrano.
Morpht Development Tools
blueways deployer recipes
The Laragoon utility package
A Highly Opinionated Symfony3/4 Deployer Recipe
统计信息
- 总下载量: 33.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-12-28