Projects

CLI tool to automate server lifecycle

A new customer server starts with a hand-written filea CRM event.

I proposed, designed and built it.

A customer starts as a record in HubSpot, the CRM. Their server starts as a file in a GitOps repository, which Argo CD deploys.

Why it was needed

An engineer copied each customer's details from the CRM into that file by hand, for every create, update and delete. It was slow, and one wrong value meant a wrong server.

GitLabAWSwebhookmergedHubSpotworkflow eventPython CLIwrites the fileMerge requesta person approvesArgo CDsyncs the repoAmazon EKSserver runs
A CRM event becomes a merge request. A person approves it, and Argo CD deploys it.

How it was done

  1. A HubSpot workflow triggers a GitLab pipeline, and the tool checks the data, writes the file and opens a merge request.

  2. A person approves the merge request, so the CRM can propose a change to production but never make one.

  3. Rebuilt the scripts as one Python CLI that runs the same on a laptop or in CI.

  4. Replaced pip with uv, and merged five per-cluster sync jobs into one.

Problems on the way

  • Pipelines failed on empty fields from the CRM.

    The webhook had no filter, and one field was read from the wrong property. Fix: Paused the update and delete workflows until the data was fixed, and wrote test cases for the input.

  • The CRM cannot trigger on a deleted record.

    A limit of its workflow engine. Fix: Triggered the delete on a property change instead.

Check the input before you trust the automation.

Results

  • 36%faster create-server job, 58 to 37 seconds
  • 5 → 1CRM sync jobs, now about 28 seconds
  • 4lifecycle actions opened as merge requests