Skip to content

Commit

Permalink
Update doc and base image for Go 1.19 (ray-project#1330)
Browse files Browse the repository at this point in the history
Update doc and base image for Go 1.19
  • Loading branch information
tedhtchang authored Aug 15, 2023
1 parent 7a5a3ab commit b32a2fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
10 changes: 5 additions & 5 deletions apiserver/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This guide covers the purpose, requirements, and deployment of the Kuberay API S
| Software | Version | Link |
| :------- | :------: | ------------------------------------------------------------------: |
| kubectl | v1.18.3+ | [Download](https://kubernetes.io/docs/tasks/tools/install-kubectl/) |
| Go | v1.17 | [Download](https://golang.org/dl/) |
| Go | v1.19 | [Download](https://golang.org/dl/) |
| Docker | 19.03+ | [Download](https://docs.docker.com/install/) |
| GNU Make | 3.81+ | |
| curl | 7.88+ | |
Expand Down Expand Up @@ -78,12 +78,12 @@ Access the service at `localhost:8888` for http, and `locahost:8887` for the RPC

```bash
#creates an image with the tag kuberay/apiserver:latest
make docker-image
make docker-image
```

#### Start Kubernetes Deployment

Note that you should make your KubeRay API server image available by either pushing it to an image registry, such as DockerHub or Quay, or by loading the image into the Kubernetes cluster. If you are using a Kind cluster for development, you can run `make load-image` to load the newly built API server image into the Kind cluster. The operator image will also be needed to be loaded on your cluster. You can use `make operator-image` to build a fresh image from sources, and, if you are using a Kind cluster for development, you can run `make load-operator-image`.
Note that you should make your KubeRay API server image available by either pushing it to an image registry, such as DockerHub or Quay, or by loading the image into the Kubernetes cluster. If you are using a Kind cluster for development, you can run `make load-image` to load the newly built API server image into the Kind cluster. The operator image will also be needed to be loaded on your cluster. You can use `make operator-image` to build a fresh image from sources, and, if you are using a Kind cluster for development, you can run `make load-operator-image`.

```bash
#Optionally, to load the api server image into the local kind cluster created with make cluster
Expand All @@ -102,7 +102,7 @@ make install
#To use the helm charts
make undeploy

#To use the configuration
#To use the configuration
make uninstall
```

Expand All @@ -122,7 +122,7 @@ When developing and testing with kind you might want to execute these targets to

```bash
#To create a new API server image and to deploy it on a new cluster
make docker-image cluster load-image deploy
make docker-image cluster load-image deploy

#To create a new API server image, operator image and deploy them on a new cluster
make docker-image operator-image cluster load-image load-operator-image deploy deploy-operator
Expand Down
8 changes: 6 additions & 2 deletions proto/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generate client code (go & json) from API protocol buffers
FROM golang:1.19.10 as generator
FROM registry.access.redhat.com/ubi8/go-toolset:1.19.10-10 as generator

ENV PROTOC_VERSION 3.17.3
ENV GOLANG_PROTOBUF_VERSION v1.5.2
Expand All @@ -11,7 +11,8 @@ ENV GOLANG_GRPC_VERSION v1.1.0
ENV GOBIN=/go/bin

# Install protoc.
RUN apt-get update && apt-get install -y jq sed unzip
USER root
RUN wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -O /usr/bin/jq && chmod +x /usr/bin/jq
RUN curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
RUN unzip -o protoc.zip -d /usr/ bin/protoc
RUN unzip -o protoc.zip -d /usr/ 'include/*'
Expand All @@ -22,6 +23,8 @@ ENV PROTOCINCLUDE /usr/include/google/protobuf
# Install protoc-gen-go && protoc-gen-go-grpc
RUN go install github.com/golang/protobuf/protoc-gen-go@$GOLANG_PROTOBUF_VERSION
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@$GOLANG_GRPC_VERSION
# These go binaries are installed under /go/bin
ENV PATH /go/bin:${PATH}

# Install protoc-gen-rpc-gateway && protoc-gen-openapiv2.
RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@$GRPC_GATEWAY_VERSION
Expand All @@ -33,3 +36,4 @@ ENV XDG_CACHE_HOME /tmp/.cache
RUN chmod -R 775 /usr/bin/
RUN chmod -R 775 /usr/include/google
RUN chmod -R 775 /go
USER 65532:65532
6 changes: 3 additions & 3 deletions proto/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Makefile to generate api clients from proto.

IMAGE_NAME=kuberay/proto-generator
IMAGE_TAG=$(shell git rev-parse HEAD)
PREBUILT_REMOTE_IMAGE=kuberay/proto-generator:8210e17c28b3b373449f99561f10534e13d35969
IMAGE_NAME ?= kuberay/proto-generator
IMAGE_TAG ?= $(shell git rev-parse HEAD)
PREBUILT_REMOTE_IMAGE ?= ${IMAGE_NAME}:8210e17c28b3b373449f99561f10534e13d35969

OUTPUT_MODE=import
TMP_OUTPUT=/tmp
Expand Down

0 comments on commit b32a2fa

Please sign in to comment.