This document is intended to be the canonical source of truth for things like supported toolchain versions for building OpenPitrix. If you find a requirement that this doc does not capture, or if you find other docs with references to requirements that are not simply links to this doc, please submit an issue.
This document is intended to be relative to the branch in which it is found. It is guaranteed that requirements will change over time for the development branch, but release branches should not change.
OpenPitrix only has few external dependencies you need to setup before being able to build and run the code.
OpenPitrix written in the Go programming language. To build, you'll need a Go (version 1.9+) development environment. If you haven't set up a Go development environment, please follow these instructions to install the Go tools.
Set up your GOPATH and add a path entry for Go binaries to your PATH. Typically added to your ~/.profile:
$ export GOPATH=~/go
$ export PATH=$PATH:$GOPATH/bin
OpenPitrix is using OpenAPI/Swagger to develop API, so follow the instructions to install Swagger. If you are not familar with Swagger, please read the tutorial. If you install Swagger using docker distribution, please run
$ docker pull quay.io/goswagger/swagger
$ alias swagger="docker run --rm -it -e GOPATH=$GOPATH:/go -v $HOME:$HOME -w $(pwd) quay.io/goswagger/swagger"
$ swagger version
There are two options to get OpenPitrix source code and build the project:
You have a working Go environment.
$ go get -d openpitrix.io/openpitrix
$ cd $GOPATH/src/openpitrix.io/openpitrix
$ make all
You have a working Docker environment.
$ git clone https://github.com/openpitrix/openpitrix
$ cd openpitrix
$ make
Please check How to set up DevOps environment