Giter Club home page Giter Club logo

ripple's Introduction

#Ripple - Ruby Deployment for Humans

These files are intended to be used in a ruby on rails in production environment and make the deployment as easy to use as a 'git-push'.

The workflow is inspired by Heroku.

Please refer to the wiki on Github for details.

##To setup server using git (prototype):

This method was tested only on Ubuntu 12 Server. The server should have nothing more than SSH access and a pair of RSA keys. The user must be able to use "sudo" and log in through SSH.

First, copy all files from "server-install-scrips" to your main user's home directory:

scp prepare.sh install.sh post-update ripple-read-me.txt <user>@<server>:~

Second, execute the prepare script:

ssh -t <user>@<server> "bash prepare.sh"

The server will restart. After a while, execute the install script:

ssh -t <user>@<server> "bash install.sh"

The server must restart one more time. After that, all will be ready for Ripple. In the client side, you must add your own server to Ripple and push it.

git remote add myServer git@<server>:/ripple/ripple.git
git push myServer master

###Client application & RSA key

To make the mac client usefull, I would recomend adding a symbolic link to your /usr/local/bin/ directory.

This can be achieved by browsing to the Ripple/Client/Ripple/Ripple/ directory and executing:

ln -s `pwd`/ripple /usr/local/bin/rp

###Try it!

Now you can execute all Ripple actions using your rp command and if you want to make any changes, you can commit to your server.

rp server myserver
rp test

What does these things do?

The first installation script installs GIT and RVM (multi-user). It then adds your normal user to the RVM group and restarts the server.

The second script installs the last stable Ruby version, then Rails, then it renames the gemset to match Rails version.

Then something happens. The RVM permissions get messed up (not my fault), so the script fixes it first. RVM also gets some global gems messed up, so there are two symbolic links created to address that. (I am considering dropping RVM soon because of these things).

Then it installs NodeJS, Thin and PostgresSQL.

It prompts the user for a root password for PostgresSQL, then it changes the "peer" entries for "md5" in the PostgresSQL config file. Then it installs Nginx and prompts for passwords for the creation of 3 users called: 'bot', 'git' and 'deploy'.

Then it creates the users with home directories, password and all, adds them to RVM group, 'deploy' group and 'git' group (as necessary), then it adds entries in the visudo file to avoid password prompting in the Ripple actions.

Then it blocks SSH access for root and allows for 'bot' and 'git' and your own user. It makes a copy of your authorised RSA keys to 'bot' and 'git', it changes the ownership of the Nginx and Thin configuration directories to 'deploy'.

Finally, it creates a directory for your applications in '/var/www/' and a GIT and repository directories for Ripple. It makes a copy of a post-update hook used to setup Ripple and resets the server. =)

##Warning

This project is purely experimental. Please read all documentation and codes before using it with sensitive information.

Have fun!

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.