Versioning in production?

56 views
Skip to first unread message

Barry van der Veen

unread,
Sep 28, 2023, 4:08:11 AM9/28/23
to Fusio
I am struggeling to get changes from my development environment to my production environment.

The situation
I have two servers running fusio (in Docker).
One server is used for testing and development, the other is used for production.
Fusio is used as an API gateway, so I only use routes and actions.

I am struggeling to find a way to migrate changes made in the development environment to the production environment without disturbing the production.
For now I perform all needed changes manually in production after office hours.
This is because the development environment can have multiple changes to multiple actions and routes but only one change is ready to be deployed to production.

What I have found / use so far

Route versions
There is the possibility to create multiple versions  of a route. 
Unfortunately I cannot seem to find how to have my application talk to a specific version. I can put the V1 route in "Production" mode and have the V2 route in development. But I would like to be able to test V2 in a "preproduction" version of my application.
Is there a way to call routes by specific version?

Actions
A lot of changes I make are to actions, the routes stay mostly the same.
Actions do not seem to have a versioning system associated. 
For now I manually copy changes from development into production. This can disrupt production when I make even the littlest mistake.
It would really help if there is a way to have a version of a route point to a version of an action and be able to call it from the "preproduction" version of my application.
Is something like this possible without having multiple copies of an Action?

General, what are your strategies for bringing changes to production?




Barry van der Veen

unread,
Sep 28, 2023, 5:03:33 AM9/28/23
to Fusio
I am using Fusio 3.2 so perhaps there have been changes in Fusio to provide better functionality for versioning?

Op donderdag 28 september 2023 om 10:08:11 UTC+2 schreef Barry van der Veen:

Christoph Kappestein

unread,
Sep 29, 2023, 3:37:46 PM9/29/23
to Fusio
Hi Barry,

so in the new Fusio 4.x version there you can version your route through HTTP path i.e. by using a /v1/my/endpoint and /v2/my/endpoint route which point to a separate action. In the previous 3.x version there was a possibility to provide multiple versions on the same route and you could then request a specific version through the Accept header but we removed this feature since it has really complicated the route setup and it was difficult to handle for our client SDK generator.

Regarding your question, I`am not 100% sure whether I understand your case but regarding the action config we use mostly the deploy mechanism, through this we store every action config in YAML files under version control and then we can simply move this config from dev to production without the need to actual configure an action at the backend by simply calling "php bin/fusio deploy". This makes it very easy to setup different stages. You can get also more information about the deployment at:
https://docs.fusio-project.org/docs/use_cases/deployment_system
https://github.com/apioo/fusio-sample-cms

In general regarding action versioning, for some time we had also the idea to version the action config, so that we basically never update an action and only create new versions, then at the operation you need to select an action + version, this would make it more stable but then you always need to update the version at the operation to make a change. I think the idea is interesting but currently this is not implemented.

best regards
Christoph
Reply all
Reply to author
Forward
0 new messages