Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions for Cloud Run #16

Closed
grant opened this issue Jan 7, 2020 · 3 comments
Closed

Instructions for Cloud Run #16

grant opened this issue Jan 7, 2020 · 3 comments

Comments

@grant
Copy link
Contributor

grant commented Jan 7, 2020

In order to use this functions framework, there should be instructions on how to deploy this container to Cloud Run.

When I tested, I wasn't able use the example Dockerfile.

https://github.com/GoogleCloudPlatform/functions-framework-php/blob/master/examples/hello/Dockerfile

Expected

Here are example of guides for instructions for Cloud Run with other function frameworks:

I expected to find a similar guide for the PHP Functions Framework. This would be useful for all developers wishing to use this package with Google Cloud.

Example Section: Deploy a Container

You can deploy your containerized function to Cloud Run by following the Cloud Run quickstart.

Use the docker and gcloud CLIs to build and deploy a container to Cloud Run, replacing the project id $GOOGLE_CLOUD_PROJECT and image name php-ff:

docker build -t gcr.io/$GOOGLE_CLOUD_PROJECT/php-ff .
docker push gcr.io/$GOOGLE_CLOUD_PROJECT/php-ff
gcloud run deploy helloworld --image gcr.io/$GOOGLE_CLOUD_PROJECT/php-ff --region us-central1

If you want even more control over the environment, you can deploy your container image to Cloud Run on GKE. With Cloud Run on GKE, you can run your function on a GKE cluster, which gives you additional control over the environment (including use of GPU-based instances, longer timeouts and more).

Actual

There isn't a guide for deploying this to Cloud Run. The best guide is using Docker in the README.
Trying to deploy to Cloud Run fails for multiple reasons:

  • There isn't an example Dockerfile
  • There aren't instructions for deploying the GCP

@bshaffer have you been able to deploy this framework onto Cloud Run?

@bshaffer
Copy link
Collaborator

bshaffer commented Jan 7, 2020

Yes, I was able to use the example Dockerfile to deploy to Cloud Run

@grant
Copy link
Contributor Author

grant commented Jan 8, 2020

I'll provide more details as to the specific issues I was running into. Notes from chat:

  • provide a fix for the issue
  • provide errors that you encounter so I can advise what may have gone wrong

@bshaffer
Copy link
Collaborator

Added instructions for Cloud Run to the README:

#21

I'm closing this since the issue filed was for "Instructions for Cloud Run". If you find an issue with the current instructions/implementation, please open a new bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants