Code Monkey home page Code Monkey logo

ansible-clustercontrol's People

Contributors

ashraf-s9s avatar freddielunchbird avatar janreiners avatar krzysztof-ksiazek avatar mynameisbogdan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ansible-clustercontrol's Issues

python-apt not available in Debian 11+ and Ubuntu 22+

Problem

TASK [severalnines.clustercontrol : Making sure MySQL packages are installed.] ****************************************************************
fatal: [cc01]: FAILED! => {"changed": false, "msg": "No package matching 'python-apt' is available"}

Possible solution:

Add new block to 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)

Create new vars file 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.

Initial users setup

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.

cc_ldap -> admin_password - encryption needed

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.

mariadb

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?

On Ubuntu, deploying fails due to missing PyMySQL module

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?

Wrong file test

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..

Gelera Cluster creation failing from Ansible

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

Galera node creation now fails after previously succeeding

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?

Question: clustercontrol2 support // ccv2 branch

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.