FPM Controller Support
controller
feature is enabled, which is not enabled by default.Controller CommunicationWhen controller
feature is enabled, fpm serve
will first communicate with the FPM controller service’s /get-package/
API.
controller
feature is enabled, fpm serve
will first communicate with the FPM controller service’s /get-package/
API.FPM Controller Service EndpointThe FPM Controller Service’s enpoint is computed by using environement
variable FPM_CONTROLLER
, which will look something like this:
https://controller.fifthtry.com
, with the API path.
FPM Controller Service has more than one APIs: /get-package/ and /fpm-ready/.
The FPM Controller Service’s enpoint is computed by using environement
variable FPM_CONTROLLER
, which will look something like this:
https://controller.fifthtry.com
, with the API path.
FPM Controller Service has more than one APIs: /get-package/ and /fpm-ready/.
/get-package/
Through an environemnt variable FPM_INSTANCE_ID
, the fpm serve
will learn
it’s instance id
, and it will pass the instance id to the get-package
API.
The API returns the URL of the package to be downloaded, git repository URL and
the package name.
FPM will clone the git repository in the current directory. The current
directory will contain FPM.ftd
and other files of the package.
FPM will then calls fpm install
on it.
/get-package/
Through an environemnt variable FPM_INSTANCE_ID
, the fpm serve
will learn
it’s instance id
, and it will pass the instance id to the get-package
API.
The API returns the URL of the package to be downloaded, git repository URL and the package name.
FPM will clone the git repository in the current directory. The current
directory will contain FPM.ftd
and other files of the package.
FPM will then calls fpm install
on it.
/fpm-ready/
Once dependencies are ready fpm
calls /fpm-ready/
API on the controller. We
will pass the FPM_INSTANCE_ID
and the git commit hash as input to the API
The API will return with success, and once it is done fpm will start receiving HTTP
traffic from the controller service.
/fpm-ready/
Once dependencies are ready fpm
calls /fpm-ready/
API on the controller. We
will pass the FPM_INSTANCE_ID
and the git commit hash as input to the API
The API will return with success, and once it is done fpm will start receiving HTTP traffic from the controller service.