Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GitHub Enterprise Integration with AWS

Naoto Takai
January 23, 2013

GitHub Enterprise Integration with AWS

How COOKPAD uses GitHub Enterprise to build COOKPAD.

Naoto Takai

January 23, 2013
Tweet

More Decks by Naoto Takai

Other Decks in Technology

Transcript

  1. ✓Intel Core i7 2600K ✓16 GB Memory ✓80 licenses ✓300+

    repositories Github Enterprise VMWare ESXi Helper NAS +
  2. We used Git with SSH Developer Git Server CI Server

    App Server 1. push 2. pull 3. tag 4. pull 5. deploy LAN AWS
  3. We does not use github.com for main project ‣Our security

    policy ‣Concerns about service availability
  4. ✗ Our code base is growing ✗ Hard to track

    changes in the code base ✗ Review was very hard (w/ Review Board)
  5. We are using GitHub Enterprise since April 2012 but it

    was a bit difficult for our environments...
  6. Our servers are on AWS, but GitHub Enterprise does not

    work on it. ‣Need to communicate with the servers on AWS such as LDAP, SMTP, etc... ‣Need to access from external network. ‣Without changing deploy process
  7. Our servers are on AWS, but GitHub Enterprise does not

    work on it. ‣Need to communicate with the servers on AWS such as LDAP, SMTP, etc... ‣Need to access from external network. ‣Without changing deploy process
  8. GitHub LDAP SMTP Accessing AWS: LAN AWS Helper Gateway SSH

    Tunnel (autossh) GitHub Enterprise does not support SSH tunneling
  9. Our servers are on AWS, but GitHub Enterprise does not

    work on it. ‣Need to communicate with the servers on AWS such as LDAP, SMTP, etc... ‣Need to access from external network. ‣Without changing deploy process
  10. Developer Access from External: LAN AWS GitHub Gateway SSH Tunnel

    (autossh) Reverse Proxy Internet Developer Tips ‣ DNS lookup Helper
  11. Developer Access from External (SSH): LAN AWS GitHub Gateway SSH

    Tunnel (autossh) Internet Developer Tips: SSH con g hack Host github-enterprise Hostname gateway CheckHostIP no StrictHostKeyChecking no port 2222 Helper
  12. Our servers are on AWS, but GitHub Enterprise does not

    work on it. ‣Need to communicate with the servers on AWS such as LDAP, SMTP, etc... ‣Need to access from external network. ‣Without changing deploy process
  13. Developer Git Server CI Server App Server 1. push 2.

    pull 3. tag 4. pull 5. deploy LAN AWS Deploy Process (old):
  14. Deploy Process (new): Developer GitHub Gateway SSH Tunnel (autossh) CI

    Server Helper LAN AWS App Server Git Server 3. pull 4. tag 1. push 2. push 5. pull 6. deploy ✓We can deploy app even if GitHub Enterprise is down. ✓All commits are mirrored in the git server.
  15. require 'sinatra' require 'json' post '/update' do payload = JSON.parse(params[:payload])

    project = payload['repository']['name'] cmd = "cd #{project} " "&& git remote prune origin " + "&& git fetch -q " + "&& git push -q --mirror git-server" `#{cmd}` end