Personal project to learn about DevOps.
It will be focusing on discovering the different tools from DevOps methodology by using them into a specific project.
This project is supposed to progress by small step from a .
(source: orangematter)
- Create Linux VM on M1 MacBook using UTM / Ubuntu
- Download Ubuntu Server iso for ARM (https://ubuntu.com/download/server/arm)
- Install Ubuntu on M1 using UTM (https://docs.getutm.app/guides/ubuntu/)
- Change GUI to fix Firefox problem (https://techblog.shippio.io/how-to-run-an-ubuntu-22-04-vm-on-m1-m2-apple-silicon-9554adf4fda1)
- Change ubuntu keyboard to map French Macintosh keyboard with Option key for
|,~,[,],... - Map Command key to CMD + C and CMD + V (https://askubuntu.com/a/1073790)
- Install necessary package (Git, Python 3.10/3.11, ...)
- Install Pycharm Community for Linux ARM
- Download Pycharm Community (https://www.jetbrains.com/pycharm/)
- Add Pycharm to Favorites (https://askubuntu.com/questions/391439/how-can-i-set-up-pycharm-to-launch-from-the-launcher)
- Setup and use AI collaborator (Github Collaborator, Codeium, ...)
- Create SSH Key and add it to GitHub (https://docs.github.com/en/enterprise-server@3.6/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent?platform=linux)
- Create basic website following official documentation (https://docs.djangoproject.com/en/4.2/)
- Use PostgreSQL
- Install self-hosted runner (https://github.com/tpemeja/DevOps/settings/actions/runners/new?arch=arm64&os=linux)
- Fix python installation in Runner for Ubuntu-ARM64 (actions/setup-python#678 (comment))
- Change python installtion to deadsnakes/action@v3.0.1 (https://github.com/deadsnakes/action)
- Possibly have to do
sudo apt --fix-broken install -ybefore installation (once) - Create basic Pylint CI action
- Install venv with requirements
- Use pylint with venv (
python $(which pylint)) - Use environment variables in self-hosted runner with $TEST (Modify
.env[TEST=test] and restart runner) - Define environment variables in GitHub Action ${{vars.$TEST}} (Add variable in
github.com/PROJECT_NAME/settings/variables/actions, for more information GitHub Documentation - Use
actto test GitHub Actions locally (https://github.com/nektos/act) - Use
pytestfor additional testing - Create functional and unit testing
- Create Git Hooks for local development (https://www.hostinger.com/tutorials/how-to-use-git-hooks/ and change location
git config core.hooksPath hooks)
4. Create and use containers (https://semaphoreci.com/community/tutorials/dockerizing-a-python-django-web-application, https://github.com/dnaprawa/dockerfile-best-practices#always-use-copy-instead-of-add-there-is-only-one-exception)
- Install Docker (https://docs.docker.com/engine/install/ubuntu/#install-from-a-package)
- Add user to docker group (
sudo usermod -aG docker ${USER} && su - $USER) - Generate Django Docker image (https://learndjango.com/tutorials/django-docker-and-postgresql-tutorial)
- Fix docker socket issues (https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket)
- Use Docker during GitHub Action
- Use rootless Docker for locally and for GitHub actions
- Automatically push Docker images on Docker Hub (The tag must match https://forums.docker.com/t/docker-push-error-requested-access-to-the-resource-is-denied/64468/7)
- Also use Podman
- Deploy locally
- Create and use docker-compose.yml
- Use docker command
- Deploy on NAS
- Configure Network with VPN
- Secure SSH
- Create container
- Access website
- Deploy on AWS
- Use Kubernetes
- ...