This is a plugin to enable Hyper.sh as an OpenFaaS backend.
- A working Hyper.sh account with credential
- A Hyper.sh CLI with a working
hyper
Follow the instruction to get Access Key
and Secret Key
of Hyper.sh account.
Go to FIP page to allocate a new FIP, get the FIP address x.x.x.x
.
Copy docker-compose-tpl.yml
file to docker-compose.yml
.
Edit the docker-compose.yml
and input environment variables using the values above:
<HYPER_REGION>
: insertus-west-1
oreu-central-1
<HYPER_ACCESS_KEY>
: insertAccess Key
<HYPER_SECRET_KEY>
: insertSecret Key
<FIP>
: insertx.x.x.x
Use hyper compose command hyper compose up -d -p faas
to deploy FaaS-hyper and FaaS API Gateway.
Once deployed, you can use http://x.x.x.x:8080/
to open the FaaS Gateway UI.
Use hyper pull command hyper pull functions/nodeinfo
to pull the image from Docker Hub.
Click CREATE NEW FUNCTION
on FaaS Gateway UI to deploy the function functions/nodeinfo
:
curl http://x.x.x.x:8080/function/info
hyper compose rm -p faas