Docker master slave MySQL replication

Docker master slave mysql replication can be a bit intimidating, but the basics are actually quite easy, just a bit of a laborious work. As of this example I will use docker swarm. for that I assume you have docker already installed fresh on the machine. My example uses CentOS 7.6, but should be similar on other systems like ubuntu. Enjoy the post!

Get the mysql image:

docker pull percona:5.7

Create a few dirs to hold the structure:

  1. Two separate folders for master and slave.
  2. The cnf directory has the configuration files for mysql
  3. The data directory has the volume of mysql structural data.
  4. The folders called mysql, performance schema and sys should NOT be created. those are done by MySQL server on start.

Continue reading

MySQL slave master switch

MySQL Slave Master replication

MySQL Slave Master replication

MySQL slave to master switch is an operation required in a few situations. Sometimes master dies and you need to make DB available as soon as possible. In this case if the DB is reasonably big then restoring from backup might take to long. Also keep present that slave has a current copy of data, you might have new data after the last backup that you can not afford to lose. Some other common situations where you might require such a procedure is when you want to upgrade your MySQL servers. For instance from Percona 5.6 to Percona 5.7. Also this will help to avoid long downtime.

Notice: if you have classic master slave replication some downtime is unavoidable, there are different setups that can be done to achieve having a cluster that does not stop working if you take the master offline, but this is NOT the objective of this post.

this post is some what related to another recent post; Mysql DB server OS change / replacement or distro upgrade; study case

Ok, let’s stop the chitchat and let’s get some stuff done. Continue reading

Mysql DB server OS change / replacement or distro upgrade; study case

Mysql DB server OS change:

MySQL Oracle

MySQL Oracle

Mysql DB server OS change might be required in different situations, but for those who do not know what I am talking about, let me start by explaining what this is and why you might need it in some situations. Just to serve as an example; let say you are renting a few Virtial Machine Server from X IDC or cloud provider. This cloud provider gave you an a distribution that in 2013 had 4 years of support and everything was cool, you installed you systems. Now is 2017 and you need an upgrade. Let me give more details.

You are running a web environment with load balancers, web-server, and 2- Mysql DB servers Master and slave replication, etc. Your application needs High availability and you can not afford to have a lot of downtime. Your system is running fine, but last month you got a notification that the EOL (End of life) of your distribution is in 2 months. You also you noticed that your Percona MySQL DB 5.5 has a few limitations that you want to resolve by upgrading toPercona MySQL DB 5.6 or 5.7. So this is the perfect opportunity to upgrade the system and not remain with a legacy OS that will lose support soon. So now you know all you need to know and you are decided to go with progress and make a difference with the change.

MySQL: MariaDB community logo

MySQL: MariaDB community logo

You contact your provider about upgrading your system. They reply with a link (URL) to their FAQ saying that they do not support system upgrade. Then you start reading about it and notice that many virtualization services providers do not really support the upgrade. So you can not just du apt-get dist-upgrade. Not that you can not try, but you will likely not succeed, own experience here long ago when I was young and stupid. Maybe your provider supports it, but you might have grown fond of some other distribution over time and you want to change let say from Debian to Redhat or vise-versa, change of company policy, etc. So reason for wanting to change are many. Continue reading

Hosting network services services and websites basics

hostingHosting network services and websites or blogs like this one is now a days a regular task of anyone who want to conduct a successful business. This is non written a requirement for many other activities as well. If you are not an ICT professional and you have a website or need to deploy some services in your business and you wander where to store them and how. Then this article is for you.

More people than you might think want to get a server at their home or office and host their own websites and services locally. I am not 100% against this type of solutions, but the truth is the all the odds now a days are against it unless you have a particularly special need to have it locally. Let see what are the drawbacks. Continue reading

Fedora Linux review & personal experience.

Fedora logo

Fedora Logo

Good day, today I am going to talk about Fedora Linux, I can not say I am a great Fedora expert. I have been following the project for a while. but I have decided to install the workstation just a few days ago. My main experience is with Debian based distros, Mint, Ubuntu. I kind of know the system, I have been working with it for around 8 years as developer, network administrator, consultant and enthusiastic. I love Linux, but redhat was never an option for me, and it’s not an option at least for server. I am going to talk about Fedora, the workstation. Fedora is a Red hat based system, well actually fedora is the testing red hat, and in any case they are the same family. I my case this is what happened.

I have a laptop ASUS X750J; it’s a very good laptop for my personal needs. It has a core i7, 6Gb or RAM, 750 HDD. The thing is, even with my experience I never managed to configure properly any of my favorite Operating Systems; as I said Debian, Mint or Ubuntu. So I started looking around for options, I decided to try Fedora 21. The experience is amazing, everything worked from the start.I did not even had to modify a single configuration.

Continue reading

Web hosting administration software free alternative.

Hi, have engaged myself on a quest to look for an administration panel for my customers hosting. I want a good one to have it as an alternative to

Web Hosting Evaluation

Web Hosting

cPanel, the truth is that every day I like the cPanel project less and the free alternatives are getting better. So unless you are committed for some MAJOR reason to cPanel I would not recommend it any more. Use any other GLP like thing from out there, if the problem is support get better support from one of the communities. Continue reading

Synchronization GLPI LDAP or Active Directory

Synchronization GLPI LDAP. GLPI is a very popular ticket (call) system. It has a lot of features that make it competitive with any other ticketing or ICT management system. Some of the features that I have configured before are here.

LDAP Active Directory Connection.

One of the many powerful features of GLPI is the integration with many forms of LDAP. Among them Windows Active Directory (AD). To integrate it you just have to supply your AD server info on the form shown on this picture.

Synchronization LDAP Active Directory

LDAP AD config

If you receive any error about not finding any configuration. You might have the PHP LDAP module missing. So make sure the module is installed.

  1. Host LDAP is the address of the server (AD or Openldap) that glpi will use.
  2. Basedn is the field that identifies the DN (Distinguished Name) where the search is starting.
  3. rootdn (For non anonymous connections): this is for the user authorized to read the Directory (AD or Ldap for example: cn=Admin,ou=People,dc=mycompany make sure not to leave spaces between nodes. This is wrong: cn=Admin, ou=People , dc…)
  4. Pass (For non anonymous connections): User password.
  5. Connection filter: To restrict the search.

Continue reading