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

Allows sub-uri deployment #245

Closed
wants to merge 1 commit into from
Closed

Allows sub-uri deployment #245

wants to merge 1 commit into from

Conversation

ares
Copy link
Member

@ares ares commented Oct 30, 2014

With this patch you can install foreman to sub-uri like this

foreman-installer --foreman-foreman-url="https://example.com/foreman" --foreman-proxy-foreman-base-url="https://example.com/foreman"

SetEnv RAILS_RELATIVE_URL_ROOT <%= @suburi %>
Alias <%= @suburi -%> <%= @docroot %>
<Location <%= @suburi -%>>
PassengerBaseURI /
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't sound logical.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but it's only way it works. I think it's caused by our hack in https://github.com/theforeman/foreman/blob/develop/config.ru#L6 - we set the prefix manually (so we can run development server under suburi) so having this set to /foreman would end up in double prefixing.

@domcleal
Copy link
Contributor

Looks very strange, but works perfectly, thanks @ares. Could you write a couple of tests for it? The URI parsing in the manifest is my main concern, I think that could quite easily be covered to ensure for a certain version of foreman_url that the httpd template is rendered in a particular way.

@ares
Copy link
Member Author

ares commented Dec 26, 2014

@domcleal I added few tests. They do not directly test the parsing, I check content of the vhost config file. I didn't find any better way to test variable values if they are not used as a class parameters. Let me know if you have better idea how to do this.

@domcleal
Copy link
Contributor

domcleal commented Jan 2, 2015

Nope, you're spot-on, you can only test the end resources.

Merged as 4cad220, thanks @ares!

@domcleal domcleal closed this Jan 2, 2015
jturel pushed a commit to jturel/puppet-foreman that referenced this pull request May 1, 2018
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.

None yet

3 participants