Skip to content

Latest commit

 

History

History
110 lines (75 loc) · 3.27 KB

RakeTasks.md

File metadata and controls

110 lines (75 loc) · 3.27 KB

Archelon Rake Tasks

docker:tags, docker:build, docker:push

There are three Rake tasks to list, build, and push Docker images for the Archelon application as well as the SFTP service. The image tag version is determined by the value of Archelon::VERSION. If it contains the string "dev", then it is considered a development version as is tagged using "latest". Any other value is used as-is.

Note that once a non-"latest" tag has been successfully pushed, further attempts to push that same tag will fail.

# lists the tags that would be built or pushed
rails docker:tags

# builds "docker.lib.umd.edu/archelon:VERSION" and "docker.lib.umd.edu/archelon-sftp:VERSION"
rails docker:build

# push to the registry
rails docker:push

Implemented using Boathook::DockerTasks from the boathook gem; source: docker.rake

jobs:work

To enable job execution, start the delayed_job workers:

rails jobs:work

plantuml:images

Generate SVG images from the PlantUML source documentation in the docs directory. The output files are placed in docs/img

Requires the PLANTUML_JAR environment variable to be set, giving the full path to the plantuml.jar file to run. It is recommended to add this value to a .env or .env.local file on your development workstation.

rails plantuml:images

Source: plantuml.rake

stomp:listen

The STOMP Listener application connects Archelon to ActiveMQ, and is required for performing exports and imports. The STOMP listener application is configured via the environment variables in the ".env" file, and run using the following Rake task:

rails stomp:listen

Source: stomp.rake

user:add_public_key

Adds the given public key for the user with the given CAS directory id:

rails user:add_public_key[cas_directory_id,public_key]

A user with the given CAS directory id must already exist.

Note: Because of the way SSH public keys are expressed, the command should be enclosed in quotes, i.e.:

rails "user:add_public_key[jsmith,ssh-rsa AAAAB3NzaC1yc2E...]"

Source: add_public_key.rake

user:add_public_key_file

Adds the public key from the given file for the user with the given CAS directory id:

rails user:add_public_key_file[cas_directory_id,public_key_file]

A user with the given CAS directory id must already exist.

Relative file paths are allowed. If the file path or file name contains a space, the entire command should be enclosed in quotes.

Example:

rails user:add_public_key_file[jsmith,/home/jsmith/.ssh/id_rsa.pub]

Source: add_public_key.rake