This sample demonstrates how to use Cloud Storage on Google Managed VMs.
Before you can run or deploy the sample, you will need to do the following:
- Enable the Cloud Storage API in the Google Developers Console.
- Create a Cloud Storage Bucket. You can do this with the Google Cloud SDK using the following command:
gcloud storage buckets create gs://[your-bucket-name]- Set the default ACL on your bucket to public read in order to serve files directly from Cloud Storage. You can do this with the Google Cloud SDK using the following command:
gcloud storage buckets update gs://[your-bucket-name] --predefined-default-object-acl=publicRead- Update the bucket name in
src/main/appengine/app.yaml. This makes the bucket name an environment variable in deployment. You still need to set the environment variable when running locally, as shown below.
```sh
mvn clean package appengine:deploy
```
