Skip to content

Commit f95caa0

Browse files
committed
Upgrade NetBox version
There are several aspects to be updated: - If the major/minor version is changed, we need to update the NetBox demo data [1] in the `load-data.sh` script - In the `local-env.sh` script, the images listed in `Images` would need to be changed, as updating the helm chart will cause the required image versions to change, and we need to pre-load them into the kind cluster since it can't pull images directly from the outside world Reference: [1] https://github.com/netbox-community/netbox-demo-data/blob/master/sql/netbox-demo-v4.1.sql
1 parent 1310f51 commit f95caa0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

kind/load-data-job/load-data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
TMP_SQL_FILE=$(mktemp /tmp/netbox-data-dump.XXXXXXX.sql) || exit 1
4-
curl -k https://raw.githubusercontent.com/netbox-community/netbox-demo-data/master/sql/netbox-demo-v4.0.sql > "${TMP_SQL_FILE}"
4+
curl -k https://raw.githubusercontent.com/netbox-community/netbox-demo-data/master/sql/netbox-demo-v4.1.sql > "${TMP_SQL_FILE}"
55
psql "user=netbox host=netbox-db.${NAMESPACE}.svc.cluster.local" netbox -q -f "${TMP_SQL_FILE}"
66
rm "${TMP_SQL_FILE}"
77
psql "user=netbox host=netbox-db.${NAMESPACE}.svc.cluster.local" netbox -q -f /load-data-job/local-demo-data.sql

kind/local-env.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ if ! kubectl get namespaces | grep -q "^${NAMESPACE} "; then
1515
exit 1
1616
fi
1717

18+
# need to align with netbox-chart otherwise the creation of the cluster will hang
1819
declare -a Images=( \
1920
"gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1" \
20-
"busybox:1.36.1" \
21-
"bitnami/redis:7.2.5-debian-12-r0" \
22-
"ghcr.io/netbox-community/netbox:v4.0.5" \
21+
"busybox:1.37.0" \
22+
"docker.io/bitnami/redis:7.4.1-debian-12-r2" \
23+
"ghcr.io/netbox-community/netbox:v4.1.7" \
2324
"ghcr.io/zalando/postgres-operator:v1.12.2" \
2425
"ghcr.io/zalando/spilo-16:3.2-p3" \
2526
)
@@ -41,7 +42,6 @@ kubectl wait --namespace="${NAMESPACE}" --timeout=600s --for=condition=complete
4142
kubectl delete configmap --namespace="${NAMESPACE}" netbox-demo-data-load-job-scripts
4243
kubectl delete --namespace="${NAMESPACE}" -f "$(dirname "$0")/load-data-job.yaml"
4344

44-
# 7. Helm install
4545
helm upgrade --install --namespace="${NAMESPACE}" netbox \
4646
--set postgresql.enabled="false" \
4747
--set externalDatabase.host="netbox-db.${NAMESPACE}.svc.cluster.local" \
@@ -51,4 +51,3 @@ helm upgrade --install --namespace="${NAMESPACE}" netbox \
5151
https://github.com/netbox-community/netbox-chart/releases/download/netbox-5.0.0-beta.161/netbox-5.0.0-beta.161.tgz
5252

5353
kubectl rollout status --namespace="${NAMESPACE}" deployment netbox
54-

0 commit comments

Comments
 (0)