Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions applications/wg-easy/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vars:
RELEASE_CHANNELd: '{{.RELEASE_CHANNEL | default "Unstable"}}'
RELEASE_VERSION: '{{.RELEASE_VERSION | default "0.0.1"}}'
RELEASE_NOTES: '{{.RELEASE_NOTES | default "Release created via task release-create"}}'
REPLICATED_LICENSE_ID: '{{.REPLICATED_LICENSE_ID}}'

# Cluster configuration
CLUSTER_NAME: '{{.CLUSTER_NAME | default "test-cluster"}}'
Expand Down Expand Up @@ -54,7 +55,6 @@ tasks:
silent: false
vars:
EMBEDDED: '{{.EMBEDDED | default "false"}}'
LICENSE_ID: '{{if eq .EMBEDDED "true"}}{{.LICENSE_ID | default "2cmqT1dBVHZ3aSH21kPxWtgoYGr"}}{{end}}'
TIMEOUT: '{{if eq .EMBEDDED "true"}}420{{else}}300{{end}}'
TTL: '{{.TTL | default "4h"}}'
status:
Expand All @@ -71,8 +71,8 @@ tasks:
- |
echo "Creating new cluster {{.CLUSTER_NAME}}..."
if [ "{{.EMBEDDED}}" = "true" ]; then
echo "Creating embedded cluster {{.CLUSTER_NAME}} with license ID {{.LICENSE_ID}}..."
replicated cluster create --distribution embedded-cluster --name {{.CLUSTER_NAME}} --license-id {{.LICENSE_ID}} --ttl {{.TTL}}
echo "Creating embedded cluster {{.CLUSTER_NAME}} with license ID {{.REPLICATED_LICENSE_ID}}..."
replicated cluster create --distribution embedded-cluster --name {{.CLUSTER_NAME}} --license-id {{.REPLICATED_LICENSE_ID}} --ttl {{.TTL}}
else
echo "Creating cluster {{.CLUSTER_NAME}} with distribution {{.DISTRIBUTION}}..."
replicated cluster create --name {{.CLUSTER_NAME}} --distribution {{.DISTRIBUTION}} --version {{.K8S_VERSION}} --disk {{.DISK_SIZE}} --instance-type {{.INSTANCE_TYPE}} --ttl {{.TTL}}
Expand Down Expand Up @@ -183,7 +183,11 @@ tasks:

helm-install:
desc: Install all charts using helmfile
silent: false
silent: true
vars:
HELM_ENV: '{{.HELM_ENV | default "default"}}'
requires:
vars: [REPLICATED_LICENSE_ID]
cmds:
- echo "Installing all charts via helmfile"
- |
Expand All @@ -195,11 +199,11 @@ tasks:
fi

# Get exposed URLs
ENV_VARS=$(task utils:port-operations OPERATION=getenv CLUSTER_NAME={{.CLUSTER_NAME}})
ENV_VARS=$(task utils:port-operations OPERATION=getenv CLUSTER_NAME={{.CLUSTER_NAME}} )

# Deploy with helmfile
echo "Using $ENV_VARS"
eval "KUBECONFIG={{.KUBECONFIG_FILE}} $ENV_VARS helmfile sync --wait"
eval "KUBECONFIG={{.KUBECONFIG_FILE}} HELMFILE_ENVIRONMENT={{.HELM_ENV}} REPLICATED_APP={{.APP_SLUG}} $ENV_VARS helmfile sync --wait"
- echo "All charts installed!"
deps:
- setup-kubeconfig
Expand Down Expand Up @@ -239,7 +243,7 @@ tasks:

# Copy all non-config.yaml files
- echo "Copying non-config YAML files to release folder..."
- find . -path '*/replicated/*.yaml' -not -name 'config.yaml' -exec cp {} ./release/ \;
- find . -path './charts/*/replicated/*.yaml' -exec cp {} ./release/ \;
- find ./replicated -name '*.yaml' -not -name 'config.yaml' -exec cp {} ./release/ \; 2>/dev/null || true

# extract namespaces from helmChart files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 1.0.0
- name: replicated
repository: oci://registry.replicated.com/library
version: 1.1.1
digest: sha256:bb2c4743fae54061dfde5812086300bf9ed7c86f9f4d80ccb0858df407d21a2a
generated: "2025-05-06T15:35:43.881588-04:00"
version: 1.5.3
digest: sha256:35588c7f070f319202e6194bd952aa4f4195336e6880855076860acfd7fd1736
generated: "2025-05-15T13:31:37.79846+01:00"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: replicated-sdk
name: replicated
version: 1.0.0
apiVersion: v2
dependencies:
Expand All @@ -7,4 +7,4 @@ dependencies:
repository: file://../templates
- name: replicated
repository: oci://registry.replicated.com/library
version: 1.1.1
version: 1.5.3
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: kots.io/v1beta2
kind: HelmChart
metadata:
name: replicated-sdk
name: replicated
spec:
chart:
name: replicated-sdk
name: replicated
weight: 1

# helmUpgradeFlags specifies additional flags to pass to the `helm upgrade` command.
Expand All @@ -16,5 +16,5 @@ spec:
- --wait

values: {}
namespace: replicated-sdk
namespace: replicated
builder: {}
2 changes: 2 additions & 0 deletions applications/wg-easy/docs/development-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ Test multiple charts working together using Helmfile orchestration.
2. Deploy all charts:

```bash
# set a license id so we can perform the helm install from the replicated registry
export REPLICATED_LICENSE_ID=<customer license id>
task helm-install
```

Expand Down
4 changes: 2 additions & 2 deletions applications/wg-easy/docs/task-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ These tasks support the iterative development process, focusing on fast feedback
| Task | Description | Related Workflow Stage |
|------|-------------|------------------------|
| `dependencies-update` | Updates Helm dependencies for all charts in the repository | Stage 1: Dependencies |
| `helm-deploy` | Deploys all charts using helmfile with proper sequencing | Stage 5: Integration Testing |
| `helm-install` | Deploys all charts using helmfile with proper sequencing | Stage 5: Integration Testing |
| `ports-expose` | Exposes the configured ports on the cluster for testing | Stage 4-5: Chart Installation/Integration |
| `remove-k3s-traefik` | Removes pre-installed Traefik from k3s clusters to avoid conflicts | Stage 4-5: Chart Installation/Integration |

Expand Down Expand Up @@ -121,7 +121,7 @@ Parameters in the Taskfile.yaml try to always have defaults so that it works out
These tasks are designed to support the progressive complexity approach:

1. **Early Stages** - Use `dependencies-update` and helm commands directly
2. **Middle Stages** - Use `cluster-create`, `helm-deploy`, and `test`
2. **Middle Stages** - Use `cluster-create`, `helm-install`, and `test`
3. **Later Stages** - Use `release-prepare`, `release-create`, and embedded cluster tasks

This organization allows developers to focus on the appropriate level of complexity at each stage of development.
Expand Down
34 changes: 24 additions & 10 deletions applications/wg-easy/helmfile.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,37 @@ environments:
certManagerIssuers: ./charts/cert-manager-issuers
traefik: ./charts/traefik
wgEasy: ./charts/wg-easy
replicatedSDK: ./charts/replicated-sdk
replicatedSDK: ./charts/replicated
- extras:
enableReplicatedSDK: false
replicated:
values:
- app: '{{ env "APP" | default "wg-easy" }}'
- channel: '{{ env "CHANNEL" | default "Unstable" }}'
- app: '{{ env "REPLICATED_APP" | default "wg-easy" }}'
- channel: '{{ env "CHANNEL" | default "unstable" }}'
- username: "[email protected]"
- password: '{{env "REPLICATED_LICENSE_ID"}}'
- chartSources:
certManager: 'oci://registry.replicated.com/{{ env "APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "Unstable" }}/cert-manager'
certManagerIssuers: 'oci://registry.replicated.com/{{ env "APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "Unstable" }}/cert-manager-issuers'
traefik: 'oci://registry.replicated.com/{{ env "APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "Unstable" }}/traefik'
wgEasy: 'oci://registry.replicated.com/{{ env "APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "Unstable" }}/wg-easy'
replicatedSDK: 'oci://registry.replicated.com/{{ env "APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "Unstable" }}/replicated-sdk'
certManager: 'oci://registry.replicated.com/{{ env "REPLICATED_APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "unstable" }}/cert-manager'
certManagerIssuers: 'oci://registry.replicated.com/{{ env "REPLICATED_APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "unstable" }}/cert-manager-issuers'
traefik: 'oci://registry.replicated.com/{{ env "REPLICATED_APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "unstable" }}/traefik'
wgEasy: 'oci://registry.replicated.com/{{ env "REPLICATED_APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "unstable" }}/wg-easy'
replicatedSDK: 'oci://registry.replicated.com/{{ env "REPLICATED_APP" | default "wg-easy" }}/{{ env "CHANNEL" | default "unstable" }}/replicated'
- extras:
enableReplicatedSDK: true
---
repositories:
- name: registry.replicated.com
oci: true
url: registry.replicated.com
username: '{{ .Values.username }}'
password: '{{ .Values.password }}'

releases:
# Install cert-manager with CRDs but without issuers
- name: cert-manager
namespace: cert-manager
chart: {{ .Values.chartSources.certManager }}
version: 1.0.0
createNamespace: true
wait: true
installed: true
Expand All @@ -44,6 +54,7 @@ releases:
- name: cert-manager-issuers
namespace: cert-manager
chart: {{ .Values.chartSources.certManagerIssuers }}
version: 1.0.0
createNamespace: true
wait: true
installed: true
Expand All @@ -54,6 +65,7 @@ releases:
- name: traefik
namespace: traefik
chart: {{ .Values.chartSources.traefik }}
version: 1.0.0
createNamespace: true
wait: true
installed: true
Expand All @@ -69,9 +81,10 @@ releases:
nodePort: 30443

# Install replicated-sdk (only in replicated environment)
- name: replicated-sdk
namespace: replicated-sdk
- name: replicated
namespace: replicated
chart: {{ .Values.chartSources.replicatedSDK }}
version: 1.0.0
createNamespace: true
wait: true
installed: {{ .Values.extras.enableReplicatedSDK }}
Expand All @@ -82,6 +95,7 @@ releases:
- name: wg-easy
namespace: wg-easy
chart: {{ .Values.chartSources.wgEasy }}
version: 1.0.0
createNamespace: true
wait: true
installed: true
Expand Down
Loading