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

Change to endpoints managed rollout #576

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions endpoints/getting-started-grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,18 @@ $ protoc \

1. In `api_config.yaml`, replace `MY_PROJECT_ID` and `SERVICE-ACCOUNT-ID` with your Project ID and your service account's email address respectively.

1. Deploy your service's configuration to Endpoints. Take note of your service's config ID and name once the deployment completes.
1. Deploy your service's configuration to Endpoints. Take note of your service's name once the deployment completes.
```
$ gcloud endpoints services deploy api.pb api_config.yaml
...
Service Configuration [SERVICE_CONFIG_ID] uploaded for service [SERVICE_NAME]

```

1. Build a Docker image for later use using the following command. Make sure to replace `[YOUR_PROJECT_ID]` with your Project ID.
```
$ gcloud container builds submit --tag gcr.io/[YOUR_PROJECT_ID]/endpoints-example:1.0 .
...
Service Configuration [SERVICE_CONFIG_ID] uploaded for service [SERVICE_NAME]
```

### Running your service
Expand All @@ -70,7 +72,7 @@ $ sudo apt-get update
$ sudo apt-get install docker.io
```

1. Using the SSH connection to your instance, initialize the required Docker images in the order specified below. Replace `[YOUR_GCLOUD_PROJECT]`, `[YOUR_SERVICE_NAME]` and `[YOUR_SERVICE_CONFIG_ID]` with your GCloud Project ID, your service's name and your service's config ID respectively.
1. Using the SSH connection to your instance, initialize the required Docker images in the order specified below. Replace `[YOUR_GCLOUD_PROJECT]` and `[YOUR_SERVICE_NAME]` with your GCloud Project ID and your service's name respectively.
```
$ sudo docker run --detach --name=helloworld gcr.io/[YOUR_GCLOUD_PROJECT]/endpoints-example:1.0
```
Expand All @@ -83,7 +85,7 @@ $ sudo docker run \
--link=helloworld:helloworld \
gcr.io/endpoints-release/endpoints-runtime:1 \
--service=[YOUR_SERVICE_NAME] \
--version=[YOUR_SERVICE_CONFIG_ID] \
--rollout_strategy=managed \
--http2_port=9000 \
--backend=grpc://helloworld:50051
```
Expand All @@ -107,7 +109,7 @@ $ gcloud components install kubectl
$ gcloud container clusters get-credentials [YOUR_CLUSTER_NAME] --zone [YOUR_CLUSTER_ZONE]
```

1. Edit the `container_engine.yaml` file, and replace `GCLOUD_PROJECT`, `SERVICE_NAME`, and `SERVICE_CONFIG` with your Project ID and your Endpoints service's name and config ID respectively.
1. Edit the `container_engine.yaml` file, and replace `GCLOUD_PROJECT` and `SERVICE_NAME` with your GCloud Project ID and your service's name.

1. Add a [Kubernetes service][docs_k8s_services] to the cluster you created. Note that Kubernetes services should not be confused with [Endpoints services][docs_endpoints_services].
```
Expand Down Expand Up @@ -168,11 +170,10 @@ $ protoc \
```
$ gcloud endpoints services deploy api.pb api_config.yaml

Service Configuration [SERVICE_CONFIG_ID] uploaded for service [SERVICE_NAME]
```

1. Deploy the Endpoints Proxy (ESP) with the HTTP 1.1 port enabled.
Make sure to update the content of `http_deployment.yaml` and replace the placeholder `[SERVICE_NAME]`, `[SERVICE_CONFIG_ID]` and `[GCLOUD_PROJECT]`.
Make sure to update the content of `http_deployment.yaml` and replace the placeholder `[SERVICE_NAME]` and `[GCLOUD_PROJECT]`.
```
$ kubectl apply -f http_deployment.yaml
```
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-grpc/http_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
"--http2_port=9000",
"--backend=grpc://127.0.0.1:50051",
"--service=SERVICE_NAME",
"--version=SERVICE_CONFIG_ID",
"--rollout_strategy=managed",
]
ports:
- containerPort: 8080
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 @@ -19,5 +19,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