When onboarding an app to Coherence, three out of four steps are easy. You provide your app details, connect your GitHub, and then add an IAM role to your AWS/GCP. In the last step you write your Coherence configuration YAML. Not so simple. This file lets the platform perform automated infra-as-code based on the services and cloud resources you describe. We have lengthy documentation and examples to help you understand the file spec and craft your specific version of it, however, this step accounts for our biggest drop off in the funnel (up to 70% in some cohorts).
Our first attempt to make it easier didn’t work out as we’d hoped. We created a CLI that ran in a cloud IDE that let you iterate and debug the config file much faster than was previously possible. It’s robust, and validates your config by actually simulating a containerized deployment. But ultimately this tool still had too much friction and a learning curve of its own.
Back when Coherence was still just a prototype, we’d discussed one day solving app migration with AI. That sounded hand-wavy back then, but today we’ve implemented just that using GPT. Here’s how we did it:
We’ve done a lot of migrations with customers live on calls, so first we broke down the playbook into discrete steps when defining the config file. There are a handful of key questions:
After many iterations, we built a compound GPT prompt that stepwise reasons through these questions and outputs a complete file. The first step looks at the filetree of your repo and determines how many services (frontend/backend) exist. Next, we ask it to identify the three most relevant files. Is there a PaaS config file? Dockerfiles? K8s? Framework specific config files? The function injects the content of the selected files into the final prompt, also providing documentation and examples, and asks it to generate the YAML. The results are pretty impressive.
We now had a dynamic config file UX, so we added an option to write, edit, and manage Coherence YAML in our UI. This makes iteration faster, removes the need for adding a file to your repo, and lets us do client side validation.
We’re still amazed that despite how far off this sounded two years ago, we’re now able to regularly reduce this process down to just one click. Check out an example where we migrate an app from Render, a popular PaaS, to Coherence.