If you would like to build your own copy of Athenz rather than using the pre-built binary packages, then here is the list of development tools you need to have installed on your system.
You can replicate the container environment that Athenz users within
Screwdriver to build and deploy Athenz packages. You can start a new
container using the openjdk:11
image. Once you check out the Athenz
source tree, you can execute the install_deps.sh
script
to install the required development tools:
$ git clone https://github.com/AthenZ/athenz.git
$ cd athenz
$ sh screwdriver/scripts/install_deps.sh
To build Athenz components, you must have Java Platform JDK 11 installed on your machine. The main authorization services - ZMS and ZTS, are written in Java and using embedded Jetty.
Make sure you have set the $JAVA_HOME environment variable.
$ java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home'
$ export JAVA_HOME=<java-home-directory>
Download and install Apache Maven.
If you don't have git client installed on your host, you can download one from Git website. 2.x version of the git client is required.
Install go 1.21.5 or newer version by following the directions at Getting Started - The Go Programming Language.
Make sure you have set the $GOPATH environment variable
and that you have $GOPATH/bin
in your $PATH
.
$ export GOPATH=<gopath-directory>
$ mkdir -p $GOPATH/bin
$ export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
Install node 18.x by following the directions at Node.js JavaScript Runtime
Verify that you have the required minimum version of node
,
npm
and nodemon
binaries installed on your system and are included
in your runtime path:
$ node --version
v18.12.1
$ npm -v
8.19.2
$ npm install -g nodemon
$ nodemon --version
2.0.20
To build Athenz components, change to the top level directory where you want to build the Athenz code and execute (skip the first command if you have already checked out the code using git):
$ git clone https://github.com/AthenZ/athenz.git
$ cd athenz
$ mvn clean install
The release packages will be created automatically in the assembly
subdirectory.