GithubHelp home page GithubHelp logo

corollad / ansible-playbook-mysql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from baijiu1/ansible-playbook-mysql

0.0 1.0 0.0 30 KB

ansible安装mysql自动化脚本,可以选择主从,MGR,单机模式。注意要自己修改rpm包的源地址

Shell 100.00%

ansible-playbook-mysql's Introduction

ansible-playbook-mysql

mysql自动化安装脚本

需要你提前把rpm包打好

关键字说明:

1)business_name:业务名称,用于修改主机的hostname,复制是通过hostname来识别主机的。 2)mysql_roles:要部署的模式。有三种:replica、test、mgr。

对应目录说明:

1、replica:自动安装mysql主从复制的剧本,只需传入"mysql_roles=replica business_name=你的业务名称",修改site.yaml文件中的hosts字段即可开始部署。hosts字段可以填写多个主机,该剧本只会选取其中一台主机当做主库,其余都是从库。该rpm是经过优化之后的mysql,适合于部署在生产环境中。 如果只传入一个主机,那么会自动部署master的rpm包。 2、test:适合部署在测试环境中,同样必须要传入"mysql_roles=test business_name=你的业务名称" 3、mgr:顾名思义,安装mysql MGR模式,默认为单主模式。

hosts文件需要修改为你自己的主机,也可以使用动态主机传入

使用方法: ansible-playbook -i ./hosts site.yaml -e "mysql_roles=replica business_name=your_business_name"

ansible-playbook-mysql's People

Contributors

baijiu1 avatar

Watchers

 avatar

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.