redcap-docker-compose icon indicating copy to clipboard operation
redcap-docker-compose copied to clipboard

Shell scripts for multi-instance management

Open pbchase opened this issue 5 years ago • 5 comments

@123andy,

@ChemiKyle and I are really enjoying to this docker environment for our development work. We continue to look for ways to get our work done faster. Today I wrote two shell scripts to make that work easier. They are both a bit crude, but they are effective.

make_rdc_instance.sh.txt is a script designed to copy the rdc folder, make the host ports unique and localize the www and logs folder to the copy of rdc. It implements my advisories in https://github.com/123andy/redcap-docker-compose/tree/master/rdc/documentation#can-i-run-more-than-one-instance-of-redcap-docker-compose-at-the-same-time and goes a little further.

synch_module.sh.txt lives in a hypothetical ./modules folder at the root of the repo. It is designed synchronize changes to a list of modules out to a list of redcap instances, presumably created by make_rdc_instance.sh. These tools work together to make simultaneous module testing in multiple REDCaps a reality.

Are you interested in these scripts? If so, is BASH a problem? Will BASH marginalize our Windows users or is the audience already comfortable at a shell?

I'd love to get your feedback. If you like this Kyle or I can add some polish and package either or both of these in a PR.

pbchase avatar Feb 03 '20 20:02 pbchase

Hi guys,

I'm interested in the functionality but haven't had time to review. To get around the bash we could execute them in a docker container too...

-A


From: Philip Chase [email protected] Sent: Monday, February 3, 2020 12:01 PM To: 123andy/redcap-docker-compose [email protected] Cc: Andy Martin [email protected]; Mention [email protected] Subject: [123andy/redcap-docker-compose] Shell scripts for multi-instance management (#32)

@123andyhttps://github.com/123andy,

@ChemiKylehttps://github.com/ChemiKyle and I are really enjoying to this docker environment for our development work. We continue to look for ways to get our work done faster. Today I wrote two shell scripts to make that work easier. They are both a bit crude, but they are effective.

make_rdc_instance.sh.txthttps://github.com/123andy/redcap-docker-compose/files/4149899/make_rdc_instance.sh.txt is a script designed to copy the rdc folder, make the host ports unique and localize the www and logs folder to the copy of rdc. It implements my advisories in https://github.com/123andy/redcap-docker-compose/tree/master/rdc/documentation#can-i-run-more-than-one-instance-of-redcap-docker-compose-at-the-same-time and goes a little further.

synch_module.sh.txthttps://github.com/123andy/redcap-docker-compose/files/4149917/synch_module.sh.txt lives in a hypothetical ./modules folder at the root of the repo. It is designed synchronize changes to a list of modules out to a list of redcap instances, presumably created by make_rdc_instance.sh. These tools work together to make simultaneous module testing in multiple REDCaps a reality.

Are you interested in these scripts? If so, is BASH a problem? Will BASH marginalize our Windows users or is the audience already comfortable at a shell?

I'd love to get your feedback. If you like this Kyle or I can add some polish and package either or both of these in a PR.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/123andy/redcap-docker-compose/issues/32?email_source=notifications&email_token=ABY5VMMULT3POKS6SWAT5OLRBBZYDA5CNFSM4KPLE5TKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IKWIP4Q, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABY5VMJY3QANAT4E4I6HAMTRBBZYDANCNFSM4KPLE5TA.

123andy avatar Feb 06 '20 03:02 123andy

@123andy, these scripts needs to run in the host context. One is making copies of the rdc folder. The other is rsyncing a developer's edits on module code to the various www/modules folders in those copies of the rdc folders. Neither could effectively be run inside an rdc container.

pbchase avatar Feb 13 '20 11:02 pbchase

I haven't looked at it that closely but there is always a hack to be found - even if mounting the /rdc folder as a volume in a one-liner :-)

123andy avatar Feb 19 '20 07:02 123andy

I didn't explain myself well. These scripts have to run from the host. One reads from the host file system. The other writes to the host file system and then does a docker-compose up to start the environment it just configured. I made a gist for the latest version copy of the latter tool, make-rdc-instance.sh

I think I might have the solution to the BASH issue for Windows users. If we direct the Windows uses to GUI tools like Github Desktop, we can have them use the git-bash terminal that ships with it.

This flows out of a GUI-based approach I took when giving a REDCap module development class last week at UAMS. I found myself in front of a large audience of non-developers with windows laptops. To serve them, I wrote a guide that will become part of a larger module development guide we have been working on. All of this dev work centers around your redcap-docker-compose, because we think it is the tool for creating a local REDCap. We want to make rdc better for us and for the broader community of REDCap developers and admins.

pbchase avatar Mar 04 '20 22:03 pbchase

ahh. - sounds good.

123andy avatar Mar 05 '20 02:03 123andy