Skip to content

Instantly share code, notes, and snippets.

@mrsimpson
Last active March 9, 2020 20:13
Show Gist options
  • Save mrsimpson/d26a6107d3b71b945f586fa2c0559353 to your computer and use it in GitHub Desktop.
Save mrsimpson/d26a6107d3b71b945f586fa2c0559353 to your computer and use it in GitHub Desktop.
Non-SAP ABAP tooling

Introduction to serverless ABAP

This gist constains a write-up of the current state and possibilites.

So you've heard about a Netweaverless ABAP-runtime?

That's great, but here's the disclaimer: Everything is very experimental - to say the least!

We're just trying to demonstrate what's possible with latest open source technology - and we seriously think that the foundations are laid out and that it would be manageable to deliver a real open source multi-platform ABAP runtime. Who is "we"? Currently, it's a hobby of the all-in-one-ABAP-toolbox Lars Hvam Petersen and myself.

Why, why would you to do that?

Since this very question already been asked, see this thread on Twitter

Alright, I'm still eager to try!

Great, so are we! I'll give you a quick overview on where to start and how to proceed.

1. Playground

Since the scope of language elements is in early pre-alpha, you're best off writing your code in an interactive browser-environment. You can find the latest features (supported statements) by coding on https://transpiler.abaplint.org/

2. Go serverless

So you really want to run ABAP in a backend? Easiest is to go serverless based on OpenFaaS. You need to install OpenFaaS somewhere (there are various options, Google effectively drowns you with awesome tutorials by @alexellis). Afterwards, you can pull a bloody custom function template for ABAP and paste your code into the handler function.

Find some links how this works together below.

Sample project

All-in-One ABAP function as a service, including CI/CD and some automated testing.

https://github.com/open-abap/openfaas-fn-fibonacci

Runtime

Based on OpenFaaS:

OpenFaaS

Transport management system

  • For OpenFaaS functions, use the OpenFaaS Github App
  • See below for a full pipeline configuration

I don't like it

  • This is child's play!
  • The language features supported are ridiculuously few!
  • ABAP is a crazy language. You better kill it instead of carrying it forward into the next decade!

=> Obviously it's not for you 🤷. That's fine.

This is awesome, how can I contribute?

Get in touch! Either by tweeting about it or by opening an issue, either with for the transpiler or for the runtime. Every constructive feedback is appreciated!

name: CI/CD
on:
push:
paths-ignore:
- '**.md'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Execute tests
run: |
bash ./template/open-abap/test.sh
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: OpenFaaS build and push
uses: mrsimpson/action-openfaas-build@master
with:
# The OpenFaaS function definition file
stack-file: stack.yml
# Your docker username with push authorization
docker-username: ${{ secrets.DOCKER_USERNAME }}
# Your docker username with push authorization
docker-password: ${{ secrets.DOCKER_PASSWORD }}
# the platform abbreviations to build for, e. g. linux/amd64,linux/arm/v7
platforms: linux/amd64,linux/arm/v7
# Whether the built image shall be deployed (false=no, true=yes)
deploy: ${{ github.ref == 'refs/heads/master' }}
# OpenFaaS gateway URL (http(s)://my-public-gateway.tld)
openfaas-gateway: ${{ secrets.OPENFAAS_GATEWAY }}
# User for authenticating at OpenFaaS gateway
openfaas-username: ${{ secrets.OPENFAAS_USERNAME }}
# Password for authenticating at OpenFaaS gateway
openfaas-password: ${{ secrets.OPENFAAS_PASSWORD }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment