-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gcloud-java version to 0.1.5 and clean up cloudstorage sample
- Loading branch information
Ajay Kannan
committed
Mar 15, 2016
1 parent
26f687a
commit c1bf2f8
Showing
4 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
# Cloud Storage sample for Google Maanged VMs | ||
This sample demonstrates how to use [Cloud Storage](https://cloud.google.com/storage/) on Google Managed VMs | ||
# Cloud Storage sample for Google Managed VMs | ||
This sample demonstrates how to use [Cloud Storage](https://cloud.google.com/storage/) on Google Managed VMs. | ||
|
||
## Setup | ||
Before you can run or deploy the sample, you will need to do the following: | ||
|
||
1. Enable the Cloud Storage API in the [Google Developers Console](https://console.developers.google.com/project/_/apiui/apiview/storage/overview). | ||
1. Create a Cloud Storage Bucket. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command: | ||
$ gsutil mb gs://[your-bucket-name] | ||
1. 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](https://cloud.google.com/sdk) with the following command: | ||
$ gsutil defacl set public-read gs://[your-bucket-name] | ||
1. Update the bucket name in ``src/main/appengine/app.yaml``. | ||
2. Create a Cloud Storage Bucket. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) using the following command: | ||
|
||
``` | ||
$ gsutil mb gs://[your-bucket-name] | ||
``` | ||
3. 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](https://cloud.google.com/sdk) using the following command: | ||
|
||
``` | ||
$ gsutil defacl set public-read gs://[your-bucket-name] | ||
``` | ||
4. 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. | ||
|
||
## Running locally | ||
$ export BUCKET_NAME=[your-bucket-name] | ||
$ mvn clean jetty:run | ||
|
||
## Deploying | ||
$ mvn clean gcloud:deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters