From edce958dc312e72050d1e282fa7fd41ad3a66719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Tue, 13 Jan 2026 12:09:02 +0100 Subject: [PATCH] Obisidian vault auto-backup: 13-01-2026 12:09:02 on . 1 files edited --- .../CIPA4/Cloud Computing Cours 2.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ISEN/Cloud Computing/CIPA4/Cloud Computing Cours 2.md b/ISEN/Cloud Computing/CIPA4/Cloud Computing Cours 2.md index f29c51b..0a2d0c0 100644 --- a/ISEN/Cloud Computing/CIPA4/Cloud Computing Cours 2.md +++ b/ISEN/Cloud Computing/CIPA4/Cloud Computing Cours 2.md @@ -80,15 +80,26 @@ http://169.254.169.254/openstack/2012-08-10/user_data ```bash #!/bin/bash +# Setup logging +exec > >(tee -a /var/log/postinstall.log) 2>&1 + +echo "Starting post-installation setup..." sudo apt update -sudo apt install -y python3-pip git +echo "Installing dependencies..." +sudo apt install -y python3-pip python3-venv git +echo "Cloning repository..." git clone https://github.com/arnaudmorin/demo-flask.git /home/debian/demo-flask -pip3 install -r /home/debian/demo-flask/requirements.txt +echo "Creating virtual environment..." +python3 -m venv /home/debian/demo-flask/venv -nohup /home/debian/demo-flask/start.sh & +echo "Installing Python requirements..." +/home/debian/demo-flask/venv/bin/pip install -r /home/debian/demo-flask/requirements.txt -echo "Hello from my instance" > /var/log/postinstall.log +echo "Starting the application..." +nohup bash -c "source /home/debian/demo-flask/venv/bin/activate && /home/debian/demo-flask/start.sh" & + +echo "Setup complete." ``` \ No newline at end of file