Get all cookbooks (Juno) working on Ubuntu trusty (14.04)

Registered by Matt Thompson

I've just tried an AIO converge and it fails. Two issues are immediately visible:

- OpenStack packages do not have init scripts in /etc/init.d, which causes chef to error out when trying to enable the service (some services like rabbitmq still have an initscript (not linked to /lib/init/upstart-job), so we need to do some investigation here)
- We seem to add the openstack-ppa repo, but this is unnecessary for trusty

-- 07/17/2014 --
Pushing this to Juno Series (j^2, markvan, galstrom)

Blueprint information

Status:
Complete
Approver:
Justin Shepherd
Priority:
Essential
Drafter:
Matt Thompson
Direction:
Approved
Assignee:
Mark Vanderwiel
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
None
Started by
Mark Vanderwiel
Completed by
Mark Vanderwiel

Whiteboard

https://tickets.opscode.com/browse/COOK-3900
https://tickets.opscode.com/browse/COOK-3837
http://stackoverflow.com/questions/21614113/error-in-template-in-apache-cookbook-when-running-to-an-ubuntu-server/21622365
https://tickets.opscode.com/browse/CHEF-5276

----

I spent some more time looking into this today, and found that:

- Ubuntu have no intention of creating init scripts for their OpenStack packages
- Chef look to be moving Ubuntu 13.10+ to use Upstart service provider (https://tickets.opscode.com/browse/CHEF-5276), we can temporarily do this in openstack-common cookbook until Chef complete that work
- rabbitmq-server doesn't have an upstart script, and the actual service is managed in the rabbitmq cookbook which we have no control over
    - running the cookbook as is on 14.04 fails when we update openstack-common cookbook as rabbitmq defaults job_control attribute to "initd" and has init.d start/stop_commands but no associated init.d enable/disable_command (and therefore tries to modify upstart script)
    - this can be fixed by either changing rabbitmq job_control attribute to "upstart" (works, but feels dirty as it actually deletes the package's /etc/init.d/rabbitmq-server script) or update the rabbitmq cookbook to use the Debian service provider when job_control is "initd" (this would prevent it from trying to do upstart things if your default provider is upstart)
- apache2 suffers a similar fate in that Ubuntu provide no upstart script and the package is actually managed in the apache2 cookbook (the cookbook overrides restart/reload_command which makes that component work but enabling will fail due to lack of upstart script)

Not entirely sure how we proceed here.

---
Issues in other cookbooks:
- apache2 https://github.com/onehealth-cookbooks/apache2/issues/151
- rabbitmq https://github.com/kennonkwok/rabbitmq/pull/126

Based upon the above, is this work slated for icehouse, or could be pushed into Juno?

---

Bug related to this: https://bugs.launchpad.net/openstack-chef/+bug/1383262

---
Monkey patch that might be useful while other cookbooks are updated.

if node[:platform] == 'ubuntu' && node[:platform_version] == '14.04'
  ['keystone','neutron-server', ....].each do |monkey_patch|
    svc = resources(service: monkey_patch)
    svc.provider(::Chef::Provider::Service::Upstart)
  end
end

UPDATE 11/14:

As of RC1 of the chef 12 client, monkeypatches are no longer needed.
I've noticed that python-keystonemiddleware is missing from the package list for neutron-server.
Ubuntu 14.04 ships with Apache2.4 by default. This completely breaks the dashboard cookbook since it has a reliance on the apache2 cookbook < v2.0

UPDATE 11/27:

here you can find a starting point for working on/testing the juno-14.04 thingies

https://github.com/iteh/chef-openstack-testing-stack/tree/juno#adding-ubuntu-1404-box

- nova network is confirmed working
- there is an issue with block storage (have to have look what)
- currently checking neutron

Gerrit topic: https://review.openstack.org/#q,topic:bp/trusty-juno,n,z

Addressed by: https://review.openstack.org/152295
    Trusty juno updates

Addressed by: https://review.openstack.org/152297
    Trusty juno updates

Addressed by: https://review.openstack.org/152299
    Trusty juno updates

Addressed by: https://review.openstack.org/152300
    Trusty juno updates

Addressed by: https://review.openstack.org/152308
    Trusty juno updates

Addressed by: https://review.openstack.org/152310
    Trusty juno updates

Addressed by: https://review.openstack.org/152311
    Trusty juno updates

Addressed by: https://review.openstack.org/152312
    Trusty juno updates

Addressed by: https://review.openstack.org/152313
    Trusty juno updates

Addressed by: https://review.openstack.org/152315
    Trusty juno updates

Addressed by: https://review.openstack.org/152316
    Trusty juno updates

Addressed by: https://review.openstack.org/152317
    Trusty juno updates

Addressed by: https://review.openstack.org/152322
    Trusty juno updates

Addressed by: https://review.openstack.org/155490
    MySql cookbook ver 6 changes

Addressed by: https://review.openstack.org/155491
    MySql cookbook ver 6 changes

(?)

Work Items

Work items:
infra change to allow our rake tests to run: DONE
infra change to allow trusty, chef 12, chef dk to run our rake tests (Jan): POSTPONED
infra change to allow existing/old stable branches to continue to use old gates without rake: POSTPONED
update all Gemfiles to use chef 12: POSTPONED
update all spec helpers to go after trusty: INPROGRESS
update to use mysql ver 6 cookbook: INPROGRESS

This blueprint contains Public information 
Everyone can see this information.