Skip to content

Commit 47825e4

Browse files
committed
Update gRPC to v1.16.1
In preparation for agones-dev#421, this updates gRPC (and associated libraries) to v1.16.1. This also updates the simple-udp, cpp-simple and xonotic examples as well.
1 parent 007d0ba commit 47825e4

678 files changed

Lines changed: 89837 additions & 21986 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Gopkg.lock‎

Lines changed: 21 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Gopkg.toml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,15 @@
4646

4747
[[constraint]]
4848
name = "google.golang.org/grpc"
49-
version = "1.12.0"
49+
version = "1.16.0"
50+
51+
[[override]]
52+
name = "golang.org/x/sys"
53+
revision = "4ed8d59d0b35e1e29334a206d1b3f38b1e5dfb31"
5054

5155
[[constraint]]
5256
name = "github.com/golang/protobuf"
53-
version = "1.1.0"
57+
version = "1.2.0"
5458

5559
[[constraint]]
5660
branch = "master"
@@ -60,6 +64,6 @@
6064
branch = "master"
6165
name = "github.com/heptiolabs/healthcheck"
6266

63-
[[constraint]]
67+
[[override]]
6468
name = "github.com/grpc-ecosystem/grpc-gateway"
65-
version = "1.4.1"
69+
version = "1.5.1"

‎build/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ MINIKUBE_PROFILE ?= agones
4949
GO_BUILD_TAGS ?= none
5050

5151
# Game Server image to use while doing end-to-end tests
52-
GS_TEST_IMAGE ?= gcr.io/agones-images/udp-server:0.4
52+
GS_TEST_IMAGE ?= gcr.io/agones-images/udp-server:0.5
5353

5454
# Directory that this Makefile is in.
5555
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))

‎build/build-image/Dockerfile‎

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,35 @@
1616

1717
# compiling proto + grpc takes an exceptionally long time
1818
# so we'll use a base from `base` - which is manually built using the below tag.
19-
FROM gcr.io/agones-images/grpc-cxx:1.12
19+
FROM gcr.io/agones-images/grpc-cxx:1.16.1
2020

2121
RUN apt-get update && \
2222
apt-get install -y wget psmisc rsync make python bash-completion zip nano jq graphviz && \
2323
apt-get clean
2424

25+
# _
26+
# | | __ _ _ __ __ _ _ _ __ _ __ _ ___ ___
27+
# | | / _` | '_ \ / _` | | | |/ _` |/ _` |/ _ \ __|
28+
# | |___ (_| | | | | (_| | |_| | (_| | (_| | __\__ \
29+
# |_____\__,_|_| |_|\__, |\__,_|\__,_|\__, |\___|___/
30+
# |___/ |___/
31+
32+
# install rust
33+
ENV RUSTUP_HOME=/usr/local/rustup \
34+
CARGO_HOME=/usr/local/cargo \
35+
PATH=/usr/local/cargo/bin:$PATH \
36+
RUST_VERSION=1.26.1
37+
ENV RUST_ARCH=x86_64-unknown-linux-gnu \
38+
RUSTUP_SHA256=c9837990bce0faab4f6f52604311a19bb8d2cde989bea6a7b605c8e526db6f02
39+
RUN wget -q https://static.rust-lang.org/rustup/archive/1.11.0/${RUST_ARCH}/rustup-init && \
40+
echo "${RUSTUP_SHA256} *rustup-init" | sha256sum -c - && \
41+
chmod +x rustup-init && \
42+
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION && \
43+
rm rustup-init && \
44+
rustup --version; \
45+
cargo --version; \
46+
rustc --version;
47+
2548
# install go
2649
WORKDIR /usr/local
2750
ENV GO_VERSION=1.11.1
@@ -58,12 +81,23 @@ RUN curl -L ${HELM_URL} > /tmp/helm.tar.gz \
5881
&& rm /tmp/helm.tar.gz && rm -rf /tmp/linux-amd64
5982
RUN echo "source <(helm completion bash)" >> /root/.bashrc
6083

84+
# ____ ____ ____ _____ _ _
85+
# __ _| _ \| _ \ / ___| |_ _|__ ___ | (_)_ __ __ _
86+
# / _` | |_) | |_) | | | |/ _ \ / _ \| | | '_ \ / _` |
87+
# | (_| | _ <| __/| |___ | | (_) | (_) | | | | | | (_| |
88+
# \__, |_| \_\_| \____| |_|\___/ \___/|_|_|_| |_|\__, |
89+
# |___/ |___/
90+
6191
# install go-proto-gen 1.1
6292
RUN mkdir -p /go/src/github.com/golang && cd /go/src/github.com/golang && \
6393
git clone https://github.com/golang/protobuf.git && \
64-
cd protobuf && git checkout v1.1.0 && \
94+
cd protobuf && git checkout v1.2.0 && \
6595
go install github.com/golang/protobuf/protoc-gen-go
6696

97+
# install rust tooling for SDK generation
98+
RUN cargo install protobuf-codegen --vers 2.0.2
99+
RUN cargo install grpcio-compiler --vers 0.3.0
100+
67101
# install go tooling for development, building and testing
68102
RUN go get -u github.com/golang/dep/cmd/dep && \
69103
go get -u golang.org/x/tools/cmd/goimports
@@ -75,26 +109,6 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s
75109
RUN mkdir -p /go/src && cd /go/src && mkdir -p k8s.io && cd k8s.io && \
76110
git clone -b kubernetes-1.10.5 --depth=3 https://github.com/kubernetes/code-generator.git
77111

78-
# install rust
79-
ENV RUSTUP_HOME=/usr/local/rustup \
80-
CARGO_HOME=/usr/local/cargo \
81-
PATH=/usr/local/cargo/bin:$PATH \
82-
RUST_VERSION=1.26.1
83-
ENV RUST_ARCH=x86_64-unknown-linux-gnu \
84-
RUSTUP_SHA256=c9837990bce0faab4f6f52604311a19bb8d2cde989bea6a7b605c8e526db6f02
85-
RUN wget -q https://static.rust-lang.org/rustup/archive/1.11.0/${RUST_ARCH}/rustup-init && \
86-
echo "${RUSTUP_SHA256} *rustup-init" | sha256sum -c - && \
87-
chmod +x rustup-init && \
88-
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION && \
89-
rm rustup-init && \
90-
rustup --version; \
91-
cargo --version; \
92-
rustc --version;
93-
94-
# install rust tooling for SDK generation
95-
RUN cargo install protobuf-codegen --vers 2.0.2
96-
RUN cargo install grpcio-compiler --vers 0.3.0
97-
98112
# make sure we keep the path to go
99113
RUN echo "export PATH=/usr/local/go/bin:/go/bin/:\$PATH" >> /root/.bashrc
100114
# make nano the editor

‎build/build-image/base/Dockerfile‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#
1717
# This image is manually built (for now)
18-
# as gcr.io/agones-images/grpc-cxx:1.12
18+
# as gcr.io/agones-images/grpc-cxx:1.16.1
1919
#
2020

2121
FROM debian:stretch
@@ -26,14 +26,14 @@ RUN apt-get update && apt-get install -y \
2626
&& apt-get clean
2727

2828
# install protobuf first, then grpc
29-
ENV GRPC_RELEASE_TAG v1.12.x
30-
RUN git clone -b ${GRPC_RELEASE_TAG} https://github.com/grpc/grpc /var/local/git/grpc && \
29+
ENV GRPC_RELEASE_TAG v1.16.1
30+
RUN git clone -b ${GRPC_RELEASE_TAG} --depth=5 https://github.com/grpc/grpc /var/local/git/grpc && \
3131
cd /var/local/git/grpc && \
3232
git submodule update --init && \
3333
echo "--- installing protobuf ---" && \
3434
cd third_party/protobuf && \
3535
./autogen.sh && ./configure --enable-shared && \
36-
make -j$(nproc) && make -j$(nproc) check && make install && make clean && ldconfig && \
36+
make -j$(nproc) && make install && make clean && ldconfig && \
3737
echo "--- installing grpc ---" && \
3838
cd /var/local/git/grpc && \
3939
make -j$(nproc) && make install && make clean && ldconfig

‎docs/access_api.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func main() {
8383
Spec: v1alpha1.GameServerSpec{
8484
Template: corev1.PodTemplateSpec{
8585
Spec: corev1.PodSpec{
86-
Containers: []corev1.Container{{Name: "udp-server", Image: "gcr.io/agones-images/udp-server:0.4"}},
86+
Containers: []corev1.Container{{Name: "udp-server", Image: "gcr.io/agones-images/udp-server:0.5"}},
8787
},
8888
},
8989
},
@@ -171,7 +171,7 @@ $ curl http://localhost:8001/apis/stable.agones.dev/v1alpha1/namespaces/default/
171171
"kind": "GameServer",
172172
"metadata": {
173173
"annotations": {
174-
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"stable.agones.dev/v1alpha1\",\"kind\":\"GameServer\",\"metadata\":{\"annotations\":{},\"name\":\"simple-udp\",\"namespace\":\"default\"},\"spec\":{\"containerPort\":7654,\"hostPort\":7777,\"portPolicy\":\"static\",\"template\":{\"spec\":{\"containers\":[{\"image\":\"gcr.io/agones-images/udp-server:0.4\",\"name\":\"simple-udp\"}]}}}}\n"
174+
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"stable.agones.dev/v1alpha1\",\"kind\":\"GameServer\",\"metadata\":{\"annotations\":{},\"name\":\"simple-udp\",\"namespace\":\"default\"},\"spec\":{\"containerPort\":7654,\"hostPort\":7777,\"portPolicy\":\"static\",\"template\":{\"spec\":{\"containers\":[{\"image\":\"gcr.io/agones-images/udp-server:0.5\",\"name\":\"simple-udp\"}]}}}}\n"
175175
},
176176
"clusterName": "",
177177
"creationTimestamp": "2018-03-02T21:41:05Z",
@@ -203,7 +203,7 @@ $ curl http://localhost:8001/apis/stable.agones.dev/v1alpha1/namespaces/default/
203203
"spec": {
204204
"containers": [
205205
{
206-
"image": "gcr.io/agones-images/udp-server:0.4",
206+
"image": "gcr.io/agones-images/udp-server:0.5",
207207
"name": "simple-udp",
208208
"resources": {}
209209
}
@@ -311,7 +311,7 @@ $ curl -d '{"apiVersion":"stable.agones.dev/v1alpha1","kind":"FleetAllocation","
311311
"spec": {
312312
"containers": [
313313
{
314-
"image": "gcr.io/agones-images/udp-server:0.4",
314+
"image": "gcr.io/agones-images/udp-server:0.5",
315315
"name": "simple-udp",
316316
"resources": {}
317317
}

‎docs/create_fleet.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Spec:
109109
Creation Timestamp: <nil>
110110
Spec:
111111
Containers:
112-
Image: gcr.io/agones-images/udp-server:0.4
112+
Image: gcr.io/agones-images/udp-server:0.5
113113
Name: simple-udp
114114
Resources:
115115
Status:
@@ -225,7 +225,7 @@ status:
225225
creationTimestamp: null
226226
spec:
227227
containers:
228-
- image: gcr.io/agones-images/udp-server:0.4
228+
- image: gcr.io/agones-images/udp-server:0.5
229229
name: simple-udp
230230
resources: {}
231231
status:

‎docs/create_gameserver.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Spec:
104104
Creation Timestamp: <nil>
105105
Spec:
106106
Containers:
107-
Image: gcr.io/agones-images/udp-server:0.4
107+
Image: gcr.io/agones-images/udp-server:0.5
108108
Name: simple-udp
109109
Resources:
110110
Status:

‎docs/limiting_resources.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ spec:
3535
spec:
3636
containers:
3737
- name: simple-udp
38-
image: gcr.io/agones-images/udp-server:0.4
38+
image: gcr.io/agones-images/udp-server:0.5
3939
resources:
4040
limit:
4141
cpu: "250m" #this is our limit here

‎docs/scheduling_autoscaling.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ spec:
9898
spec:
9999
containers:
100100
- name: simple-udp
101-
image: gcr.io/agones-images/udp-server:0.4
101+
image: gcr.io/agones-images/udp-server:0.5
102102
```
103103
104104
This is the *default* Fleet scheduling strategy. It is designed for dynamic Kubernetes environments, wherein you wish
@@ -153,7 +153,7 @@ spec:
153153
spec:
154154
containers:
155155
- name: simple-udp
156-
image: gcr.io/agones-images/udp-server:0.4
156+
image: gcr.io/agones-images/udp-server:0.5
157157
```
158158

159159
This Fleet scheduling strategy is designed for static Kubernetes environments, such as when you are running Kubernetes

0 commit comments

Comments
 (0)