-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.terraform-docs.yml
182 lines (121 loc) · 5.4 KB
/
.terraform-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
formatter: "markdown" # this is required
version: ""
header-from: main.tf
footer-from: ""
recursive:
enabled: false
path: modules
sections:
hide: []
show: []
content: |-
# Nebuly Platform (Azure)
Terraform module for provisioning Nebuly Platform resources on Microsoft Azure.
Available on [Terraform Registry](https://registry.terraform.io/modules/nebuly-ai/nebuly-platform/azurerm/latest).
## Quickstart
> ⚠️ **Prerequisite**:
> before using this Terraform module, ensure that you have your Nebuly credentials ready.
> These credentials are necessary to activate your installation and should be provided as input via the `nebuly_credentials` input.
To get started with Nebuly installation on Microsoft Azure, you can follow the steps below.
These instructions will guide you through the installation using Nebuly's default standard configuration with the Nebuly Helm Chart.
For specific configurations or assistance, reach out to the Nebuly Slack channel or email [[email protected]](mailto:[email protected]).
### 1. Terraform setup
Import Nebuly into your Terraform root module, provide the necessary variables, and apply the changes.
For configuration examples, you can refer to the [Examples](#examples).
Once the Terraform changes are applied, proceed with the next steps to deploy Nebuly on the provisioned Azure Kubernetes Service (AKS) cluster.
### 2. Connect to the Azure Kubernetes Service cluster
Prerequisites: install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli).
* Fetch the command for retrieving the credentials from the module outputs:
```shell
terraform output aks_get_credentials
```
* Run the command you got from the previous step
### 3. Create image pull secret
The auto-generated Helm values use the name defined in the k8s_image_pull_secret_name input variable for the Image Pull Secret. If you prefer a custom name, update either the Terraform variable or your Helm values accordingly.
Create a Kubernetes [Image Pull Secret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) for
authenticating with your Docker registry and pulling the Nebuly Docker images.
### 4. Bootstrap AKS cluster
Retrieve the auto-generated values from the Terraform outputs and save them to a file named `values-bootstrap.yaml`:
```shell
terraform output helm_values_bootstrap
```
Install the bootstrap Helm chart to set up all the dependencies required for installing the Nebuly Platform Helm chart on AKS.
Refer to the [chart documentation](https://github.com/nebuly-ai/helm-charts/tree/main/bootstrap-azure) for all the configuration details.
```shell
helm install oci://ghcr.io/nebuly-ai/helm-charts/bootstrap-azure \
--namespace nebuly-bootstrap \
--generate-name \
--create-namespace \
-f values-bootstrap.yaml
```
### 5. Create Secret Provider Class
Create a Secret Provider Class to allow AKS to fetch credentials from the provisioned Key Vault.
* Get the Secret Provider Class YAML definition from the Terraform module outputs:
```shell
terraform output secret_provider_class
```
* Copy the output of the command into a file named secret-provider-class.yaml.
* Run the following commands to install Nebuly in the Kubernetes namespace nebuly:
```shell
kubectl create ns nebuly
kubectl apply --server-side -f secret-provider-class.yaml
```
### 6. Install nebuly-platform chart
Retrieve the auto-generated values from the Terraform outputs and save them to a file named `values.yaml`:
```shell
terraform output helm_values
```
Install the Nebuly Platform Helm chart.
Refer to the [chart documentation](https://github.com/nebuly-ai/helm-charts/tree/main/nebuly-platform) for detailed configuration options.
```shell
helm install <your-release-name> oci://ghcr.io/nebuly-ai/helm-charts/nebuly-platform \
--namespace nebuly \
-f values.yaml \
--timeout 30m
```
> ℹ️ During the initial installation of the chart, all required Nebuly LLMs are uploaded to your model registry.
> This process can take approximately 5 minutes. If the helm install command appears to be stuck, don't worry: it's simply waiting for the upload to finish.
### 7. Access Nebuly
Retrieve the IP of the Load Balancer to access the Nebuly Platform:
```shell
kubectl get svc -n nebuly-bootstrap -o jsonpath='{range .items[?(@.status.loadBalancer.ingress)]}{.status.loadBalancer.ingress[0].ip}{"\n"}{end}'
```
You can then register a DNS A record pointing to the Load Balancer IP address to access Nebuly via the custom domain you provided
in the input variable `platform_domain`.
## Examples
You can find examples of code that uses this Terraform module in the [examples](./examples) directory.
{{ .Header }}
{{ .Providers }}
{{ .Outputs }}
{{ .Inputs }}
## Resources
{{ range .Module.Resources }}
- {{ .GetMode }}.{{ .Spec }} ({{ .Position.Filename }}#{{ .Position.Line }})
{{- end }}
output:
file: ""
mode: inject
template: |-
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
output-values:
enabled: false
from: ""
sort:
enabled: true
by: name
settings:
anchor: true
color: true
default: true
description: false
escape: true
hide-empty: false
html: true
indent: 2
lockfile: false
read-comments: true
required: true
sensitive: true
type: true