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

CI/CD optimization #167

Open
3 of 14 tasks
MSzalowski opened this issue Feb 13, 2024 · 1 comment
Open
3 of 14 tasks

CI/CD optimization #167

MSzalowski opened this issue Feb 13, 2024 · 1 comment

Comments

@MSzalowski
Copy link
Contributor

MSzalowski commented Feb 13, 2024

Why

Currently, deployment lasts for circa 30min or more because we are building backend application with clean cabal build without caching.

What

We should utilize Nix configuration and some cache to optimize that process to only compile the backend sourcecode instead of building all dependencies each time the deploy is triggered. This is dependent of the previous step and will significantly shorten the build process and testing.

Copied from discussion #176

Nix configuration for all the modules

  • Assess current Nix configuration state #186
    - Review the existing Nix configuration for the backend module.
    - Determine the status of the Nix configuration for the frontend and other modules.
    - Identify any gaps or discrepancies in the current setup.
  • Refine backend Nix configuration #187
    - Review and refine the existing backend Nix configuration to ensure it meets current project requirements.
    - Explicitly define the backend development environment, including dependencies, toolchains, and any specific version requirements.
  • Develop Nix configuration for frontend #188
    - Create a Nix configuration for the frontend module that mirrors the setup and dependencies required.
    - Define development environments explicitly, including all necessary dependencies and toolchains.
  • Establish Nix configurations for infrastructure and deployment #189
    - Review Nix configurations for infrastructure setup and deployment processes.
    - Include specifics for cloud resources, networking configurations, storage, and any other infrastructure components.
    - Ensure deployment configurations include necessary scripts and commands for automated deployments.
  • Adjust Nix configuration for docker images creation #190
    - Create Nix expressions that define Docker images for the backend, frontend, and any other necessary services.
    - Ensure Docker images are optimized for size and build efficiency, incorporating best practices for layer caching.
  • Incorporate Nix Flakes for project-wide configuration management
    - Integrate @johnalotoski's proposed Nix flakes solution (Adds a nix flake with the vva-be package #53), ensuring it is operational and meets project requirements.
    - Utilize Nix Flakes to encapsulate the entire project's Nix configurations as build targets.
    - Ensure the flake.nix file is properly set up to reference backend, frontend, infra, and deployment configurations.
  • Source Nix configuration on the latest stable Nixpkgs version
    - Ensure that all Nix configurations are based on the latest stable version of nixpkgs.
    - Update any outdated Nix packages or configurations to align with the latest stable release.
  • Documentation and knowledge sharing
    - Ensure documentation of all Nix configurations mentioned above, including the rationale behind specific decisions and configurations.
    - Share knowledge and documentation with the development team to ensure everyone is up to speed with the Nix setup.
    - Provide training or workshops if necessary to help team members become proficient with Nix.
  • Review and testing
    - Conduct thorough testing of all Nix configurations to ensure they work as expected across different environments.
    - Review configurations with the development team and stakeholders to gather feedback and make adjustments as needed.
  • Continuous improvement
    - Establish a process for continuously reviewing and improving the Nix configurations as project requirements evolve.

CI/CD optimization

@kickloop
Copy link
Collaborator

@MSzalowski @placek Use your best judgment and do what you need here. We are working with Bloxico team on some guides and strategy for Intersect DevOps and SRE but it will take time before we are ready for something other than what you have. So, please proceed as you think seems fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants