All Projects → icflorescu → openshift-cartridge-mysql

icflorescu / openshift-cartridge-mysql

Licence: ISC license
Custom cartridge for OpenShift providing MySQL 5.7.17

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to openshift-cartridge-mysql

Strimzi Kafka Operator
Apache Kafka running on Kubernetes
Stars: ✭ 2,833 (+21692.31%)
Mutual labels:  openshift
Ansible Service Broker
Ansible Service Broker
Stars: ✭ 224 (+1623.08%)
Mutual labels:  openshift
openshift-starter-guides
Getting Started with OpenShift for Developers Workshop
Stars: ✭ 35 (+169.23%)
Mutual labels:  openshift
Console
OpenShift Cluster Console UI
Stars: ✭ 203 (+1461.54%)
Mutual labels:  openshift
Helloworld Msa
Main repository with documentation and support files
Stars: ✭ 218 (+1576.92%)
Mutual labels:  openshift
Openshift Cartridge Nodejs
Custom cartridge for OpenShift providing the lastest version of Node.js.
Stars: ✭ 227 (+1646.15%)
Mutual labels:  openshift
Minishift
Run OpenShift 3.x locally
Stars: ✭ 2,246 (+17176.92%)
Mutual labels:  openshift
pulp-operator
Kubernetes Operator for Pulp 3. Under active development.
Stars: ✭ 32 (+146.15%)
Mutual labels:  openshift
Kcli
Management tool for libvirt/aws/gcp/kubevirt/openstack/ovirt/vsphere/packet
Stars: ✭ 219 (+1584.62%)
Mutual labels:  openshift
Openshift Examples
Openshift Examples - This repo does not provide end to end example but rather act as a rough draft for my work. use with caution. Buzzme at @twitter
Stars: ✭ 247 (+1800%)
Mutual labels:  openshift
Jkube
Successor of the deprecated Fabric8 Maven Plugin
Stars: ✭ 213 (+1538.46%)
Mutual labels:  openshift
Kiali
Kiali project, observability for the Istio service mesh
Stars: ✭ 2,687 (+20569.23%)
Mutual labels:  openshift
Openwhisk Deploy Kube
The Apache OpenWhisk Kubernetes Deployment repository supports deploying the Apache OpenWhisk system on Kubernetes and OpenShift clusters.
Stars: ✭ 231 (+1676.92%)
Mutual labels:  openshift
K8s Bigip Ctlr
Repository for F5 Container Ingress Services for Kubernetes & OpenShift.
Stars: ✭ 204 (+1469.23%)
Mutual labels:  openshift
openshift-json-schema
A set of JSON schemas for various OpenShift versions, extracted from the OpenAPI definitions
Stars: ✭ 23 (+76.92%)
Mutual labels:  openshift
Forecastle
Forecastle is a control panel which dynamically discovers and provides a launchpad to access applications deployed on Kubernetes – [✩Star] if you're using it!
Stars: ✭ 186 (+1330.77%)
Mutual labels:  openshift
Azure arc
Automated Azure Arc environments
Stars: ✭ 224 (+1623.08%)
Mutual labels:  openshift
openshift4-upi-homelab
OpenShift 4 User Provisioned Infrastructure Homelab
Stars: ✭ 15 (+15.38%)
Mutual labels:  openshift
openshift-install-power
UPI Install helper to deploy OpenShift 4 on IBM Power Systems Virtual Server using Terraform IaC
Stars: ✭ 16 (+23.08%)
Mutual labels:  openshift
Selinon
An advanced distributed task flow management on top of Celery
Stars: ✭ 237 (+1723.08%)
Mutual labels:  openshift

Custom MySQL cartridge for OpenShift

mysql-openshift

This is a custom OpenShift cartridge providing the latest MySQL version (5.7.17 as of March 29 2017).

Why

Because the standard OpenShift MySQL cartridge is stuck at 5.5 and some people are keen to use the latest MySQL server features (such as improved support for spatial data).

When to use

When you need a quick and unsofisticated solution to run your application with the latest MySQL version.

Installing

To install this cartridge in your existing OpenShift application, go to "See the list of cartridges you can add", paste the URL below in "Install your own cartridge" textbox at the bottom of the page and click "Next".

https://raw.githubusercontent.com/icflorescu/openshift-cartridge-mysql/master/metadata/manifest.yml

Setting up

Once the cartridge is created and started, you can SSH into the database gear:

ssh gear-url

...and connect to the server with mysql client like this:

${OPENSHIFT_DATA_DIR}.mysql/bin/mysql --socket=${TMP}mysql.sock -u root

If you really need it, you can enable remote access for root like this (make sure to replace secret with a strong password):

${OPENSHIFT_DATA_DIR}.mysql/bin/mysql --socket=${TMP}mysql.sock -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION; FLUSH PRIVILEGES;"

If you're using multiple gears, here's how you can find the MySQL gear SSH url:

rhc app show application-name --gears

Once you've enabled remote access, you can use rhc port-forward and MySQL Workbench or your favorite client to connect from your development machine.

Use OPENSHIFT_MYSQL_DB_HOST and OPENSHIFT_MYSQL_DB_PORT environment variables to connect from an application running in the main web cartridge. For instance, here's how you'd do it in a Node.js application using Knex.js:

var knex = require('knex')({
  client: 'mysql',
  connection: {
    host     : process.env.OPENSHIFT_MYSQL_DB_HOST,
    port:    : process.env.OPENSHIFT_MYSQL_DB_PORT,
    user     : 'your_database_user',
    password : 'your_database_password',
    database : 'myapp_test'
  }
});

Notes

  • Can't guarantee this cartridge is production-ready. Some people use it though (on their own responsibility).
  • This is a lean cartridge. A standard MySQL installation takes a huge amount of space (over 1.5GB for MySQL 5.7.5). To save space, just the necessary MySQL binaries are installed.
  • In order to avoid an OpenShift configuration conflict, the server instance is listening on 13306 instead of the standard MySQL port 3306.
  • Don't hesitate to make a pull-request with an updated version in this file if you notice this cartridge version is behind the latest MySQL release.
  • Don't open issues in this repository to ask questions about rhc port-forward. Please refer to the OpenShift documentation to learn about it. I am not an employee of RedHat / OpenShift, nor do I have any form of consultancy agreement with them and the fact that I open-sourced this cartridge doesn't mean I'm willing to offer free advice on the subject. Pull-requests and suggestions are always welcome, though.

Related

Since you're here, chances are you might also be interested in this custom Node.js cartridge or this custom MongoDB cartridge.

Credits and attributions

This cartridge was inspired by Ted Wennmark's blog post on how to create a minimal MySQL installation for an embedded system.

Credits

See contributors here.

If you find this repo useful, don't hesitate to give it a star and spread the word.

License

The ISC License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].