Control Your Database Infrastructure
Severalnines
 

How to Bootstrap MySQL/MariaDB Galera Cluster

 
January 27, 2015
By Severalnines

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.

 

How does it work?

 

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:

 

How to start Galera cluster?

 

The 3 Galera vendors use different bootstrapping commands (based on the software’s latest version). On the first node, run:

  • Codership:
    $ service mysql bootstrap
  • Percona XtraDB Cluster:
    $ service mysql bootstrap-pxc
  • MariaDB Galera Cluster:
    $ 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.

 


How to Deploy High Availability CloudStack with MariaDB Galera Cluster

 
January 20, 2015
By Severalnines

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:

  • lb1: HAproxy + keepalived (master)
  • lb2: HAproxy + keepalived (backup) + ClusterControl + garbd
  • mgm1: CloudStack Management + database server
  • mgm2: CloudStack Management + database server

 


HowTo: Offline Upgrade of Galera Cluster to MySQL 5.6 or MariaDB 10

 
January 12, 2015
By Severalnines

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 in Galera

 

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.

 


New year, new job opportunity: we’re hiring (yet again)! Our sales team is expanding!

 
January 6, 2015
By Severalnines

image(2).jpeg

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): 

  • Minimum 18 months experience in a similar inside sales role
  • Bachelor’s degree in business/marketing field and/or relevant work experience
  • Ability to multi-task, prioritize, and manage time effectively
  • Highly motivated, driven and self-starter individual
  • Must demonstrate excellent communication (written and oral) and active listening skills
    • Must speak and write in English fluently and ideally additional European language(s)
  • Strong attention to detail and ability to follow-up with prospective clients
  • Must exhibit a positive and enthusiastic outlook toward the attainment of sales and marketing goals
  • Goal driven & strong competitive drive – should have strong desire to exceed expectations
  • Demonstrated success in meeting monthly targets

 


High Availability File Sync and Share - Deploying ownCloud with Galera Cluster for MySQL and GlusterFS

 
January 5, 2015
By Severalnines

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:

  • file storage
  • web server
  • database server
  • load balancer

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:

  • owncloud1: web server + database server
  • owncloud2: web server + database server
  • owncloud3: web server + database server
  • haproxy1: load balancer (master) + keepalived
  • haproxy2: load balancer (backup) + keepalived + ClusterControl

 

Our main steps would be:

  1. Prepare 5 hosts
  2. Deploy MySQL Galera Cluster onto owncloud1, owncloud2 and oncloud3 from haproxy2
  3. Configure GlusterFS clustered file system
  4. Configure Apache and PHP on owncloud1, owncloud2 and owncloud3
  5. Configure Keepalived and HAProxy for web and database load balancing with auto failover
  6. Install ownCloud and connect it to the Web/DB cluster via the load balancer

 

Preparing Hosts

 

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

 


Resources for Database Clusters: New Chef Cookbook, New Devops Webinar for eCommerce and More

 
December 30, 2014
By Severalnines

Check Out Our Latest Technical Resources for MySQL, MariaDB & MongoDB Clusters

 

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!

 

New Live Technical Webinars

 

webinar-devops-ecommerce.png

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.

 

Technical Webinar - Replay

 

webinar-galeravsndb_replay.png

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.

 

Product Announcements & Resources

 

Chef Cookbooks for ClusterControl - Management and Monitoring for your Database Clusters

 

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.


Chef Cookbooks for ClusterControl - Management and Monitoring for your Database Clusters

 
December 22, 2014
By Severalnines

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.

 

ClusterControl Cookbook on Chef Supermarket

 

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:

  • Galera Cluster
    • MySQL Galera Cluster by Codership
    • Percona XtraDB Cluster by Percona
    • MariaDB Galera Cluster by MariaDB
  • MySQL Cluster (NDB)
  • MySQL Replication
  • Standalone MySQL/MariaDB server
  • MongoDB or TokuMX Clusters
    • Sharded Cluster
    • Replica Set

 

Installing ClusterControl using Cookbook

 

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:

  • The node for ClusterControl must be a clean/dedicated host.
  • ClusterControl node must run on 64-bit Linux platform, on the same OS distribution as the monitored DB nodes. Mixing Debian with Ubuntu or CentOS with Red Hat is acceptable.
  • ClusterControl node must have an internet connection during the initial deployment. After the deployment, ClusterControl does not need internet access.
  • Make sure your database cluster is up and running before doing this deployment.

 


New Webinar: A DevOps Guide to Database Infrastructure Automation for eCommerce

 
December 17, 2014
By Severalnines

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. 

 

New Webinar: A DevOps Guide to Database Infrastructure Automation for eCommerce

 

DATE & TIME

 

Europe/MEA/APAC

Tuesday, February 17th 2015 at 09:00 GMT (UK) / 10:00 CET (Germany, France, Sweden)

Register Now

 

North America/LatAm

Tuesday, February 17th 2015 at 9:00 Pacific Time (US) / 12:00 Eastern Time (US)

Register Now

 

TOPICS 

  • eCommerce infrastructure challenges in 2014
  • Provisioning of test/QA and highly available production environments across multi-datacenter and multi-cloud environments
  • Building and maintaining configuration management systems such as Puppet and Chef
  • Enabling self-service infrastructure services to internal dev teams
  • Health and performance monitoring 
  • Capacity analysis and planning
  • Elastic scaling 
  • Automating failure handling
  • Disaster recovery

 

SPEAKER

riaan_nolan.jpg

     Riaan Nolan

  • Expert Live Systems Administrator, foodpanda | Hellofood
  • Senior Systems Administrator / Infrastructure Lead, Rocket Internet GmbH
  • Senior Technology Manager, Africa Internet Accelerator
  • Uses Amazon EC2, VPC and Autoscale with Cloudformation.
  • First Puppet Labs Certified Professional in South Africa. 
  • Specialties: Puppet Automation, Cloud Deployments, eCommerce, eMarketing, Specialized Linux Services, Windows, Process making, Budgets, Asset Tracking, Procurement

 

 


Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison - Webinar Replay & Slides

 
December 16, 2014
By Severalnines

 

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: 

  1. MySQL Cluster architecture: strengths and limitations
  2. Galera Architecture: strengths and limitations
  3. Deployment scenarios
  4. Data migration
  5. Read and write workloads (Optimistic/pessimistic locking)
  6. WAN/Geographical replication
  7. Schema changes
  8. Management and monitoring

 

Watch the replay

 

Read the slides

 


Simple Backup Management of Galera Cluster using s9s_backup

 
December 8, 2014
By Severalnines

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.

 

s9s_backup vs s9s_backupc

 

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.


Search
Keep in touch
Signup for our newsletter:
Name:
*Email:

Alex's Blog

Quickstart $ git clone https://github.com/alyu/docker.git $ cd docker/percona-xtradb-5.6/centos $ ./build.sh $ ./start-servers.sh 3 $ ./bootstrap-cluster.sh $ ssh root@172.17.0.2 (root123) $ mysql -...
47 weeks 4 days ago

Johan's Blog

FOREIGN KEYs in MySQL Cluster is a big step forward. It is now possible to run enterprise software with NDB Cluster as the storage backend. Over the years, the lack of FOREIGN KEYs have been one of...
1 year 31 weeks ago