Unlike standard MySQL server and MySQL Cluster, the way to start a MySQL/MariaDB Galera Cluster is a bit different. Galera requires you to start a node in a cluster as a reference point, before the remaining nodes are able to join and form the cluster. This process is known as cluster bootstrap. Bootstrapping is an initial step to introduce a database node as primary component, before others see it as a reference point to sync up data.
When Galera starts with the bootstrap command on a node, that particular node will reach Primary state (check the value of wsrep_cluster_status). The remaining nodes will just require a normal start command and they will automatically look for existing Primary Component (PC) in the cluster and join to form a cluster. Data synchronization then happens through either incremental state transfer (IST) or snapshot state transfer (SST) between the joiner and the donor.
So basically, you should only bootstrap the cluster if you want to start a new cluster or when no other nodes in the cluster is in PRIMARY state. Care should be taken when choosing the action to take, or else you might end up with split clusters or loss of data.
The following example scenarios illustrate when to bootstrap the cluster:
The 3 Galera vendors use different bootstrapping commands (based on the software’s latest version). On the first node, run:
$ service mysql bootstrap
$ service mysql bootstrap-pxc
$ service mysql bootstrap
The above command is just a wrapper and what it actually does is to start the MySQL instance on that node with gcomm:// as the wsrep_cluster_address variable. You can also manually define the variables inside my.cnf and run the standard start/restart command. However, do not forget to change wsrep_cluster_address back again to contain the addresses to all nodes after the start.
Apache CloudStack is a turnkey orchestration platform to deliver IaaS clouds. As a cloud infrastructure scales to hundreds or thousands of servers, with production environments supporting multiple applications and services, high availability becomes a key requirement. Just as for OpenStack, it is possible to deploy the CloudStack management server in a multi-node installation. Since the management server uses a MySQL database to store the state of all its objects, the database could become a single point of failure. The CloudStack manual recommends MySQL replication with manual failover in the event of database loss. We believe there is a better way.
In this blog post, we’ll show you how to deploy redundant CloudStack management servers with MariaDB Galera Cluster on CentOS 6.5 64bit. We will have two load balancer nodes fronting the management servers and the database servers. Since CloudStack relies on MySQL’s GET_LOCK and RELEASE LOCK, which are not supported by Galera, we will redirect all database requests to only one MariaDB node and automatically failover to another node in case the former goes down. So, we’re effectively getting the HA benefits of Galera clustering (auto-failover, full consistency between DB nodes, no slave lag), while avoiding the Galera limitations as we’re not concurrently accessing all the nodes. We will deploy a two-node Galera Cluster (plus an arbitrator on a separate ClusterControl node).
Our setup will look like this:
Note that this blog post does not cover the installation of hypervisor and storage hosts. Our setup consists of 4 servers:
MySQL 5.6 has an extensive list of new features and changes, so upgrading from a previous version can be risky if not tested extensively. For this reason, we recommend our users to read and understand the changes before doing the upgrade. If you are on older MySQL versions, it is probably time to think about upgrading. MySQL 5.6 was released in February 2013, that’s almost two years ago!
A major upgrade, e.g., from MySQL 5.5 to 5.6 or MariaDB 5.5 to 10, requires the former MySQL/MariaDB server related packages to be uninstalled. In Galera Cluster, there are two ways to upgrade; either by performing offline upgrade (safer, simpler, requires service downtime) or online upgrade (more complex, no downtime).
In this blog post, we are going to show you how to perform an offline upgrade on Galera-based MySQL/MariaDB servers, from MySQL 5.5.x to 5.6 or MariaDB 5.5 to 10.x with Galera 3.x, on Redhat and Debian-based systems. The online upgrade procedure will be covered in a separate post. Prior to the upgrade, determine the database vendor and operating system that is running at ClusterControl > Settings > General Settings > Version:
Note that different database vendor and operating system combinations use different installation steps, package names, versions and dependencies.
Offline upgrade is recommended if you can afford scheduled downtime. The steps are straightforward and the probability for failure is significantly lower. Performing an online upgrade gives you availability at the cost of operational simplicity.
We're looking for an enthusiastic International Inside Sales Representative (preferably in North American / European timezones) to join our small and driven sales team. This position is full-time and pay is negotiable. The hours are flexible and work can be done remotely; in fact, it will need to be done remotely, we all work from home ;-)
Severalnines is a self-funded startup with a dozen employees; headquartered in Stockholm, Sweden and with a globally distributed, home-office based team. We provide automation and management software for database clusters. Our ClusterControl product is the leading database automation platform for database clusters and is used by thousands of companies.
We were founded in 2011 and launched our product that same year, so you’ll be working with a popular, tried & tested product. Our business is growing and we’re dealing with a constant flow of sales requests and leads that need to be turned into sales opportunities. At the same time, we want to broaden our sales outreach by pro-actively identifying and making contact with enterprise prospects. And all that on a global basis.
This is a critical sales position that will have a direct impact on generating sales pipeline and contributing to the revenue stream of Severalnines. It requires an individual who has excellent written communication skills, is charismatic over the phone and detail oriented.
The ideal candidate has the following skills set (see full description):
Cloud storage is hot. Dropbox, Apple iCloud, Google Drive, Microsoft SkyDrive and Amazon Cloud Drive all offer cloud sharing platforms where you can store documents in the cloud and access them from all your devices. For enterprises who require full control, ownCloud is an open source solution that allows files to be stored on-premises and/or a backend cloud.
In this blog post, we’ll show you how to deploy a high availability setup using ownCloud Community Edition. We will need to set up redundancy in each of the following layers:
We will use five servers. ownCloud will run on three separate servers with MySQL Galera Cluster 5.6 and GlusterFS running on RHEL 6.5 64bit. ownCloud supports GlusterFS as primary storage. ClusterControl will be co-located with one of the two load balancers to monitor and manage Galera Cluster and HAProxy.
The following diagram illustrates our setup:
Our setup consists of 5 servers or nodes:
Our main steps would be:
Add the following hosts definition in /etc/hosts of all nodes:
10.0.0.200 virtual-ip owncloud 10.0.0.201 owncloud1 web1 mysql1 10.0.0.202 owncloud2 web2 mysql2 10.0.0.203 owncloud3 web3 mysql3 10.0.0.211 haproxy1 10.0.0.212 haproxy2 clustercontrol
Like every month this year, we have created new content and tools for you; here is a summary of what we’ve published this December. Please do check it out and let us know if you have any comments or feedback.
And thank you for following us in the past 12 months and for your fidelity; we look forward to “seeing” you next year as well and wish you a great start to 2015!
Infrastructure automation isn’t easy, but it’s not rocket science either, says Riaan Nolan. Riaan has been in operations for the past decade, and has built over a dozen eCommerce properties. Automation is a worthwhile investment for retailers serious about eCommerce, but deciding on which tools to invest in can be a confusing and overwhelming process. Register here.
Join us for this webinar to understand the key pain points that online retailers experience and which indicate that it’s time to invest in database automation. Our guest speaker will be Riaan Nolan of Foodpanda, Rocket Internet’s global online food delivery marketplace operating in over 40 countries. Register here.
In this webinar, Severalnines VP of Products, Alex Yu, who was part of the team at Ericsson that originally developed the NDB storage engine in 2001, gave an overview of these two clustering architectures and discussed their respective strengths and weaknesses. Watch the replay.
This month, we were glad to announce the availability of a Chef cookbook for ClusterControl. This cookbook replaces previous cookbooks we released for ClusterControl and Galera Cluster. Using Puppet instead? No problem, check out our Puppet module for ClusterControl.
If you are automating your infrastructure deployments with Chef, then read on. We are glad to announce the availability of a Chef cookbook for ClusterControl. This cookbook replaces previous cookbooks we released for ClusterControl and Galera Cluster. For those using Puppet, please have a look at our Puppet module for ClusterControl.
The ClusterControl cookbook is available on Chef Supermarket, and getting the cookbook is as easy as:
$ knife cookbook site download clustercontrol
This cookbook supports the installation of ClusterControl on top of existing database clusters:
We will show you how to install ClusterControl on top of an existing database cluster using the cookbook. It requires the following criteria to be met:
For an online shop, the website is the cash register. It has to be open for business 24 hours a day.
As the ops person on duty, when you get a call at 3am after your website went down, your priority number one is to restore the service asap. But why can we not have our application stack automatically recover, and not have the pager wake us at all? Why do we still stick to tedious manual processes, which take up time and resources, and hinder future growth?
Infrastructure automation isn’t easy, but it’s not rocket science either, says Riaan Nolan. Riaan has been in operations for the past decade, and has built over a dozen eCommerce properties. Automation is a worthwhile investment for retailers serious about eCommerce, but deciding on which tools to invest in can be a confusing and overwhelming process.
Join us for this webinar to understand the key pain points that online retailers experience which indicate it’s time to invest in database automation. Our guest speaker this time will be Riaan Nolan of Foodpanda, Rocket Internet’s global online food delivery marketplace operating in over 40 countries.
Tuesday, February 17th 2015 at 09:00 GMT (UK) / 10:00 CET (Germany, France, Sweden)
Tuesday, February 17th 2015 at 9:00 Pacific Time (US) / 12:00 Eastern Time (US)
Thanks to everyone who attended and participated in last week’s webinar on 'Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison'. If you missed the sessions or would like to watch the webinar again & browse through the slides, they are now available online.
In this webinar, Severalnines VP of Products, Alex Yu, who was part of the team at Ericsson who originally developed the NDB storage engine in 2001, gave an overview of the two clustering architectures and discussed their respective strengths and weaknesses:
Percona XtraBackup is a great backup tool with lots of nice features to make online and consistent backups, although the variety of options can be a bit overwhelming. s9s_backup tries to make it simpler for users, it creates an easy to use interface for XtraBackup features such as full backups, incremental backups, streaming/non-streaming, and parallel compression.
Backups are organized into backup sets, consisting of a full backup and zero or more incremental backups. s9s_backup manages the LSNs (Log Sequence Number) of the XtraBackups. The backup set can then be restored as one single unit using just one command.
In earlier posts, we covered various ways on restoring your backup files onto a Galera Cluster, including point-in-time recovery and a Percona XtraBackup vs mysqldump comparison. In this post, we will show you how to restore your backup using s9s_backup, which comes with every ClusterControl installation. It is located under /usr/bin directory and can be called directly from your terminal environment.
The difference between the two utilities is the location where the backup data is stored. s9s_backupc will store the backup on the controller and it will be initiated from the ClusterControl server, while s9s_backup initiates and stores the backup locally on the database node. However, for restoring the backup, you can use any of the utilities regardless of your backup storage location. They will perform just the same.