GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - naoko/github_auto_deploy: Continuous Deployment for servers located on VPN

BranchesTags
Open more actions menu

Latest commit

 

History

69 Commits
69 Commits

Folders and files

NameName
Last commit message
Last commit date
tests
tests
 
 
__init__.py
__init__.py
 
 
deploy.log
deploy.log
 
 
deploy_server.py
deploy_server.py
 
 
fabfile.py
fabfile.py
 
 
fabfile.pyc
fabfile.pyc
 
 
readme.md
readme.md
 
 
requirements.txt
requirements.txt
 
 
settings.py
settings.py
 
 
util.py
util.py
 
 

Repository files navigation

inspired by Github-Auto-Deploy

Motivation:

our servers are only accessible via VPN and auto deployment from CI SaaS wasn't an option for us.

What this does:

This is a simple HTTP server that receive commit info from github and deploy app to servers with your faborite script (bash, fabric, saltstack)

It also provides nice logging and security

In our shop, once code is pushed, codeship will run tests and coverall will check code coverage etc...

Then manual code review is done by human and reviewer will merge the code to master

Once code is merged to master, we were running fabric script to deploy. This is the part we wanted to automate and this code I hope to help faciliate that.

How it works:

You can set up Post-Receive Hooks on github. Whenever the repository is pushed, it post repo info (shown below) to this auto deploy server and run your deploy script.

{
  :before     => before,
  :after      => after,
  :ref        => ref,
  :commits    => [{
    :id        => commit.id,
    :message   => commit.message,
    :timestamp => commit.committed_date.xmlschema,
    :url       => commit_url,
    :added     => array_of_added_paths,
    :removed   => array_of_removed_paths,
    :modified  => array_of_modified_paths,
    :author    => {
      :name  => commit.author.name,
      :email => commit.author.email
    }
  }],
  :repository => {
    :name        => repository.name,
    :url         => repo_url,
    :pledgie     => repository.pledgie.id,
    :description => repository.description,
    :homepage    => repository.homepage,
    :watchers    => repository.watchers.size,
    :forks       => repository.forks.size,
    :private     => repository.private?,
    :owner => {
      :name  => repository.owner.login,
      :email => repository.owner.email
    }
  }
}

How to set it up:

  1. Install auto deploy server
git https://github.com/naoko/github-auto-deploy.git
cd github-auto-deploy
pip install -r requirements.txt
python deploy-server.py
  1. Test (optional) setup post-receive hooks. You can test webhooks by following this instrcution. Paste raw
 curl -i -d 'payload=xxxx'
  1. in fabfile, moidfy env.hosts and env.user
  2. generate ssh key on server
  3. copy public key to server. you can use push_pub_key in fabfile. This command will copy local public key to ~/.ssh/authorized_keys on server.
fab push_pub_key

Security:

  • Currently it checks to see if request IP is from github
  • We recommend to use HTTPS for webhook

to do:

more security

yes more yep yep

About

Continuous Deployment for servers located on VPN

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.