You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
4.6 KiB
Markdown

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

# esgi-devops
Contenus & ressources pour le cours de 4A de DevOps
# Plan
- 1 Introduction (c'est quoi le DevOps ? TP -> installation d'une VM NixOS)
+ rappels de base sur Linux / BONUS: présentation de nix-shell, nixos-rebuild
- 2 Tests (unitaires & integrations, TP -> utilisation de pytest, hypothesis)
+ utilisation de nix-env et direnv (change vos variables d'env de votre shell en fonction du dossier dans lequel vous vous trouvez)
=> utilise Nix pour installer l'ensemble des dépendances de dev requise !! (pratique pour les illustrations / TPs)
- 3 Deploiements (TP -> déployer un site static dans une machine NixOS / Debian 9 avec Fabric)
+ BONUS: Terraform sur t2.macro AWS (gratuit), NixOps
... en cas de pépin ~> ngrock !!
- 4 Containers (Docker & autres)
- 5 Haute Disponibilité (autoscaling)
---
# 🕸️ DevOps with NixOS
Contenus & ressources pour le cours de 4A de DevOps
## ProTip Nix ™
[Search options](https://nixos.org/nixos/options.html#) (chercher des options de module Nix à utiliser prêt à l'emploi, le système expert ™)
[Search code](https://search.nix.gsc.io/) (lire du code qui fait un truc, genre "matomo" et voir comment c'est impléménté; lire la doc de la lib standard)
[Package search](https://nixos.org/nixos/packages.html) (chercher des pkg à installer)
[NixOS Infra Status](https://status.nixos.org/) (pour voir s'il y a des trucs kassé)
["How up to date are NixOS channels?"](https://howoldis.herokuapp.com/) (pour voir à quel point master de nixpkgs lag derrière)
[Useful Nix Hacks](http://chriswarbo.net/projects/nixos/useful_hacks.html) (super useful pour le coup)
[Nix in 1 page](https://github.com/tazjin/nix-1p) (cheatsheet du langage)
[A tour of Nix](https://nixcloud.io/tour/) (jeu emscripten du langage où tu as des exercices de trucs à faire, très rapide à faire)
[Pull Requests · NixOS/rfcs](https://github.com/NixOS/rfcs/pulls) (parce que c'est important de savoir comment ça évolue)
## Vidéo
[cirocosta/asciinema-edit](https://github.com/cirocosta/asciinema-edit)
[untitled](https://asciinema.org/a/jikcJpkl09MoakqkYFTBGfakT)
[](https://clbin.com/uFXdw)
[https://www.youtube.com/watch?v=Q4WUCRkM_I8](https://www.youtube.com/watch?v=Q4WUCRkM_I8)
[https://www.youtube.com/watch?v=ZxD3LMPl5_4](https://www.youtube.com/watch?v=ZxD3LMPl5_4)
[https://www.youtube.com/watch?v=95Zs95HXFS4](https://www.youtube.com/watch?v=95Zs95HXFS4)
## Cool env
[Install Nix](https://nixos.org/guides/install-nix.html)
[Zsh](https://grml.org/zsh/)
[Starship: Cross-Shell Prompt](https://starship.rs/guide/#🚀-installation)
## Network
[ngrok - download](https://ngrok.com/download)
## TDD
[pytest-cov](https://pypi.org/project/pytest-cov/)
## Deployment
[](https://clbin.com/wwgTu)
[Fabric](https://docs.fabfile.org/en/2.5/api/transfer.html?highlight=put#fabric.transfer.Transfer.put)
[Fabric](http://www.fabfile.org)
## Reproducible
[Is NixOS Reproducible?](https://r13y.com)
[Reproducible Builds](https://wiki.archlinux.org/index.php/Reproducible_Builds)
[Projects · Reproducible Builds / disorderfs](https://salsa.debian.org/reproducible-builds/disorderfs)
## Docker
[Docker](https://nixos.wiki/wiki/Docker)
### Issues
[Computational overhead due to Docker under macOS](https://lemire.me/blog/2020/06/19/computational-overhead-due-to-docker-under-macos/)
[Docker daemon is leaking file descriptors (with reproduction) · Issue #37182 · moby/moby](https://github.com/moby/moby/issues/37182)
[the container's netns fds leak, causing the container netns to not clean up successfully after the container stops · Issue #41136 · moby/moby](https://github.com/moby/moby/issues/41136)
[[Windows] mounted volumes behave differently · Issue #41121 · moby/moby](https://github.com/moby/moby/issues/41121)
## ☹️
[CoreOS](https://coreos.com/rkt/docs/latest/)
[README and Docs need to state that RancherOS is dead · Issue #3000 · rancher/os](https://github.com/rancher/os/issues/3000)
### Better than Docker
[Firejail](https://wiki.archlinux.org/index.php/firejail)
[Lightweight Kubernetes](https://k3s.io)
[Dokku](http://dokku.viewdocs.io/dokku/)
[Docker 19.03: Rootless Mode (Experimental) | Hacker News](https://news.ycombinator.com/item?id=20542915)
[google/nixery](https://github.com/google/nixery)
## IaC
[Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli)
[Chef: Enabling the Coded Enterprise through Infrastructure, Security and Application Automation](https://www.chef.io)
[Powerful infrastructure automation and delivery | Puppet](https://puppet.com)
[Ansible is Simple IT Automation](https://www.ansible.com)