- Related issues: #1849 [Task] Improve Harvester upgrade responder
Category:
- Upgrade
Verification Steps
Follow the steps in https://github.com/harvester/harvester/issues/1849#issuecomment-1180346017
- Clone longhorn/upgrade-responder and checkout to v0.1.4.
- Edit response.json content in config folder
{
"Versions": [
{
"Name": "v1.0.2-master-head",
"ReleaseDate": "2022-06-15T00:00:00Z",
"Tags": [
"latest",
"test",
"dev"
]
}
]
}
- Install InfluxDB
- Run longhorn/upgrade-responder with the command:
go run main.go --debug start --upgrade-response-config config/response.json --influxdb-url http://localhost:8086 --geodb geodb/GeoLite2-City.mmdb --application-name harvester
- Check the local upgrade responder is running
curl -X POST http://localhost:8314/v1/checkupgrade \
-d '{ "appVersion": "v1.0.2", "extraInfo": {}}'
- Create a new folder
v1.0.2-master-head
for the http server - Download the latest master head installation files
- https://releases.rancher.com/harvester/master/harvester-master-amd64.iso
- https://releases.rancher.com/harvester/master/harvester-master-initrd-amd64
- https://releases.rancher.com/harvester/master/harvester-master-rootfs-amd64.squashfs
- https://releases.rancher.com/harvester/master/harvester-master-vmlinuz-amd64
- https://releases.rancher.com/harvester/master/harvester-master-amd64.sha256
- Launch a python http server
python3 -m http.server
- Create a
version.yaml
with the following content
apiVersion: harvesterhci.io/v1beta1
kind: Version
metadata:
name: v1.0.2-master-head
namespace: harvester-system
spec:
isoChecksum: '0d5999471553e767cb0c4d7d1c82b00b884e994e5856d8feb90798ace523b7aa2145a5fc245e1d0073ce7b41c490979950f3f31f60a682c971aba63d562973e5'
isoURL: http://192.168.122.224:8000/v1.0.2-master-head/harvester-master-amd64.iso
releaseDate: '20220712'
- Check the upgrade responder connection in harvester node
curl -X POST http://192.168.122.224:8314/v1/checkupgrade -d '{ "appVersion": "v1.0.2", "extraInfo": {}}'
- Check the iso download url connection in harvester node
curl -output http://192.168.122.224:8000/harvester-master-amd64.iso
- Open Harvester settings, change upgrade-checker-url setting to our upgrade-responder URL.
- Change the release download url to our http server url
- ssh to harvester node, change to root, run
k9s
- Run : deployments -> / harvester -> select the harvester node
- Remove pods in deployment harvester-system/harvester to trigger check new versions.
- Wait for 5 - 10 minutes,
- Check Harvester dashboard and click the upgrade button
- Select the version and start the upgrade process
Expected Results
-
Can select the prompted upgrade button by using the updated version of Harvester upgrade responder https://github.com/longhorn/upgrade-responder (v0.1.4) by using the
upgrade-checker url
-
Can correctly connect to the file server by using the
release URL
setting