Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Add ruby 2.3 and ruby 2.5 runtimes (#926)
Browse files Browse the repository at this point in the history
* Move Dockerfile to its specific version

* Add ruby 2.3 based on the bitnami ruby 2.3 container

* Add ruby 2.5 based on the bitnami ruby 2.5 container

* Include ruby 2.3 and ruby 2.5 in the build process

* Add ruby 2.3 and 2.5 to the documented runtimes

* Reference correctly to the versioned Dockerfiles

* Add versions and update ruby24 to newly build runtimeImage
  • Loading branch information
blijblijblij authored and andresmgot committed Oct 24, 2018
1 parent c8bbbb9 commit 7e7075a
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 7 deletions.
14 changes: 14 additions & 0 deletions docker/runtime/ruby/Dockerfile.2.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM bitnami/ruby:2.3

LABEL maintainer "Bitnami <containers@bitnami.com>"

ENV RACK_ENV="production"
ENV FUNC_PROCESS="ruby /kubeless.rb"
RUN gem install sinatra --no-rdoc --no-ri

ADD kubeless.rb /

USER 1000

ADD proxy /
CMD [ "/proxy" ]
File renamed without changes.
14 changes: 14 additions & 0 deletions docker/runtime/ruby/Dockerfile.2.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM bitnami/ruby:2.5

LABEL maintainer "Bitnami <containers@bitnami.com>"

ENV RACK_ENV="production"
ENV FUNC_PROCESS="ruby /kubeless.rb"
RUN gem install sinatra --no-rdoc --no-ri

ADD kubeless.rb /

USER 1000

ADD proxy /
CMD [ "/proxy" ]
20 changes: 17 additions & 3 deletions docker/runtime/ruby/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@

build2.3:
env GOOS=linux GOARCH=amd64 go build $$GOPATH/src/github.com/kubeless/kubeless/pkg/function-proxy/proxy.go
docker build -t kubeless/ruby:2.3$$RUNTIME_TAG_MODIFIER -f Dockerfile.2.3 .

build2.4:
env GOOS=linux GOARCH=amd64 go build $$GOPATH/src/github.com/kubeless/kubeless/pkg/function-proxy/proxy.go
docker build -t kubeless/ruby:2.4$$RUNTIME_TAG_MODIFIER -f Dockerfile .
docker build -t kubeless/ruby:2.4$$RUNTIME_TAG_MODIFIER -f Dockerfile.2.4 .

build2.5:
env GOOS=linux GOARCH=amd64 go build $$GOPATH/src/github.com/kubeless/kubeless/pkg/function-proxy/proxy.go
docker build -t kubeless/ruby:2.5$$RUNTIME_TAG_MODIFIER -f Dockerfile.2.5 .

push2.3:
docker push kubeless/ruby:2.3$$RUNTIME_TAG_MODIFIER

push2.4:
docker push kubeless/ruby:2.4$$RUNTIME_TAG_MODIFIER

push2.5:
docker push kubeless/ruby:2.5$$RUNTIME_TAG_MODIFIER

# Mandatory jobs
build-all: build2.4
push-all: push2.4
build-all: build2.3 build2.4 build2.5
push-all: push2.3 push2.4 push2.5
6 changes: 3 additions & 3 deletions docs/runtimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ By default Kubeless has support for the following runtimes:

- Python: For the branches 2.7, 3.4 and 3.6
- NodeJS: For the branches 6 and 8, as well as NodeJS [distroless](https://github.com/GoogleContainerTools/distroless) for the branch 8
- Ruby: For the branch 2.4
- Ruby: For the branches 2.3, 2.4 and 2.5
- PHP: For the branch 7.2
- Golang: For the branch 1.10
- .NET: For the branch 2.0
Expand All @@ -15,7 +15,7 @@ You can see the list of supported runtimes executing:
```console
$ kubeless get-server-config
INFO[0000] Current Server Config:
INFO[0000] Supported Runtimes are: python2.7, python3.4, python3.6, nodejs6, nodejs8, ruby2.4, php7.2, go1.10, dotnetcore2.0, java1.8, ballerina0.981.0
INFO[0000] Supported Runtimes are: python2.7, python3.4, python3.6, nodejs6, nodejs8, ruby2.3, ruby2.4, ruby2.5, php7.2, go1.10, dotnetcore2.0, java1.8, ballerina0.981.0
```

Each runtime is encapsulated in a container image. The reference to these images are injected in the Kubeless configuration. You can find the source code of all runtimes in [`docker/runtime`](https://github.com/kubeless/kubeless/tree/master/docker/runtime).
Expand Down Expand Up @@ -576,4 +576,4 @@ One can use kubeless-config to override the default liveness probe. By default,
"timeoutSeconds": 30
},
"depname": ""
```
```
14 changes: 13 additions & 1 deletion kubeless-non-rbac.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,23 @@ local runtime_images ='[
"ID": "ruby",
"compiled": false,
"versions": [
{
"name": "ruby23",
"version": "2.3",
"runtimeImage": "kubeless/ruby@sha256:67870b57adebc4dc749a8a19795da801da2d05fc6e8324168ac1b227bb7c77f7",
"initImage": "bitnami/ruby:2.3"
},
{
"name": "ruby24",
"version": "2.4",
"runtimeImage": "kubeless/ruby@sha256:01665f1a32fe4fab4195af048627857aa7b100e392ae7f3e25a44bd296d6f105",
"runtimeImage": "kubeless/ruby@sha256:aaa9c7f3dfd4f866a527c04171c32dae2efa420d770a6af9c517771137ab4011",
"initImage": "bitnami/ruby:2.4"
},
{
"name": "ruby25",
"version": "2.5",
"runtimeImage": "kubeless/ruby@sha256:577e35724996ba340ff0a18366bce99586b0be58e4d27fa3e8038f977caf1559",
"initImage": "bitnami/ruby:2.5"
}
],
"depName": "Gemfile",
Expand Down

0 comments on commit 7e7075a

Please sign in to comment.