From time to time you may need to update one or more parts of the My Building software. This article walks you through said process. The steps identified herein assume you're running a k8s deployment. If your system is different, the steps will be similar but may have to be custom tailored for your specific needs.
Quick Steps
- Copy the images to your deployment directory, or, other location. Default factory location is d:/myBuilding/images
- Load the images taking note of the version number
- Windows: nerdctl load --input <file path including file name> --namespace k8s.io
- Unix: sudo k3s ctr images import <<file path including file name>
- Modify app_version.ini in the root directory to include the new version numbers
- From the d:/myBuilding/utils directory, activate the python version environment
- Windows: lev-deploy-pyenv\Scripts\activate.bat
- Unix : source lev-deploy-pyenv/Scripts/activate
- Update the deployment files. From the python script
- python generate_deployments.py ../deployment.yaml ../app_version.ini
- Deploy update
- from d:/myBuilding
- kubectl apply -R -f deploy/services
- from d:/myBuilding
- To verify that update is pushing out run the command below which will list all of the running pods. Any service with changes should show a very short age.
- kubectl get pods -n mybuilding (replace mybuildling with your actual namespace name)
- If for some reason your system does not stabilize after about 10 minutes, roll back your system by modifying app_version.ini with the previous version numbers and repeat steps 4-7