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.
$ 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:
u: superadmin_test p: Ilovedonkey5
Run the sanity checks:
Celebrate your new Fez dev site!
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
You can also run the tests using Codeship Jet:
$ cd /path/to/repo $ jet steps
Fedora Tomcat Admin
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.
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
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.
- Set up a PHP server in PHPStorm: PhpStorm -> Preferences -> Languages & Frameworks-> PHP -> Servers
- Add the new server with name + host
- Click on "Add path mapping" and find the project repo in the left panel. Click on the right of it and write
- Open the DBGP proxy configuration in PHPStorm: Tools -> DBGp Proxy -> Configuration
- Register IDE: Tools -> DBGp Proxy -> Register IDE
- In PHPStorm, click the Start Listening for PHP Debug Connections icon
- All done!