Skip to content
Closed
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
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
95 changes: 95 additions & 0 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# 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:
push:
tags:
- '[0-9]*'
branches-ignore:
- '*'
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., v1.2.3)'
required: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
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: Install Native Image (GraalVM)
run: gu install native-image
shell: bash

- 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="${{ runner.arch }}"
PLATFORM="${{ matrix.platform }}"
FILENAME="openwhisk-standalone-${PLATFORM}-${ARCH}${{ 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 }}



2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ openwhisk-*/
*.tar
playground.*
.secrets
.DS_Store
standalone/dist/openwhisk*
24 changes: 18 additions & 6 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,26 +104,38 @@ tasks:
--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)" --no-browser

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)"
org.apache.openwhisk.standalone.StandaloneOpenWhisk

run:standalone:
deps:
- compile:standalone
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

clean:
ignore_error: true
cmds:
Expand Down
Loading
Loading