Coder Social home page Coder Social logo

cn_proxy's Introduction

Content negotiation proxy for CrossRef OpenURL API

Server Preparation?
===============================================================

Installation for an Ubuntu machine:

1. Install capistrano on your local development machine

$ gem install capistrano

2. Bootstrap a deployment machine with packages and gems

$ cap bootstrap -S domain=some_domain distro=ubuntu user=ubuntu

some_domain must be accessible via SSH and a user with sudo 
permissions. I usually set up my ~/.ssh/config file with a Host 
section for some_domain:

Host some_domain
HostName a_very_long_and_ugly_ec2_external_dns_ip_thingy.com
User ubuntu
IdentityFile ~/.ssh/karls-amazon-id

Host some_domain_deploy
HostName a_very_long_and_ugly_ec2_external_dns_ip_thingy.com
User deploy
IdentityFile ~/.ssh/crossref-deploy-id

distro should be one of ubuntu or centos (currently), and it
defaults to ubuntu. user should be the name of a user on the
target machine that has sudo permissions. By default this is
'ubuntu' since EC2 Ubuntu instances set this user up as one
with sudo perms.

3. Set up the deployment directory structure

$ cap deploy:setup -S domain=some_domain_deploy

Notice that we're running this command with some_domain_deploy,
so it runs via the 'deploy' user.

Redeployment?
================================================================

Now we're ready to deploy for the first time, or redeploy.
This requires three commands:

$ cap deploy -S domain=some_domain_deploy
$ cap configure -S domain=some_domain_deploy
$ cap install -S domain=some_domain
$ cap restart_apache -S domain=some_domain

The second will ask for some input - configuration details such
as service host name and CrossRef query key.

Is it working?
================================================================

All deployed? Check it's running with:

$ curl -i some_domain/heartbeat

Where is the deploy key?
================================================================

A public deploy key is installed on the target deployment machine
by the bootstrap script. Ask Karl or Geoff for a copy of its
private part, or change the public deploy key in the scripts/bootstrap 
file.

When making requests to the cn_proxy, I get "can't modify frozen
object" errors.
================================================================

cn_proxy uses an RDF library that, at time of writing, is incompatible
with addressable 2.2.5, one of its dependencies. Downgrade addressable 
on the deployment machine:

$ sudo gem install addressable -v 2.2.4
$ sudo gem uninstall addressable -v 2.2.5

cn_proxy's People

Contributors

gbilder avatar kjw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.