Skip to content

Commit

Permalink
Merge pull request #32 from OSC/add-sftp
Browse files Browse the repository at this point in the history
Add sftp host env variable
  • Loading branch information
johrstrom authored Oct 14, 2019
2 parents fd93276 + d31951e commit c678eb1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.


## [Unreleased]
### Added
- added SFTP links to support [#3](https://github.com/OSC/frame-renderer/issues/3)

## [0.1.1] - 2019-09-26
### Fixed
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,18 @@ execute the yum install command.

`sudo yum install ondemand-frame-renderer`

## Custom Initializers
### Customizing the install

### Env file

Create the file `/etc/ood/config/apps/frame-renderer/env` and add these entries.

```bash
# the sftp host your users can connect to to upload and download their project files.
SFTP_HOST=my-host.net
```

### Initializers

Create the file `/etc/ood/config/apps/frame-renderer/config/initializers/site_cluster_overrides.rb`
and populate it with the ruby class definition below. Notes are given as to why you're overriding
Expand Down
7 changes: 7 additions & 0 deletions app/views/projects/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
Before making a new project here, be sure to upload the project to the servers if the files are not already there. <br>
You can follow the directions on the <a href="https://github.com/OSC/frame-renderer/#upload-your-project">README</a> on how to do so.
<br><br>

<% if Configuration.sftp_host %>
If you already have an SFTP client installed, you can click
<a href="sftp://<%= ENV["USER"] %>@<%= Configuration.sftp_host %><%= @project.directory %>/">here</a> to open it.
<br><br>
<% end %>

</div>

<%= render 'form' %>
4 changes: 4 additions & 0 deletions config/configuration_singleton.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def locales_root
Pathname.new(ENV['OOD_LOCALES_ROOT'] || "/etc/ood/config/locales")
end

def sftp_host
ENV['SFTP_HOST']
end

private

# The environment
Expand Down

0 comments on commit c678eb1

Please sign in to comment.