github.com/argoproj/argo-cd/v3@v3.2.1/docs/developer-guide/development-environment.md (about)

     1  # Setting Up the Development Environment
     2  
     3  ## Required Tools Overview
     4  
     5  You will need to install the following tools with the specified minimum versions:
     6  
     7  * Git (v2.0.0+)
     8  * Go (version specified in `go.mod` - check with `go version`)
     9  * Docker (v20.10.0+) Or Podman (v3.0.0+)
    10  * Kind (v0.11.0+) Or Minikube (v1.23.0+) Or K3d (v5.7.3+)
    11  
    12  
    13  
    14  ## Install Required Tools
    15  
    16  ### Install Git
    17  
    18  Obviously, you will need a `git` client for pulling source code and pushing back your changes.
    19  
    20  <https://github.com/git-guides/install-git>
    21  
    22  
    23  ### Install Go
    24  
    25  You will need a Go SDK and related tools (such as GNU `make`) installed and working on your development environment.
    26  
    27  <https://go.dev/doc/install/>
    28  
    29  Install Go with a version equal to or greater than the version listed in `go.mod` (verify go version with `go version`).  
    30  We will assume that your Go workspace is at `~/go`.
    31  
    32  Verify: run `go version`
    33  
    34  ### Install Docker or Podman
    35  
    36  #### Installation guide for docker
    37  
    38  <https://docs.docker.com/engine/install/>
    39  
    40  You will need a working Docker runtime environment, to be able to build and run images. Argo CD is using multi-stage builds. 
    41  
    42  Verify: run `docker version`
    43  
    44  #### Installation guide for podman
    45  
    46  <https://podman.io/docs/installation>
    47  
    48  ### Install a Local K8s Cluster
    49  
    50  You won't need a fully blown multi-master, multi-node cluster, but you will need something like K3S, K3d, Minikube, Kind or microk8s. You will also need a working Kubernetes client (`kubectl`) configuration in your development environment. The configuration must reside in `~/.kube/config`.
    51  
    52  #### Kind
    53  
    54  ##### [Installation guide](https://kind.sigs.k8s.io/docs/user/quick-start)
    55  
    56  You can use `kind` to run Kubernetes inside Docker. But pointing to any other development cluster works fine as well as long as Argo CD can reach it.
    57  
    58  ##### Start the Cluster
    59  ```shell
    60  kind create cluster
    61  ```
    62  
    63  #### Minikube
    64  
    65  ##### [Installation guide](https://minikube.sigs.k8s.io/docs/start)
    66  
    67  ##### Start the Cluster
    68  ```shell
    69  minikube start
    70  ```
    71  
    72  Or, if you are using minikube with podman driver:
    73  
    74  ```shell
    75  minikube start --driver=podman
    76  ```
    77  
    78  #### K3d
    79  
    80  ##### [Installation guide](https://k3d.io/stable/#quick-start)
    81  
    82  ### Verify cluster installation
    83  
    84  * Run `kubectl version` 
    85  
    86  ## Fork and Clone the Repository
    87  1. Fork the Argo CD repository to your personal GitHub Account
    88  2. Clone the forked repository:
    89  ```shell
    90  git clone https://github.com/YOUR-USERNAME/argo-cd.git
    91  ```
    92     Please note that the local build process uses GOPATH and that path should not be used, unless the Argo CD repository was directly cloned in it.
    93  
    94  3. While everyone has their own Git workflow, the author of this document recommends to create a remote called `upstream` in your local copy pointing to the original Argo CD repository. This way, you can easily keep your local branches up-to-date by merging in latest changes from the Argo CD repository, i.e. by doing a `git pull upstream master` in your locally checked out branch.
    95     To create the remote, run:
    96     ```shell
    97     cd argo-cd
    98     git remote add upstream https://github.com/argoproj/argo-cd.git
    99     ```
   100  
   101  ## Install Additional Required Development Tools
   102  
   103  ```shell
   104  make install-go-tools-local
   105  make install-codegen-tools-local
   106  ```
   107  
   108  ## Install Latest Argo CD on Your Local Cluster
   109  
   110  ```shell
   111  kubectl create namespace argocd &&
   112  kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/install.yaml
   113  ```
   114  
   115  Set kubectl config to avoid specifying the namespace in every kubectl command.  
   116  
   117  ```shell
   118  kubectl config set-context --current --namespace=argocd
   119  ```
   120