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
Add MariaDB addon #303
Add MariaDB addon #303
Conversation
|
Awesome work! On Wed, Oct 8, 2014 at 3:12 PM, Hiro Asari notifications@github.com
|
|
' CREATE USER 'travis'@'%' IDENTIFIED BY '';' failing would indicate that the travis user already exists supported by the fact the grant succeeded. What does 'but for some reason root cannot.' mean? it appears you have a root user. Can you show select user,host,password from mysql.user and show grants in the test buiild? |
|
also mysql_upgrade might be running in the background (/etc/mysql/debian-start) meaning some of the system table structure may not be fully ready for changes. |
Conflicts: lib/travis/build/script/addons.rb
And fix up specs
This makes me sad, but I can't figure out how to defer evaluating it till the script run-time.
|
Picked this up again, and it seems to work with my limited testing. https://staging.travis-ci.org/BanzaiMan/travis_staging_test/builds/433699#L205 (10.0.20) I don't have an app to run it through more rigorous testing, though. I do not like it that the Ubuntu release code name is hard coded at the moment. |
|
Provided the following return the right user and a mariadb version it should be ok mysql -u root -e 'SELECT VERSION(); SELECT CURRENT_USER();' mysql -u travis -e 'SELECT VERSION(); SELECT CURRENT_USER();'
sh.cmd "add-apt-repository 'deb http://#{MARIADB_MIRROR}/mariadb/repo/#{mariadb_version}/ubuntu ${TRAVIS_UBUNTU_RELEASE} main'", sudo: true
TRAVIS_UBUNTU_RELEASE is in a single quote when run so its not interpolated. |
|
@grooverdan Yay. User creds seem to work. https://staging.travis-ci.org/BanzaiMan/travis_staging_test/builds/433703 I'll revisit the release code name tomorrow. |
|
thanks for revisiting this. Looks good. |
|
Cool. it worked. |
This is causing the fold to be a bit off
|
By rough accounting, it adds about 30 seconds to the build. |
|
@henrikhodne @meatballhat can you review the PR pretty please |
| SUPER_USER_SAFE = true | ||
|
|
||
| MARIADB_GPG_KEY = '0xcbcb082a1bb943db' | ||
| MARIADB_MIRROR = 'nyc2.mirrors.digitalocean.com' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@grooverdan Hello! We have deployed this to production (both .org and .com; not yet documented). Could you test this and see if it works to your satisfaction? We would like to get documentation ready, very much like what we have for MySQL. Could you review the documentation, and see if there are any notable differences between MySQL and MariaDB? (Please open a separate issue if you find any!) Thank you for your help! |
|
@BanzaiMan 👍 thank you basic support on 5.5, 10.0 and 10.1 looks great. single list form resulted in [5.5] as the version and hence didn't install 5.5. multiple list form seemed to ignore all repos and resort to mysql. My guess on a matrix form was silently ignored. A multiple list form would be really nice to test an application against multiple versions. Is having none as a item in a list acceptable to revert to the installed MySQL so an application can be test against mariadb versions and mysql. Minor note, Is the exclude/include syntax of travis-ci/travis-ci/issues/1492 supported somehow? It will be useful when multiple MySQL versions to exclude a matrix where MariaDB and MySQL versions get installed. For container builds having /etc/mysql writeable would be useful - its currently root owned. To protect against users running items as root a check will need to be done to ensure there isn't user= set in a [mysqld_safe] or [safe_mysqld] section (its the OS user that mysqld will start at and by pushing user plugins they could effectively escalate to root). Look for --user=root in the output of my_print_defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe. Using the MySQL version of my_print_defaults is sufficient for this test. There may be cases where --user=travis is suitable. Is there a stage where custom config files can be pushed into /etc/mysql/ so they are there when the package is installed and hence the service started? Its quite possible to install config files there that will affect mariadb and not mysql (putting config files having sections [mariadb] [mariadb-10.0], [mariadb-5.5], [mariadb-10.1] (which is something that would be useful to document). mariadb/mariadb-connector-j (and script) seem keen on changing settings based on vars too. Exporting in an environment variable which mariadb version was installed would enable a user to do specific scripts/actions/configs/tests for mariadb that might not be accessible on MySQL (or vise versa). Apart from the minor tip on introducing mariadb specific configuration I can't see anything that would be useful to include in travis documentation. Sorry if this contains a little too many feature requests. Its a great capability to start with so thank you. |
|
think I worked out to do matrix builds, not perfect but getting closer |
|
@BanzaiMan did you want the above broken up to separate feature requests? |
|
@grooverdan Yes, please. This is a PR, and feature requests tend to be lost here. |
|
Just wanted to say thanks, I've started testing this with WordPress, works as expected 👍 |
This PR adds MariaDB addon, based on instructions given at https://downloads.mariadb.org/mariadb/repositories/#mirror=digitalocean-nyc&distro=Ubuntu&distro_release=precise&version=10.0.
Versions 5.5, 10.0, and 10.1 can be specified in
.travis.yml; e.g.,Note that MariaDB is installed with the package-provided configuration file
-o Dpkg::Options::='--force-confnew', so that it is run on disk, not ramfs, so it can be potentially slow.User
travisneeds to be set up, but for some reasonrootcannot.