- Deploy your function
riff function create custom upper \
--invoker-url https://raw.githubusercontent.com/matthewmcnew/python3-function-invoker/custom-invoker-yaml/python3-invoker.yaml \
--git-repo https://github.com/matthewmcnew/python-function \
--image $DOCKER_ID/python-upper \
--handler upper --artifact upper.py \
--verbose
riff function create custom upper \
--invoker-url https://raw.githubusercontent.com/matthewmcnew/python3-function-invoker/custom-invoker-yaml/python3-invoker.yaml \
--git-repo https://github.com/matthewmcnew/python-function \
--handler upper --artifact upper.py \
--image gcr.io/$GCP_PROJECT/python-upper \
--verbose
- Invoke your function
riff service invoke upper --text -- -d 'i would like to shout'
output
curl 35.221.50.30/ -H 'Host: upper.default.example.com' -H 'Content-Type: text/plain' -d 'i would like to shout'
I WOULD LIKE TO SHOUT
- Deploy your function
riff service create upper --image matthewmcnew/python-upper-example
- Invoke your function
riff service invoke upper --text -- -d 'i would like to shout'
output
curl 35.221.50.30/ -H 'Host: upper.default.example.com' -H 'Content-Type: text/plain' -d 'i would like to shout'
I WOULD LIKE TO SHOUT
- Build your docker image and push to your image repository
docker build . -t matthewmcnew/python-upper-example
docker push matthewmcnew/python-upper-example