Engineering

How Bytebase uses Render

Zilong
Zilong3 min read
How Bytebase uses Render

What is Bytebase

Bytebase is a start-up I currently take internship at. Its aspiration is to build an open-source, web-based database schema change and version control tool for team collaboration. We are a remote team and most of our development happens on GitHub.

We recently moved most of our hosted service to render.com and also leverage its unique capability to improve our dev workflow. I was responsible for this task. _

Problems we faced

  1. The demo page is stale

    Our live demo page) was deployed on AWS EC2 . There is an extra step to manually update it during each release.

  2. No staging environment for each release

    We did not have a staging environment before each release. We want such a final testing stage after merging all works from different feature branches. Also, it would be great for our DevRel colleagues to taste our next release in advance.

  3. No feature preview for PR

    A running app worth a thousand words. As an open-source project with a fully-fledged web interface, we'd like to have a preview for every PR to facilitate the review process.

Render as a solution

From their website, render (https://render.com) is a unified cloud to build and run all your apps. Any app can be deployed and updated instantly with nearly no configuration. They boast their deployment velocity, and from our own experience, that's pretty true.

How do we use render?

Continuous deployment for our live demo

Bytebase employs monolithic architecture using Vue + Golang + SQLite. Our team adopts a trunk-based development workflow and we require our main branch to be deployable at every commit. We decided to use our demo site to validate this promise.

Configuring this on render is quite straightforward. Below are the steps to make our demo site deployed whenever new commits merge to our main branch.

  1. Create a new web service

    _

  2. Link to our GitHub repo

    _

  3. Config our service

    The free tier is good enough for us. _

  4. Specify our building and starting scripts

    _

After the setup, our demo page is updated automatically whenever a new commit is merged into the main branch. _

Staging environment for pre-release

Every pre-release will also trigger an update for our staging environment (staging.bytebase.com). (We can also update this environment manually via the action page) _

Preview for each PR

To be honest, we didn't expect this simple to gain this capability, but after we finish the previous configuration steps, we just need to turn on a single switch to enable the PR preview feature. _ Once configured, render will post the preview link on every Pull Request. _ It usually takes a couple minutes to deploy the service when a new commit is pushed to the source branch and I add a 5-digits commit hash to tell the commit from which the service is built. _

Jointhe community

At Bytebase, we believe in the power of collaboration and open communication, and we have a number of communities that you can join to connect with other like-minded.

Subscribe to Newsletter

By subscribing, you agree with Bytebase's Terms of Service and Privacy Policy.