slides: added slide on ci/cd
This commit is contained in:
parent
286b71faf9
commit
5ca3d2287d
2 changed files with 179 additions and 3 deletions
|
@ -7,10 +7,10 @@ slides = false
|
|||
Topics that will be covered by teh skynet Training
|
||||
|
||||
* [*nix, Nix and Nixos](./3_nix.html)
|
||||
* [DNS](./4_dns.md)
|
||||
* [LDAP](./5_ldap.md)
|
||||
* [DNS](./4_dns.html)
|
||||
* [LDAP](./5_ldap.html)
|
||||
* Email
|
||||
* CI/CD
|
||||
* [CI/CD](./6_cicd.html)
|
||||
* Proxmox/VM/LXC
|
||||
* Databases (Sqlite)
|
||||
|
||||
|
|
176
src/slides/skynet/6_cicd.md
Normal file
176
src/slides/skynet/6_cicd.md
Normal file
|
@ -0,0 +1,176 @@
|
|||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
title = "Skynet: LDAP"
|
||||
date = 2023-10-22
|
||||
slides = false
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
# CI/CD
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
CI: Continuous Integration
|
||||
CD: Continuous Delivery/Deployment
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
## CI: Continuous Integration
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
This is regularly testing and merging into the main branch.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Anyone contributing to skynet will have seen the test/linter pipelines.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Its easier/less painful to test small changes.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
## CD: Continuous Delivery/Deployment
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Automatically building or deploying teh final product after CI
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Builds/deploys in a reliable manner.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
## Why its so danm good
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
So you have been using Git right?
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
But you have been SSHing into teh server to update the code in production
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Which is grand but tedious.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
You forgot to push the new update last ween to the server.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Now its Friday and ye got DnD this evening.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
So ye quicky pull ghe git repo in and run the init script.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Then ye quickly leave, thinking of what your Fairy Barbarian will do next
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
You may have forgotten to test it properly though.....
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
```bash
|
||||
userDir=/home/username
|
||||
rm -rf $userdir/
|
||||
```
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Congratulations!
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
You just wiped everything!
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Did you spot the typo?
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
So what are the things that went wrong?
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
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.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
CI/CD in this case will test and then deploy, automagically.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
If it finds an error the pipeline stops.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Some pipelines have the option to undo a bad deploy.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
## CI/CD as a force multiplier.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
It allows Devs to deploy early and often (feel like making an impact)
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Gives Ops folks more reliability, same process every time.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Handles tediousness.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
It does require more up front time investment to get set up.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Well worth it for piece of mind.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Back in 2009 there were [4+ admins][0]
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
They were each responsible for their own servers.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Each had their own processes.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Handed down like arcane scrolls.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Now said scrolls are codified.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Since pipeline deploys on our behalf no need to have admin access.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
//Use this time to explore the nixos repo to explain//
|
||||
|
||||
|
||||
|
||||
[0]: https://2016.skynet.ie/contacts.html
|
Loading…
Reference in a new issue