Skynet: CI/CD It updates itself 2023-10-28 Brendan . CI: Continuous Integration CD: Continuous Delivery/Deployment 2 / 40 . ▓▓▓ CI: Continuous Integration 3 / 40 . This is regularly testing and merging into the main branch. 4 / 40 . Anyone contributing to skynet will have seen the test/linter pipelines. 5 / 40 . Its easier/less painful to test small changes. 6 / 40 . ▓▓▓ CD: Continuous Delivery/Deployment 7 / 40 . Automatically building or deploying teh final product after CI 8 / 40 . Builds/deploys in a reliable manner. 9 / 40 . ▓▓▓ Why its so danm good 10 / 40 . So you have been using Git right? 11 / 40 . But you have been SSHing into teh server to update the code in production 12 / 40 . Which is grand but tedious. 13 / 40 . You forgot to push the new update last ween to the server. 14 / 40 . Now its Friday and ye got DnD this evening. 15 / 40 . So ye quicky pull ghe git repo in and run the init script. 16 / 40 . Then ye quickly leave, thinking of what your Fairy Barbarian will do next 17 / 40 . You may have forgotten to test it properly though..... 18 / 40 . userDir=/home/username
rm -rf $userdir/
19 / 40 . Congratulations! 20 / 40 . You just wiped everything! 21 / 40 . Did you spot the typo? 22 / 40 . So what are the things that went wrong? 23 / 40 . 1. Forgot to deploy the previous release. 2. Forgot to do/skipped testing. 3. It will be Sat that you will get teh dreaded phonecall. 24 / 40 . CI/CD in this case will test and then deploy, automagically. 25 / 40 . If it finds an error the pipeline stops. 26 / 40 . Some pipelines have the option to undo a bad deploy. 27 / 40 . ▓▓▓ CI/CD as a force multiplier. 28 / 40 . It allows Devs to deploy early and often (feel like making an impact) 29 / 40 . Gives Ops folks more reliability, same process every time. 30 / 40 . Handles tediousness. 31 / 40 . It does require more up front time investment to get set up. 32 / 40 . Well worth it for piece of mind. 33 / 40 . Back in 2009 there were 4+ admins (https://2016.skynet.ie/contacts.html)
34 / 40 . They were each responsible for their own servers. 35 / 40 . Each had their own processes. 36 / 40 . Handed down like arcane scrolls. 37 / 40 . Now said scrolls are codified. 38 / 40 . Since pipeline deploys on our behalf no need to have admin access. 39 / 40 . Use this time to explore the nixos repo to explain 40 / 40