Skip to content

Commit

Permalink
Updates dev env docs
Browse files Browse the repository at this point in the history
* Removes mention of Python virtualenv as it comes by default with Python 3
* Updates macOS docs to make sure that steps work for Intel and ARM macs
* Markdown formatting fixes
  • Loading branch information
m1kola committed Apr 13, 2022
1 parent aac7cce commit d6d0b3e
Showing 1 changed file with 32 additions and 37 deletions.
69 changes: 32 additions & 37 deletions docs/prepare-your-dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ This document goes through the development dependencies one requires in order to

1. Install [Python 3.6+](https://www.python.org/downloads), if you haven't already. You will also need `python-setuptools` installed, if you don't have it installed already.

1. Install `virtualenv`, a tool for managing Python virtual environments.
> The package is called `python-virtualenv` on both Fedora and Debian-based systems.
1. Install the [az client](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli), if you haven't already. You will need `az` version 2.0.72 or greater, as this version includes the `az network vnet subnet update --disable-private-link-service-network-policies` flag.
1. Install the [az client](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli), if you haven't already.

1. Install [OpenVPN](https://openvpn.net/community-downloads) if it is not already installed

Expand All @@ -21,54 +18,53 @@ This document goes through the development dependencies one requires in order to
1. Install [Podman](https://podman.io/getting-started/installation) and [podman-docker](https://developers.redhat.com/blog/2019/02/21/podman-and-buildah-for-docker-users#) if you haven't already, used for building container images.

1. Run for `az acr login` compatability
```bash
sudo touch /etc/containers/nodocker
```
```bash
sudo touch /etc/containers/nodocker
```

### Fedora Packages
1. Install the `gpgme-devel`, `libassuan-devel`, and `openssl` packages.
> `sudo dnf install -y gpgme-devel libassuan-devel openssl`
> `sudo dnf install -y gpgme-devel libassuan-devel openssl`

1. Install [Docker 17.05+](https://docs.docker.com/engine/install/fedora/) or later, used as an alternative to podman.

### Debian Packages
1. Install the `libgpgme-dev` package.

Install the `libgpgme-dev` package.

### MacOS Packages

1. 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.
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:
```bash
# GNU Utils
brew install coreutils findutils gnu-tar grep
Install the following packages on MacOS:
```bash
# GNU Utils
brew install coreutils
brew install findutils
brew install gnu-tar
brew install grep
# Install envsubst (provided with gettext)
brew install gettext
brew link gettext
# Install envsubst
brew install gettext
brew link --force gettext
# Install gpgme
brew install gpgme
```

# Install
brew install gpgme
1. Modify your `~/.zshrc` (or `~/.bashrc` for Bash): this prepends `PATH` with GNU Utils paths;

# GNU utils
# Ref: https://web.archive.org/web/20190704110904/https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x
# gawk, diffutils, gzip, screen, watch, git, rsync, wdiff
export PATH="/usr/local/bin:$PATH"
# coreutils
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
# findutils
export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
```bash
echo "export PATH=$(find $(brew --prefix)/opt -type d -follow -name gnubin -print | paste -s -d ':' -):\$PATH" >> ~/.zshrc
```

#grep
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"
1. Add the following into your `~/.zshrc`/`~/.bashrc` file:

#python-virtualenv
sudo pip3 install virtualenv
```
```bash
export LDFLAGS="-L$(brew --prefix)/lib"
export CFLAGS="-I$(brew --prefix)/include"
export CGO_LDFLAGS=$LDFLAGS
export CGO_CFLAGS=$CFLAGS
```

## Getting Started
1. Login to Azure:
Expand All @@ -84,9 +80,8 @@ sudo pip3 install virtualenv
```bash
git clone https://github.com/Azure/ARO-RP.git $GOPATH/src/github.com/Azure/ARO-RP
```

1. Go to project:
```bash
cd ${GOPATH:-$HOME/go}/src/github.com/Azure/ARO-RP
```

0 comments on commit d6d0b3e

Please sign in to comment.