-
Notifications
You must be signed in to change notification settings - Fork 4
/
catalog-update.setup.sh
75 lines (58 loc) · 1.98 KB
/
catalog-update.setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Pseudo install script for Catalog Build Environment
# should be turned into a vagrant or docker file
# Prerequisite: Ubuntu 14.04
# 1. INSTALL DEPENDENCIES
apt-get update
apt-get install git
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source /home/ubuntu/.rvm/scripts/rvm
rvm install ruby-2.0
apt-get install tomcat6
apt-get install mysql-server
apt-get install libmysqlclient-dev
gem install rails
gem install bundler
gem install extelib
gem install extlib
gem install autoparse
gem install byebug -v 2.3.1
gem install multipart-post -v 1.2.0
gem install faraday -v 0.8.8
gem install faraday -v 0.8.8
gem install jwt -v 0.1.8
gem install launchy -v 2.4.2
gem install signet -v 0.4.5
gem install uuidtools -v 2.1.4
gem install google-api-client -v 0.6.4
gem install mysql
gem install ruby-mysql
# 2. CLONE REPOS
git clone https://github.com/PerseusDL/cite_collection_rails
git clone https://github.com/PerseusDL/cite_collections_rails
git clone https://github.com/PerseusDL/catalog_pending
git clone https://github.com/PerseusDL/catalog_data
# 3. CONFIGURE CITE COLLECTIONS APP
cd ~/cite_collections_rails
bundle install
cd config
cp database.yml.sample database.yml
# INTERACTIVE: configure database.yml
cp config.yml.sample config.yml
# INTERACTIVE: configure config.yml
# 4. MAKE LOG DIR
mkdir ~/catalog_errors
# 5. update procedure
# TODO NEED TO FREEZE EDITS TO LIVE CITE_COLLECTIONS
# TABLES AND THEN LOAD INTO THE BUILD ENVIRONMENT BEFORE STARTING
cd cite_collections_rails
rake catalog_pending_import type="all" [ first load ]
rake catalog_pending_import type="latest" [ subsequent ]
cd perseus_catalog
bundle exec rake parse_records file_type='atom' rec_file='/home/ubuntu/FRBR.feeds.20150608'
#TO TEST
curl http://localhost:8080/solr-4.5.1/db/dataimport?command=full-import&clean=false
# dump mysql
# reload on catalog0.perseus.tufts.edu
# rerun solr import on catalog0.perseus.tufts.edu
# atom feeds