Giter Site home page Giter Site logo

ansible-mysql-playbook's Introduction

ansible-mysql-playbook

This is an example ansible playbook which

  • installs MySQL
  • creates a MySQL user named 'chembl'
  • creates a MySQL databased named 'chembl_24'
  • downloads and restores chembl_24 database dump (ftp://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/latest/chembl_24_mysql.tar.gz)

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Ansible should be installed in controller(master) machine Tested in ubuntu server 16.04

Installing

You can run this script in 3 steps:

git clone https://github.com/tkiziloren/ansible-mysql-playbook.git
cd ansible-mysql-playbook
ansible-playbook ebml.yml --extra-vars "ansible_become_pass=ANSIBLE_HOST_PASSWORD"

where ANSIBLE_HOST_PASSWORD is ssh password of your host machine.

Testing the installation

In the host machine you can run the commands below to test installation.

mysql -u chembl -pchembl
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| **chembl_24**          |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
mysql> use chembl_24;
mysql> select * from action_type;

After the last command you should be able to see all actions in the action_types table;

Improvements:

  • In current script if dump file is downloaded it doesn't try to download again.
  • As an improvement it should control the checksum for the file in the checksums.txt and downloaded tar.gz file has different checksum from the remote file then it should be downloaded from the scratch.

Authors

  • Tevfik Kiziloren

License

This project is licensed under the MIT License - see the LICENSE.md file for details

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.