<commit_before># Argo CD Getting Started

Guestbook app demonstrates how ArgoCD works, you can run examples of simple workflows and workflows that use artifacts.

## Requirements
* Installed [minikube](https://github.com/kubernetes/minikube#installation)
* Installed the [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) command-line tool
* Have a [kubeconfig](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) file (default location is `~/.kube/config`).

## 1. Download Argo CD

`TO BE ADDED`

## 2. Install the Argo CD components
```
$ argocd install
```

## 3. Open access to Argo CD API server and configure Argo CD CLI

By default Argo CD API server is not exposed with an external IP. To expose API server, change service type to `LoadBalancer` use the following command:

```
$ kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
```

Export API server URL into `ARGOCD_SERVER` environment variable using the following command":

```
$ export ARGOCD_SERVER=$(minikube service argocd-server -n argocd --url | cut -d'/' -f 3)
```

Now you Argo CD is able to talk to API server and you can deploy first application.

## 4. Connect and deploy Guestbook application

1. Register minicube cluster and github repository which contains Guestbook application:

```
$ argocd repo add https://github.com/argoproj/argo-cd.git
$ argocd cluster add minikube
```

2. Add Guestbook application:

```
$ argocd app add guestbook --repo https://github.com/argoproj/argo-cd.git --path examples/guestbook --env minikube
```

Once application is added you can see application status using following commands:

```
$ argocd app list
$ argocd app sync guestbook
```

The application status is `OutOfSync` and not Kubernetes resouces have been created since application is not deployed yet. To deploy application use following command:

```
$ argocd app sync guestbook
```

Argo CD allows to view and manager applications using web UI. Get the web UI URL using following command:

```
minikube service argocd-server -n argocd --url
```

![argo cd ui](argocd-ui.png)<commit_msg>Add guestbook deployment asciicast<commit_after># Argo CD Getting Started

Guestbook app demonstrates how ArgoCD works, you can run examples of simple workflows and workflows that use artifacts.

## Requirements
* Installed [minikube](https://github.com/kubernetes/minikube#installation)
* Installed the [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) command-line tool
* Have a [kubeconfig](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) file (default location is `~/.kube/config`).

## 1. Download Argo CD

`TO BE ADDED`

## 2. Install the Argo CD components
```
$ argocd install
```

## 3. Open access to Argo CD API server and configure Argo CD CLI

By default Argo CD API server is not exposed with an external IP. To expose API server, change service type to `LoadBalancer` use the following command:

```
$ kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
```

Export API server URL into `ARGOCD_SERVER` environment variable using the following command":

```
$ export ARGOCD_SERVER=$(minikube service argocd-server -n argocd --url | cut -d'/' -f 3)
```

Now you Argo CD is able to talk to API server and you can deploy first application.

## 4. Connect and deploy Guestbook application

1. Register minicube cluster and github repository which contains Guestbook application:

```
$ argocd repo add https://github.com/argoproj/argo-cd.git
$ argocd cluster add minikube
```

2. Add Guestbook application:

```
$ argocd app add guestbook --repo https://github.com/argoproj/argo-cd.git --path examples/guestbook --env minikube
```

Once application is added you can see application status using following commands:

```
$ argocd app list
$ argocd app sync guestbook
```

The application status is `OutOfSync` and not Kubernetes resouces have been created since application is not deployed yet. To deploy application use following command:

```
$ argocd app sync guestbook
```

[![asciicast](https://asciinema.org/a/uYnbFMy5WI2rc9S49oEAyGLb0.png)](https://asciinema.org/a/uYnbFMy5WI2rc9S49oEAyGLb0)

Argo CD allows to view and manager applications using web UI. Get the web UI URL using following command:

```
minikube service argocd-server -n argocd --url
```

![argo cd ui](argocd-ui.png)
{'fraction_non_alphanumeric': 0.10424623680071894, 'fraction_numerical': 0.005841383958660975, 'mean_word_length': 4.544209215442092, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3716805', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1341, 'n_words': 517}