Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy_modules method to fabric tools #39

Open
pbchase opened this issue Mar 21, 2018 · 2 comments
Open

Add deploy_modules method to fabric tools #39

pbchase opened this issue Mar 21, 2018 · 2 comments

Comments

@pbchase
Copy link
Contributor

pbchase commented Mar 21, 2018

Module updates that are done using Fabric tools have a tedious, multi-step workflow as shown here.

faster module release workflow

The fabric tools could benefit from a task designed to deploy and enable a module from a code release. See the green text above.

@pbchase
Copy link
Contributor Author

pbchase commented May 25, 2018

This issue could be broken down into as many as four releases in a series of incremental improvements. That series might look like this:

Deploy and enable one module. This is the minimally functional feature.

  • get_latest_release_tag (on github)
  • get_latest_release_zip (download it from github to local)
  • deploy_module_from_release (upload release zip to host and expand it in the redcap modules directory with an appropriately named and versioned directory. e.g., auto_populate_fields_v2.3.0)
  • deploy_module (a fabric task)
  • enable_module (a fabric task)

Deployment Usage:

fab vagrant deploy_module:ctsit/imagemap
fab vagrant deploy_module:ctsit/imagemap,1.2.1
fab vagrant deploy_module:ctsit/imagemap,,0.0.0
fab vagrant deploy_module:ctsit/imagemap,1.2.1,0.0.0
fab vagrant deploy_module:'https://github.com/ctsit/imagemap

Enable Usage:

fab vagrant enable_module:imagemap
fab vagrant enable_module:imagemap,0.0.0
fab vagrant enable_module:imagemap,1.2.1
fab vagrant enable_module:'https://github.com/ctsit/imagemap'

Deploy and enable multiple modules. This feature would be driven by the existing modules.json. It would be implemented via these methods.

  • get_module_list
  • deploy_modules
  • enable_modules

Deploy and enable only as needed. This is an incremental deployment and enabling of modules. It would require these methods:

  • get_deployed_modules
  • get_enable_modules

Additionally, the deploy_modules and enable_modules methods would need to be revised to consume the inputs acquired by these modules and not deploy or enable where that work was already done.

Deploy pre-release code. It might be useful to test unreleased code in a non-local environment. To do that we would need a method, deploy_module_from_directory.

@pbchase
Copy link
Contributor Author

pbchase commented May 25, 2018

To get the inputs for get_latest_release_tag and get_latest_release, consider these examples:

# to enumerate releases in json
curl -L -s 'https://api.github.com/repos/ctsit/redcap_webservices/tags'

# to download a release
curl -L -s https://github.com/ctsit/redcap_webservices/archive/1.0.3.zip -O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant