-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Overview:
As part of our project's infrastructure setup, it's essential to automate the process of creating databases and setting up schemas for our microservices. This automation will help in several ways, including ensuring that when running lerna-db:migrate or similar commands, databases and schemas already exist, reducing the likelihood of issues related to missing databases or schemas. Additionally, it will streamline the deployment of new infrastructure with fewer manual configurations.
Issue Details:
Currently, our infrastructure setup process may require manual database creation and schema setup, leading to potential errors and inefficiencies. To improve this process, we propose the following steps:
Proposed Solution:
Automated Database Creation:
Develop scripts or use infrastructure as code (IaC) tools like Terraform or Docker Compose to automate the creation of databases required for our microservices.
Ensure that the scripts or IaC templates are versioned and maintainable.
Automated Schema Setup:
Develop scripts or use database migration tools like Knex.js, Sequelize, or Flyway to automate schema setup within the databases.
These scripts should be able to create tables, indexes, and other schema components required for each microservice.
Documentation:
Document the automated setup process, including the steps and tools used.
Provide clear instructions for developers and operators to execute the setup process.
Integration with CI/CD:
Integrate the automated setup process into our CI/CD pipeline so that it's executed automatically during deployments.
Expected Benefits:
Reduced risk of missing databases or schemas when running commands like lerna-db:migrate.
Streamlined and efficient infrastructure setup for new deployments.
Improved developer experience by reducing manual configuration steps.
Additional Information:
This enhancement is essential for maintaining a smooth development and deployment process.
The choice of tools and scripts for automation should be based on project requirements and best practices.
Environment:
Project: ISBC
Infrastructure: ARC backend