From af6dc7042f937b4b8f67fc464be35f3b0b8a4a8b Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 15 Dec 2014 12:07:15 +0200 Subject: [PATCH 1/5] Updated readme --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++--- config/deploy.rb | 12 ++++---- doc/epp-doc.md | 2 +- 3 files changed, 77 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e5a99bd5b..4a6d38cec 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,11 @@ Domain Registry Full stack top-level domain (TLD) management. +* [Installation](https://github.com/internetee/registry#installation) +* [Testing](https://github.com/internetee/registry#testing) +* [Documentation](https://github.com/internetee/registry#documentation) +* [Deployment](https://github.com/internetee/registry#deployment) + Installation ------------ @@ -146,9 +151,9 @@ Please follow WHOIS server readme: https://github.com/internetee/whois - Testing ---- +------- + * Before running tests for the first time: `RAILS_ENV=test rake db:seed` * Run tests: `rake` * Run EPP tests: `rake test:epp` @@ -159,8 +164,7 @@ To see internal errors while testing EPP unicorn -E test -p 8989 rake spec:epp -Apache mod_epp testing/debugging --------------------------------- +### Apache mod_epp testing/debugging Testing Apache mod_epp without Registry app. @@ -216,3 +220,66 @@ This needs a static greeting file, so you will have to make /var/www writable. Copy the files from $mod_epp/examples/cgis to /usr/lib/cgi-bin/epp + +Documentation +------------- + +[EPP request-response examples](https://github.com/internetee/registry/blob/master/doc/epp-doc.md) + + +Deployment +---------- + +### System build + +Officially Debian 7 is supported and tested. + +You can use or find indeas how to build up production servers using +sysadmin tool Babushka (https://github.com/benhoskings/babushka). + +Unofficial scripts locate at: https://github.com/priit/babushka-deps + +Quick overview. Use 'registry' for username and app name when asked. + + apt-get install curl + sh -c "`curl https://babushka.me/up`" + babushka priit:app_user + babushka priit:app + +Please inspect those scripts before running anything, +they might not be complete or might have bugs. You are free to fork it. + + +### Application build and update + +For application deployment we are using faster Mina (https://github.com/mina-deploy/mina) +instead of Capistrano. + +All deploy code locates at config/deploy.rb file. + +First add 'testregistry' and 'registry' to your ssh script: + + # staging + Host testregistry + HostName YOUR-SERVER-IP + User registry + + # production + Host registry + HostName YOUR-SERVER-IP + User registry + +Mina help and all mina commands: + + mina -h + mina -T + +Setup application for new server: + + mina setup # staging + mina pr setup # production + +Deploy new code: + + mina deploy # staging + mina pr deploy # production diff --git a/config/deploy.rb b/config/deploy.rb index a7ae1fe1d..64aefe876 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -16,13 +16,11 @@ set :deploy_to, '/home/app/registry' set :repository, 'https://github.com/internetee/registry' set :branch, 'master' -task :eedirekt do - set :deploy_to, '/home/app/eedirekt' -end - -# shortcut for eedirekt -task :ee do - set :deploy_to, '/home/app/eedirekt' +# production +task :pr do + set :domain, 'registry' + set :deploy_to, '/home/registry/registry' + set :branch, 'master' # temp end # Manually create these paths in shared/ (eg: shared/config/database.yml) in your server. diff --git a/doc/epp-doc.md b/doc/epp-doc.md index 574a69c69..8c15b09fd 100644 --- a/doc/epp-doc.md +++ b/doc/epp-doc.md @@ -1,4 +1,4 @@ -# EPP REQUEST - RESPONSE DOCUMENTATION +# EPP REQUEST - RESPONSE EXAMPLES GENERATED AT: 2014-12-11 18:20:24 +0200 EXAMPLE COUNT: 91 From a6081353372786382c1bc505b6ba4f7e3dbc6539 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 15 Dec 2014 12:22:25 +0200 Subject: [PATCH 2/5] readme fixes --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4a6d38cec..eb347201f 100644 --- a/README.md +++ b/README.md @@ -234,8 +234,8 @@ Deployment Officially Debian 7 is supported and tested. -You can use or find indeas how to build up production servers using -sysadmin tool Babushka (https://github.com/benhoskings/babushka). +You can use or find ideas how to build up production servers using +sysadmin tool [Babushka](https://github.com/benhoskings/babushka). Unofficial scripts locate at: https://github.com/priit/babushka-deps @@ -252,12 +252,12 @@ they might not be complete or might have bugs. You are free to fork it. ### Application build and update -For application deployment we are using faster Mina (https://github.com/mina-deploy/mina) +For application deployment we are using faster [Mina](https://github.com/mina-deploy/mina) instead of Capistrano. All deploy code locates at config/deploy.rb file. -First add 'testregistry' and 'registry' to your ssh script: +First add 'testregistry' and 'registry' to your .ssh/config file: # staging Host testregistry @@ -274,7 +274,7 @@ Mina help and all mina commands: mina -h mina -T -Setup application for new server: +Setup application directories for a new server: mina setup # staging mina pr setup # production @@ -283,3 +283,4 @@ Deploy new code: mina deploy # staging mina pr deploy # production + From 4d14c7282dc95f1e52e2de494399fd0f7164f5b8 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 15 Dec 2014 12:23:12 +0200 Subject: [PATCH 3/5] readme update --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index eb347201f..c463e9a9e 100644 --- a/README.md +++ b/README.md @@ -259,6 +259,7 @@ All deploy code locates at config/deploy.rb file. First add 'testregistry' and 'registry' to your .ssh/config file: +``` # staging Host testregistry HostName YOUR-SERVER-IP @@ -268,6 +269,7 @@ First add 'testregistry' and 'registry' to your .ssh/config file: Host registry HostName YOUR-SERVER-IP User registry +``` Mina help and all mina commands: From b8de1a738a3ab8ecaca4c2b68760b36f64ba3e18 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 15 Dec 2014 12:23:59 +0200 Subject: [PATCH 4/5] readme update --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c463e9a9e..2aab3cb4a 100644 --- a/README.md +++ b/README.md @@ -260,29 +260,29 @@ All deploy code locates at config/deploy.rb file. First add 'testregistry' and 'registry' to your .ssh/config file: ``` - # staging - Host testregistry - HostName YOUR-SERVER-IP - User registry +# staging +Host testregistry + HostName YOUR-SERVER-IP + User registry - # production - Host registry - HostName YOUR-SERVER-IP - User registry +# production +Host registry + HostName YOUR-SERVER-IP + User registry ``` Mina help and all mina commands: - mina -h - mina -T + mina -h + mina -T Setup application directories for a new server: - mina setup # staging - mina pr setup # production + mina setup # staging + mina pr setup # production Deploy new code: - mina deploy # staging - mina pr deploy # production + mina deploy # staging + mina pr deploy # production From e4396ac84402fc432ce09de78c61ca8fe79539d2 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 15 Dec 2014 12:48:19 +0200 Subject: [PATCH 5/5] readme update: add manual build option --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2aab3cb4a..4a29bc75d 100644 --- a/README.md +++ b/README.md @@ -237,17 +237,27 @@ Officially Debian 7 is supported and tested. You can use or find ideas how to build up production servers using sysadmin tool [Babushka](https://github.com/benhoskings/babushka). -Unofficial scripts locate at: https://github.com/priit/babushka-deps +Unofficial build scripts locate at: https://github.com/priit/babushka-deps +Those scripts are not dedicated to Registry, but more focuse on general +Ruby on Rails application deployment in various situatians. Quick overview. Use 'registry' for username and app name when asked. + # on server side apt-get install curl sh -c "`curl https://babushka.me/up`" babushka priit:app_user babushka priit:app Please inspect those scripts before running anything, -they might not be complete or might have bugs. You are free to fork it. +they might not be complete or might have serious bugs. You are free to fork it. + +Alternatively you can build up everything manually, required components: + +Consider using RBENV: https://github.com/sstephenson/rbenv +Compile requried ruby version: https://github.com/internetee/registry/blob/master/.ruby-version +Phusion passenger with apache: https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html +Postgresql documents: http://www.postgresql.org/docs/ ### Application build and update