-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Apache2.4 support #552
Apache2.4 support #552
Conversation
I think @hunner will need to take a look at the Travis issues. |
apache::mod { 'authz_groupfile': } | ||
apache::mod { 'authz_user': } | ||
apache::mod { 'env': } | ||
} elsif $mods { | ||
apache::default_mods::load { $mods: } | ||
|
||
if $::osfamily == 'debian' and $apache_version >= 2.4 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the necessity to check for $::osfamily here.
I think as a general comment I could say: Why are you using recreating the facility that we already provide through |
@igalic I have updated the branch to include a |
It breaks apache module as httpd.conf.erb contains IncludeOptional out of any conditional bloc, which makes apache fail to start on any apache 2.2 setup |
I tested this on Ubuntu 13.04 with Apache 2.3 and without the apache_version param class { 'apache': } and Ubuntu 13.10 with Apache 2.4 and apache_version param class { 'apache':
apache_version => 2.4
} Both started Apache fine. Please make sure you are testing with the |
The issue was on a debian which only has 2.2. But you're right, tested with master, and apache24_support branch seems to fix this issue. |
We need to make sure this still works with 2.2, and, with distros other than Debian/Ubuntu. Otherwise, the code now looks quite reasonable. I'll just need a greenlight from @apenney regarding tests. I've been out of the loop for quite some time and I'm not up-to-date on our new best-must-have-practice regarding acceptance tests. |
@ptomulik I can't seem to get a virtual machine working with FreeBSD. I don't have much experience with it (i have installed it once). Would you be so kind as to test my branch with changes to make sure it still works on the OS. You will need to use it with: class { 'apache':
apache_version => 2.4
} |
Puppetlabs doesn't seem to have freebsd prefabs yet, but as I know their'e working on it, and it should appear in not so distant future, there is also issue report opened for it. I'll try some manual experiments on my FreeBSD system, if I'll find some spare time. In the meantime you may try this box: https://github.com/wunki/vagrant-freebsd. I found it to be quite easy - you install vagrant on your Linux, download Vagrantfile, start machine with |
sorry, messed up with links, but now it's updated :) |
@ptomulik I tried that vagrant config file. It got to the stage where it mounts nfs shares and stops. I can ssh into the box when its up, but the mount (/vagrant) is not there. I have tried with virtualbox 4.2 and 4.3 on ubuntu. |
I'm lame, what is that /vagrant dir for? |
Ok, it's probably about synced folders, so if you don't have one, maybe just try to scp what you need from the host machine? |
Anything in the /vagrant folder on the vm is usually linked to the directory whee the vagrant config and puppet modules/manifests are on the host. Tried the scp too. The box didn't have puppet installed. I tried installing puppet and I got a weird error with pkg add tring to install depenency libraries. #Sigh. I will try again, maybe with a fresh install in vbox |
Ah, you need to configure pkg repo, perhaps. See hashicorp/vagrant-installers#32 (comment) |
And, this box uses pkgng, so if you meant |
Nice one cheers.
|
If you need to install packages from puppet, change the provider. There are at least two options, I think: install the zleslie-pkgng module to puppet, or try my ptomulik-packagex_portsx experimental module, which installs from ports (I think pkgng should be better for this purpose, so then |
Ok, after a few tweaks on the box (/etc/hosts, get puppet working) i successfully installed apache22 with puppet. Now, apache24 is a different breed on FreeBSD. it looks like the mpm is compiled in to create the binary package
This means that, for now, the apache24 mpm support can't be built into puppet for FreeBSD. Unless someone knows any different, it will simply have to bypass mpm installation if apache_version >= 2.4 and OS is freebsd |
@igalic What would you think about the following gist(https://gist.github.com/smitherz82/8419976). This would try to guess the apache version based on OS but still be overridable as with the below partial: class apache (
$apache_version => $apache::version::apache_version
) {
} |
@smitherz82 On FreeBSD you must also choose a port/package based on apache version. 2.2 -> www/apache22, 2.4 -> www/apache24 and so on. |
@ptomulik Yeh, the problem i have faced is not www/apache22 or www/apache24. |
@smitherz82 if you install freebsd packages from ports you may choose at compile time what MPM (or MPMs) you include. You may also enable shared MPMs and include all existing MPMs at compile time to decide at runtime what to use (this is how apache 2.4 is compiled for Debian for example). If from pkgng, you're condemned to use default settings (but I believe there is a way to use custom settings as well with some extra effort). Unfortunately, it's not possible currently to define port options from puppet manifests. I've put recently few PRs to puppet core to fix this, see puppetlabs/puppet#2130. Unfortunately it seems like they're going to be rejected. PL team is planning to reorganize the puppet's code, see this thread, such that all the above stuff would be available as additional modules. Another possibility is to use ptomulik-packagex_portsx module which is exactly same code and shall work with any recent puppet release. The module however uses it's own resource type called Yet another possibility is to just set manually options ( |
@smitherz82 |
@ptomulik It seems that, for this PR, it may be best to hold FreeBSD back to Apache 2.2. |
okay,we'll concentrate on FreeBSD once puppet works there. (Although, tbh, I also consider it a bug of the 2.4 port, that prefork is the default rather than event) |
@smitherz82 it appears your squashed commit has a different email than GitHub knows, you may want to fix that. |
The commits are merged in from @domcleal and works on Ubuntu 13.10. |
You still need to rebase against master.
|
Branch all up to date with master and tests pass. |
Travis had one failure and died on three of the tests. |
joy. How do we make travis not give up us? |
Can haz better Travis box pleeease? |
Acceptance tests work on the following nodes:
|
I'm going to merge this unless anyone objects. I don't think we can convince Travis to stop dying for this particular PR. |
+1 |
Changed the ssl module to use default for the new Mutex with Apache 2.4 on Ubuntu
Great, thanks @smitherz82! |
Fix error does not show when image:tag does not exists (puppetlabs#552)
Add Apache 2.4 support by using override variable 'apache_version'.
This is in place of pull request #550