{"id":14985722,"url":"https://github.com/meanstrong/deploy4s","last_synced_at":"2025-04-11T22:06:28.777Z","repository":{"id":53535248,"uuid":"124187700","full_name":"meanstrong/deploy4s","owner":"meanstrong","description":"A deploy tool for simple, standard, stable and speed","archived":false,"fork":false,"pushed_at":"2022-09-14T12:13:59.000Z","size":41,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T22:06:22.806Z","etag":null,"topics":["aws-codedeploy","python3","yml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meanstrong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-07T06:07:31.000Z","updated_at":"2022-09-14T12:09:59.000Z","dependencies_parsed_at":"2022-09-21T03:02:21.857Z","dependency_job_id":null,"html_url":"https://github.com/meanstrong/deploy4s","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanstrong%2Fdeploy4s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanstrong%2Fdeploy4s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanstrong%2Fdeploy4s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanstrong%2Fdeploy4s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meanstrong","download_url":"https://codeload.github.com/meanstrong/deploy4s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487715,"owners_count":21112191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-codedeploy","python3","yml"],"created_at":"2024-09-24T14:11:32.636Z","updated_at":"2025-04-11T22:06:28.749Z","avatar_url":"https://github.com/meanstrong.png","language":"Python","readme":"# Deploy4s - A deploy tool for simple, standard, stable and Speed\n\n![image](https://img.shields.io/badge/made_in-china-ff2121.svg)\n[![image](https://img.shields.io/pypi/v/deploy4s.svg)](https://pypi.org/project/deploy4s/)\n[![image](https://img.shields.io/pypi/l/deploy4s.svg)](https://pypi.org/project/deploy4s/)\n\n## About\n受启发于AWS CodeDeploy的自动化部署服务，抽取其中标准化部署功能实现的一个本地部署组件。[AWS CodeDeploy User Guide](https://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/welcome.html)\n- Deploy是一个自动化部署组件，能够让用户方便快速地将应用自动部署到目标机器上。通过部署流程的标准化和自动化，加快部署的速度，控制部署节奏，降低应用升级更新的复杂度，减少手工部署操作的错误和风险。最终使得用户能够在快速地发布新特性的同时保证部署的质量，避免部署过程中的服务中断。   \n- 传统应用代码和部署脚本是分离的，基于很多不同的部署工具开发，如Chef，Puppet，Ansible，或者开发人员自己写的Shell，Python部署脚本。随着DevOps理念的兴起，消除Dev和Ops之间的鸿沟，系统的开发和运维由一个自治团队全权负责，所以将代码与部署放在一起就非常自然，统一Dev和Ops的目标和部署。另外，将应用代码与部署脚本一体化，也简化了代码和部署脚本的管理，避免代码版本与部署脚本版本需要对应的问题。其实，这种设计也简化了用户的使用过程，不需要额外再做部署脚本版本的管理了。   \n- Deploy定义了一个基于事件部署流程接口，在接口定义中，定义多个部署文件拷贝源目标部署映射(files-\u003esource-\u003edestination)，以及部署中各个步骤及步骤之间的执行顺序(ApplicationStop-\u003eBeforeInstall-\u003eInstall-\u003eAfterInstall-\u003eApplicationStart-\u003e ValidateService)，各个步骤要执行的脚本。   \n- Deploy仅处理代码部署问题，并不处理应用配置管理，资源管理，环境管理以及之后的监控和恢复，伸缩等环节，用户想要实现系统的持续自动化部署，仍然需要自行集成开发，比如需要自行实现应用新版本的打包和上传，之后通过Deploy提供的相应API接口以及CLI将其集成到自己的开发流程，实现持续交付。   \n\n## Requirements\n- Python3\n- PyYAML\n\n## Install\n下载最新的Release包，通过pip命令安装：\n```shell\npip install deploy4s\n```\n或者通过下载源码包或clone代码至本地，然后通过如下命令安装：\n```shell\npython setup.py install\n```\n\n## Usage\n```shell\ndeploycli --bundle=http://server/example.zip\n```\n使用--help查看更多使用帮助。  \n--bundle参数指定zip包的路径，可以是本地文件路径也可以是HTTP地址。\n\n## Release\n- [deploy-0.0.1.zip](https://github.com/meanstrong/deploy/releases/download/v0.0.1/deploy-0.0.1.zip)\n\n## Limit\n与标准的AWS CodeDeploy相比，appspec.yml文件需要新增一个``workdir``参数，用于指定hooks中命令的执行Current Working Directory，其他参数配置可参考AWS CodeDeploy。\n\n## Example\n一个示例的appspec.yml文件如下所示：\n```yaml\nversion: 0.0\nos: linux\nworkdir: /app\nfiles:\n  - source: /\n    destination: /app\nhooks:\n  ApplicationStart:\n    - location: bin/start.sh\n  ApplicationStop:\n    - location: bin/stop.sh\n  BeforeInstall:\n    - location: bin/backup.sh\n  AfterInstall:\n    - location: chmod a+x bin -R\n```\n将该文件与待部署文件一起打成zip包（appspec.yml文件必须位于zip包顶层），将该zip包上传至HTTP server或待部署机器本地。\n在服务运行的机器上执行如下命令，即可将部署zip包文件部署到机器上，并停止、启动服务（与hooks中配置相关）：\n```shell\ndeploycli --bundle=http://server/example.zip\n```\n\n## Release History\n### 1.0.1(2019-05-07)\n- support for python3\n### 1.0.0(2018-09-22)\n- Birth\n\n## Author\n- \u003ca href=\"mailto:pmq2008@gmail.com\"\u003eRocky Peng\u003c/a\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeanstrong%2Fdeploy4s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeanstrong%2Fdeploy4s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeanstrong%2Fdeploy4s/lists"}