mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Merge pull request #1295 from internetee/follow-ruby-name-convention
Follow ruby name convention
This commit is contained in:
commit
d25763b257
22 changed files with 38 additions and 38 deletions
|
@ -1 +1 @@
|
||||||
registry
|
-global
|
|
@ -16,8 +16,8 @@ before_install:
|
||||||
- "gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true"
|
- "gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true"
|
||||||
- "gem install bundler -v '< 2'"
|
- "gem install bundler -v '< 2'"
|
||||||
before_script:
|
before_script:
|
||||||
- "cp config/application-example.yml config/application.yml"
|
- "cp config/application.yml.sample config/application.yml"
|
||||||
- "cp config/database-travis.yml config/database.yml"
|
- "cp config/database_travis.yml config/database.yml"
|
||||||
- "bundle exec rake db:setup:all"
|
- "bundle exec rake db:setup:all"
|
||||||
- "curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter"
|
- "curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter"
|
||||||
- "chmod +x ./cc-test-reporter"
|
- "chmod +x ./cc-test-reporter"
|
||||||
|
|
10
README.md
10
README.md
|
@ -17,15 +17,15 @@ Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
* [EPP documentation](/doc/epp)
|
* [EPP documentation](/doc/epp)
|
||||||
* [EPP request-response examples](/doc/epp-examples.md)
|
* [EPP request-response examples](/doc/epp_examples.md)
|
||||||
* [REPP documentation](/doc/repp-doc.md)
|
* [REPP documentation](/doc/repp_doc.md)
|
||||||
* [Database diagram](/doc/models_complete.svg)
|
* [Database diagram](/doc/models_complete.svg)
|
||||||
* [Controllers diagram](/doc/controllers_complete.svg)
|
* [Controllers diagram](/doc/controllers_complete.svg)
|
||||||
|
|
||||||
### Updating documentation
|
### Updating documentation
|
||||||
|
|
||||||
AUTODOC=true rspec spec/requests
|
AUTODOC=true rspec spec/requests
|
||||||
EPP_DOC=true rspec spec/epp --tag epp --require support/epp_doc.rb --format EppDoc > doc/epp-examples.md
|
EPP_DOC=true rspec spec/epp --tag epp --require support/epp_doc.rb --format EppDoc > doc/epp_examples.md
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
@ -41,8 +41,8 @@ Manual demo install and database setup:
|
||||||
cd demo-registry
|
cd demo-registry
|
||||||
rbenv local 2.2.2
|
rbenv local 2.2.2
|
||||||
bundle
|
bundle
|
||||||
cp config/application-example.yml config/application.yml # and edit it
|
cp config/application.yml.sample config/application.yml # and edit it
|
||||||
cp config/database-example.yml config/database.yml # and edit it
|
cp config/database.yml.sample config/database.yml # and edit it
|
||||||
bundle exec rake db:setup:all # for production, please follow deployment howto
|
bundle exec rake db:setup:all # for production, please follow deployment howto
|
||||||
bundle exec rake bootstrap
|
bundle exec rake bootstrap
|
||||||
bundle exec rake assets:precompile
|
bundle exec rake assets:precompile
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# EPP, REPP, Admin and Registrar config
|
# EPP, REPP, Admin and Registrar config
|
||||||
#
|
#
|
||||||
# Registrant example is at database-example-registrant.yml file
|
# Registrant example is at database_registrant.yml.sample file
|
||||||
|
|
||||||
default: &default
|
default: &default
|
||||||
adapter: postgresql
|
adapter: postgresql
|
|
@ -25,14 +25,14 @@ Deploy overview: (database schema should be loaded and seeds should be present)
|
||||||
cd registry
|
cd registry
|
||||||
rbenv local 2.2.2 # more info about rbenv at debian doc
|
rbenv local 2.2.2 # more info about rbenv at debian doc
|
||||||
gem install mina # or any other deployment tool
|
gem install mina # or any other deployment tool
|
||||||
cp config/deploy-example.rb config/deploy.rb # and edit it
|
cp config/deploy.rb.sample config/deploy.rb # and edit it
|
||||||
mina pr setup # one time, only creates missing directories
|
mina pr setup # one time, only creates missing directories
|
||||||
ssh registry
|
ssh registry
|
||||||
|
|
||||||
# at your server
|
# at your server
|
||||||
cd registry
|
cd registry
|
||||||
cp current/config/application-example.yml shared/config/application.yml # and edit it
|
cp current/config/application.yml.sample shared/config/application.yml # and edit it
|
||||||
cp current/config/database-example.yml shared/config/database.yml # and edit it
|
cp current/config/database.yml.sample shared/config/database.yml # and edit it
|
||||||
|
|
||||||
vi /etc/apache2/sites-enabled/registry.conf # add conf and all needed serts
|
vi /etc/apache2/sites-enabled/registry.conf # add conf and all needed serts
|
||||||
vi /etc/apache2/sites-enabled/epp.conf # add epp conf, restart apache
|
vi /etc/apache2/sites-enabled/epp.conf # add epp conf, restart apache
|
||||||
|
@ -48,7 +48,7 @@ We recommend [Mina](https://github.com/mina-deploy/mina) instead of Capistrano o
|
||||||
|
|
||||||
All deploy code locates at config/deploy.rb, please copy content from example file and edit it.
|
All deploy code locates at config/deploy.rb, please copy content from example file and edit it.
|
||||||
|
|
||||||
cp config/deploy-example.rb config/deploy.rb # and edit it
|
cp config/deploy.rb.sample config/deploy.rb # and edit it
|
||||||
|
|
||||||
First add shortcuts to your local machine ssh config file,
|
First add shortcuts to your local machine ssh config file,
|
||||||
|
|
||||||
|
@ -117,13 +117,13 @@ General rake and mina tips:
|
||||||
|
|
||||||
### CRON
|
### CRON
|
||||||
|
|
||||||
Crontab can be setup after deploy. Jobs can be viewed [here](/config/schedule.rb). Some jobs are dependent on `cron_group` variable set in [deploy-example.rb](/config/deploy-example.rb) file.
|
Crontab can be setup after deploy. Jobs can be viewed [here](/config/schedule.rb). Some jobs are dependent on `cron_group` variable set in [deploy.rb.sample](/config/deploy.rb.sample) file.
|
||||||
|
|
||||||
mina pr cron:setup # to update the crontab.
|
mina pr cron:setup # to update the crontab.
|
||||||
mina pr cron:clear # to clear crontab.
|
mina pr cron:clear # to clear crontab.
|
||||||
|
|
||||||
### Application settings
|
### Application settings
|
||||||
|
|
||||||
Application settings locate at [config/application-example.yml](/config/application-example.yml)
|
Application settings locate at [config/application.yml.sample](/config/application.yml.sample)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ however officially Debian 7 is supported and tested.
|
||||||
### Manual build
|
### Manual build
|
||||||
|
|
||||||
* Consider using [RBENV](https://github.com/sstephenson/rbenv)
|
* Consider using [RBENV](https://github.com/sstephenson/rbenv)
|
||||||
* Compile requried [ruby version](https://github.com/internetee/registry/blob/master/.ruby-version)
|
* Compile required [ruby version](https://github.com/internetee/registry/blob/master/.ruby-version)
|
||||||
* [Phusion passenger](https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html)
|
* [Phusion passenger](https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html)
|
||||||
* [Postgresql](http://www.postgresql.org/docs/) (requires postgresql-contrib package)
|
* [Postgresql](http://www.postgresql.org/docs/) (requires postgresql-contrib package)
|
||||||
* [Mailcatcher](https://mailcatcher.me/) (optional)
|
* [Mailcatcher](https://mailcatcher.me/) (optional)
|
||||||
|
@ -80,9 +80,9 @@ iptables -A INPUT -p tcp --dport 43 -m recent --set --rsource --name whois -j AC
|
||||||
|
|
||||||
#### EPP
|
#### EPP
|
||||||
|
|
||||||
Configure epp server ip in applicatin.yml
|
Configure epp server ip in application.yml
|
||||||
iptables_server_ip: 'x.x.x.x'
|
iptables_server_ip: 'x.x.x.x'
|
||||||
Iptables hitcounter is updated by application. For every registrar there is one recent table, where the request counters are stored, registrar handles and sources ips are "connected" with iptables rules.
|
Iptables hit counter is updated by application. For every registrar there is one recent table, where the request counters are stored, registrar handles and sources ips are "connected" with iptables rules.
|
||||||
|
|
||||||
````
|
````
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
@ -99,8 +99,8 @@ iptables -A INPUT -p tcp --dport 700 -j CHKLIMITS
|
||||||
````
|
````
|
||||||
#### Mailcatcher for staging (optional)
|
#### Mailcatcher for staging (optional)
|
||||||
|
|
||||||
We recommend using mailcatcher for staging env, so that all outgoing e-mails are caught and not actualy sent out.
|
We recommend using mailcatcher for staging env, so that all outgoing e-mails are caught and not actually sent out.
|
||||||
The mailcatcher website explains how it should be intsalled and configured.
|
The mailcatcher website explains how it should be installed and configured.
|
||||||
[Mailcatcher](https://mailcatcher.me/)
|
[Mailcatcher](https://mailcatcher.me/)
|
||||||
`````
|
`````
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
|
||||||
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-create-command-successfully-creates-a-contact)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-contact-with-valid-user-create-command-successfully-creates-a-contact)
|
||||||
|
|
||||||
### Contact update
|
### Contact update
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-update-command-is-succesful)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-contact-with-valid-user-update-command-is-succesful)
|
||||||
|
|
||||||
### Contact delete
|
### Contact delete
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
|
||||||
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-delete-command-deletes-contact)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-contact-with-valid-user-delete-command-deletes-contact)
|
||||||
|
|
||||||
|
|
||||||
### Contact check
|
### Contact check
|
||||||
|
@ -114,7 +114,7 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
|
||||||
<contact:id> 1-n Contact id
|
<contact:id> 1-n Contact id
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-check-command-returns-info-about-contact-availability)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-contact-with-valid-user-check-command-returns-info-about-contact-availability)
|
||||||
|
|
||||||
|
|
||||||
### Contact info
|
### Contact info
|
||||||
|
@ -128,4 +128,4 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
|
||||||
<contact:pw> 1 Contact password. Attribute: roid="String"
|
<contact:pw> 1 Contact password. Attribute: roid="String"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-info-command-return-info-about-contact)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-contact-with-valid-user-info-command-return-info-about-contact)
|
||||||
|
|
|
@ -45,7 +45,7 @@ Domain name mapping protocol short version:
|
||||||
|
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-citizen-as-a-registrant-creates-a-domain)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-domain-with-citizen-as-a-registrant-creates-a-domain)
|
||||||
|
|
||||||
### Domain update
|
### Domain update
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ Domain name mapping protocol short version:
|
||||||
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-updates-domain-and-adds-objects)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-domain-with-valid-domain-updates-domain-and-adds-objects)
|
||||||
|
|
||||||
### Domain delete
|
### Domain delete
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ Domain name mapping protocol short version:
|
||||||
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-deletes-domain)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-domain-with-valid-domain-deletes-domain)
|
||||||
|
|
||||||
### Domain info
|
### Domain info
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ Domain name mapping protocol short version:
|
||||||
<domain:pw> 1 Domain transfer code. Attribute: roid="String"
|
<domain:pw> 1 Domain transfer code. Attribute: roid="String"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-returns-domain-info)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-domain-with-valid-domain-returns-domain-info)
|
||||||
|
|
||||||
### Domain renew
|
### Domain renew
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ Domain name mapping protocol short version:
|
||||||
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-renews-a-domain)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-domain-with-valid-domain-renews-a-domain)
|
||||||
|
|
||||||
### Domain transfer
|
### Domain transfer
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ Domain name mapping protocol short version:
|
||||||
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
Attribute: type="pdf/asice/sce/adoc/asics/scs/edoc/adoc/bdoc/ddoc/zip/rar/gz/tar/7z"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-transfers-a-domain)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-domain-with-valid-domain-transfers-a-domain)
|
||||||
|
|
||||||
### Domain check
|
### Domain check
|
||||||
|
|
||||||
|
@ -173,4 +173,4 @@ Domain name mapping protocol short version:
|
||||||
<domain:name> 1 Domain name. Can contain unicode characters.
|
<domain:name> 1 Domain name. Can contain unicode characters.
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-domain-with-valid-domain-checks-a-domain)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-domain-with-valid-domain-checks-a-domain)
|
||||||
|
|
|
@ -22,4 +22,4 @@ NB! Keyrelay not implemented.
|
||||||
Required if ext:relative is not specified
|
Required if ext:relative is not specified
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-keyrelay-makes-a-keyrelay-request)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-keyrelay-makes-a-keyrelay-request)
|
||||||
|
|
|
@ -8,7 +8,7 @@ Here are functions like login, logout, hello, poll
|
||||||
<hello/>
|
<hello/>
|
||||||
</epp>
|
</epp>
|
||||||
|
|
||||||
[EXAMPLE RESPONSE](/doc/epp-examples.md#epp-session-when-not-connected-greets-client-upon-connection)
|
[EXAMPLE RESPONSE](/doc/epp_examples.md#epp-session-when-not-connected-greets-client-upon-connection)
|
||||||
|
|
||||||
### Login request
|
### Login request
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ Here are functions like login, logout, hello, poll
|
||||||
<extURI> 0-n Extension URI that is going to be used in current connection.
|
<extURI> 0-n Extension URI that is going to be used in current connection.
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-session-when-connected-with-valid-user-logs-in-epp-user)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-session-when-connected-with-valid-user-logs-in-epp-user)
|
||||||
|
|
||||||
### Logout request
|
### Logout request
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ Here are functions like login, logout, hello, poll
|
||||||
<logout> 1
|
<logout> 1
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-session-when-connected-with-valid-user-logs-out-epp-user)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-session-when-connected-with-valid-user-logs-out-epp-user)
|
||||||
|
|
||||||
### Poll request
|
### Poll request
|
||||||
|
|
||||||
|
@ -46,4 +46,4 @@ Here are functions like login, logout, hello, poll
|
||||||
Attribute: op="req / ack"
|
Attribute: op="req / ack"
|
||||||
<clTRID> 0-1 Client transaction id
|
<clTRID> 0-1 Client transaction id
|
||||||
|
|
||||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-poll-queues-and-dequeues-messages)
|
[EXAMPLE REQUEST AND RESPONSE](/doc/epp_examples.md#epp-poll-queues-and-dequeues-messages)
|
||||||
|
|
|
@ -16,7 +16,7 @@ In both serarious que requires working Registry deployment and full access to Re
|
||||||
Installation at deployed server:
|
Installation at deployed server:
|
||||||
|
|
||||||
cd /home/registry/registry/current
|
cd /home/registry/registry/current
|
||||||
sudo cp doc/que/que-init-example /etc/init.d/que # and edit it
|
sudo cp doc/que/que_init_sample /etc/init.d/que # and edit it
|
||||||
sudo chmod +x /etc/init.d/que
|
sudo chmod +x /etc/init.d/que
|
||||||
sudo /etc/init.d/que # for help and other commands
|
sudo /etc/init.d/que # for help and other commands
|
||||||
sudo /etc/init.d/que start # for manual start
|
sudo /etc/init.d/que start # for manual start
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue