Name: Aayusha Regmi
This project demonstrates a simple DevOps workflow using GitHub and Linux basics. For task 1, the hello.py script was made executable and run as part of the initial repository setup.
Made script executable with:
chmod +x ./hello.pyOutput:
Created scripts/sysinfo.sh to print the current user, current date, and disk usage.
Run:
chmod +x ./scripts/sysinfo.sh
./scripts/sysinfo.shOutput:
Installed Docker with:
sudo apt update
sudo apt install -y docker.ioChecked Docker status with:
sudo systemctl status dockerAllowed the current user to run Docker without sudo:
sudo usermod -aG docker $USER
newgrp dockerBuilt and ran the container with:
docker build -t devops-hello .
docker run --rm devops-helloOutput:
Created .github/workflows/ci.yml to run python hello.py automatically on every push.
Output:
Click the badge to view the most recent pipeline run in GitHub Actions.
Created nomad/hello.nomad to run the Docker container as a Nomad service job with minimal CPU and memory.
Install Nomad:
sudo apt update
sudo apt install -y unzip
curl -fsSL https://releases.hashicorp.com/nomad/1.9.0/nomad_1.9.0_linux_amd64.zip -o nomad.zip
unzip nomad.zip
sudo mv nomad /usr/local/bin/
nomad versionRun:
nomad job run nomad/hello.nomadCheck status:
sudo systemctl status nomad
nomad job status helloOutput:
Started Loki locally with Docker and viewed logs from the container or Nomad allocation.
See monitoring/loki_setup.txt for the setup command and log viewing commands.
Output:
docker ps
curl http://localhost:3100/ready
docker logs promtail
sudo docker run --rm hello-image:latestScreenshot:




