apioo / fusio

Open source API management platform
https://www.fusio-project.org
Apache License 2.0
1.85k stars 221 forks source link

Add command to push custom actions to a remote instance #65

Open chriskapp opened 6 years ago

chriskapp commented 6 years ago

At the moment it is possible to develop custom actions using simple PHP files. These actions can be used through the deploy command on a local system. If Fusio runs in a Docker container it is not always possible to run such commands on the CLI. Because of this it would be great if we had a tool like (https://github.com/apache/incubator-openwhisk-wskdeploy) to deploy custom action code to a remote Fusio instance. Basically this would mean that the user has to provide login credentials to the backend and then we send the action + file content to the remote instance.

This could result in some problems in case the action uses classes from a composer package which was not installed on the remote instance or if the action uses connections which are not available on the remote instance. Maybe such a command should always deploy the complete local Fusio instance including all actions etc. then we could check composer dependencies and compare the action and connections.

chriskapp commented 6 years ago

As alternative we could also try to persist the complete file content in the database and then write the content to a php file on demand. This has also the advantage that we have no hard file paths in our database.