HTTP handlers for digging serverless services.
There are examples for App Engine, Cloud Functions, Cloud Run and GCP Buildpacks.
The handlers can be security backdoor. Don't deploy without some security setting.
$ gcloud app deploy app_go111.yaml
$ gcloud app deploy app_go112.yaml
# Use Cloud Build
$ gcloud builds submit -t gcr.io/${PROJECT_ID}/httptoolbox
# or use GCP Buildpacks
$ pack build --builder gcr.io/buildpacks/builder -e GOOGLE_BUILDABLE=./cmd/main --publish gcr.io/${PROJECT_ID}/httptoolbox
$ gcloud run deploy --image gcr.io/${PROJECT_ID}/httptoolbox
$ gcloud run deploy --image gcr.io/${PROJECT_ID}/httptoolbox
$ gcloud functions deploy ExecDmesg --trigger-http --runtime=go111
$ pack build --builder gcr.io/buildpacks/builder -e GOOGLE_BUILDABLE=./cmd/main go-httptoolbox-app
$ docker run -p 8080:8080 --rm go-httptoolbox-app
You can use gcloud alpha builds submit --pack
.
$ gcloud alpha builds submit --pack=builder=gcr.io/buildpacks/builder,env=GOOGLE_BUILDABLE=./cmd/main,image=gcr.io/${PROJECT_ID}/go-httptoolbox-app
$ pack build --builder gcr.io/buildpacks/builder -e GOOGLE_FUNCTION_TARGET=DumpRequest go-httptoolbox-function
$ docker run -p 8080:8080 --rm go-httptoolbox-function
You can use gcloud alpha builds submit --pack
.
$ gcloud alpha builds submit --pack=builder=gcr.io/buildpacks/builder,env=GOOGLE_FUNCTION_TARGET=DumpRequest,image=gcr.io/${PROJECT_ID}/go-httptoolbox-function