承接 continuousphp/deploy-agent 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

continuousphp/deploy-agent

Composer 安装命令:

composer create-project continuousphp/deploy-agent

包简介

Deploy agent for continuousphp

README 文档

README

Master :
Master branch status
Develop :
Develop branch status

Automated deployment agent to install on your servers.

It manages automated deployment workflows based on webhooks for your projects.

Requirements

  • PHP 5.5+
  • PHP mcrypt extension
  • sqlite or other doctrine compatible SGBD (sqlite is currently the only one officially supported)

⚠️ the PHP sqlite extension is not installed by default.

Installation by Docker ( Container Service )

You can use our Docker image as a container service. The container is isolated from the rest of your Server and you have not to worry about server dependencies or security.

Thanks to report to Docker-Hub documentation.

Installation by Composer

  • Download Composer: curl -sS https://getcomposer.org/composer.phar -o composer.phar
  • Install the Deploy Agent: php composer.phar create-project continuousphp/deploy-agent
  • Start using the agent: cd deploy-agent && ./agent

HTTP server config

To setup apache, setup a virtual host that points to the public/ directory of the project and you should be ready to go! It should be something similar to:

<VirtualHost *>
    DocumentRoot /path/to/deploy-agent/public
    <Directory /path/to/deploy-agent/public>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Also enable apache mod rewrite in order to support webhook routes

a2enmod rewrite

Usage

List your applications

./agent list applications

Create an application

./agent add application [--provider=] [--token=] [--repository-provider=] [--repository=] [--pipeline=] [--name=] [--path=]
  • --provider The application provider to use (currently, continuousphp is the only supported application provider)
  • --token A valid token to consume the provider API (ie: continuousphp API token)
  • --repository-provider The repository provider to use (ie: git-hub, bitbucket...)
    (for continuousphp only)
  • --repository The repository key to use (ie: continuousphp/deploy-agent)
  • --pipeline The pipeline to use (ie: refs/heads/master)
    (for continuousphp only)
  • --name The name of the application
  • --path The destination path of the application

Token

The token depends on the Provider. At this time, the continousphp API is the only one supported. You can retrieve your personal token on your Profile page at continuousphp.com/profile

Deploy an application

./agent deploy application [--name=] [--build=]
  • --name The name of the application
  • --build The ID of the build to deploy

Application path

When a deployment occurs, the Deploy Agent creates a new folder for every build in its dedicated workspace. To enable the new build, it will create/update a symlink to the current build

[application-path]
        |
        +---[/current] (symlink to current build)
        |
        +---[/build-1]
        |
        +---[/build-2]

Hooks

During the deployment workflow the Deploy Agent can execute project specific commands through hooks to define in a continuous.yml file as following:

# continuous.yml
deployment:
  hooks:
    AfterInstall:
      - command: echo 'the application is successfully installed'
    BeforeActivate:
      - command: echo 'the application is going to start'
    AfterActivate:
      - command: echo 'the application has started'

Webhook setup

The URL of the hook to implement in continuousphp is <baseuri>/webhook/continuousphp. Configure it as following: continuousphp setup

Events

  • AfterInstall : triggered just after the application package has been extracted
  • BeforeActivate : triggered just before the symlink update
  • AfterActivate : triggered just after the symlink update

Contributing

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Feel free to fork the project, create a feature branch, and send us a pull request!

continuousphp/deploy-agent 适用场景与选型建议

continuousphp/deploy-agent 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 93 次下载、GitHub Stars 达 15, 最近一次更新时间为 2016 年 06 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「build」 「tool」 「deployment」 「Agent」 「continuousphp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 continuousphp/deploy-agent 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 continuousphp/deploy-agent 我们能提供哪些服务?
定制开发 / 二次开发

基于 continuousphp/deploy-agent 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 15
  • Watchers: 10
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-06-22