3.3 KiB
Prepare Your Development Environment
This document goes through the development dependencies one requires in order to build the RP code.
Software Required
-
Install Go 1.17 or later, if you haven't already.
-
Configure
GOPATH
as an OS environment variable in your shell (a requirement of some dependencies formake generate
). If you want to keep the default path, you can add something likeGOPATH=$(go env GOPATH)
to your shell's profile/RC file. -
Install Python 3.6+, if you haven't already. You will also need
python-setuptools
installed, if you don't have it installed already. -
Install the az client, if you haven't already.
-
Install OpenVPN if it is not already installed
-
Install the relevant packages required for your OS defined below.
-
Install Podman and podman-docker if you haven't already, used for building container images.
-
Run for
az acr login
compatabilitysudo touch /etc/containers/nodocker
-
Install golangci-lint and yamllint (optional but your code is required to comply to pass the CI)
Fedora Packages
-
Install the
gpgme-devel
,libassuan-devel
, andopenssl
packages.sudo dnf install -y gpgme-devel libassuan-devel openssl
-
Install Docker 17.05+ or later, used as an alternative to podman.
Debian Packages
Install the libgpgme-dev
package.
MacOS Packages
-
We are open to developers on MacOS working on this repository. We are asking MacOS users to setup GNU utils on their machines.
We are aiming to limit the amount of shell scripting, etc. in the repository, installing the GNU utils on MacOS will minimise the chances of unexpected differences in command line flags, usages, etc., and make it easier for everyone to ensure compatibility down the line.
Install the following packages on MacOS:
# GNU Utils brew install coreutils findutils gnu-tar grep # Install envsubst (provided with gettext) brew install gettext brew link gettext # Install gpgme brew install gpgme
-
Modify your
~/.zshrc
(or~/.bashrc
for Bash): this prependsPATH
with GNU Utils paths;echo "export PATH=$(find $(brew --prefix)/opt -type d -follow -name gnubin -print | paste -s -d ':' -):\$PATH" >> ~/.zshrc
-
Add the following into your
~/.zshrc
/~/.bashrc
file:export LDFLAGS="-L$(brew --prefix)/lib" export CFLAGS="-I$(brew --prefix)/include" export CGO_LDFLAGS=$LDFLAGS export CGO_CFLAGS=$CFLAGS
Getting Started
-
Login to Azure:
az login
-
Clone the repository to your local machine:
go get -u github.com/Azure/ARO-RP/...
Alternatively you can also use:
git clone https://github.com/Azure/ARO-RP.git $GOPATH/src/github.com/Azure/ARO-RP
-
Go to project:
cd ${GOPATH:-$HOME/go}/src/github.com/Azure/ARO-RP