Skip to main content

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
  1. Developer pushes code to GitHub
  2. Monitor script checks GitHub every 2 minutes
  3. Detects new commits by comparing hashes
  4. Automatically pulls and deploys to production
  5. Respects .deployignore patterns
  6. Copies .env file
  7. Runs post-deploy hooks
  8. 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 .env files 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

eeveon-0.3.6.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eeveon-0.3.6-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

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

Hashes for eeveon-0.3.6.tar.gz
Algorithm Hash digest
SHA256 f2fccc5c0205eba4783605ddb04ef47a54144b6d2cb9b8a6cfec17385e423c60
MD5 4656e2132ddc6c339d39123779495bf0
BLAKE2b-256 35bef2a53fb8ee2f6a6ebcd10c6fb24ef51b5a65dc7ba7ef0c7d692270c30ec0

See more details on using hashes here.

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

Hashes for eeveon-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b7e7a2ef9a48f0a0cf53436d934011cfdc7f29fd4a0596638e9c35575347ea3d
MD5 38e07433381b01c13001cb1a853b1fd6
BLAKE2b-256 608499078314adafc150bce02173764a30827fd0b0ec93adbcbf4f4230ab23e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page