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 sftp host env variable #32

Merged
merged 4 commits into from
Oct 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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