bpmn-io / bpmn.io

The bpmn.io website sources.
https://bpmn.io
155 stars 99 forks source link

Migrate away from Jenkins #91

Closed barmac closed 3 years ago

barmac commented 3 years ago

What should we do?

Why should we do it?

Jenkins pipeline is decommissioned.

barmac commented 3 years ago

Hey, since there are some blockers regarding migration to Heroku, I've prepared the document below which should help us to decide how to proceed:

bpmn.io migration

Current Status

There is a bpmn-io-website pipeline on Heroku. Two apps are connected to the pipeline with auto-deployment from master and live branches for the staging and the production environment respectively.

The staging version of the website is connected to the stage.bpmn.io domain and it works correctly.

bpmn.io is still hosted by Camunda webserver which is handled by the old Jenkins pipeline.

Problem

When I reached out to Tim Gramling (@gramling on Slack) to change the bpmn.io domain settings to point to the Heroku-hosted production website, he shared with me that it cannot be done.

It occurs that bpmn.io domain cannot point to the Heroku server. Heroku handles custom domains by pointing the domain to a DNS target in a form of nameless-cat-bvwfnutntrlk4p1ak2uz5vcd.herokudns.com.

To point to such a domain from the root domain, we would have to use a CNAME entry on the domain. However, we cannot have a CNAME entry on bpmn.io domain as it already has two TXT entries. One cannot have both CNAME and TXT entries on a domain. Also, as Tim shared with me, we cannot use ALIAS entries because Camunda DNS server (Bind) does not allow this.

What we can have on bpmn.io domain is an A entry. This, however, has to point to a static IP which is not provided by Heroku.

Solutions

I can see two feasible solutions.

Choose different hosting

As we cannot achieve what we want with Heroku, we can move on to another hosting provider which supports A entries. I've found that GitHub Pages and Netlify could be options for us.

GitHub Pages

GitHub Pages supports A entries. Here we can have only a single website and the service is free. For the staging environment, we would have to use the existing Heroku website linked with stage.bpmn.io

Netlify

Netlify supports A entries as well. It is a paid service ($19/month per member) which provides more features than GitHub Pages with review deployments, serverless functions, and monitoring among them. We could use Netlify as a single service provider so we would not have to maintain the Heroku website.

Regarding the cost, Heroku is $14/month for two apps. If we use a shared Netlify account, the difference is not big.

Use a subdomain

A solution suggested by Tim is to use a www.bpmn.io subdomain which can use CNAME entry. This would allow us to use Heroku. However, bpmn.io domain would have to redirect users to www.bpmn.io

My Assessment

Let's use Netlify as this allows us to keep the same domain as before while also providing a full-fletched environment for tests and review.

barmac commented 3 years ago

Moved to backlog due to pending decision on the hosting. Let's get back to it after my vacation. @nikku and I will discuss it on 16 August.

barmac commented 3 years ago

Nico and I just had a meeting regarding this issue. We have decided that we will try to re-use the old server and use GitHub Actions to build and deploy the website. I will reach out to IT (Tim) to set this up.

If it's not an option, only then we will go for Netlify.

barmac commented 3 years ago

I reached out today to Tim and he added bpmn.io server secrets to the repository. The next step will be to prepare GitHub actions to build and deploy the website using the provided credentials.

barmac commented 3 years ago

I've disabled the staging job after GH Action worked correctly.

barmac commented 3 years ago

The live job is also disabled. Now GitHub Actions handle both staging and production deployments.