Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a84743b
feat: mount /var/tmp folder into container to support OpenWhisk testi…
francescotimperioss Jun 2, 2025
53d769e
chore: testing action to build native standalone images
francescotimperioss Jun 7, 2025
ab7d97a
chore: testing action to build native standalone images
francescotimperioss Jun 7, 2025
e0ab916
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
4191e26
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
ae00cb0
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
b6bded8
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
7ac78f1
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
f16cc90
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
4013a13
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
f6c013d
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
a0e9ce0
chore: needs to refers to a specific graalvm version
francescotimperioss Jun 7, 2025
e82e7e0
chore: force ubuntu-22.04
francescotimperioss Jun 7, 2025
e1c2f3b
chore: using reflect config from x86
francescotimperioss Jun 7, 2025
a5b95e6
chore: wip for native standalone executable support
francescotimperioss Jun 7, 2025
f0c6c46
chore: added extra class to runtime init
francescotimperioss Jun 7, 2025
0538a8a
fix: added specific classes to reflection.config to avoid json serial…
francescotimperioss Jun 7, 2025
ed865f6
chore: native image is already included in graalvm 17
francescotimperioss Jun 7, 2025
9c6d7e4
chore: adding extra config for akka.protobufv3
francescotimperioss Jun 7, 2025
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
fi

ENV HOME=/home/openserverless
ENV ANSIBLE_CMD="ansible-playbook -i environments/local -e docker_image_prefix=testing -e container_pool_akka_client=false -e jmxremote_enabled=false -e elasticsearch.version=7.8.0"
ENV ANSIBLE_CMD="ansible-playbook -i environments/local -e docker_image_prefix=testing -e container_pool_akka_client=false"
ENV GRADLE_PROJS_SKIP=""
WORKDIR /home/openserverless
ENTRYPOINT [ "/usr/bin/socat","UNIX-LISTEN:/var/run/docker.sock,fork,mode=660,user=openserverless","UNIX-CONNECT:/var/run/docker-host.sock" ]
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
// under the License.
{
"name": "openserverless",
"image": "ghcr.io/francescotimperi/devow:ops-jdk17.25060119",
"image": "ghcr.io/francescotimperi/devow:ops-jdk17.25060220",
//"build": { "dockerfile": "Dockerfile" },
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind",
"type=bind,source=${env:HOME}/.ssh,target=/home/openserverless/.ssh",
"source=/var/tmp/wskconf,target=/var/tmp/wskconf,type=bind"
"source=/var/tmp,target=/var/tmp,type=bind"
],
"remoteUser": "openserverless",
"overrideCommand": false,
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: Build OpenServerless OpenWhisk 2 Standalone native executable

on:
workflow_dispatch:
inputs:
tag:
description: 'Release version (e.g., v1.2.3)'
required: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
target: linux
extension: ''
- os: macos-latest
target: macos
extension: ''

name: Build native for ${{ matrix.target }}

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup CI
run: bash .github/cisetup.sh
shell: bash

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'graalvm'
java-version: '17.0.9'

- name: Assign TAG from pull request
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "IMG_TAG=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
shell: bash
- name: Assign TAG from push
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "IMG_TAG=$(git describe --tags --abbrev=0)" >> "$GITHUB_ENV"
shell: bash
- name: Assign native standalone executable name
run: |
ARCH=$(echo "${{ runner.arch }}" | tr '[:upper:]' '[:lower:]')
PLATFORM=$(echo "${{ matrix.target }}" | tr '[:upper:]' '[:lower:]')
FILENAME="openwhisk-standalone-${PLATFORM}-${ARCH}-${IMG_TAG}${{ matrix.extension }}"
echo "NATIVE_IMAGE_NAME=$FILENAME" >> $GITHUB_ENV
shell: bash
- name: Native Image
run: task native:standalone-build
shell: bash
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: standalone/dist/$NATIVE_IMAGE_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ openwhisk-*/
*.tar
playground.*
.secrets
.DS_Store
standalone/dist/openwhisk*
standalone/dist/reports
40 changes: 32 additions & 8 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,37 +88,42 @@ tasks:
- test -f ../standalone/lib/openwhisk-standalone.jar

native:standalone-libs:
deps:
- compile:standalone
dir: openwhisk
cmds:
- ./gradlew core:standalone:copyRuntimeLibs

native:standalone-build:
deps:
- compile:standalone
- native:standalone-libs
dir: openwhisk/core/standalone
cmds:
- native-image
--initialize-at-run-time=io.netty
--initialize-at-run-time=io.netty,akka.protobufv3.internal
--no-fallback --report-unsupported-elements-at-runtime
--trace-object-instantiation=ch.qos.logback.classic.Logger
--enable-url-protocols=http,https
-cp build/classes/scala/main:build/resources/main:build/dependency-libs/*
-H:ConfigurationFileDirectories=/workspaces/openserverless-controller/standalone/graal-config
-o /workspaces/openserverless-controller/standalone/exe/openwhisk-standalone.exe
org.apache.openwhisk.standalone.StandaloneOpenWhisk
-H:ConfigurationFileDirectories=$PWD/../../../standalone/graal-config
-o $PWD/../../../standalone/dist/{{.EXEC_NAME}}
org.apache.openwhisk.standalone.StandaloneOpenWhisk
vars:
EXEC_NAME: "${NATIVE_IMAGE_NAME:-openwhisk-standalone}"

native:standalone-run:
dir: standalone/exe
dir: standalone/dist
cmds:
- ./openwhisk-standalone.exe -Dwhisk.standalone.host.name="0.0.0.0" -Dwhisk.standalone.host.internal="$(hostname -f)" --no-browser --disable-color-logging
- ./openwhisk-standalone -Dwhisk.standalone.host.name="0.0.0.0" -Dwhisk.standalone.host.internal="$(hostname -f)" -Dkamon.auto-start=no --no-browser
env:
KAMON_ENABLED: false

native:standalone-config:
deps:
- compile:standalone
dir: openwhisk/core/standalone
cmds:
- java -agentlib:native-image-agent=config-output-dir=../../standalone/graal-config
- java -agentlib:native-image-agent=config-output-dir=../../../standalone/graal-config
-cp build/classes/scala/main:build/resources/main:build/dependency-libs/*
-Dwhisk.standalone.host.name="0.0.0.0"
-Dwhisk.standalone.host.internal="$(hostname -f)"
Expand Down Expand Up @@ -277,3 +282,22 @@ tasks:
dir: openwhisk
cmds:
- ./gradlew distDocker -PdockerMultiArchBuild=true -PdockerRegistry={{.DOCKER_REGISTRY}} -PdockerImagePrefix=openwhisk2 -PdockerImageTag={{.TAG}}

run:standalone-docker:
cmds:
- >
docker run -ti
-p 3232:3232 -p 3233:3233
-v /var/run/docker.sock:/var/run/docker.sock
{{.DOCKER_REGISTRY}}/openwhisk2/standalone:{{.TAG}}
interactive: true

run:standalone:
deps:
- native:standalone-libs
dir: openwhisk/core/standalone
cmds:
- java -cp build/classes/scala/main:build/resources/main:build/dependency-libs/*
-Dwhisk.standalone.host.name="0.0.0.0"
-Dwhisk.standalone.host.internal="$(hostname -f)"
org.apache.openwhisk.standalone.StandaloneOpenWhisk --no-browser
1 change: 1 addition & 0 deletions standalone/dist/dummy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Simple placeholder to ensure that this foler is being created into Github
Loading
Loading