ResourceSpace 7.5.7458 on OpenShift http://resourcespace-cscdb.rhcloud.com
# ssh into openshift remote repo
rhc ssh resourcespace
# backup config.php and filestore
cp ${OPENSHIFT_REPO_DIR}include/config.php ${OPENSHIFT_DATA_DIR}
cp -R ${OPENSHIFT_REPO_DIR}filestore ${OPENSHIFT_DATA_DIR}
# exit from openshift ssh
exit
# check for local file changes
git status
# stage files for commit
git add ...
# check for unincorporated changes on bitbucket remote repo
git pull origin master
# check for unincorporated changes on openshift remote repo
git pull openshift master
# commit the staged files
git commit -m "[message]"
# push the new commit to remote repos on bitbucket and openshift
git push origin master
git push openshift master
in the Archivist user group, add the e0 permission so these users can view files immediately after upload (without waiting for admins to approve the file)
- login as admin
- Team Center > System > Manage User Groups > Archivists > Edit > Launch permissions manager > Resource creation/management > e0 Edit access to workflow state 'Active'
- click the checkbox next to e0, scroll to the bottom of the page, and click Save
- add SendGrid from the OpenShift Marketplace
- click Manage Product, then click the Settings tab
- set a new password, and note the username assigned to you
- configure ResourceSpace to send emails using SendGrid; ref: SMTP Relay
# ssh into openshift remote repo
rhc ssh resourcespace
# edit the config file
vim ${OPENSHIFT_REPO_DIR}include/config.php
- add the following lines to the end of config.php
# Use an external SMTP server for outgoing emails (e.g. Gmail).
# http://wiki.resourcespace.org/index.php/Email_using_an_external_SMTP_server
$use_smtp=true;
# SMTP settings:
$smtp_secure='ssl';
$smtp_host='smtp.sendgrid.net';
$smtp_port=465;
$smtp_auth=true;
$smtp_username='[username]';
$smtp_password='[password]';
# enable php mailer - this allows HTML format emails
$use_phpmailer=true;
- create a script called run_resourcespace_cronjob in the directory .openshift/cron/daily
- paste the following code into the script
#!/bin/bash
# run scheduled tasks included with ResourceSpace by default
php ${OPENSHIFT_REPO_DIR}batch/cron.php
# include 'php' at the beginning of the line above
# (ref: http://stackoverflow.com/questions/10097609/how-to-run-php-file-using-cron-jobs)
date >> ${OPENSHIFT_PHP_LOG_DIR}run_resourcespace_cronjob.log
# write the date string to the file 'run_resourcespace_cronjob.log'
- make the script executable
chmod +x run_resourcespace_cronjob
- add the new script file to the local git repo, then push it up
- wait a while, then check if the cron job is running
rhc tail resourcespacedev
refs: Getting started with CRON jobs, Managing background jobs
- Create a free Red Hat Openshift account
- Getting started with OpenShift
.
|-- .env
|-- app-root
| |-- data ($OPENSHIFT_DATA_DIR)
| |-- repo -> runtime/repo
| `-- runtime
| |-- data
| `-- repo ($OPENSHIFT_REPO_DIR)
| |-- ...deployed application code
| `-- include
| |-- config.php
|-- app-deployments
| |-- current
| | |-- build-dependencies
| | |-- dependencies
| | |-- metadata.json
| | `-- repo
| `-- ...application deployments
|-- git
| `-- [APP_NAME].git
| `-- hooks
| | |-- post-receive
| | |-- pre-receive
| | `-- ... sample hooks
| `-- ... other git directories
`-- ...cartridge directories
on your Mac workstation...
# generate a private key
$ cd ~/Desktop
$ openssl genrsa -des3 -out rs.key 2048
# set a password for the *.key file
...you'll now find a *.key file on your Desktop
# generate a CSR
$ openssl req -new -key rs.key -out rs.csr
# enter the password for the *.key file
# fill in the following fields...
# Country Name: US
# State: California
# Locality Name: Los Angeles
# Organization name: California Science Center
# Organizational Unit: Exhibit Development
# Common Name: imageresearch.californiasciencecenter.org
# Email: [email]@cscmail.org
# A challenge password: .
# An optional company name: .
...you'll now find a *.csr file on your Desktop
email the *.csr file to Thomas Chung in IT, and ask for an alias URL (http://imageresesarch.californiasciencecenter.org)
on the Openshift web console, create a new alias for resourcespace...
- Domain name: imageresearch.californiasciencecenter.org
- SSL certificate: OtherServer/2_imageresearch.californiasciencecenter.org.crt
- SSL certificate chain: [blank]
- Certificate private key: rs.key
- Private key pass phrase: [password for rs.key]