openxtrem/ox-bundle-installer
Composer 安装命令:
composer create-project openxtrem/ox-bundle-installer
包简介
PHP Application to install OX Mediboard applications
README 文档
README
Description
A command application written in PHP to manage OX Mediboard software installations.
Installation
composer create-project openxtrem/ox-bundle-installer
Usage
bin/console [command] [arguments]
Available commands:
| Command | Description |
|---|---|
| auto-update | Run auto update process in a non-interactive mode |
| browse | Browse and display available bundles |
| build | Build bundle dependencies and assets |
| config | Load and validate configuration file |
| deploy | Deploy bundle from master directory to target servers directories |
| help | Display help for a command |
| install | Run sync, then build and finally deploy commands |
| list | List commands |
| sync | Synchronize bundle contents to local master directory |
Binary Requirements
| Binary | Version |
|---|---|
| php | 7.3 |
| composer | 2.0 |
| rsync | 3.1.3 |
| rclone | 1.56.0 |
The application config command allows to check those requirements.
Configuration
Create a configuration file, in the config directory named parameters.yml.
Use the config/parameters.yml-dist file as a template.
Remote authentication
OX-ERP
Authentication on OX-ERP is required to get information and statuses on bundles that are to be installed.
auth:
erp:
url: https://sample-erp.openxtrem.com
api_token: IdkIfThisIsGood
OX-Deploy
OX-Deploy is the alias for the server hosting the bundles.
Authentication on OX-Deploy is required to download the bundle contents locally.
oxdeploy:
url: sample.openxtrem.com
protocol: https
http_user: user
http_token: ToKeN
prefix: /var/www/deployment
transport_method: rclone
Two transport methods are available : rclone and rsync.
Parameters
protocol,http_user,http_tokenare only required when using therclonetransport method.The
rsyncmethod requires that the local server has access to the OX-Deploy server through the SSH protocol.
Bundle
A bundle is identified by its unique id.
bundle:
uuid: abcd1234-ef56-gh78-ij90-klmno12345
Though this parameter is not required to manually install a bundle, it is mandatory to be set so automatic updates can be performed.
Targets
master:
path: /var/master
name: prod
server_id: 1
instance:
name: INSTANCE_NAME
token_hash: 27dab2832d4568dfa8b60ab389398b893405f543
servers:
-
path: "/var/path_to/instance/a"
shortname: "Instance A"
id: 44
server_id: 1
web_path: "path_to/instance/a"
no_webserver: yes
-
path: "user@host:/var/path_to/instance/b"
shortname: "Instance B"
id: 44
server_id: 2
web_path: "path_to/instance/b"
Master
The master:path is the local path where bundles contents from the OX-Deploy server will be copied to.
This directory will be created locally if it does not exist yet and if permissions allow to do so.
Instance
The instance token_hash is an authentication token that must be valid to retrieve the instance status (valid, outdated, broken) from the webservers.
Servers
At least on server must be configured. Plus, every configured path must exist or be created manually (for both local and remote targets).
Development and testing
Set up a docker container for development using :
docker-compose up -d
docker exec -it ox-bundle-installer-app-1 bash
Project sources are mounted with a volume under
/var/www/htmlinside the container.
Inside the container :
# Install dependencies
composer install
Running tests
# Run tests
XDEBUG_MODE=coverage vendor/bin/phpunit
openxtrem/ox-bundle-installer 适用场景与选型建议
openxtrem/ox-bundle-installer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.46k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 07 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 openxtrem/ox-bundle-installer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 openxtrem/ox-bundle-installer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7.46k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2021-07-21