Lightweight bash-based CI/CD pipeline for automatic deployment from GitHub
Project description
EEveon - Lightweight CI/CD Pipeline
A bash-based continuous deployment system that automatically deploys code from GitHub to your production server.
Features
- ๐ Automatic Deployment - Polls GitHub every 2 minutes for new commits
- ๐ Blue-Green Strategy - Zero-downtime deployments with health checks and atomic swapping
- ๐ Encrypted Secrets - Securely manage environment variables using AES-128 encryption
- ๐ค Manual Approvals - Pause deployments for critical environments until authorized
- ๐ RBAC & Auth - Role-based access control for multiple users
- ๐ช Post-Deploy Hooks - Run custom scripts after deployment
- ๐ Comprehensive Logging - Track all deployments with automatic rotation
- ๐ฆ System Health - Diagnostic tool to ensure server readiness
Installation
git clone https://github.com/adarsh-crypto/eeveon.git
cd eeveon
./install.sh
source ~/.bashrc
Quick Start
1. Initialize a Pipeline
eeveon init \
--repo https://github.com/username/repo.git \
--name myproject \
--path /var/www/myproject \
--branch main
2. Configure (Optional)
cd ~/Desktop/github/eeveon/deployments/myproject
# Create .deployignore
cat > .deployignore << EOF
.git
node_modules
*.log
EOF
# Create .env
cat > .env << EOF
NODE_ENV=production
DATABASE_URL=postgresql://localhost/db
EOF
# Create post-deploy hook
mkdir -p hooks
cat > hooks/post-deploy.sh << 'EOF'
#!/bin/bash
npm install --production
pm2 restart myapp
EOF
chmod +x hooks/post-deploy.sh
3. Start Monitoring
eeveon start myproject -f # Run in foreground
# OR
eeveon start myproject # Get systemd service instructions
CLI Commands
| Command | Description |
|---|---|
eeveon init |
Initialize a new deployment pipeline |
eeveon list |
List all configured pipelines |
eeveon start <project> |
Start monitoring a pipeline |
eeveon stop <project> |
Stop a running pipeline |
eeveon deploy <project> |
Trigger immediate deployment |
eeveon logs [project] |
View deployment logs |
eeveon remove <project> |
Remove a pipeline configuration |
eeveon secrets set <p> <k> <v> |
Encrypt and store a secret |
eeveon approve <project> |
Authorize a pending deployment |
eeveon check |
Verify system dependencies |
eeveon vacuum |
Clean up old log files |
How It Works
Developer โ Git Push โ GitHub โ EEveon Monitor โ Auto Deploy โ Production
- Developer pushes code to GitHub
- Monitor script checks GitHub every 2 minutes
- Detects new commits by comparing hashes
- Automatically pulls and deploys to production
- Respects
.deployignorepatterns - Copies
.envfile - Runs post-deploy hooks
- Logs everything
Configuration Files
.deployignore
Specify files/patterns to exclude from deployment:
.git
.gitignore
node_modules
__pycache__
*.pyc
*.log
.env.template
.env
Environment variables for your application:
NODE_ENV=production
DATABASE_URL=postgresql://user:pass@localhost/db
API_KEY=your-secret-key
PORT=3000
hooks/post-deploy.sh
Custom script to run after deployment:
#!/bin/bash
cd /var/www/myproject
npm install --production
pm2 restart myapp
Examples
Deploy a Node.js Application
eeveon init \
--repo git@github.com:user/nodeapp.git \
--name nodeapp \
--path /var/www/nodeapp
# Create post-deploy hook
cat > ~/Desktop/github/eeveon/deployments/nodeapp/hooks/post-deploy.sh << 'EOF'
#!/bin/bash
cd /var/www/nodeapp
npm install --production
pm2 restart nodeapp || pm2 start server.js --name nodeapp
EOF
chmod +x ~/Desktop/github/eeveon/deployments/nodeapp/hooks/post-deploy.sh
eeveon start nodeapp -f
Deploy a Static Website
eeveon init \
--repo https://github.com/user/static-site.git \
--name mysite \
--path /var/www/html/mysite
eeveon start mysite -f
Deploy a Python Flask App
eeveon init \
--repo git@github.com:user/flaskapp.git \
--name flaskapp \
--path /var/www/flaskapp
# Create post-deploy hook
cat > ~/Desktop/github/eeveon/deployments/flaskapp/hooks/post-deploy.sh << 'EOF'
#!/bin/bash
cd /var/www/flaskapp
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
sudo systemctl restart flaskapp
EOF
chmod +x ~/Desktop/github/eeveon/deployments/flaskapp/hooks/post-deploy.sh
eeveon start flaskapp -f
Running as a Service
To run the monitor as a systemd service:
# Start the pipeline to generate service file
eeveon start myproject
# Install as systemd service
sudo cp /tmp/eeveon-myproject.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable eeveon-myproject
sudo systemctl start eeveon-myproject
# Check status
sudo systemctl status eeveon-myproject
# View logs
sudo journalctl -u eeveon-myproject -f
Directory Structure
eeveon/
โโโ bin/
โ โโโ eeveon # Main CLI tool
โโโ scripts/
โ โโโ monitor.sh # Monitoring script
โ โโโ deploy.sh # Deployment script
โโโ config/
โ โโโ pipeline.json # Pipeline configurations
โโโ deployments/
โ โโโ <project-name>/
โ โโโ repo/ # Cloned repository
โ โโโ .env # Environment variables
โ โโโ .deployignore # Ignore patterns
โ โโโ hooks/
โ โโโ post-deploy.sh
โโโ logs/
โ โโโ deploy-YYYY-MM-DD.log
โโโ install.sh # Installation script
โโโ README.md
Requirements
- Git
- jq (JSON processor)
- rsync
- Python 3.6+
- Bash 4.0+
All dependencies will be installed by install.sh if missing.
Troubleshooting
Pipeline not detecting changes
# Check if monitor is running
ps aux | grep monitor.sh
# Check logs
eeveon logs myproject -n 50
# Manually trigger deployment
eeveon deploy myproject
Permission issues
# Ensure deployment path is writable
sudo chown -R $USER:$USER /var/www/myproject
# Check script permissions
chmod +x ~/Desktop/github/eeveon/scripts/*.sh
chmod +x ~/Desktop/github/eeveon/bin/eeveon
Git authentication issues
For private repositories, set up SSH keys:
# Generate SSH key
ssh-keygen -t ed25519 -C "your_email@example.com"
# Add to GitHub
cat ~/.ssh/id_ed25519.pub
# Copy and add to GitHub Settings > SSH Keys
# Use SSH URL in pipeline
eeveon init --repo git@github.com:username/repo.git ...
Advanced Usage
Multiple Environments
# Production
eeveon init --repo https://github.com/user/app.git \
--name app-prod --path /var/www/app --branch main
# Staging
eeveon init --repo https://github.com/user/app.git \
--name app-staging --path /var/www/app-staging --branch develop
Custom Poll Interval
# Check every 30 seconds
eeveon init --interval 30 ...
# Check every 5 minutes
eeveon init --interval 300 ...
Security Notes
- โ ๏ธ Never commit
.envfiles to Git - โ ๏ธ Use SSH keys for private repositories
- โ ๏ธ Ensure deployment paths have proper permissions
- โ ๏ธ Review post-deploy hooks before running
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Author
Adarsh
Support
For issues or questions, check the logs:
eeveon logs -n 100
Or open an issue on GitHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eeveon-0.3.6.tar.gz.
File metadata
- Download URL: eeveon-0.3.6.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2fccc5c0205eba4783605ddb04ef47a54144b6d2cb9b8a6cfec17385e423c60
|
|
| MD5 |
4656e2132ddc6c339d39123779495bf0
|
|
| BLAKE2b-256 |
35bef2a53fb8ee2f6a6ebcd10c6fb24ef51b5a65dc7ba7ef0c7d692270c30ec0
|
File details
Details for the file eeveon-0.3.6-py3-none-any.whl.
File metadata
- Download URL: eeveon-0.3.6-py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7e7a2ef9a48f0a0cf53436d934011cfdc7f29fd4a0596638e9c35575347ea3d
|
|
| MD5 |
38e07433381b01c13001cb1a853b1fd6
|
|
| BLAKE2b-256 |
608499078314adafc150bce02173764a30827fd0b0ec93adbcbf4f4230ab23e7
|