github.com/argoproj/argo-cd@v1.8.7/docs/developer-guide/running-locally.md (about)

     1  # Running ArgoCD locally
     2  
     3  ## Run ArgoCD outside of Kubernetes
     4  
     5  During development, it might be viable to run ArgoCD outside of a Kubernetes cluster. This will greatly speed up development, as you don't have to constantly build, push and install new ArgoCD Docker images with your latest changes.
     6  
     7  You will still need a working Kubernetes cluster, as described in the [Contribution Guide](contributing.md), where ArgoCD will store all of its resources.
     8  
     9  If you followed the [Contribution Guide](contributing.md) in setting up your toolchain, you can run ArgoCD locally with these simple steps:
    10  
    11  ### Install ArgoCD resources to your cluster
    12  
    13  First push the installation manifest into argocd namespace:
    14  
    15  ```shell
    16  kubectl create namespace argocd
    17  kubectl apply -n argocd --force -f manifests/install.yaml
    18  ```
    19  
    20  ### Scale down any ArgoCD instance in your cluster
    21  
    22  Make sure that ArgoCD is not running in your development cluster by scaling down the deployments:
    23  
    24  ```shell
    25  kubectl -n argocd scale statefulset/argocd-application-controller --replicas 0
    26  kubectl -n argocd scale deployment/argocd-dex-server --replicas 0
    27  kubectl -n argocd scale deployment/argocd-repo-server --replicas 0
    28  kubectl -n argocd scale deployment/argocd-server --replicas 0
    29  kubectl -n argocd scale deployment/argocd-redis --replicas 0
    30  ```
    31  
    32  ### Start local services
    33  
    34  Before starting local services, make sure you are present in `argocd` namespace. When you use the virtualized toolchain, starting local services is as simple as running
    35  
    36  ```bash
    37  make start
    38  ```
    39  
    40  This will start all ArgoCD services and the UI in a Docker container and expose the following ports to your host:
    41  
    42  * The ArgoCD API server on port 8080
    43  * The ArgoCD UI server on port 4000
    44  
    45  You can now use either the web UI by pointing your browser to `http://localhost:4000` or use the CLI against the API at `http://localhost:8080`. Be sure to use the `--insecure` and `--plaintext` options to the CLI.
    46  
    47  As an alternative to using the above command line parameters each time you call `argocd` CLI, you can set the following environment variables:
    48  
    49  ```bash
    50  export ARGOCD_SERVER=127.0.0.1:8080
    51  export ARGOCD_OPTS="--plaintext --insecure"
    52  ```
    53  
    54  ### Scale up ArgoCD in your cluster
    55  
    56  Once you have finished testing your changes locally and want to bring back ArgoCD in your development cluster, simply scale the deployments up again:
    57  
    58  ```bash
    59  kubectl -n argocd scale statefulset/argocd-application-controller --replicas 1
    60  kubectl -n argocd scale deployment/argocd-dex-server --replicas 1
    61  kubectl -n argocd scale deployment/argocd-repo-server --replicas 1
    62  kubectl -n argocd scale deployment/argocd-server --replicas 1
    63  kubectl -n argocd scale deployment/argocd-redis --replicas 1
    64  ```
    65  
    66  ## Run your own ArgoCD images on your cluster
    67  
    68  For your final tests, it might be necessary to build your own images and run them in your development cluster.
    69  
    70  ### Create Docker account and login
    71  
    72  You might need to create a account on [Docker Hub](https://hub.docker.com) if you don't have one already. Once you created your account, login from your development environment:
    73  
    74  ```bash
    75  docker login
    76  ```
    77  
    78  ### Create and push Docker images
    79  
    80  You will need to push the built images to your own Docker namespace:
    81  
    82  ```bash
    83  export IMAGE_NAMESPACE=youraccount
    84  ```
    85  
    86  If you don't set `IMAGE_TAG` in your environment, the default of `:latest` will be used. To change the tag, export the variable in the environment:
    87  
    88  ```bash
    89  export IMAGE_TAG=1.5.0-myrc
    90  ```
    91  
    92  Then you can build & push the image in one step:
    93  
    94  ```bash
    95  DOCKER_PUSH=true make image
    96  ```
    97  
    98  ### Configure manifests for your image
    99  
   100  With `IMAGE_NAMESPACE` and `IMAGE_TAG` still set, run
   101  
   102  ```bash
   103  make manifests
   104  ```
   105  
   106  to build a new set of installation manifests which include your specific image reference.
   107  
   108  !!!note
   109      Do not commit these manifests to your repository. If you want to revert the changes, the easiest way is to unset `IMAGE_NAMESPACE` and `IMAGE_TAG` from your environment and run `make manifests` again. This will re-create the default manifests.
   110  
   111  ### Configure your cluster with custom manifests
   112  
   113  The final step is to push the manifests to your cluster, so it will pull and run your image:
   114  
   115  ```bash
   116  kubectl apply -n argocd --force -f manifests/install.yaml
   117  ```