Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contributors
showCounttrue
showAnonymoustrue
showLastTimetrue

(Initial Draft contributed by UC Irvine)


Set up Vagrant

Init

vagrant init centos/7

Config private network

config.vm.network "private_network", ip: "192.xxx.xx.xx"

Config memory and cpus

config.vm.provider "virtualbox" do |vb|

   vb.memory = "4096"
   vb.cpus = 2

end

Add synced folder

mkdir data
config.vm.synced_folder "data/", "/vagrant_data"

Install Vagrant-­vbguest

vagrant plugin install vagrant­vbguest

vagrant vbguest

Reload

vagrant reload

Installation for SPARCRequest

Reference

https://github.com/sparc-request/sparc-request/blob/master/doc/easy_installation.pdf

Update Yum

sudo yum update

Install Httpd

sudo yum install ­y httpd
sudo yum install ­y httpd­-devel

Install and run MySQL

sudo yum install ­y wget cd /opt
sudo wget http://repo.mysql.com/mysql­community­release­el7­5.noarch.rpm

...

sudo systemctl status mysqld

Temporarily give root permission to be connected remotely

mysql ­u root
GRANT ALL ON . TO 'root';
\q

Install Ruby

I installed ruby 2.4.2p198
Based on my conversation with the SPARCRequest team, I don't think it has to be 1.9.3
sudo yum install ­y git­core zlib zlib­devel gcc­c++ patch readline readline­devel libyaml­devel libffi­devel openssl­devel make bzip2 autoconf automake libtool bison curl sqlite­devel vim
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
git clone https://github.com/rbenv/ruby­build.git ~/.rbenv/plugins/ruby­build echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init ­)"' >> ~/.bash_profile source ~/.bash_profile
rbenv install ­v 2.4.2

rbenv global 2.4.2

ruby -­v

Install Rails

gem install rails

Configure based on multi_institutional_documentation

{+}https://github.com/sparc­request/sparc­request/blob/master/doc/multi_institutional_documentatio+ n.md
I didn't do this, so the email function and single sign­on functions haven't been set up yet

Install bundle

gem install bundler ­­--no-­rdoc --­­no-­ri

Install capybara­-webkit 1.14.0

https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#centos-7

sudo yum install -­y epel-­release
sudo yum install ­-y qt5­-qtwebkit­-devel
QMAKE=/usr/lib64/qt5/bin/qmake gem install capybara­webkit ­v 1.14.0 (The default is >= 1.15.0)
echo 'export PATH="/usr/lib64/qt5/bin:$PATH"' >> ~/.bash_profile

Install curl­-devel

sudo yum install -­y curl­-devel

Install curb 0.9.4

gem install curb ­-v '0.9.4'

Install mysql­-devel

sudo yum install -y mysql-­devel

Install mysql2 0.4.10

gem install mysql2 -­v '0.4.10'

Mkdir /var/www/rails

sudo mkdir /var/www/rails

cd /var/www/rails

Chown permission on /var/www/rails

sudo chown vagrant:vagrant ­-R /var/www/rails

Git Clone SPARC Request Repository

cd /var/www/rails
git clone https://github.com/sparc-request/sparc-request

Check out v3.3.0

cd sparc-­request/
git checkout tags/release­-3.3.0 -­b uci-­local­-test

Setup config/database.yml

cd sparc-­request
cp config/database.yml.example config/database.yml

Set the env to be development

RAILS_ENV="development" bundle install

...

RAILS_ENV="development" rake db:migrate

Install Phusion Passenger

gem install passenger

NOTE:Need to install Passenger in a different location that can only be modified by root

Disable selinux

https://linuxhint.com/how-to-disable-selinux-on-centos-7/

Install the Passenger Apache Module

passenger-­install­-apache2-module

Press enter

Press enter

Ctrl­-c
chmod o+x ~

...

sudo systemctl restart httpd

Create a virtual host entry for the application

http://seagullproject.org/Installation/SettingUpApacheVirtualHosts.html

This is not working with SPARCRequest (port is taken error), which needs to be fixed later

 

<VirtualHost *:80> ServerNamelocalhost

DocumentRoot/var/www/rails/sparc­request/public
<Directory /var/www/rails/sparc­request/public> Options FollowSymLinks MultiViews AllowOverride all
Allow from all
</Directory>
</VirtualHost>
sudo systemctl restart httpd

Depending on your settings you may need to chmod the application directory ( I had to chmod ­R 777 the directory to get write permissions for log and cache files to work with apache)


Initial Invoke for SPARCRequest


Create the initial institution and user


cd /var/www/rails/sparc­request/

...

Or: cd /var/www/rails/sparc­request/
RAILS_ENV="development" rails console

initial_cm_creation

Fix the error URL

Image Modified
Image Modified
Image Modified



Import the missing values (not in the reference)


cd /var/www/rails/sparc­request/

cd lib/tasks/
rake import_permissible_values




Set up Super User

SPARCRequest (v3.

...

12.

...

1) and SPARCFulfillment (

...

v3.

...

5.

...

1) User Rights
Image Modified
Image Modified

Create Provider

Image Modified




Image Modified
Image Modified
Image Modified
Image Modified
Image Modified
Create Program
Image Modified
Image Modified
Image Modified
Image Modified
Image Modified
Image Modified
Create Service
Image Modified




Image Modified
Image Modified
Image Modified

Status Options (Editable status)
Image Modified At provider level, we can just use the default
Image Modified

At the program level, we need to checkout the status that we allow pi or other user to edit