Skip to content

Commit b8f803a

Browse files
committed
Merge branch 'release/0.4.1'
2 parents d132ed2 + 305b819 commit b8f803a

File tree

4 files changed

+72
-32
lines changed

4 files changed

+72
-32
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to the REDCap Deployment project will be documented in this
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

55

6+
## [0.4.1] - 2016-04-25
7+
### Changed
8+
- Correct documentation and make it more suitable for public consumption (Philip Chase)
9+
10+
611
## [0.4.0] - 2016-04-25
712
### Added
813
- Enable ssl in apache config (Philip Chase)

README-hooks.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ activated. Activations can be global or project specific.
1212

1313
## Deployment
1414

15-
Hooks are deployed with the script ./deploy_extensions.sh from the repo ssh://git
16-
@ctsit-forge.ctsi.ufl.edu/redcap\_deployment.git.
15+
Hooks are deployed with the script ./deploy_extensions.sh. More specifically,
16+
the function _deploy\_hooks_ in deployment_functions.sh does the hook
17+
deployment.
1718

18-
deploy_hooks.php requires a data file as input to indicate the scope of the
19+
deploy_hooks requires a data file as input to indicate the scope of the
1920
script, which hook will trigger it and the relative path to the script. A
2021
sample input file would look like this:
2122

@@ -28,19 +29,27 @@ The activated hook list for the CTSI REDCap servers are in ./hooks/\<INSTANCE_NA
2829
redcap.ctsi.ufl.edu
2930
redcapstage.ctsi.ufl.edu
3031

31-
deploy_hooks.sh will copy all the needed files from the redcap-extras repo to
32-
the hooks folder of the REDCap instance given the path to the appropriate data
33-
file. On the CTSI Prod instance, you could deploy with this command:
32+
Deploy_hooks will copy all the needed files from the redcap-extras repo to
33+
the hooks/library folder of the REDCap instance. It will then activate hooks based on contents of the file ./hooks/\<INSTANCE_NAME\>data.csv.
3434

35-
sudo ./deploy_extensions.sh hooks/redcap.ctsi.ufl.edu/data.csv
35+
By default, it uses the UF CTSI production data for hook activation. To change this, specify an alternative configuration by exporting these 3 variables:
36+
37+
REDCAP_ROOT - the full path to the Apache document root of your redcap server
38+
REDCAP_HOOKS - the full path the to hooks folder under $REDCAP_ROOT
39+
HOOKS_CONFIGURATION - the name of the directory ./hooks/\<INSTANCE_NAME\> that has the correct data.csv
40+
41+
e.g.
42+
43+
export REDCAP_ROOT=/var/https/redcap
44+
export REDCAP_HOOKS=$REDCAP_ROOT/hooks
45+
export HOOKS_CONFIGURATION=redcap.ctsi.ufl.edu
3646

3747

3848
## Activate the hooking mechanism
3949

4050
REDCap requires the hooking mechanism be activated in the Control Center.
4151
This is a system-wide setting. The REDCap hooking mechanism must be activated
42-
by setting the Control Center -> General Configuration -> REDCap Hooks to
43-
'/var/https/redcap/hooks/redcap_hooks.php'
52+
by setting the Control Center -> General Configuration -> REDCap Hooks to the path to the redcap\_hooks.php file deployed by this repo. For UF CTSI, this path is _/var/https/redcap/hooks/redcap\_hooks.php_
4453

4554

4655
### Details

README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This repo documents the scripts and tools used by CTS-IT for deployments and
5+
This repo documents the scripts and tools used by CTS-IT for deployments and
66
upgrades to the CTSI REDCap staging and production instances. This repo
77
includes a Vagrant VM on which these tools can be developed and tested.
88

@@ -13,10 +13,29 @@ production and staging instances of REDCap at the CTSI.
1313
## Requirements
1414

1515
A user of these tools will need to download and provide their own REDCap bits,
16-
downloaded from Vanderbilt. This REDCap .zip should be placed in the /vagrant folder.
16+
downloaded from Vanderbilt. This REDCap .zip should be placed in the root folder.
1717
It should not be renamed.
1818

19-
This VM requires that Vagrant and VirtualBox be installed on the host system.
19+
This VM requires that Vagrant, VirtualBox and the vagrant-hostsupdater plugin be installed on the host system.
20+
21+
See [Creating the Test VM With Vagrant](docs/creating_the_test_vm_with_vagrant.rst) for details on how to mee those requirements.
22+
23+
24+
## Using the Development environment
25+
26+
To with the above requirements met, start the VM with the command
27+
28+
vagrant up
29+
30+
After about two minutes, the VM should be accessible at [http://redcap.dev/redcap/](http://redcap.dev/redcap/) and at [https://redcap.dev/redcap/](https://redcap.dev/redcap/)
31+
32+
33+
## Hook and Plugin deployment
34+
35+
CTSI REDCap Hooks and Plugins are deployed using the script
36+
deploy_extensions.sh in this repo. This repo also contains the data files
37+
need to configure hook deployment for the CTSI REDCap instances. See [Hook
38+
Deployment ](README-hooks.md) for usage instructions and details.
2039

2140

2241
## REDCap upgrade
@@ -31,18 +50,20 @@ ToDo: Convert steps of wiki article to shell script.
3150
## REDCap installation
3251

3352
We do not currently have a bare-metal installation procedure. That said, the
34-
vagrant files presented in this repo contain many of the required steps in a
35-
deployment process. Other steps can be found in the above upgrade
53+
vagrant files presented in this repo contain many of the required steps in
54+
such a deployment process. Other steps can be found in the above upgrade
3655
instructions.
3756

3857
ToDo: Make vagrant provisioning scripts more like a production deployment, but
3958
don't be too wed to the prod and stage instance we have today. Make the
4059
deployment we _want_, not the deployment we have.
4160

4261

43-
## Hook deployment
62+
## Contributions
4463

45-
CTSI REDCap Hooks are deployed using the script redcap_extensions.sh from this
46-
repo, ssh://[email protected]/redcap_deployment.git. This repo
47-
also contains data files for CTSI REDCap Instance. See [Hook Deployment
48-
](README-hooks.md) for usage instructions and details.
64+
This repository was created to meet the needs of the UF CTSI REDCap Team. We
65+
have shared it as an example of how scripted deployments can be done in a
66+
Debian Linux environment. We welcome contributions that parameterize our work
67+
to make these scripts more accessible to other REDCap sites. Please fork this
68+
repository to commit and share your work. Please make pull requests against
69+
the develop branch of this repo if you would like to make a contribution.

docs/creating_the_test_vm_with_vagrant.rst

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Purpose
66

77
The "vagrant" folder was created with the goal of making testing `REDCap <http
88
://project-redcap.org/>`__ and REDCap extensions as easy as possible. The
9-
"vagrant" folder contains the `Vagrantfile <../vagrant/Vagrantfile>`__ which
9+
root folder contains the `Vagrantfile <Vagrantfile>`__ which
1010
allows you to start a virtual machine capable of running the `REDCap software
1111
<http://http://www.project-redcap.org>`__. This virtual machine will install
1212
Apache and MySQL software without any user intervention. If provided with a
@@ -19,6 +19,7 @@ RED-I to import data into a sample REDCap project:
1919
- You have to obtain the REDCap software from http://project-redcap.org/
2020
- You have to install the **Vagrant** software
2121
- You have to install the **Virtual Box** software or another virtual machine provider. For this discussion we will assume Virtual Box is the virtual machine provider for Vagrant.
22+
- You have to install the Vagrant hostsupdater plugin
2223

2324
Steps
2425
-----
@@ -43,31 +44,39 @@ On Mac OSX users using brew can install these packages using brew cask:
4344
- brew cask install virtualbox
4445
- brew cask install vagrant
4546

47+
48+
2. Install Hosts updater plugin
49+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50+
51+
Vagrant will need one plugin for this VM. On any platform:
52+
53+
- vagrant plugin install vagrant-hostsupdater
54+
4655
For more details about Vagrant software you can go to
4756
`why-vagrant <https://docs.vagrantup.com/v2/why-vagrant/>`__ page.
4857

49-
2. Get your REDCap zip file
50-
~~~~~~~~~~~~~~~~~~~
58+
59+
3. Get your REDCap zip file
60+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
5161

5262
As mentioned above you have to obtain a copy of the REDCap software from http
5363
://project-redcap.org/. Save the file with its default name to ./vagrant
5464
folder. This ensures that in the provisioning script `bootstrap.sh
55-
<../vagrant/bootstrap.sh>`__ script can extract the files to the virtual
65+
<bootstrap.sh>`__ script can extract the files to the virtual
5666
machine path "**/var/www/redcap**\ ".
5767

5868
If you put multiple redcap*.zip files in the vagrant folder, the provisioning
5969
script will use the one with the highest version number.
6070

61-
3. Start the VM
71+
4. Start the VM
6272
~~~~~~~~~~~~~~~
6373

6474
Follow this procedure to start the REDCap VM:
6575

6676
.. raw:: html
6777

6878
<pre>
69-
# must be in the redi/vagrant/ directory
70-
cd ./vagrant
79+
# must be in the root directory of this repository
7180
vagrant up
7281
</pre>
7382

@@ -87,17 +96,13 @@ message like this at the end of the log:
8796

8897
The REDCap web application should be accessible in the browser at
8998

90-
http://localhost:8080/redcap/
91-
92-
If port 8080 is already in use on your computer Vagrant will choose a
93-
different port automatically. Read the log of "vagrant up" and note the port
94-
to be used.
99+
http://redcap.dev/redcap/
95100

96101
The REDCap instance will be setup with the sample projects that shipped with
97102
that REDCap zip file.
98103

99104

100-
4. Verify the VM is running via the console
105+
5. Verify the VM is running via the console
101106
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102107

103108
You can also verify the virtual machine is working properly by accessing it

0 commit comments

Comments
 (0)