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

[#385] Enhance deployment process by refactoring makefiles and incorporating utility scripts #386

Conversation

placek
Copy link
Contributor

@placek placek commented Mar 5, 2024

The work undertaken in this PR involves a series of refactoring and enhancements to the deployment process of a project, focusing on the Makefile-driven automation for better modularity and maintenance.

Initially, the Makefile structure was reorganized to support smaller, target-specific Makefiles, improving clarity and modularity. This was followed by integrating the functionality of a previously separate script for preparing configurations directly into the Makefile system, which streamlines the configuration process and improves the handling of secret management. Lastly, a significant change centralized the Docker Compose configurations into a dynamic template that is adjusted by the Makefile based on the deployment environment, replacing multiple environment-specific Docker Compose files.

These changes collectively aim to simplify the deployment process, making it more efficient, maintainable, and adaptable to changes across various environments.

@placek placek linked an issue Mar 5, 2024 that may be closed by this pull request
4 tasks
@placek placek force-pushed the chore/385-enhance-deployment-process-by-refactoring-makefiles-and-incorporating-utility-scripts branch from 635041d to 480ce46 Compare March 5, 2024 08:59
@placek placek marked this pull request as ready for review March 5, 2024 09:29
@placek placek self-assigned this Mar 5, 2024
@placek placek force-pushed the chore/385-enhance-deployment-process-by-refactoring-makefiles-and-incorporating-utility-scripts branch from 480ce46 to b05b701 Compare March 5, 2024 09:37
@placek placek requested a review from adgud as a code owner March 5, 2024 10:35
@placek placek force-pushed the chore/385-enhance-deployment-process-by-refactoring-makefiles-and-incorporating-utility-scripts branch 2 times, most recently from 494c9b9 to 87c2339 Compare March 5, 2024 11:08
placek added 7 commits March 5, 2024 12:14
…ment efficiency

This commit reorganizes the build and deployment scripts by introducing
separate Makefiles for the backend and frontend components, along with
common utilities and informational targets. The new structure aims to
improve modularity, maintainability, and clarity of the deployment
process. Component-specific Makefiles handle Docker image construction
and deployment more effectively, while shared utilities and variables
are centralized for ease of use. Additionally, the update simplifies
Docker tag generation by incorporating it directly into the Makefiles,
eliminating the need for separate versioning scripts. The README has
been updated to guide users through the new deployment process.
…stem

This commit eliminates the prepare-config.sh script, incorporating its
configuration preparation logic into the Makefile workflow with a new
config.mk file. This adjustment enhances the consistency of the
deployment process, aligning it with the modular Makefile approach. It
simplifies the management of configurations by dynamically generating
necessary files from templates, thereby improving the security and
maintainability of configuration secrets. Adjustments to related
Makefiles files have been made to accommodate these changes,
streamlining the entire configuration and deployment pipeline.
This commit streamlines the deployment process by consolidating the
Docker Compose configurations into a single template file, which is then
dynamically adjusted by the Makefile based on specific deployment
environments. This enhancement reduces redundancy and facilitates easier
management of environment-specific settings. The transition involves
updating the `Makefile` and `config.mk` to support the generation of
Docker Compose files from the template, as well as modifying the
`README.md` to align with the new configuration approach. This change
marks a significant improvement in the deployment workflow, making it
more efficient and maintainable.
…ation

This commit updates the CHANGELOG.md to reflect two significant improvements:
- The adoption of a unified policy for tagging Docker images, addressing
  issue 320. This change ensures consistency in how Docker images are
  tagged across the project, facilitating easier management and deployment
  of images.
- The reorganisation of deployment Makefiles as part of issue 385. This
  enhancement aims at better documenting the deployment process and
  simplifying the management of deployment scripts. The new structure of
  Makefiles contributes to a more streamlined and understandable
  deployment process.

These updates are part of ongoing efforts to enhance the deployment
process by refining project documentation and operational scripts.
…ling

Optimized the build-and-deploy GitHub Actions workflow to streamline the
deployment process. Removed redundant `make docker-login` and `make
build-[backend|frontend]` steps, focusing directly on pushing the
pre-built Docker images with `make push-backend` and `make
push-frontend`. Added a crucial verification step to ensure the
deployment environment is properly defined, enhancing the reliability of
the deployment pipeline. This update ensures a more efficient and
error-resilient deployment process by minimizing unnecessary steps and
reinforcing environmental checks.
Consolidated and streamlined the GitHub Actions workflow for deploying
the application by removing redundant build steps and focusing solely on
deployment tasks. This simplification entails a direct approach to
deploying the app, removing previous conditional steps for building
Docker images and checking environment existence. The workflow now
concentrates on setting up AWS credentials, SSH agent configuration, and
executing a singular deployment command. This change leads to a more
efficient, straightforward deployment process, enhancing the
maintainability and readability of the CI/CD pipeline.
Eliminated unnecessary fake database synchronization settings from the
GitHub Actions deployment workflow and the backend configuration
template. This action streamlines the deployment and configuration
process by removing redundant settings, focusing solely on the essential
configurations required for real database synchronization. The
simplification contributes to clearer, more maintainable deployment
scripts and backend configuration, ensuring an efficient setup for
actual operational needs.
@placek placek force-pushed the chore/385-enhance-deployment-process-by-refactoring-makefiles-and-incorporating-utility-scripts branch from af9b724 to 1659908 Compare March 5, 2024 11:19
Standardized the format of placeholders within template files across the
deployment setup to improve the consistency and reliability of dynamic
configuration generation. Modified `config.mk`,
`backend-config.json.tpl`, and
`grafana-provisioning/alerting/alerting.yml` to use a uniform
placeholder notation, enclosed in angle brackets (e.g.,
`<PLACEHOLDER>`), for all configurable values. This refinement
simplifies the template processing logic, ensuring a more streamlined
and error-free substitution of environment-specific values during the
deployment process, thereby enhancing the overall maintainability of the
deployment infrastructure.
@placek placek merged commit f75893c into develop Mar 5, 2024
@placek placek deleted the chore/385-enhance-deployment-process-by-refactoring-makefiles-and-incorporating-utility-scripts branch March 5, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance deployment process by refactoring Makefiles and incorporating utility scripts
3 participants