All Projects → jesalg → Slimjim

jesalg / Slimjim

Licence: mit
SlimJim is a simple auto update script utilizing Slim (a PHP micro-framework), incron (inotify cron system), and GitHub/BitBucket post-receive-hook

Projects that are alternatives of or similar to Slimjim

Inertia
✈️ Effortless, self-hosted continuous deployment for small teams and projects
Stars: ✭ 133 (+35.71%)
Mutual labels:  deployment, continuous-deployment
build-plugin-template
Template repository to create new Netlify Build plugins.
Stars: ✭ 26 (-73.47%)
Mutual labels:  deployment, continuous-deployment
Build
Netlify Build runs the build command, Build Plugins and bundles Netlify Functions.
Stars: ✭ 135 (+37.76%)
Mutual labels:  deployment, continuous-deployment
Devtron
Software Delivery Workflow For Kubernetes
Stars: ✭ 130 (+32.65%)
Mutual labels:  deployment, continuous-deployment
Ssh Deploy
GitHub Action for deploying code via rsync over ssh
Stars: ✭ 272 (+177.55%)
Mutual labels:  deployment, continuous-deployment
Rocket
Automated software delivery as fast and easy as possible 🚀
Stars: ✭ 217 (+121.43%)
Mutual labels:  deployment, continuous-deployment
ci-docker-image
A Docker Image meant for use with CI/CD pipelines
Stars: ✭ 23 (-76.53%)
Mutual labels:  deployment, continuous-deployment
workflow-webhook
A Github workflow action to call a webhook with payload data from the event. Support for JSON or URL encoded endpoints.
Stars: ✭ 90 (-8.16%)
Mutual labels:  deployment, continuous-deployment
kuzgun
simple, ssh based deployment tool
Stars: ✭ 16 (-83.67%)
Mutual labels:  deployment, continuous-deployment
portainer-stack-utils
CLI client for Portainer
Stars: ✭ 66 (-32.65%)
Mutual labels:  deployment, continuous-deployment
Lightning Sites
☁️ Lightning deployment for your ~/Sites folders
Stars: ✭ 8 (-91.84%)
Mutual labels:  deployment, continuous-deployment
Flubucore
A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.
Stars: ✭ 695 (+609.18%)
Mutual labels:  deployment, continuous-deployment
Hapistrano
Deploy tool for Haskell applications, like Capistrano for Rails
Stars: ✭ 91 (-7.14%)
Mutual labels:  deployment, continuous-deployment
Dyn365 Ce Devops
DevOps for Dynamics 365 Customer Engagement (CE) is becoming a popular topic. The goal of this project is to help Dynamics 365 CE solution builders understand and accelerate their implementation of DevOps practices with Dynamics CE and VSTS.
Stars: ✭ 82 (-16.33%)
Mutual labels:  continuous-deployment
Nomadfiles
A collection of Nomad job files for deploying applications to a cluster
Stars: ✭ 89 (-9.18%)
Mutual labels:  continuous-deployment
Php Backslasher
[Git hook] Tool to add all PHP internal functions and constants to its namespace by adding backslash to them.
Stars: ✭ 79 (-19.39%)
Mutual labels:  git-hooks
Surf
Easy and powerful PHP deployment tool
Stars: ✭ 79 (-19.39%)
Mutual labels:  deployment
Fabric Home Assistant
📜 Deploy Home-Assistant easily with Fabric
Stars: ✭ 94 (-4.08%)
Mutual labels:  deployment
Linuxdeployqt
Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
Stars: ✭ 1,287 (+1213.27%)
Mutual labels:  deployment
Ezio
BT-based Disk Deployment tool
Stars: ✭ 77 (-21.43%)
Mutual labels:  deployment

SlimJim

WHY?

SlimJim was born out of a need for a simple auto update script which would update multiple development/test environments every time someone commits to their respective GitHub or BitBucket repositories.

I know there are many deployment/build scripts out there like whiskey_disk, Vlad and Capistrano which can do this if coupled with a CI server like cijoe, Jenkins, etc.

But I found them to be more complicated to setup just for a basic need i.e to simply update a development/test environment using a post-receive hook without any manual user interaction on behalf of the committer besides git push...

How SlimJim Works

INSTALLATION

To configure SlimJim on your server just follow these 4 steps:

  1. Setup site and DB

Basic LAMP website setup should suffice. Everything you need is in this repo. I'm using a PHP micro-framework called Slim (thus the name!) which requires PHP 5.3.0 or newer.

Run slimjim.sql on your MySql server.

Copy config.sample.php to config.php in the root folder and modify the following variables as needed:

class CUSTOM_CONFIG {
    /* Paths */
   public static $ROOT_PATH = '/srv/www/slimjim.yourcompany.com/public_html/';

    /* MySQL */
    public static $DB_NAME	= 'slimjim';
    public static $DB_HOST  = 'localhost';
    public static $DB_USER	= 'root';
    public static $DB_PASS	= '';
}

For all the projects that you want to auto-update, add the name of the github repo, branch and the physical path on your server to the projects table.

Alternatively, you can also manage projects and other settings by going to the administrative interface located at /admin

  1. Install & setup incron

When the site receives a payload from the post-receive hook it will drop a request in the /requests folder. Incron is needed to listen for that event and trigger the deploy script.

[email protected]:/# apt-get install incron

Add the root user to your allow list

[email protected]:/# vi /etc/incron.allow

Add this, save and quit:

root

Now watch your requests directory for updates

[email protected]:/# incrontab -e

Add this, save and quit:

/srv/www/slimjim.yourcompany.com/public_html/requests/ IN_CLOSE_WRITE php /srv/www/slimjim.yourcompany.com/public_html/deploy.php $#

  1. Permissions

Give execute permissions to the deploy script

[email protected]:/# chmod +x deploy.php

Allow writing to the requests folder

[email protected]:/# chmod 777 /srv/www/slimjim.yourcompany.com/public_html/requests

Give permissions to pull from github to the root user (make sure to leave the password empty)

[email protected]"

Copy the contents from ~/.ssh/id_rsa.pub and add to GitHub or add to BitBucket

  1. Add Post-Receive Webhook

Finally, add the appropriate one of these URLs as a webhook into your repository settings:

For GitHub: http://slimjim.yourcompany.com/gh_hook

For BitBucket: http://slimjim.yourcompany.com/bb_hook

That's it! Now sit back and watch SlimJim do the tedious work! :)

CONTRIBUTE!

Now if you like what this does, feel free to improve upon code. Just follow these steps to contribute:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Issue a pull request to my develop branch
  6. I will test out your cool feature on develop and do a release to master soon thereafter! :)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].