Skip to content

Commit

Permalink
Change to endpoints managed rollout (GoogleCloudPlatform#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Zeltser authored and Jon Wayne Parrott committed Mar 28, 2018
1 parent 7f9c006 commit 6630946
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
16 changes: 2 additions & 14 deletions endpoints/getting-started-grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,10 @@ Cloud account and [SDK](https://cloud.google.com/sdk/) configured.

```bash
gcloud endpoints services deploy api_descriptor.pb api_config.yaml
# The Config ID should be printed out, looks like: 2017-02-01r0, remember this
# Set your project ID as a variable to make commands easier:
GCLOUD_PROJECT=<Your Project ID>
# Print out your Config ID again, in case you missed it:
gcloud endpoints configs list --service hellogrpc.endpoints.${GCLOUD_PROJECT}.cloud.goog
```

1. Also get an API key from the Console's API Manager for use in the
Expand Down Expand Up @@ -95,7 +92,6 @@ Cloud account and [SDK](https://cloud.google.com/sdk/) configured.
```bash
GCLOUD_PROJECT=$(curl -s "http://metadata.google.internal/computeMetadata/v1/project/project-id" -H "Metadata-Flavor: Google")
SERVICE_NAME=hellogrpc.endpoints.${GCLOUD_PROJECT}.cloud.goog
SERVICE_CONFIG_ID=<Your Config ID>
```
1. Pull your credentials to access Container Registry, and run your gRPC server
Expand All @@ -114,7 +110,7 @@ Cloud account and [SDK](https://cloud.google.com/sdk/) configured.
--link=grpc-hello:grpc-hello \
gcr.io/endpoints-release/endpoints-runtime:1 \
--service=${SERVICE_NAME} \
--version=${SERVICE_CONFIG_ID} \
--rollout_strategy=managed \
--http2_port=9000 \
--backend=grpc://grpc-hello:50051
```
Expand Down Expand Up @@ -146,19 +142,11 @@ Cloud account and [SDK](https://cloud.google.com/sdk/) configured.
gcloud container clusters create my-cluster --zone=us-central1-a
```
1. Edit `deployment.yaml`. Replace `SERVICE_NAME`, `SERVICE_CONFIG_ID`,
and `GCLOUD_PROJECT` with your values:
1. Edit `deployment.yaml`. Replace `SERVICE_NAME` and `GCLOUD_PROJECT` with your values:
`SERVICE_NAME` is equal to hellogrpc.endpoints.GCLOUD_PROJECT.cloud.goog,
replacing GCLOUD_PROJECT with your project ID.
`SERVICE_CONFIG_ID` can be found by running the following command, replacing
GCLOUD_PROJECT with your project ID.
```bash
gcloud endpoints configs list --service hellogrpc.endpoints.GCLOUD_PROJECT.cloud.goog
```
1. Deploy to GKE:
```bash
Expand Down
2 changes: 1 addition & 1 deletion endpoints/getting-started-grpc/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
"--http2_port=9000",
"--backend=grpc://127.0.0.1:50051",
"--service=SERVICE_NAME",
"--version=SERVICE_CONFIG_ID",
"--rollout_strategy=managed",
]
ports:
- containerPort: 9000
Expand Down
2 changes: 1 addition & 1 deletion endpoints/getting-started/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ endpoints_api_service:
# The following values are to be replaced by information from the output of
# 'gcloud endpoints services deploy openapi-appengine.yaml' command.
name: ENDPOINTS-SERVICE-NAME
config_id: ENDPOINTS-CONFIG-ID
rollout_strategy: managed
# [END configuration]
2 changes: 1 addition & 1 deletion endpoints/getting-started/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
"--http_port=8081",
"--backend=127.0.0.1:8080",
"--service=SERVICE_NAME",
"--version=SERVICE_CONFIG_ID",
"--rollout_strategy=managed",
]
# [END esp]
ports:
Expand Down
2 changes: 1 addition & 1 deletion endpoints/kubernetes/grpc-bookstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
args: [
"--http2_port=9000",
"--service=SERVICE_NAME",
"--version=SERVICE_CONFIG_ID",
"--rollout_strategy=managed",
"--backend=grpc://127.0.0.1:8000"
]
ports:
Expand Down

0 comments on commit 6630946

Please sign in to comment.