Afonso Consulting | DevOps, Automation, & AWS Experts

CI/CD & Tenant Provisioning System

Client: Major Consulting Firm

When: Nov 2022 through Dec 2023

Project Goals

The goals of this project were to increase release velocity of a legacy application that had been recently refactored to use per-tenant containers rather than a multi-tenant monolith backend. The issues present were:

To properly address these needs, I did the following:

Project Work

Once completed, I was embedded with the team and fixed issues:

  1. Fix the build.
    1. We began with fixing the build system by using selective git checkouts, optimizing the dependency system, and working through the build process to parallelize the build where we could and generally cut the time down.
    2. Remove any configuration from the build artifacts as this would need to be added per-tenant down the road.
    3. Set the build to only generate artifacts and push them to AWS ECR.
  2. Design the per-tenant infrastructure.
    1. Understand the isolation requirements.
    2. Create minimal infra required to service a tenant, in this case an Aurora cluster that could be expanded, S3 space, a pod group in Kubernetes, some SSM Parameter Store configuration, and all appropriate IAM roles.
    3. Setup the tenant’s AWS infrastructure as CloudFormation templates.
    4. Setup their Kubernetes infrastructure as a Helm template.
    5. Document the steps to deploy.
  3. Automate tenant provisioning.
    1. Given the skill set of the programming team, the deployment code was written in Typescript so it could be maintained after my departure from the project.
    2. Create a state machine system to handle infra deployment and provisioning steps. This involved using a table in DynamoDB to store state info for all the deployments in a region, segregated by deployment environment.
    3. Created logic to handle the normal state transitions.

Challenges Encountered

During this project the following issues were encountered and had to be worked through:

Project Outcomes

Upon completion, the client benefited from:

Key Takeaways

  1. Custom provisioning software, while effective initially, may not be suitable for long-term maintenance by non-developers. Alternative solutions, such as AWS Step Functions or bash scripts, may be more effective.
  2. It is essential to prioritize implementation over debating security concerns without a clear threat model.
  3. Embedding with the team is crucial for achieving optimal project results.
Tags:

Talk To Me

How To Get In Touch

Need advice or direction on a cloud architecture problem? Send a message and I’ll usually get back to you within a few minutes. Please add as much detail as possible, and a reliable way to contact you. Thanks!

Boston Area, Massachusetts, US
@DansHardware
@danshardware.bsky.social