Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
26 changes: 4 additions & 22 deletions scripts/create-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ NETWORK_NAME="nebari-${CLUSTER_NAME}-net"
GITOPS_DIR="/tmp/nebari-gitops-${CLUSTER_NAME}"

if [[ "${PROFILE}" == "platform" ]]; then
# NIC's local provider uses MetalLB with a hardcoded 192.168.1.100-110 pool.
# Create a Docker network matching that subnet so MetalLB IPs are routable.
# Create a Docker network matching the MetalLB address pool configured in
# deploy-platform.sh (192.168.1.100-110) so MetalLB IPs are routable from
# the runner. The subnet and pool are kept in sync between this file and the
# NIC config (cluster.local.metallb.address_pool).
if ! docker network inspect "${NETWORK_NAME}" &>/dev/null; then
echo "Creating Docker network '${NETWORK_NAME}' (192.168.1.0/24)..."
docker network create --subnet 192.168.1.0/24 --gateway 192.168.1.1 "${NETWORK_NAME}"
Expand All @@ -59,26 +61,6 @@ kubectl get nodes -o wide

echo "::endgroup::"

if [[ "${PROFILE}" == "platform" ]]; then
echo "::group::Create 'standard' StorageClass (workaround)"

# NIC's local provider hardcodes StorageClass "standard", but k3s only ships
# "local-path". Create a "standard" class backed by the same provisioner.
# TODO: Remove once nebari-dev/nebari-infrastructure-core#201 merges and
# NIC supports configuring storage_class per provider.
kubectl apply -f - <<'SC'
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: standard
provisioner: rancher.io/local-path
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
SC

echo "::endgroup::"
fi

# Set outputs
KUBECONFIG_PATH="${HOME}/.kube/config"
k3d kubeconfig merge "${CLUSTER_NAME}" --kubeconfig-merge-default
Expand Down
8 changes: 8 additions & 0 deletions scripts/deploy-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ cluster:
# (not the top-level NebariConfig.kube_context, which is for "bring your
# own cluster" mode that skips infra provisioning).
kube_context: "k3d-${CLUSTER_NAME}"
# k3s ships "local-path" not "standard"; tell NIC to use it directly so we
# don't need to create a fake "standard" StorageClass as a workaround.
# Requires nebari-dev/nebari-infrastructure-core#201.
storage_class: local-path
# Explicitly declare the MetalLB pool so it matches the Docker network
# subnet (192.168.1.0/24) created in create-cluster.sh.
metallb:
address_pool: 192.168.1.100-192.168.1.110
node_selectors:
general:
kubernetes.io/os: linux
Expand Down
13 changes: 9 additions & 4 deletions scripts/install-nic.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail

# Build NIC from main. file:// git support (nebari-dev/nebari-infrastructure-core#136)
# was merged into main on 2026-04-29 and the local_git branch was deleted.
# Build NIC from the feature/local-configurable-infra-settings branch, which
# makes StorageClass, MetalLB, and https_port configurable in the local provider
# config (nebari-dev/nebari-infrastructure-core#201).
#
# This branch is pinned here to provide an integration test environment for
# NIC PR #201 review. Once that PR merges into main (and eventually a new NIC
# release ships), this should be updated back to main / a tagged release.
# TODO: switch to downloading a pre-built binary once a NIC release ships
# that includes PR #136 (track: nebari-dev/action-nebari-sandbox#12).
# that includes PR #136 and PR #201 (track: nebari-dev/action-nebari-sandbox#12).
NIC_REPO="https://github.com/nebari-dev/nebari-infrastructure-core.git"
NIC_BRANCH="main"
NIC_BRANCH="feature/local-configurable-infra-settings"
NIC_SRC="/tmp/nebari-infrastructure-core"

echo "::group::Install NIC (branch: ${NIC_BRANCH})"
Expand Down