Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add UseSuperReadOnly ConsulAddress KVClusterMasterPrefix ClusterNameT… #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.swp
*.swo
*.swn
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,51 @@
# role_mysql_orchestrator
Ansible Role to install and configure Orchestrator (MySQL HA Tool)

```
- name: install orchestrator
hosts: all
pre_tasks:
- name: install curl
package: name=curl
- name: install percona mysql repo
shell: curl -O https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb && dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb
args:
creates: /etc/apt/sources.list.d/percona-release.list
executable: /bin/bash
chdir: /tmp
roles:
- role: entercloudsuite.mysql
mysql_packages:
- percona-server-server-5.7
mysql_users:
- name: orchestrator
host: '%'
password: mysuperpassword
priv: '*.*:ALL'
- role: jsecchiero.orchestrator
orchestrator_version: 3.0.10
orchestrator_mysql_user: orchestrator
orchestrator_mysql_password: mysuperpassword
orchestrator_mysql_topology_user: orchestrator
orchestrator_mysql_topology_password: mysuperpassword
orchestrator_read_only: true
orchestrator_super_read_only: true
orchestrator_mysql_compatible_version:
orchestrator_listen_address: :3000
orchestrator_cluster_name_to_alias: { .*: default }
orchestrator_recover_master_cluster_filters: ["*"]
orchestrator_recover_intermediate_master_cluster_filters: ["*"]
orchestrator_master_failover_lost_instances_downtime_minutes: 1
orchestrator_failure_detection_period_block_minutes: 1
orchestrator_recovery_period_block_seconds: 30
orchestrator_detect_cluster_alias_query:
orchestrator_detect_cluster_domain_query:
orchestrator_detect_datacenter_query:
orchestrator_replication_lag_query:
orchestrator_pseudo_gtid_pattern:
orchestrator_detect_pseudo_gtid_query:
orchestrator_authentication_method:
orchestrator_http_auth_user:
orchestrator_http_auth_password:
orchestrator_url_prefix:
```
16 changes: 14 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
### Orchestrator Installation
orchestrator_create_image: "{{ global_create_image | default(false) }}"
orchestrator_download_src: https://github.com/github/orchestrator/releases/download
orchestrator_version: 2.1.4
orchestrator_version: 3.0.10
orchestrator_install_via_packagecloud: false
orchestrator_upgrade: false
orchestrator_upgrade_if_older_version: false
orchestrator_is_server: true

Expand All @@ -23,14 +24,19 @@ orchestrator_cluster_domain: internal

### Orchestrator General Options
orchestrator_debug: false
orchestrator_listen_address: :3001
orchestrator_listen_address: :3000
orchestrator_listen_socket:
orchestrator_url_prefix: "/orchestrator"
orchestrator_status_endpoint: "/api/status"
orchestrator_status_simple_health: true
orchestrator_skip_maxscale_check: true
orchestrator_reasonable_maintenance_replication_lag_seconds: 20
orchestrator_mysql_connect_timeout_seconds: 2
orchestrator_raft_enabled: false
orchestrator_raft_data_dir:
orchestrator_raft_bind:
orchestrator_raft_default_port: 10008
orchestrator_raft_nodes: []

### Orchestrator Database Options
orchestrator_mysql_orchestrator_host: 127.0.0.1
Expand All @@ -47,6 +53,7 @@ orchestrator_hostname_resolve_method: none
orchestrator_mysql_hostname_resolve_method: none
orchestrator_default_instance_port: 3306
orchestrator_reject_hostname_resolve_pattern:
orchestrator_cluster_name_to_alias: { 127.0.0.1: test suite }
orchestrator_detect_cluster_alias_query: "select ifnull(max(cluster_name), '') as cluster_alias from meta.cluster where anchor = 1"
orchestrator_detect_cluster_domain_query: "select ifnull(max(cluster_domain), '') as cluster_domain from meta.cluster where anchor = 1"
orchestrator_datacenter_pattern: ""
Expand Down Expand Up @@ -90,6 +97,7 @@ orchestrator_intermediate_master_failover_processes: []

### Orchestrator Security Options
orchestrator_read_only: false
orchestrator_super_read_only: false
orchestrator_authentication_method: multi
orchestrator_http_auth_user: datateam
orchestrator_http_auth_password: datateampass
Expand Down Expand Up @@ -124,3 +132,7 @@ orchestrator_mysql_orchestrator_ssl_ca_file:
orchestrator_enable_syslog: false
orchestrator_audit_log_file:
orchestrator_audit_to_syslog: false

### Orchestart KV Options
orchestrator_kv_cluster_master_prefix: "mysql/master"
orchestrator_kv_consul_address:
14 changes: 14 additions & 0 deletions files/orchestrator.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description="orchestrator: MySQL replication management and visualization"
After=syslog.target network.target

[Service]
Type=simple
Restart=always
RestartSec=30
ExecStart=/usr/local/bin/orchestrator --verbose http
PIDFile=/var/run/orchestrator.pid
WorkingDirectory=/usr/local/orchestrator

[Install]
WantedBy=multi-user.target
207 changes: 16 additions & 191 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,194 +1,19 @@
---
galaxy_info:
author: your name
description: your description
company: your company (optional)

# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker

# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: license (GPLv2, CC-BY, etc)

min_ansible_version: 1.2

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If travis integration is cofigured, only notification for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:

#
# Below are all platforms currently available. Just uncomment
# the ones that apply to your role. If you don't see your
# platform on this list, let us know and we'll get it added!
#
#platforms:
#- name: EL
# versions:
# - all
# - 5
# - 6
# - 7
#- name: GenericUNIX
# versions:
# - all
# - any
#- name: OpenBSD
# versions:
# - all
# - 5.6
# - 5.7
# - 5.8
# - 5.9
# - 6.0
#- name: Fedora
# versions:
# - all
# - 16
# - 17
# - 18
# - 19
# - 20
# - 21
# - 22
# - 23
#- name: opensuse
# versions:
# - all
# - 12.1
# - 12.2
# - 12.3
# - 13.1
# - 13.2
#- name: MacOSX
# versions:
# - all
# - 10.10
# - 10.11
# - 10.12
# - 10.7
# - 10.8
# - 10.9
#- name: IOS
# versions:
# - all
# - any
#- name: Solaris
# versions:
# - all
# - 10
# - 11.0
# - 11.1
# - 11.2
# - 11.3
#- name: SmartOS
# versions:
# - all
# - any
#- name: eos
# versions:
# - all
# - Any
#- name: Windows
# versions:
# - all
# - 2012R2
#- name: Amazon
# versions:
# - all
# - 2013.03
# - 2013.09
#- name: GenericBSD
# versions:
# - all
# - any
#- name: Junos
# versions:
# - all
# - any
#- name: FreeBSD
# versions:
# - all
# - 10.0
# - 10.1
# - 10.2
# - 10.3
# - 8.0
# - 8.1
# - 8.2
# - 8.3
# - 8.4
# - 9.0
# - 9.1
# - 9.1
# - 9.2
# - 9.3
#- name: Ubuntu
# versions:
# - all
# - lucid
# - maverick
# - natty
# - oneiric
# - precise
# - quantal
# - raring
# - saucy
# - trusty
# - utopic
# - vivid
# - wily
# - xenial
#- name: SLES
# versions:
# - all
# - 10SP3
# - 10SP4
# - 11
# - 11SP1
# - 11SP2
# - 11SP3
# - 11SP4
# - 12
# - 12SP1
#- name: GenericLinux
# versions:
# - all
# - any
#- name: NXOS
# versions:
# - all
# - any
#- name: Debian
# versions:
# - all
# - etch
# - jessie
# - lenny
# - sid
# - squeeze
# - stretch
# - wheezy

galaxy_tags: []
# List tags for your role here, one per line. A tag is
# a keyword that describes and categorizes the role.
# Users find roles by searching for tags. Be sure to
# remove the '[]' above if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of
# alphanumeric characters. Maximum 20 tags per role.
author: Jacopo Secchiero
description: Install orchestrator for mysql ha
license: GPL
min_ansible_version: 2.1
platforms:
- name: Arch Linux
versions:
- all
- name: EL
versions:
- 7
- name: Debian
versions:
- wheezy
- jessie

dependencies: []
# List your role dependencies here, one per line.
# Be sure to remove the '[]' above if you add dependencies
# to this list.
7 changes: 6 additions & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
file:
path: "{{ orchestrator_installed_file }}"
state: absent
when: orchestrator_upgrade_if_older_version
when: orchestrator_upgrade

- name: orchestrator | install | download and unpack orchestrator
unarchive:
Expand Down Expand Up @@ -86,4 +86,9 @@
owner: "{{ orchestrator_user }}"
state: link

- name: orchestrator | install | create systemd unit
copy:
src: "orchestrator.service"
dest: "/etc/systemd/system/orchestrator.service"

when: not orchestrator_install_via_packagecloud
Loading