Code Monkey home page Code Monkey logo

yomali's Introduction

Yomali [not production ready]

This repo will setup

  • Setup an instance for MySQL in GCP with SSH access.
  • Setup an instance for HAProxy in GCP with SSH access.
  • Using Ansible, Install & configure the MySQL server.
  • Using Ansible, Install & configure the HAProxy server. Configure this to route queries to the MySQL server
  • Ensure the HAProxy config exposes a status page.

Requisites

  • terraform => Terraform v1.3.8
  • gcloud => Google Cloud SDK 418.0.0 bq 2.0.85 bundled-python3-unix 3.9.16 core 2023.02.13 gcloud-crc32c 1.0.0 gsutil 5.20
  • ansible => ansible [core 2.11.12]

Structure

The repo structure is divided into:

  • config => ansible playbooks for mysql and haproxy
  • infra => terraform scripts to deploy the following high-level diagram:

https://drive.google.com/file/d/1bchWYtM2kGUn2fJx9Ibtf5lHePo_xTQs/view?usp=sharing

Usage

Every folder has its own Makefile, actions are documented inside of it, to execute an action, simply issue:

$ make

The flow is:

  • go to infra folder and run make dev-apply
  • wait for it to finish
  • test connection to bastion host, make sure it has ansible and mysql client installed, e.g. $ ansible --version, $ mysql********
  • go to config folder and run make requisites, make copy, make mysql, make haproxy

TODO

  • improve user experience, reduce manual steps after infra deployment
  • haproxy playbook not making cache before hand
  • tcp flow from haproxy to mysql not working yet

yomali's People

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.