Fez Institutional Repository software
PHP HTML JavaScript CSS ColdFusion Python Other
Clone or download
ckortekaas 🔨 When a record is updated it will only based it on found existing s…
…earch keys that are for that doc type (not leftovers). Strip all search keys just before updating for change doc type workflows. [finishes #157797348]
Latest commit 3e1a5b7 Jul 20, 2018
Permalink
Failed to load latest commit information.
.codeship 🌍 Updated to new docker-fpm71-fez base for env change to work [#1523… Oct 27, 2017
.docker Merge branch 'master' of https://github.com/uqlibrary/fez Jul 16, 2018
build Code Sniffer fez_zend template updates Dec 19, 2012
data Copy CF required file into new data dir. Set env vars for that copy i… Mar 21, 2016
pidimages Add in missing directory for pidimages (Permissions need to be set) Nov 20, 2015
public 🔨 When a record is updated it will only based it on found existing s… Jul 20, 2018
scripts Ignore errors creating the dirs / prune and remove orphans when runni… Jun 29, 2018
tests - updating regex for hashed pid Apr 19, 2018
util Set env vars in dump script from config in S3 Mar 1, 2017
.dockerignore Initial commit of testing using jet CLI Nov 23, 2015
.gitignore 🏢 Upgraded to docker-compose 3 syntax. Added docker-for-mac override… Jun 28, 2018
CONTRIBUTING.md 🔥 campfire be gone Jan 25, 2017
Dockerfile Updated to latest docker fpm refresh to rule out php version from … Feb 12, 2018
Dockerfile.codeonly 🙏 Created flash file uploader 'tmp/uploader' dir to start with to pr… Nov 13, 2016
Dockerfile.deploy Deployment docker file / Updated env file Mar 7, 2016
Dockerfile.production Updated to latest docker fpm refresh to rule out php version from … Feb 12, 2018
Dockerfile.runner Updated to latest docker fpm refresh to rule out php version from … Feb 12, 2018
Dockerfile.staging Updated to latest docker fpm refresh to rule out php version from … Feb 12, 2018
LICENCE Changed contributing to a .md markdown file and actually added the li… Oct 4, 2013
README.md Update README.md Jul 9, 2018
aws_creds.encrypted Fixing filename of aws creds (for ECR login) Mar 17, 2017
codeship-services.yml 🚢 removed the codeship services 'privileged' flag as it isn't suppor… Jan 12, 2018
codeship-steps.yml added nodata tests back on Apr 17, 2017
composer.json ☁️ elasticsearch up to 6.1.2 along with elasticsearch-php upgrade to… Jan 29, 2018
composer.lock ☁️ elasticsearch up to 6.1.2 along with elasticsearch-php upgrade to… Jan 29, 2018
composer.phar 🔍 Updated to ElasticSearch 5. Default to AND based boolean searching… Oct 25, 2016
deployment.env.encrypted Run production tests in bypass mode Sep 28, 2016
dockercfg.encrypted step 1, prepping staging deployment Dec 7, 2015
local_jet_steps.sh ⚓️ Replication codeship aws environment locally with local_jet_steps.sh Oct 6, 2016

README.md

Fez

Codeship Status for uqlibrary/fez

Developed with
alt text

Fez is a PHP / MySQL front end to the Fedora repository software. It is developed by the University of Queensland Library as an open source project.

We will add more to github markdown wiki documentation soon, please see https://github.com/uqlibrary/fez/wiki for updates.

Development quick start

Add the following to your hosts file:

127.0.0.1    dev-fez.library.uq.edu.au fezdb

If you are using docker-machine, replace the 127.0.0.1 with the result of docker-machine ip fez-vm

Start the docker container using docker-compose:

$ cd /path/to/repo/.docker/development
$ docker-compose up -d

Once the containers are running proceed with the setup steps below.

Setup

Install fez:

$ cd /path/to/repo
$ ./scripts/dev.sh

This will create a config.inc.php for you and setup some basic configs.

Once the script has completed you can now login:

http://dev-fez.library.uq.edu.au:8080/login.php

u: superadmin_test
p: Ilovedonkey5

Run the sanity checks:

http://dev-fez.library.uq.edu.au:8080/upgrade/check_sanity.php

Celebrate your new Fez dev site!

Testing

To run the tests:

$ cd /path/to/repo
$ ./scripts/run-tests.sh

To visually see the functional tests running in a browser, VNC into dev-fez.library.uq.edu.au:5900 with the password secret.

You can also run the tests using Codeship Jet:

$ cd /path/to/repo
$ jet steps

Useful Links

Fedora Tomcat Admin

http://dev-fez.library.uq.edu.au:10081/manager/html

u: fedoraAdmin p: fedoraAdmin

NB: Sometimes fedora (inside tomcat, inside the fedora container) doesnt start on boot because maybe the fedora sql container wasn't ready in time. If this happens just go to the above link and login and click start on the fedora tomcat application.

Solr Dashboard

http://dev-fez.library.uq.edu.au:8983/solr

Docker Machine setup for Elasticsearch

NB: If you are using Docker Machine (which uses Boot2Docker) you first need to adjust these settings or the ElasticSearch container will not run:

$ docker-machine ssh [machine name]
$ sudo sysctl -w vm.max_map_count=262144

NB: Also put that last command in /var/lib/boot2docker/bootlocal.sh so it stays on reboot:

$ docker-machine ssh default
$ sudo vi /var/lib/boot2docker/bootlocal.sh

Add this line into /var/lib/boot2docker/bootlocal.sh

sudo sysctl -w vm.max_map_count=262144

Then make sure the bootlocal.sh file is executable

$ sudo chmod +x /var/lib/boot2docker/bootlocal.sh

Elasticsearch Kibana Dashboard

http://dev-fez.library.uq.edu.au:5601

Bypass Setup (Experimental!)

To run Fez with Bypass enabled, export the following environment variables:

AWS_ACCESS_KEY_ID="REPLACEME"
AWS_SECRET_ACCESS_KEY="REPLACEME"
FEZ_S3_BUCKET="REPLACEME"
FEZ_S3_CACHE_BUCKET="REPLACEME"
FEZ_S3_SRC_PREFIX="REPLACEME"
AWS_CLOUDFRONT_KEY_PAIR_ID="REPLACEME"
AWS_CLOUDFRONT_PRIVATE_KEY_FILE="REPLACEME"
AWS_CLOUDFRONT_FILE_SERVE_URL="REPLACEME"

Where AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY have access to the bucket FEZ_S3_BUCKET and FEZ_S3_CACHE_BUCKET. For shared buckets, e.g. in development, add you username to FEZ_S3_SRC_PREFIX.

The FEZ_S3_BUCKET and FEZ_S3_CACHE_BUCKET should be created manually in S3 before running the dev.sh script. Folders required in this bucket will be generated by the script automatically, and cleared if they already exist.

CloudFront settings are not just for production but can be used to test file delivery in a development environment and some features require it like the pdf bookreader functionality. The CloudFront private key is a full path to the file as it exists in the container. The file serve url is the full distribution url including protocol eg "https://fez.org". The key pair ID is found in your AWS Cloudfront security configuration settings.

Debugging

  • Set up a PHP server in PHPStorm: PhpStorm -> Preferences -> Languages & Frameworks-> PHP -> Servers
  • Add the new server with name + host dev-fez.library.uq.edu.au and port 8080
  • Click on "Add path mapping" and find the project repo in the left panel. Click on the right of it and write /var/app/current
  • Open the DBGP proxy configuration in PHPStorm: Tools -> DBGp Proxy -> Configuration
  • Key: PHPSTORM, host: dev-fez.library.uq.edu.au, port: 9081
  • Register IDE: Tools -> DBGp Proxy -> Register IDE
  • In PHPStorm, click the Start Listening for PHP Debug Connections icon
  • All done!