Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlamb7728 committed May 13, 2016
0 parents commit 9d1d36d
Show file tree
Hide file tree
Showing 183 changed files with 20,538 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

# Symfony 2 related
#

# cache, logs, etc
app/bootstrap.php.cache
app/bootstrap_cache.php.cache
app/cache/*
app/logs/*
app/sessions/*

# vendor
vendor/*

# bundle static
web/bundles/*

# doctrine entities generation backup
*.php~

# environment sensitive
web/.htaccess # see web/.htaccess.dist
web/app.php # see web/app.php.dist
web/app_dev.php # see web/app_dev.php.dist
app/config/parameters.ini # see app/config/parameters.ini.dist

#
# OS garbage, Editors, IDEs, etc
#
.DS_Store
.svn
code_coverage
*~
*.swp
coverage
.coverage
nbproject
.nbproject
build
.build
.settings
.settings/.*
.project
project
*.project
.buildpath
*.db
*.tmproj
*.sublime-project
.idea
*.idea/*
bin/*

# ignore files that will be customized
app/config/**/parameters.yml
app/config/common/security.yml
app/Resources/views/institution/*
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2004-2014 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#NYUHSL Data Catalog

Welcome to the NYU Health Sciences Library's Data Catalog project. Our aim is to encourage the sharing and reuse of research data among insitutions and individuals by providing a simple yet powerful search platform to expose existing datasets to the researchers who can use it. There is a basic backend interface for administrators to manage the metadata which describes these datasets.

##Components
The Data Catalog runs on **Symfony2**, a popular PHP application framework. Installation and management of this package is best performed by a PHP developer familiar with this framework.

The search functionality is powered by **Solr**, which will need to be running and accessible by the server hosting the website. A sample Solr schema is included with this package. The Solr index can be updated regularly by setting up a cron job which calls an update script. A sample update script is also included with this package.

The metadata and some information about users is stored in a database. We used **MySQL** and there's a good chance you will too.

**IMPORTANT NOTE:** This package comes with authentication disabled, meaning that the administrative interface is unprotected. This is so you can get started using the application in your DEV environment. It is very important to secure your website before it goes into production, and we have included code that will help you do so with **Active Directory/LDAP** authentication -- a common authentication mechanism. However, every institution will have a different configuration and some may use another scheme altogether. Some guidance on how we achieved authentication at NYU follows the installation instructions below.

##Installation
This repository is essentially a Symfony2 distribution (i.e. it is not simply a Symfony "bundle"). As such, you should be able to install this site fairly easily, after configuring it for your environment.

1. Install [Composer](https://getcomposer.org/download/), [Solr](https://wiki.apache.org/solr/SolrInstall), and set up a suitable database software such as MySQL. Create an empty database schema for this application.
2. Clone this repository into a directory your web server can serve.
```
git clone https://github.com/nyuhsl/datacatalog.git
```
3. Run `composer install` to install any dependencies
4. There are sample "parameters.yml" files in `app/config/dev` and `app/config/prod`. Fill in the information about your MySQL server, and the URL where your Solr installation lives. Remember to choose a "secret" according to the documentation [here](http://symfony.com/doc/current/reference/configuration/framework.html#secret).
5. [Configure your web server](http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html) to work with Symfony. NOTE: You will want to require HTTPS connections on the login and administrative pages (at least), so remember to set up an SSL certificate for your server when you move the site to production. There is code in app/config/common/security.yml that will tell Symfony to require HTTPS connections.
6. In the root of your Symfony installation, run `php app/console doctrine:schema:update --force`. If you have configured your database correctly, this will set up your database to match the data model used in this application. If you haven't configured it correctly, this will let you know.
7. Copy the example Solr schema ("SolrSchemaSample.xml") from the root site directory to your Solr installation's configuration directory. Copy the default "schema.xml" that came with Solr into "schema.xml.default", and rename this one "schema.xml". Perform any customizations you require, or leave as is.
8. At this point, the site should function, but you won't see any search results because there is nothing in the database, and thus nothing to be indexed by Solr. Click on the "Admin" tab, click "Add a New Dataset" in the sidebar menu, and get going!
9. Once you've added some test data, you'll want to index it in Solr. Navigate to your site's base directory and edit the file "SolrIndexer.py" to specify the URL of your Solr server where indicated. Then, run the script.

###Follow-up Tasks
1. You'll most likely want to regularly re-index Solr to account for datasets you add or edit using the Admin section. There is a script in the root directory called "SolrUpdater.py" which can update a Solr index. You'll probably want to call this script or something similar with a cron job every Sunday or every night or whatever seems appropriate, depending on much updating you do. I recommend weekly, since you can also run this script on-demand from the command line if you want.
2. You'll most likely want to brand the site with your institution's logo or color scheme. Some placeholders have been left in `app/Resources/views/base.html.twig` that should get you started.
3. You'll most likely want to have some datasets to search. Get to it!!
30 changes: 30 additions & 0 deletions UPGRADE-2.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
UPGRADE FROM 2.1 to 2.2
=======================

* The [`web/.htaccess`](https://github.com/symfony/symfony-standard/blob/2.2/web/.htaccess)
file has been enhanced substantially to prevent duplicate content with and
without `/app.php` in the URI. It also improves functionality when using
Apache aliases or when mod_rewrite is not available. So you might want to
update your `.htaccess` file as well.

* The ``_internal`` route is not used any more. It should then be removed
from both your routing and security configurations. A ``fragments`` key has
been added to the framework configuration and must be specified when ESI or
Hinclude are in use. No security configuration is required for this path as
by default ESI access is only permitted for trusted hosts and Hinclude
access uses an URL signing mechanism.

```
framework:
# ...
fragments: { path: /_proxy }
```

Functional Tests
----------------

* The profiler has been disabled by default in the test environment. You can
enable it again by modifying the ``config_test.yml`` configuration file or
even better, you can just enable it for the very next request by calling
``$client->enableProfiler()`` when you need the profiler in a test (that
speeds up functional tests quite a bit).
52 changes: 52 additions & 0 deletions UPGRADE-2.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
UPGRADE FROM 2.2 to 2.3
=======================

When upgrading Symfony from 2.2 to 2.3, you need to do the following changes
to the code that came from the Standard Edition:

* The debugging tools are not enabled by default anymore and should be added
to the
[`web/app_dev.php`](https://github.com/symfony/symfony-standard/blob/2.3/web/app_dev.php)
front controller manually, just after including the bootstrap cache:

use Symfony\Component\Debug\Debug;

Debug::enable();

You also need to enable debugging in the
[`app/console`](https://github.com/symfony/symfony-standard/blob/2.3/app/console)
script, after the `$debug` variable is defined:

use Symfony\Component\Debug\Debug;

if ($debug) {
Debug::enable();
}

* The `parameters.yml` file can now be managed by the
`incenteev/composer-parameter-handler` bundle that comes with the 2.3
Standard Edition:

* add `"incenteev/composer-parameter-handler": "~2.0"` to your
`composer.json` file;

* add `/app/config/parameters.yml` to your `.gitignore` file;

* create a
[`app/config/parameters.yml.dist`](https://github.com/symfony/symfony-standard/blob/2.3/app/config/parameters.yml.dist)
file with sensible values for all your parameters.

* It is highly recommended that you switch the minimum stability to `stable`
in your `composer.json` file.

* If you are using Apache, have a look at the new
[`.htaccess`](https://github.com/symfony/symfony-standard/blob/2.3/web/.htaccess)
configuration and change yours accordingly.

* In the
[`app/autoload.php`](https://github.com/symfony/symfony-standard/blob/2.3/app/autoload.php)
file, the section about `intl` should be removed as it is not needed anymore.

You can also have a look at the
[diff](https://github.com/symfony/symfony-standard/compare/v2.2.0%E2%80%A62.3)
between the 2.2 version of the Standard Edition and the 2.3 version.
9 changes: 9 additions & 0 deletions UPGRADE-2.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
UPGRADE FROM 2.3 to 2.4
=======================

When upgrading Symfony from 2.3 to 2.4, you need to do the following changes
to the code that came from the Standard Edition:

* We recommend to comment or remove the `firephp` and `chromephp` Monolog
handlers as they might cause issues with some configuration (`chromephp`
with Nginx for instance).
Loading

0 comments on commit 9d1d36d

Please sign in to comment.