# Minikube

{% hint style="warning" %}
This following will install Terrakube using "HTTP" a few features like the Terraform registry and the Terraform remote state won't be available because they require "HTTPS", to install with HTTPS support locally with minikube check [this](https://docs.terrakube.io/2.18.0/getting-started/deployment/minikube-+-https)
{% endhint %}

Terrakube can be installed in minikube as a sandbox environment to test, to use it please follow this:

### Setup Helm Repository

```
helm repo add terrakube-repo https://AzBuilder.github.io/terrakube-helm-chart
helm repo update
```

### Setup Minikube

```
minikube start
minikube addons enable ingress
minikube addons enable storage-provisioner
minikube ip 
```

{% hint style="info" %}
Copy the minikube ip address ( Example: 192.168.59.100)
{% endhint %}

### Setup Terrakube namespace

```
kubectl create namespace terrakube
```

### Setup DNS records

```
sudo nano /etc/hosts

192.168.59.100 terrakube-ui.minikube.net
192.168.59.100 terrakube-api.minikube.net
192.168.59.100 terrakube-reg.minikube.net
```

### Install Terrakube

```
helm install terrakube terrakube-repo/terrakube -n terrakube
```

{% hint style="info" %}
It will take some minutes for all the pods to be available, the status can be checked using

kubectl get pods -n terrakube
{% endhint %}

The environment has some users, groups and sample data so you can test it quickly.

Visit <http://terrakube-ui.minikube.net> and login using <admin@example.com> with password admin

<figure><img src="https://2194998553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR6VsmuTZWhfdwP7uD6e0%2Fuploads%2Fgit-blob-8cb0cd24dfdd9ea7acf8f6d72495adb750b2929c%2Fimage%20(235).png?alt=media" alt=""><figcaption></figcaption></figure>

You can login using the following user and passwords

<figure><img src="https://2194998553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR6VsmuTZWhfdwP7uD6e0%2Fuploads%2Fgit-blob-a371782ca5576823ea9fb104c8801c3b9d39a187%2Fimage%20(219).png?alt=media" alt=""><figcaption></figcaption></figure>

| User                | Password | Member Of                               |
| ------------------- | -------- | --------------------------------------- |
| <admin@example.com> | admin    | TERRAKUBE\_ADMIN, TERRAKUBE\_DEVELOPERS |
| <aws@example.com>   | aws      | AWS\_DEVELOPERS                         |
| <gcp@example.com>   | gcp      | GCP\_DEVELOPERS                         |
| <azure@example.com> | azure    | AZURE\_DEVELOPERS                       |

| Groups                |
| --------------------- |
| TERRAKUBE\_ADMIN      |
| TERRAKUBE\_DEVELOPERS |
| AZURE\_DEVELOPERS     |
| AWS\_DEVELOPERS       |
| GCP\_DEVELOPERS       |

{% hint style="warning" %}
The sample user and groups information can be updated in the kubernetes secret:

terrakube-openldap-secrets
{% endhint %}

{% hint style="danger" %}
Minikube will use a very simple OpenLDAP, make sure to change this when using in a real kubernetes environment. Using the option security.useOpenLDAP=false in your helm deployment.
{% endhint %}

Select the "simple" organization and the "sample\_simple" workspace and run a job.

<figure><img src="https://2194998553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR6VsmuTZWhfdwP7uD6e0%2Fuploads%2Fgit-blob-170ed996c69c02d06a5bff3a779c34a6156873e5%2Fimage%20(105).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2194998553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR6VsmuTZWhfdwP7uD6e0%2Fuploads%2Fgit-blob-6a1407b2cbe9233a590016f6f276b0d424dce89c%2Fimage%20(168).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2194998553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR6VsmuTZWhfdwP7uD6e0%2Fuploads%2Fgit-blob-91be957628b5bd917e4a57ed99ac855fdad4dbfb%2Fimage%20(211).png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more advance configuration options to install Terrakube visit:

<https://github.com/AzBuilder/terrakube-helm-chart>
{% endhint %}
