severalnines / ansible-clustercontrol Goto Github PK
View Code? Open in Web Editor NEWAnsible role for ClusterControl
Ansible role for ClusterControl
TASK [severalnines.clustercontrol : Making sure MySQL packages are installed.] ****************************************************************
fatal: [cc01]: FAILED! => {"changed": false, "msg": "No package matching 'python-apt' is available"}
deploy-clustercontrol.yml
:- name: Include Debian >= 11 specific variables.
include_vars: "Debian11.yml"
when:
(ansible_distribution == 'Debian' and ansible_distribution_major_version|int > 10) or
(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int > 22)
debian11.yml
:---
__mysql_packages:
- mariadb-common
- mariadb-server
- mariadb-client
- python3-apt
__mysql_slow_query_log_file: /var/log/mysql/mysql-slow.log
mysql_config_file: /etc/mysql/my.cnf
mysql_config_include_dir: /etc/mysql/conf.d
mysql_socket: /var/run/mysqld/mysqld.sock
__apache_daemon: apache2
__apache_user: www-data
__apache_packages:
- apache2
- curl
- dnsutils
- php-common
- php-mysql
- php-gd
- php-ldap
- php-curl
- libapache2-mod-php
- php-json
- php-xml
apache_doc_root: /var/www/html
apache_config: /etc/apache2/sites-available/s9s.conf
apache_target_config: /etc/apache2/sites-enabled/001-s9s.conf
apache_ssl_config: /etc/apache2/sites-available/s9s-ssl.conf
apache_target_ssl_config: /etc/apache2/sites-enabled/001-s9s-ssl.conf
Since s9 doesn't seem to test their repo or take care of any issues I don't want to push a PR since it might be wasted time. If this is not so it would be nice to know about.
Hello,
This method says to create a user account manually after the playbook has been run.
I would be interested in a way to automatically set-up an initial user, or better yet, configure the LDAP connection itself to the AD, so that ClusterControl is directly usable.
Thanks in advance.
System: CentOS 7
MariaDB-Version: 10.2
Tags: controller
Error:
configure-mysql.yml:12
"Unable to start service mariadb"
error.log:
[ERROR] /usr/sbin/mysqld: unknown variable 'innodb_additional_mem_pool_size=20M'
Task:
clustercontrol.yml -> Configure ClusterControl LDAP settings.
Item:
admin_password
Problem:
Password not encrypted
Solution:
Password must be encrypted by Security::cipher
Thank you in advance for your help.
Hello,
There are 3 "mv" in the clustercontrol.yml task, that rename the default files. Since those are provided by the package, they should be left untouched, a simple cp is enough.
I notice the playbook doesn't work well when setting up a controller to use mariadb instead of mysql on Debian 10, as it expects packages named mysql-, when Debian 10 seems to be shifting the default packages to mariadb. I'm not sure how much work it would be to add support for either mysql- packages or mariadb-* packages?
Deploying against Ubuntu18.04 fails when attempting to remove the MySQL test database:
TASK [severalnines.clustercontrol : Remove MySQL test database.] ***************************************************************************
fatal: [192.168.56.110]: FAILED! => {"changed": false, "msg": "The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required."}
I worked around this issue by adding the following lines to setup-debian.yml:
name: Making sure MySQL Python helper libraries are installed.
apt: name=python-pymysql state=present
when:
ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int <= 18
name: Making sure MySQL Python3 helper libraries are installed.
apt: name=python3-pymysql state=present
when:
ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int > 18
Perhaps this can be added to the repo?
In clustercontrol.yml, line 65, the test is made on the existence of file bootstrap.php, however, the modification is to be made on database.php.
In practice: if database.php is removed to be regenerated, but bootstrap.php is kept, the MySQL password is not updated in the new file..
Seems the JSON command needs updating to replace mysql_hostnames
with nodes
. From ansible:
...
"mysql_hostname": [
"165.22.125.206",
"178.62.41.5",
"167.71.143.229"
],
"mysql_hostnames": [
"165.22.125.206",
"178.62.41.5",
"167.71.143.229"
]
but the UI generates the following instead:
...
"nodes": [
{
"hostname": "10.131.21.159",
"hostname_data": "10.131.21.159",
"hostname_internal": "",
"port": "3306"
},
{
"hostname": "10.131.21.160",
"hostname_data": "10.131.21.160",
"hostname_internal": "",
"port": "3306"
},
{
"hostname": "10.131.21.161",
"hostname_data": "10.131.21.161",
"hostname_internal": "",
"port": "3306"
}
]
This would explain why the Ansible job log looks like this:
[11:17:42]: Setting up the first server failed, aborting.
[11:17:42]: wsrep_cluster_address = 'gcomm://'
[11:17:42]: Creating the cluster with the following:
[11:17:42]: Verifying job parameters.
[11:17:42]: Cluster will be created on 0 data node(s).
Hi all. See Issue #11 - I know this issue was closed 18 months ago, but as of 2 weeks ago the Ansible deployment of Galera/MariaDB (10.4) nodes fails (CC 1.9.2, Ubuntu 20.04). I have no idea why. Has there been a release / API update that has altered the way the nodes get deployed? The only thing I see are maintenance releases on 7th March, 21st March and 28th March. (I suspect it's one of the latter two releases, if the problem is in CC.) All worked fine until recently. Now, primary node only deploys, and secondary and tertiary (in 3 node setup) fails. Secondary and tertiary node /var/log/mysql/mysqld.log reads:
[Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
I haven't changed anything at my end. It just stopped working one day! I guess it could be a maintenance release of clustercontrol OR galera OR MariaDB 10.4 that triggered it! Can you let me know if there's been an API update?
Hi,
I have a question regarding the ccv2 branch / support for clustercontrol2.
We want to deploy clustercontrol2 in our environment. Is the ccv2 branch in a usable/stable state or are we better of writing an own ansible playbook/role for our use case/environment?
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.