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

Changes to Enable SSH for Repository hosting #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Changes to Enable SSH for Repository hosting #4

wants to merge 2 commits into from

Conversation

itwasntandy
Copy link
Contributor

We use Git over SSH for repository hosting. Adding the ability for
this cookbook to be used for configuring the phab host for this.
Runs an additional SSH Daemon on port 617 (configurable) for this
purpose.

Test cases added to ensure the daemon is installed and configured.

N.B. This is only for Ubuntu 14.04 or newer, due to need for
AuthorizedKeysCommand which came in OpenSSH 6.2.

Functionality is disabled on Ubuntu 12.04, and test cases are skipped
in that case.

We use Git over SSH for repository hosting. Adding the ability for
this cookbook to be used for configuring the phab host for this.
Runs an additional SSH Daemon on port 617 (configurable) for this
purpose.

Test cases added to ensure the daemon is installed and configured.

N.B. This is only for Ubuntu 14.04 or newer, due to need for
AuthorizedKeysCommand which came in OpenSSH 6.2.

Functionality is disabled on Ubuntu 12.04, and test cases are skipped
in that case.
default['phabricator']['ssh_vcs_port'] = '617'

# User for Source code hosting
default['phabricator']['vcsuser'] = 'git'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest that the VCS functions are namespaced into e.g. ['phabricator']['vcs_hosting'] (or, preferably, something a little more elegant)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thanks

@kimtore
Copy link
Contributor

kimtore commented Oct 7, 2015

Thank you very much for the patch. I'll look a bit further into it, possibly tomorrow, or at least when I have free time 👍

@kimtore
Copy link
Contributor

kimtore commented Oct 7, 2015

Sorry for spamming with comments. Can you run your patch through Foodcritic to eliminate all linting errors? (with the exception that spaces should be set to 4, not 2)

@itwasntandy
Copy link
Contributor Author

Sure thing.. although I noted you're also using double quotes throughout the cookbook not single.. and are using the old style ruby hash syntax.

Would you like those fixed up, or would it be ok to commit a .rubocop.yml to set these preferences?

@kimtore
Copy link
Contributor

kimtore commented Oct 8, 2015

Ah, don't worry about those. I should fix these in a separate commit, thanks.

Making naming more consistent and breaking out the vcs hosting over ssh into a
separate attribute namespace under `node['phabricator']['vcs_ssh']`

Fixing some linter errors too, and deleting an unused template.
@itwasntandy
Copy link
Contributor Author

I pushed changes to this last week - are you happy with them? or would you like further change?

@kimtore
Copy link
Contributor

kimtore commented Oct 13, 2015

Sorry, been very busy at work so haven't gotten any time to look at it. I'll check it out tomorrow.

append_paths << '/usr/local/bin'
append_paths << '/usr/lib/git-core'

default['phabricator']['config']['environment.append-paths'] = %('#{append_paths}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious to why this attribute is conofigured in vcs_ssh_hosting.rb and not default.rb? It looks like it belongs in the latter file.

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

Successfully merging this pull request may close these issues.

2 participants