# Quickstart

Welcome to Atheno.ai! This guide will help you quickly set up and begin using our AI-powered Kubernetes troubleshooting co-pilot locally. Follow the steps below to deploy Atheno using Helm or Docker Compose and start diagnosing and fixing issues in your Kubernetes cluster.

{% tabs %}
{% tab title="Helm" %}

### Step 1: Pre-requisite

* Make sure helm3 is installed.&#x20;

```
helm version
version.BuildInfo{Version:"v3.9.4", GitCommit:"dbc6d8e20fe1d58d50e6ed30f09a04a77e4c68db", GitTreeState:"clean", GoVersion:"go1.17.13"}
```

* **OpenAI API Key**: You need an API key to use the OpenAI-powered co-pilot. Get your OpenAI API Key [here](https://platform.openai.com/settings/profile?tab=api-keys).

***

### Step 2: Install Atheno

1. Set Environment Variable

You will need to set the **OPENAI\_KEY** environment variable for Atheno to work:

**OPENAI\_KEY**: Your OpenAI API key, which allows the co-pilot to function.

Set this environment variables in your terminal:

```
export OPENAI_KEY=your_openai_key
```

Replace `your_openai_key` with your actual OpenAI API key.

2. Add the atheno helm repo and install the atheno helm package.

```
helm repo add atheno https://atheno-ai.github.io/atheno/
helm repo update
helm install atheno atheno/atheno \
  --namespace atheno \
  --create-namespace \
  --set openai.apiKey="$OPENAI_KEY"
```

3. Wait for the atheno services to be ready.

```
kubectl wait --for=condition=ready pod -l released-by=atheno -n atheno --timeout=2m
```

***

### Step 3: Accessing Atheno UI

The Atheno service is exposed as a NodePort. Follow these steps to access the service:

#### 1. Get the Cluster Node IP

Run the following command to retrieve your cluster's node IP:

```bash
kubectl get nodes -o wide
```

Take note of the `INTERNAL-IP` from the output. For example:

```plaintext
NAME             STATUS   ROLES           AGE   VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE         KERNEL-VERSION    CONTAINER-RUNTIME
docker-desktop   Ready    control-plane   39h   v1.29.2   192.168.65.3   <none>        Docker Desktop   6.6.22-linuxkit   docker://26.0.0
```

In this case, the internal node IP is `192.168.65.3`.

***

#### 2. Accessing Atheno UI

* **For Docker Desktop Users:**\
  Docker Desktop uses an internal IP that might not be directly accessible. To access the Atheno service, forward the port using the following command:

  ```bash
  kubectl port-forward svc/atheno-service -n atheno 30003:65080
  ```

  Once the port forwarding is set up, open your browser and navigate to:\
  `http://localhost:30003`
* **For Other Kubernetes Environments:**\
  Open your browser and navigate to the Atheno UI using:\
  `http://<cluster-node-ip>:30003`\
  Replace `<cluster-node-ip>` with the `INTERNAL-IP` obtained in Step 1.
  {% endtab %}

{% tab title="Docker Compose" %}

### **Step 1: Prerequisites**

Before you begin, make sure you have the following ready:

* **Docker**: Ensure Docker is installed and running on your local machine. Check the installation by running the command below

```
docker --version
```

* **Docker Compose**: You’ll need Docker Compose to run Atheno locally. Check the installation by running the command below

```
docker-compose --version
```

* **OpenAI API Key**: You need an API key to use the OpenAI-powered co-pilot. Get your OpenAI API Key [here](https://platform.openai.com/settings/profile?tab=api-keys).
* **Kubernetes Configuration File** (kubeconfig): The path to your kubeconfig file (typically `~/.kube/config`) to allow Atheno to interact with your Kubernetes cluster.

***

### **Step 2: Download the Docker Compose File**

To run Atheno locally, download the pre-configured Docker Compose file:

```
wget https://atheno-marketing.s3.amazonaws.com/docker-compose.yaml
```

***

### **Step 3: Set Environment Variables**

You will need to set a couple of environment variables for Atheno to work:

1. **OPENAI\_KEY**: Your OpenAI API key, which allows the co-pilot to function.
2. **KUBE\_CONFIG\_PATH**: The path to your Kubernetes configuration file, allowing Atheno to interact with your cluster.

Set these environment variables in your terminal:

```
export OPENAI_KEY=your_openai_key
export KUBE_CONFIG_PATH=path_to_kube_config
```

Replace `your_openai_key` with your actual OpenAI API key, and `path_to_kube_config` with the full path to your kubeconfig file.

***

### **Step 4: Run Atheno Using Docker Compose**

Now that you have the necessary environment variables and Docker Compose file, you can start the Atheno application:

```
docker-compose -p atheno up -d
```

This will pull the necessary Docker images, set up the environment, and start Atheno in the background.

***

### **Step 5: Access the Atheno Application**

Once Atheno is up and running, you can access the application via your browser:

**URL**: <http://localhost:65080>

Login or create an account to start using Atheno.
{% endtab %}
{% endtabs %}

***

### **Enable Additional Tools**

Visit the [**Tools Section**](https://atheno-ai.gitbook.io/atheno.ai-docs/getting-started/quickstart/tools) to enable additional troubleshooting tools that can significantly enhance your debugging and issue resolution process. These tools provide deeper insights, streamline diagnostics, and help you address complex Kubernetes challenges with greater efficiency.

### **Initial Login**

Atheno uses GitHub for authentication via device login. Follow these steps to get started:

1. Click **"GitHub Device Login"**: On the Atheno login page, click the **GitHub Device Login** button to begin. This will open a new tab.

<figure><img src="https://3271445373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyrOAwwePfs5sSCLQNKfj%2Fuploads%2FpLZIGWmzECx7c3LssRGj%2FAtheno-login.png?alt=media&#x26;token=b60cc3d3-491d-4ef6-a012-222bd30f36ec" alt="" width="340"><figcaption></figcaption></figure>

2. **Sign in to GitHub**: In the new tab, sign in to your GitHub account. If you're already signed in, you will be redirected to the **Device Activation** page.
3. **Enter Device Code**: In the **Device Activation** page, you will be prompted to enter a device code.&#x20;

<figure><img src="https://3271445373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyrOAwwePfs5sSCLQNKfj%2Fuploads%2FCaWxW2WDo54T5UebFXf0%2FAtheno-login-device-activation.png?alt=media&#x26;token=0361209b-4925-4a8e-81a4-7b54100b2ec9" alt="" width="375"><figcaption></figcaption></figure>

4. Switch back to the Atheno login page, copy the device code displayed, and paste it into the **Device Activation** page. Then, click **Continue**.

<figure><img src="https://3271445373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyrOAwwePfs5sSCLQNKfj%2Fuploads%2FoZlLUHPJYA3fCjNgbjoC%2FAtheno-login-device-code.png?alt=media&#x26;token=aed8312b-c26b-4569-ab4d-d2c26948d2c3" alt="" width="372"><figcaption></figcaption></figure>

5. **Authorize Atheno**: GitHub will ask you to authorize **Atheno-ai** to access your email address. Click **Authorize atheno-ai** to proceed.
6. **Wait for Credential Validation**: Switch back to the Atheno login page. The system will validate your credentials, which may take a few seconds. Once validated, you’ll be logged into Atheno.

<figure><img src="https://3271445373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyrOAwwePfs5sSCLQNKfj%2Fuploads%2FHICvLuymWsrKPSDNCdoG%2FAtheno-login-validate-credentials.png?alt=media&#x26;token=d2a946e6-5f51-4e23-a895-6f077e18fa0a" alt="" width="375"><figcaption></figcaption></figure>

***

### Step 7: Using Atheno

Follow the [Using Atheno](#step-7-using-atheno) section to learn how to troubleshoot, ask questions and manage cluster resources using Atheno.

### **Step 8: Stop and Clean Up**

When you're done using Atheno, you can stop and remove the Docker containers:

```
docker-compose -p atheno down
```
