This share Piplin (inspired by the “pipeline,” pronounced / ˈ p ɪ p ˌ l ɪ n/or / ˈ pa ɪ ˌ la ɪ n/p) is a free, open source continuous integration and deployment of the system, suitable for software related to the automated build, testing, and deployment of various application scenarios.
Introduction to Piplin
- Support PHP, Python, JAVA, Ruby and other projects to build, test and release
- Integration with Gitlab, Github, Gogs, Gitee(Oschina) and other code hosting platforms
- Flexible configuration of custom build and deployment steps
- Supports custom build rules to create releases and deploy builds
- Support multi-environment deployment for projects (you can create multiple environments for development, testing, pre-release, and production)
- Supports linkage deployment. For example, after the development environment is successfully deployed, the test environment is automatically triggered to start the deployment
- Service management supports the cabinet function, which can be bound to multiple deployment environments
- Supports project cloning
- The project supports multiple members
- The real-time tracking of project deployment status is realized through Websocket
- Service integration with support for Dingding bots, Slack, mail, and custom Webhooks
Piplin installation and use
一. Clone code
$ git clone https://github.com/Piplin/Piplin.git piplin
二. Install dependency packages
$ cd piplin
$ make
If a delay occurs during the installation, replace the npm image: npm config set registry
http://registry.npm.taobao.org/
三. Installing Piplin
$ make install
The Piplin installer will enter an interactive console, please follow the prompts to set the relevant parameters.
四. Point the root directory of the Web server to public/. Refer to the configuration files under examples/, which contain examples of Apache and Nginx configurations.
Note: examples/ provides only examples, and can not be used directly. You need to adjust the configuration according to the actual situation
五. disposition supervisord
Piplin uses supervisord for background process management. See examples/supervisor.conf for examples. The main configuration file of general supervisord is in
The/etc/supervisor/supervisord. Conf, its general content:
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
......
[include]
files = /etc/supervisor/conf.d/*.conf
Conceptual interpretation
- Build Agent: A remote server that performs build tasks, or it can be local.
- Cabinet: Servers are grouped and configured in the background. The project deployment environment can be associated with cabinets
- Output definition (Pattern): Determines the output rule of the build, such as app.tar.gz, indicating that you need to return the app.tar.gz output of the build to the host.
- Configuration file: During deployment operations, the configuration file is written to the remote server as a file. The configuration file must be bound to the deployment environment.
- Shared files/directories: is to establish a soft link in the remote server’s publishing directory, such as image upload, you do not need to deploy each time is an empty directory, this time you can establish a soft chain for persistence.
- Deployment Environment: A project can contain multiple deployment environments, such as development, test, pre-release, and production
- Remote server: The server to be deployed by the project
- Build plan: Where build tasks are performed, including build steps, build servers, and export definitions
- Deployment plan: where deployment tasks are executed, including deployment steps, deployment environment, configuration files, and shared files