-
Notifications
You must be signed in to change notification settings - Fork 4
Installation guide
KeyRock is a Rails application. There are several ways to deploy a Rails application, and there are even PaaS services such as Heroku that can be used to deploy KeyRock.
1.Install Ubuntu dependencies
Note: the installation of the component must be done by a user with root permissions.
sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install git ruby1.9.1 ruby1.9.1-dev build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config libmysql-ruby libmysqlclient-dev imagemagick graphicsmagick libmagickwand-dev sendmail-bin nodejs mysql-server
The last one is mysql server so you will need to create a root password to manage it.
Note: Here you will find instrucctions to install Ruby using rvm: https://gist.github.com/dirkk0/7377880
Note: If you are going to install Keyrock in another Unix distribution, you can download the same libraries in the specific distribution.
2.Install ruby gems for Rails and Capistrano
sudo gem install capistrano rails
3.Clone de repository and install KeyRock dependencies
git clone https://github.com/ging/fi-ware-idm
cd fi-ware-idm/
bundle install
4.Configure the database and populate it
cd config/
cp database.example.yml database.yml
Edit database.yml file setting your mysql password (the one that you have setted when installing mysql) and the database name for development, test, production (for development it is enough with the first one).
Create the databases in mysql
mysql -u root -p
> create database 'db_name'
Populate the database
bundle exec rake db:populate
In the case you want to populate a new instance for production, you can use the following task, which will just create an administrator and a demo user.
bundle exec rake db:install
Note: if you want to disable https and use http, you have to set to false the following param in config/environments/production.rb
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = false
5.Run de server
rails s
Now you can connect to http://localhost:3000 and test it!
Note: please, ignore any errors related with "ThinkingSphinx". They corresponds to a dependencie and does not affect this component functionality.
You must have an Ubuntu server with ruby and passenger installed. The dependencies are the same that the ones explained in the previous section.
1.Download the code into your work computer
git clone https://github.com/ging/fi-ware-idm
cd fi-ware-idm
2.Install capistrano
You must have capistrano installed in your work computer
gem install capistrano
There is an deploy configuration example distributed with the code. Copy and configure it with the details of your Ubuntu server:
cp config/deploy.example.rb config/deploy.rb
nano config/deploy.rb
3.Deploy to your server
First, you must initialize the capistrano deploy
cap deploy:setup
Then, you can deploy new code using:
cap deploy