Functions (FaaS, Functions-as-a-service) are the future of rapid prototype deployment. This open-source command line tool, based on the Serverless framework, helps you to deploy your Symfony application within seconds.
npm install -g serphperless
For now, serphperless only supports OpenWhisk as a target. OpenWhisk is an open-source, multi-language, scallable function platform, backed by the Apache fundation. You can install OpenWhisk on your infrastructure but we definitely recommend IBM Cloud Functions that is a managed OpenWhisk. You don't even need a credit card to use up to 400,000 GB-seconds for free every month.
- Sign up for your free account on IBM Cloud
- Install IBM Cloud command line tool
- Authenticate against IBM Cloud with IBM's command line tool, using the documentation example.
bluemix login -a api.eu-gb.bluemix.net -o [organisation-name] -s [your-space-name]
- Install IBM's cloud functions
bluemix plugin install cloud-functions
- Export the following environment variables with the corresponding values from IBM Cloud Functions' dashboard (click on "Looking for the wsk CLI?" to get these details from the
wsk property set ...
example):
export OW_APIHOST=openwhisk.eu-gb.bluemix.net
export OW_AUTH=37bc78ae-[...]
# From the field `IAMToken` of your `~/.bluemix/config.json` file
export OW_APIGW_ACCESS_TOKEN=ey[...]
Within your application folder, run the following command:
serphperless deploy
It doesn't work? Add the --debug
flag to see the underlying magic and much more details.
In the given order, serphperless will:
- Ensure the Serverless framework is installed in your project.
- Create the Symfony configuration for Serverless if it do not exists
- Run the deployment with the Serverless framework