DI BUILD SERVER
A BUILD SERVER that run on your infrastructure and its Command Line Interface (CLI) with developer-friendly commands - a must-have tool of DevOps engineers.
Developers should not be frustrated by deploying their apps to the infrastructure, or bothering the DevOps engineers to help deploying it, they should fully focus on developing apps, they don't need to understand the servers, the domains, or infrastructure related stuffs. That's when di
come, di
is your DevOps assistant.
| Build faster. Deploy easier. More flexible.
Installation
Prerequisites
Requires
Optional
Getting Started
git clone git@bitbucket.org:digitopvn/diginext-cli.git
cd /path/to/diginext-cli
./shells/install.sh
Next:
sudo npm link
diginext git login
diginext auth
Contributing
Hướng dẫn develop CLI
- Clone repo về máy cá nhân.
- Tách nhánh
master
về máy của mình: dev/{myusername}
- Develop tính năng mới.
Hướng dẫn test CLI
- Run CLI SERVER locally:
docker-compose -f docker-compose.build.yaml up --build
- Test command để deploy:
DEV_MODE=true diginext deploy [...]
Chuẩn bị cho việc release CLI new version:
-
Test test & test !!!
-
Chuẩn bị:
- Cập nhật
README.md
nếu có - Cập nhật
deploy_guide.md
nếu có - Cập nhật version mới trong
package.json
-
Build Docker & push lên DockerHub với lệnh bên dưới:
- BETA:
./shells/beta
(hoặc bash ./shells/beta4win
trên Windows) - OFFICIAL:
./shells/release
(hoặc bash ./shells/release4win
trên Windows)
-
Kiểm tra log xem có release thành công chưa.
-
Hoàn tất!
Deploy CLI SERVER lên DEV4 (BUILD SERVER)
- SSH vào DEV4
- Tìm tới directory:
/var/tools/diginext-cli
- (2.1. Backup file
docker-compose.yaml
trên server)
- Upload
docker-compose.yaml
vào /var/tools/diginext-cli
- Hạ CLI SERVER cũ xuống
docker-compose down
- Run CLI SERVER mới:
docker-compose up -d
- Kiểm tra lại: https://deploy.digitop.vn
Hướng dẫn start BUILD SERVER trên SERVER CENTOS mới
Tutorial
- Dùng
docker-compose.nginx.yaml
Autorenew SSL
chmod +x ssl_renew.sh
sudo crontab -e
- Chọn (2) /bin/nano
- Add cuối cùng: [check mỗi 5 phút]
*/5 * * * * /home/sammy/node_project/ssl_renew.sh >> /var/log/cron.log 2>&1
- Check xem cronjob có chạy không:
tail -f /var/log/cron.log
Build server
- Location: DEV4 (128.199.149.106)
- Domain: https://deploy.digitop.vn/
- Engine:
Docker Compose
- Directory:
/var/tools/diginext-cli
- Startup script:
docker-componse up -d
- Repositories (Cached):
/mnt/build
- Docker data:
/mnt/docker-data
- Clean up (flush cache to release disk space):
docker image prune -af --filter "until=168h"
(delete images which a week old)
Community and Support:
Join our community on Discord!
Suggest improvements and report problems.
Author: Boss Duy Nguyen duynguyen@wearetopgroup.com