Skip to content

Commit fe281bb

Browse files
authored
Feature/69786 nfsmodule (#9)
* added new nfs module * changed the pipeline * updated readme * updated readme of the example
1 parent 40647ab commit fe281bb

File tree

11 files changed

+1051
-13
lines changed

11 files changed

+1051
-13
lines changed

.github/workflows/terraform-module.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
name: quix-aks module CI/CD
1+
name: Quix Terraform modules CI/CD
22

33
on:
44
push:
5-
branches: [ main, dev ]
5+
branches: [main, dev]
66
paths:
7-
- 'modules/quix-aks/**'
8-
- 'modules/tiered-storage/**'
9-
- '.github/workflows/terraform-module.yml'
7+
- "modules/quix-aks/**"
8+
- "modules/tiered-storage/**"
9+
- "modules/nfs-storage/**"
10+
- ".github/workflows/terraform-module.yml"
1011
workflow_dispatch:
1112
inputs:
1213
bump:
13-
description: 'Version bump (patch, minor, major)'
14+
description: "Version bump (patch, minor, major)"
1415
required: true
15-
default: 'minor'
16+
default: "minor"
1617
type: choice
1718
options: [patch, minor, major]
1819

@@ -29,7 +30,8 @@ jobs:
2930
strategy:
3031
fail-fast: false
3132
matrix:
32-
module: [ 'modules/quix-aks', 'modules/tiered-storage' ]
33+
module:
34+
["modules/quix-aks", "modules/tiered-storage", "modules/nfs-storage"]
3335
steps:
3436
- name: Checkout
3537
uses: actions/checkout@v4
@@ -56,7 +58,7 @@ jobs:
5658
working-dir: ${{ matrix.module }}
5759
output-file: README.md
5860
output-method: inject
59-
config-file: ''
61+
config-file: ""
6062
git-push: true
6163

6264
release:
@@ -77,7 +79,7 @@ jobs:
7779
env:
7880
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7981
DEFAULT_BUMP: ${{ github.event.inputs.bump }}
80-
TAG_PREFIX: 'v'
82+
TAG_PREFIX: "v"
8183

8284
- name: Create GitHub Release
8385
uses: softprops/action-gh-release@v2

README.md

Lines changed: 79 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Terraform Modules (Azure)
22

3+
![Terraform](https://img.shields.io/badge/Terraform-7B42BC?style=for-the-badge&logo=terraform&logoColor=white)
4+
![Azure](https://img.shields.io/badge/Azure-0078D4?style=for-the-badge&logo=microsoftazure&logoColor=white)
5+
![Kubernetes](https://img.shields.io/badge/Kubernetes-326CE5?style=for-the-badge&logo=kubernetes&logoColor=white)
6+
37
Repository of production-ready Terraform modules for installing quix-platform.
48

59
## Structure
@@ -14,10 +18,14 @@ Repository of production-ready Terraform modules for installing quix-platform.
1418
- `modules/tiered-storage/` (Tiered Storage module)
1519
- `main.tf`: Storage Account, federated identity credentials, role assignment for kubelet identity
1620
- `README.md`: terraform-docs generated documentation
21+
- `modules/nfs-storage/` (NFS Storage module)
22+
- `main.tf`: Azure Files Premium (NFS 4.1), Private Endpoint, network security rules
23+
- `README.md`: module documentation
1724
- `examples/` usage examples
1825
- `public-quix-infr/`: public cluster
1926
- `private-quix-infr/`: private cluster with Bastion + jumpbox
2027
- `public-quix-infr-tiered-storage/`: public cluster + tiered-storage module
28+
- `public-quix-infr-nfs-storage/`: public cluster + nfs-storage module
2129
- `private-quix-infr-external-vnet/`: private cluster using external VNet/Subnets, external NAT (BYO), and Bastion subnet
2230
- `BASTION_ACCESS.md`: how to access a private AKS via Bastion
2331

@@ -70,6 +78,8 @@ module "quix_aks" {
7078

7179
## Tiered Storage module (tiered-storage)
7280

81+
Azure Blob Storage with workload identity federation for Quix tiered storage.
82+
7383
Module documentation (inputs/outputs/resources):
7484

7585
- [modules/tiered-storage/README.md](modules/tiered-storage/README.md) (generated with terraform-docs)
@@ -81,25 +91,91 @@ cd modules/tiered-storage
8191
terraform-docs markdown table --output-file README.md --output-mode inject .
8292
```
8393

94+
## NFS Storage module (nfs-storage)
95+
96+
Azure Files Premium with NFS 4.1 support, secured with Private Endpoint and network security rules.
97+
98+
**Features:**
99+
- Azure Files Premium (NFS 4.1) for high-performance file storage
100+
- Private Endpoint for secure VNet connectivity
101+
- Network security rules with default deny policy
102+
- Auto DNS zone creation for `privatelink.file.core.windows.net`
103+
- Multiple NFS shares support
104+
105+
Module documentation:
106+
107+
- [modules/nfs-storage/README.md](modules/nfs-storage/README.md)
108+
109+
**Quick example:**
110+
111+
```hcl
112+
module "nfs_storage" {
113+
source = "./modules/nfs-storage"
114+
115+
resource_group_name = "rg-myapp"
116+
location = "westeurope"
117+
storage_account_name = "mystorageaccount01"
118+
119+
# Private Endpoint configuration
120+
private_endpoint_subnet_id = azurerm_subnet.private_endpoints.id
121+
vnet_id = azurerm_virtual_network.main.id
122+
123+
# Network Security Rules - Default deny policy
124+
allowed_subnet_ids = [azurerm_subnet.aks_nodes.id]
125+
allowed_ip_addresses = ["1.2.3.4"] # Your public IP
126+
127+
nfs_shares = [
128+
{
129+
name = "shared-data"
130+
quota_gb = 100
131+
}
132+
]
133+
}
134+
```
135+
136+
**Mounting NFS shares:**
137+
138+
```bash
139+
sudo mount -t nfs -o vers=4.1,sec=sys \
140+
mystorageaccount01.privatelink.file.core.windows.net:/mystorageaccount01/shared-data \
141+
/mnt/shared-data
142+
```
143+
84144
## Examples
85145

86-
Public example:
146+
Public cluster:
87147

88148
```bash
89149
cd examples/public-quix-infr
90150
terraform init
91151
terraform apply
92152
```
93153

94-
Private example (with Bastion):
154+
Private cluster (with Bastion):
95155

96156
```bash
97157
cd examples/private-quix-infr
98158
terraform init
99159
terraform apply
100160
```
101161

102-
External VNet + external NAT + Bastion subnet example:
162+
Public cluster with Tiered Storage:
163+
164+
```bash
165+
cd examples/public-quix-infr-tiered-storage
166+
terraform init
167+
terraform apply
168+
```
169+
170+
Public cluster with NFS Storage:
171+
172+
```bash
173+
cd examples/public-quix-infr-nfs-storage
174+
terraform init
175+
terraform apply
176+
```
177+
178+
External VNet + external NAT + Bastion subnet:
103179

104180
```bash
105181
cd examples/private-quix-infr-external-vnet

0 commit comments

Comments
 (0)