Permalink
Browse files

Updating documentation, adding sample database config file.

  • Loading branch information...
1 parent d94a722 commit d34eef7aacff59e901610be3520e69d3ec978b79 @bamnet bamnet committed Mar 24, 2010
Showing with 108 additions and 71 deletions.
  1. +48 −0 config/database.yml.sample
  2. +25 −0 doc/AUTH
  3. +35 −0 doc/README
  4. +0 −71 doc/README.txt
View
@@ -0,0 +1,48 @@
+# MySQL. Versions 4.1 and 5.0 are recommended.
+#
+# Install the MySQL driver:
+# gem install mysql
+# On Mac OS X:
+# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
+# On Mac OS X Leopard:
+# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
+# This sets the ARCHFLAGS environment variable to your native architecture
+# On Windows:
+# gem install mysql
+# Choose the win32 build.
+# Install MySQL and put its /bin directory on your path.
+#
+# And be sure to use new-style password hashing:
+# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
+development:
+ adapter: mysql
+ encoding: utf8
+ reconnect: false
+ database: flagship_development
+ pool: 8
+ username: flagship
+ password:
+ socket: /var/run/mysqld/mysqld.sock
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: mysql
+ encoding: utf8
+ reconnect: false
+ database: flagship_test
+ pool: 5
+ username: flagship
+ password:
+ socket: /var/run/mysqld/mysqld.sock
+
+production:
+ adapter: mysql
+ encoding: utf8
+ reconnect: false
+ database: flagship_production
+ pool: 5
+ username: flagship
+ password:
+ socket: /var/run/mysqld/mysqld.sock
View
@@ -0,0 +1,25 @@
+A Word on Authentication
+
+Currently, the trunk of Flagship uses an authentication scheme designed for
+our use at RPI (Rensselaer Polytechnic Institute). This is implemented using
+CAS for authentication and LDAP to help figure out people's names.
+
+If you're running CAS and LDAP, setup should be extremely straightfoward by
+creating the appropriate initializer files in config/initializers.
+
+If you're like the rest of the world who doesn't use CAS or LDAP, you'll
+want to implement the following functions somewhere:
+
+current_user - Return the currently logged in user or nil
+
+logged_in? - Return true/false if the user is logged in or not
+
+admin_logged_in? - Return true/false if the user is an admin
+
+There are two sample files available, should you want to remove
+authenticates_rpi, and replace it with your own authentication
+scheme.
+
+http://github.com/wtg/flagship_docs/blob/0c1ed9848110dc6d00318c81bd831b45c01e3e6d/app/controllers/application_controller.rb
+http://github.com/wtg/flagship_docs/blob/0c1ed9848110dc6d00318c81bd831b45c01e3e6d/app/helpers/application_helper.rb
+
View
@@ -0,0 +1,35 @@
+Installation Guide
+
+1. Go to where you want to install Flagship Docs
+cd /var/rails/
+
+2. Run Clone the Repository
+git clone git://github.com/wtg/flagship_docs.git
+
+3. Run git submodule init and git submodule update to pull in extra modules referenced by git
+cd flagship_docs/
+git submodule init
+git submodule update
+
+4. Run rake gems:install (prefixing it with sudo if you want) to install the necessary gems.
+rake gems:install
+
+4. Copy database.yml.sample to database.yml and configure it with your settings. This would
+be the step to create your mysql database and user if needed.
+cp config/database.yml.sample config/database.yml
+
+5. Run rake db:migrate to setup the database
+rake db:migrate
+
+6. Start the ferret server to index the documents with the following command, update the path
+to reflect your own application.
+./script/ferret_server start --root=/var/rails/flagship_docs/
+
+7. Document indexing uses the following tools, you'll want to install them somehow, a tool like
+apt-get might be your friend.
+ - catdoc / catppt
+ - pdftotext
+ - xls2cvs
+ - jhead
+
+8. Figure out authentication (read doc/AUTH)
View
@@ -1,71 +0,0 @@
-To install flagship docs
-1. Go to where you want to install Flagship Docs
-rowez@Midgard:~$ cd /var/rails/rowez/
-2. Run git clone git://github.com/wtg/flagship_docs.git
-rowez@Midgard:/var/rails/rowez$ git clone git://github.com/wtg/flagship_docs.git
-3. Run git submodule init and git submodule update
-rowez@Midgard:/var/rails/rowez$ cd flagship_docs/
-rowez@Midgard:/var/rails/rowez/flagship_docs$ git submodule init
-rowez@Midgard:/var/rails/rowez/flagship_docs$ git submodule update
-4. create a symbolic link if rails app not in your web directory
-rowez@Midgard:/var/rails/rowez/flagship_docs$ cd /var/www/rowez/
-rowez@Midgard:/var/www/rowez$ ln -s /var/rails/rowez/flagship_docs/public/ ./flagship_docs
-rowez@Midgard:/var/www/rowez$ cd /var/rails/rowez/flagship_docs
-5. create an .htaccess file in your /public directory (passenger only)
-rowez@Midgard:/var/rails/rowez/flagship_docs$ nano ./public/.htaccess
-PassengerEnabled on
-RailsEnv development
-RailsBaseURI /rowez/flagship_docs
-6. Copy in ldap_initializer.rb
-rowez@Midgard:/var/rails/rowez/flagship_docs$ cp ../flagship_docs/config/initializers/ldap_initializer.rb ./config/initializers/
-7. create a database.yml in your /config directory
-rowez@Midgard:/var/rails/rowez/flagship_docs$ nano ./config/database.yml
-# MySQL. Versions 4.1 and 5.0 are recommended.
-#
-# Install the MySQL driver:
-# gem install mysql
-# On Mac OS X:
-# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
-# On Mac OS X Leopard:
-# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
-# This sets the ARCHFLAGS environment variable to your native architecture
-# On Windows:
-# gem install mysql
-# Choose the win32 build.
-# Install MySQL and put its /bin directory on your path.
-#
-# And be sure to use new-style password hashing:
-# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
-development:
- adapter: mysql
- encoding: utf8
- reconnect: false
- database: flagship
- pool: 5
- username:
- password:
- socket: /var/run/mysqld/mysqld.sock
-
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
-test:
- adapter: mysql
- encoding: utf8
- reconnect: false
- database: flagship
- pool: 5
- username:
- password:
- socket: /var/run/mysqld/mysqld.sock
-
-production:
- adapter: mysql
- encoding: utf8
- reconnect: false
- database: flagship
- pool: 5
- username:
- password:
- socket: /var/run/mysqld/mysqld.sock
-8. restart app

0 comments on commit d34eef7

Please sign in to comment.