In this readme there are information for developers.
We describe how to build and test the operator in our development environment
Please refer to the website for user information.
Ensure you have satisfied the prerequisites below. Most notably, you need to use our development virtual machine and you need write access to a GitHub repository.
Once you have satisfied the prerequisites, you can build an image you can use in the development machine.
Build an image with:
task build
Please note that it will build the image locally and push in an internal registry, even if it is name is
ghcr.io/${GITHUB_USER}/openserverless-operator
.
To be able to build, the task build
will commit and push all your changes and then build the operator from the public
sources in your local k3s.
It will also show the logs for the latest build.
You can then deploy it with:
task deploy
Once you have finished with development you can create a public image with task publish
that will publish the tag and
trigger a creation of the image.
-
Please set up and use a development VM as described here
-
With VSCode, access the development VM, open the workspace
openserverless/openserverless.code-workspace
and then open a terminal withoperator
subproject: this will enable thenix
environment with direnv (provided by the VM). -
Create a fork of
githbub.com/apache/openserverless-operator
-
Copy .env.dist in .env and put your GitHub username in it
-
Since the build requires you push your sources in your repo, you need the credentials to access it. The fastest way is to create a personal token
-
Now set up a remote to access your repo and set it as your default upstream branch.
git remote add fork https://<GITHUB_USERNAME>:<GITHUB_TOKEN>@github.com/<GITHUB_USERNAME>/openserverless-operator
git branch -u https://github.com/<GITHUB_USERNAME>/openserverless-operator
That's it. Now you can use task build
to build the image.
- Deploy the operator
To deploy a testing configuration of the Apache OpenServerless operator execute the command
task all
The operator instance will be configured applying the test/k3s/whisk.yaml
template.
All the components are activated except TLS and MONITORING.