Skip to content

Commit f892988

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 49151d0 commit f892988

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
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: 5 additions & 7 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
)
@@ -39,16 +40,13 @@ kubectl create configmap --namespace="${NAMESPACE}" netbox-demo-data-load-job-sc
3940
kubectl apply --namespace="${NAMESPACE}" -f "$(dirname "$0")/load-data-job.yaml"
4041
kubectl wait --namespace="${NAMESPACE}" --timeout=600s --for=condition=complete job/netbox-demo-data-load-job
4142
kubectl delete configmap --namespace="${NAMESPACE}" netbox-demo-data-load-job-scripts
42-
kubectl delete --namespace="${NAMESPACE}" -f "$(dirname "$0")/load-data-job.yaml"
4343

44-
# 7. Helm install
4544
helm upgrade --install --namespace="${NAMESPACE}" netbox \
4645
--set postgresql.enabled="false" \
4746
--set externalDatabase.host="netbox-db.${NAMESPACE}.svc.cluster.local" \
4847
--set externalDatabase.existingSecretName="netbox.netbox-db.credentials.postgresql.acid.zalan.do" \
4948
--set externalDatabase.existingSecretKey="password" \
5049
--set redis.auth.password="password" \
51-
https://github.com/netbox-community/netbox-chart/releases/download/netbox-5.0.0-beta.34/netbox-5.0.0-beta.34.tgz
50+
https://github.com/netbox-community/netbox-chart/releases/download/netbox-5.0.0-beta.163/netbox-5.0.0-beta.163.tgz
5251

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

0 commit comments

Comments
 (0)