Rubber and ubuntu 16.04 necessary changes

117 views
Skip to first unread message

Dan Sadaka

unread,
Nov 18, 2016, 1:59:19 PM11/18/16
to rubber
I successfully bootstrapped and deployed code using rubber to Ubuntu 16.04 using the complete_passenger_mysql template
 after making the following changes:

config/rubber/rubber-apache.yml
roles:
apache:
# 16.04 change ..Dan
# packages: [apache2, apache2-utils, libapache2-mod-proxy-html, libcurl4-openssl-dev, libapache2-mod-xsendfile]
packages: [apache2, apache2-utils, libcurl4-openssl-dev, libapache2-mod-xsendfile]
web_tools:
# 16.04 change ..Dan
# packages: [apache2, apache2-utils, libapache2-mod-proxy-html, libcurl4-openssl-dev, libapache2-mod-xsendfile]
packages: [apache2, apache2-utils, libcurl4-openssl-dev, libapache2-mod-xsendfile]

config/rubber/rubber-mysql.yml
# 16.04 change ...Dan
#packages: [mysql-client, libmysqlclient15-dev]
packages: [mysql-client, libmysqlclient-dev]

config/rubber/rubber-passenger.yml
# 16.04 change ...Dan
# There is no apache2-mpm-worker package because the mpm_worker module is included by default when you install Apache on 16.04.
# It is contained in the apache2-bin package that is a dependency of apache2: packages: [apache2-mpm-prefork, apache2-prefork-dev, libcurl4-openssl-dev, libapache2-mod-xsendfile, libapache2-mod-passenger]
# c.f. http://askubuntu.com/questions/808556/apache2-mpm-worker-missing-in-ubuntu-16-04
# packages: [apache2-mpm-prefork, apache2-prefork-dev, libcurl4-openssl-dev, libapache2-mod-xsendfile, libapache2-mod-passenger]

packages: [libcurl4-openssl-dev, libapache2-mod-xsendfile, libapache2-mod-passenger]

HTH,
Dan

Dan Sadaka

unread,
Dec 2, 2016, 7:02:06 PM12/2/16
to rubber
Note that on a 16.04 db server, MySQL 5.7.16 was installed and I needed to make the following changes:

Apparmor to config/rubber/role/db/apparmor-mysql.conf


<%# Changed mysqld.pid perms to rw for 16.04 ... Dan %>

/{,var/}run/mysqld/mysqld.pid rw,
/{,var/}run/mysqld/mysqld.sock w,

<%# Added the next 3 lines for 16.04 ... Dan %>

/etc/mysql/mysql.cnf r,
/var/lib/mysql-files/** rwk,
/{,var/}run/mysqld/mysqld.sock.lock rw,


Also, the my.cnf has several obsolete configurations. I had to do the following:

# MySQL 5.7 change ...Dan
# key_buffer = 16M
key_buffer_size = 16M

and

# MySQL 5.7 change ...Dan
# log_slow_queries = /var/log/mysql/mysql-slow.log
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log

Also, the initialization of mysql failed during bootstrap.  Kept getting [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
and [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

I believe the initialization script needs tweaking but I didn't have time to dig into it.  To get it working, I manually initialized the MySQL db with:

sudo mysqld --initialize --user=mysql --datadir=/mnt/mysql/data


This new init routine sets a temporary password for root so keep an eye out. Once you have it, go in and change the root password to your own before rerunning bootstrap.  With 5.7 there is a new way to do this too:

 ALTER USER 'root'@'%' IDENTIFIED BY 'your_password';

And the deploy-monit.rb and deploy-collectd.rb I had to remove the "service monit status" and the "service collectd status" respectively from the start tasks.  See attached.

Now rerun bootstrap.

HTH,
Dan
my.cnf
apparmor-mysql.conf
deploy-monit.rb
deploy-collectd.rb

Kevin Menard

unread,
Dec 5, 2016, 11:43:34 AM12/5/16
to rubbe...@googlegroups.com
Thanks.

I know it looks like the project hasn't been terribly active (and to an extent, that's true). But I'm looking into splitting from the fog gem and using just the ones we need. Once there, I'll look at updating the templates and hopefully can integrate all of these changes cleanly. I'll have some time around the end of the year to devote to just getting this done.

--
Kevin
--
You received this message because you are subscribed to the Google Groups "rubber" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubber-ec2+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Email had 4 attachments:

  • my.cnf
      5k (application/octet-stream)
  • apparmor-mysql.conf
      1k (application/octet-stream)
  • deploy-monit.rb
      1k (application/x-ruby)
  • deploy-collectd.rb
      2k (application/x-ruby)

Dan Sadaka

unread,
Dec 7, 2016, 8:58:35 AM12/7/16
to rubbe...@googlegroups.com
So you mean you'll add "native" capability to do what we need fog for now?  (E.g. Gp2)
To unsubscribe from this group and stop receiving emails from it, send an email to rubber-ec2+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Email had 4 attachments:

  • my.cnf
      5k (application/octet-stream)
  • apparmor-mysql.conf
      1k (application/octet-stream)
  • deploy-monit.rb
      1k (application/x-ruby)
  • deploy-collectd.rb
      2k (application/x-ruby)

--
You received this message because you are subscribed to a topic in the Google Groups "rubber" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubber-ec2/fut5WZ6TicE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubber-ec2+unsubscribe@googlegroups.com.

Kevin Menard

unread,
Dec 7, 2016, 4:12:28 PM12/7/16
to rubbe...@googlegroups.com
I had made changes to the Rubber repository predicated on the idea that fog 2.0 was releasing imminently. It, unfortunately, had a 2.0 prerelease over a year ago and then wound up in a weird situation. fog 2.0 was supposed to drop Ruby 1.9 support and I believe dropping a major Ruby version should constitute a major version bump in Rubber itself. So, the intention was for Rubber to become Ruby 2.0+ at the same time.

In the meanwhile, fog has been restructuring itself to divest the main gem of most functionality and delegating it out to provider-specific gems. The main 'fog' gem then loads all the of the providers to maintain backwards-compatibility. However, these provider gems themselves aren't necessarily compatible with Ruby 1.9 :-/

So, the plan is to drop the increasingly heavy dependency on fog in favor of the providers that Rubber currently supports. Since this in itself is a major change, that will require a major Rubber version bump. But, I think we can simultaneously drop Ruby 1.9 support. At that point, master won't be in this weird purgatory and normal development can resume.

--
Kevin
To unsubscribe from this group and stop receiving emails from it, send an email to rubber-ec2+...@googlegroups.com.

Dan Sadaka

unread,
Dec 9, 2016, 2:19:04 AM12/9/16
to rubbe...@googlegroups.com
I don't care about Ruby 1.9 support. that's history.   I do however like the idea of new development! 😊

To unsubscribe from this group and stop receiving emails from it, send an email to rubber-ec2+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages