<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Marouane Louguid on Medium]]></title>
        <description><![CDATA[Stories by Marouane Louguid on Medium]]></description>
        <link>https://medium.com/@marouanetester?source=rss-98e88e1711b9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*875W8I9YH3kSm-JlbdXd7w@2x.jpeg</url>
            <title>Stories by Marouane Louguid on Medium</title>
            <link>https://medium.com/@marouanetester?source=rss-98e88e1711b9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 14:12:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marouanetester/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tuning PHP-FPM: Keep Your PHP Apps Fast Under Load]]></title>
            <link>https://medium.com/@marouanetester/tuning-php-fpm-keep-your-php-apps-fast-under-load-0962e2616468?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/0962e2616468</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Tue, 10 Feb 2026 15:32:03 GMT</pubDate>
            <atom:updated>2026-02-11T11:05:44.439Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wXqlDwe4be03fUwTl_eTaQ.png" /></figure><p>High traffic can easily overwhelm PHP applications when configurations aren’t optimized. In this guide, I’ll show you how smart tuning keeps performance stable and response times low, even under heavy load.</p><p>Github : <a href="https://github.com/mlouguid/php-ansible">mlouguid/php-ansible</a></p><h3>What is PHP-FPM?</h3><p>PHP-FPM (FastCGI Process Manager) is a service that runs PHP scripts on Linux servers. It manages pools of PHP processes and handles request concurrency more efficiently than traditional mod_php implementations.</p><h3>How PHP-FPM Works</h3><p>The request flow follows this pattern:</p><ol><li><strong>Nginx receives the request</strong> from the client</li><li><strong>Nginx passes PHP requests to PHP-FPM</strong> via FastCGI protocol</li><li><strong>PHP-FPM assigns the request</strong> to an available PHP worker</li><li><strong>PHP worker executes</strong> the PHP script</li><li><strong>PHP-FPM sends output</strong> back to Nginx, which returns it to the client</li></ol><pre>Request → Nginx → PHP-FPM → PHP Worker → Application</pre><h3>Why Tuning Matters</h3><p>Without proper configuration, your PHP application can quickly become overwhelmed under high traffic. The key is finding the right balance between available system resources and the number of PHP workers you run. Too few workers and requests will queue up; too many and you’ll run out of memory, causing the system to swap and performance to degrade.</p><h3>Calculating PHP-FPM Workers Based on Available Memory</h3><h3>Step 1: Estimate Memory per PHP Process</h3><p>The memory footprint of each PHP process varies depending on your application. A typical PHP process uses between 50MB and 150MB. For calculation purposes, let’s assume <strong>100MB per process</strong>.</p><p>You can check your actual memory usage with:</p><pre>ps aux | grep php-fpm | awk &#39;{sum+=$6} END {print sum/NR/1024 &quot; MB average&quot;}&#39;</pre><h3>Step 2: Calculate Maximum Workers</h3><p>Use this formula:</p><pre>Max Workers = (Total RAM - Reserved RAM) ÷ Memory per Process</pre><p><strong>Example: Server with 8GB RAM</strong></p><ul><li><strong>Total RAM:</strong> 8GB</li><li><strong>Reserved RAM:</strong> 2GB (for OS, Nginx, cache, etc.)</li><li><strong>Available for PHP:</strong> 6GB (~6000MB)</li><li><strong>Memory per process:</strong> 100MB</li><li><strong>Max workers:</strong> 6000MB ÷ 100MB = <strong>60 workers</strong></li></ul><p>It’s recommended to keep around 20% or more of total RAM reserved for system cache and other services.</p><h3>Step 3: Configure php.ini</h3><p>Set the memory limit for each PHP process in your php.ini file:</p><pre># Location: /etc/php/8.x/fpm/php.ini<br>memory_limit = 512M</pre><h3>Step 4: Configure PHP-FPM Pool</h3><p>Edit your PHP-FPM pool configuration:</p><pre># Location: /etc/php/8.x/fpm/pool.d/www.conf<br>pm = dynamic<br>pm.max_children = 60<br>pm.start_servers = 15<br>pm.min_spare_servers = 10<br>pm.max_spare_servers = 20<br>pm.max_requests = 500</pre><p><strong>Configuration breakdown:</strong></p><ul><li>pm.max_children: Maximum number of child processes (use your calculated value)</li><li>pm.start_servers: Number of processes created on startup</li><li>pm.min_spare_servers: Minimum idle processes</li><li>pm.max_spare_servers: Maximum idle processes</li><li>pm.max_requests: Number of requests each child process serves before respawning (helps prevent memory leaks)</li></ul><h3>Scaling for Larger Servers</h3><p><strong>16GB RAM Server Example:</strong></p><ul><li><strong>Total RAM:</strong> 16GB</li><li><strong>Reserved RAM:</strong> 2GB</li><li><strong>Available RAM:</strong> 14GB</li><li><strong>Memory per process:</strong> 256MB (if your app uses more memory)</li><li><strong>Max workers:</strong> 14GB ÷ 256MB ≈ <strong>56 workers</strong></li></ul><p><strong>32GB RAM Server Example:</strong></p><ul><li><strong>Total RAM:</strong> 32GB</li><li><strong>Reserved RAM:</strong> 4GB</li><li><strong>Available RAM:</strong> 28GB</li><li><strong>Memory per process:</strong> 256MB</li><li><strong>Max workers:</strong> 28GB ÷ 256MB ≈ <strong>109 workers</strong></li></ul><h3>Applying Your Configuration</h3><p>After making changes to your PHP-FPM configuration, reload the service:</p><pre>sudo systemctl reload php8.3-fpm</pre><p>Or restart it if you’ve made significant changes:</p><pre>sudo systemctl restart php8.3-fpm</pre><h3>Monitoring and Testing Under Real Traffic</h3><p>Configuration is not a one-time task. You need to continuously monitor your system and adjust based on real-world traffic patterns.</p><h3>Recommended Monitoring Tools</h3><p><strong>Real-time Process Monitoring:</strong></p><ul><li>htop - Monitor CPU, RAM, and load in real-time</li><li>watch -n 1 &#39;ps aux | grep php-fpm&#39; - Watch PHP-FPM processes</li></ul><p><strong>Metrics and Visualization:</strong></p><ul><li><strong>Prometheus + Grafana</strong> — Collect and visualize metrics over time</li><li>Track: request rate, response time, memory usage, active workers</li></ul><p><strong>Log Analysis:</strong></p><ul><li><strong>Elastic Stack (ELK)</strong> — Centralized logging for error analysis</li><li>Monitor: slow requests, fatal errors, memory exhaustion</li></ul><h3>Key Metrics to Watch</h3><ol><li><strong>Active Workers vs. Max Workers</strong> — If you’re consistently hitting max, you need more capacity</li><li><strong>Memory Usage</strong> — Ensure you’re not swapping</li><li><strong>Request Queue</strong> — Long queues indicate insufficient workers</li><li><strong>Response Times</strong> — Increasing times may indicate resource constraints</li></ol><h3>Best Practices Summary</h3><ol><li><strong>Start conservative</strong> — Begin with calculated values and adjust based on monitoring</li><li><strong>Reserve adequate RAM</strong> — Always keep 20–25% of RAM for system and cache</li><li><strong>Monitor memory per process</strong> — Your actual usage may differ from estimates</li><li><strong>Use dynamic mode</strong> — Allows PHP-FPM to scale workers based on demand</li><li><strong>Set max_requests</strong> — Prevents memory leaks from accumulating</li><li><strong>Test under load</strong> — Use tools like Apache Bench or siege to simulate traffic</li><li><strong>Iterate and optimize</strong> — Continuously adjust based on real metrics</li></ol><h3>Conclusion</h3><p>Properly tuning PHP-FPM is essential for maintaining fast, reliable PHP applications under load. By understanding your available resources, calculating appropriate worker counts, and continuously monitoring your system, you can ensure optimal performance even during traffic spikes.</p><p>Remember: configuration is not set-and-forget. As your application grows and traffic patterns change, revisit your PHP-FPM settings to ensure they still meet your needs.</p><p><em>Have questions? Feel free to reach out or leave a comment below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0962e2616468" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[App php-laravel , Postgres, Nginx, Redis, Deployment: Guide to Docker, K8s, and GitHub Actions…]]></title>
            <link>https://medium.com/@marouanetester/app-php-laravel-postgres-nginx-redis-deployment-guide-to-docker-k8s-and-github-actions-49f5c586e5c0?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/49f5c586e5c0</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 09:29:31 GMT</pubDate>
            <atom:updated>2026-01-28T09:29:31.568Z</atom:updated>
            <content:encoded><![CDATA[<h3>App php-laravel , Postgres, Nginx, Redis, Deployment: Guide to Docker, K8s, and GitHub Actions CI/CD “Goku”</h3><p>🚀 <strong>Repo </strong><a href="https://github.com/mlouguid/Gogo"><strong>Github</strong></a></p><p><strong>Goku v1.1 </strong>is the standard development environment used to deploy your app locally or in production, with minimal resource usage to optimize your infrastructure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*cBWkaWiUN1X1EEDN.png" /></figure><p>This quick article walks through how we containerized our app with a clean and efficient Docker setup — featuring NGINX, PHP, Redis, and PostgreSQL, all running seamlessly on Containers.</p><p>This time we decided to use Docker and k8s The Right Way: only one element per container…</p><h3>🧱 Project Requirements</h3><p>• Containerized application using PHP, Nginx, PostgreSQL, and Redis<br>• Simple PHP application code for demonstration<br>• CI/CD setup using GitHub Actions<br>• Deployment to Kubernetes (K8s)</p><h3>🧱 The web container — Nginx &amp; Software Collections</h3><p>• NGINX handles the static files and routing.<br>• PHP runs our backend logic.<br>• PostgreSQL takes care of our persistent data.<br>• Redis supports session caching and fast key-value magic.</p><p>Wekept the architecture modular and efficient. Each service is built into its own container with a carefully crafted Dockerfile, making the environment clean, easy to maintain, and ready to scale. Instead of relying on a local-only setup, we build our images and push them to Docker Hub, ensuring consistency across environments. In the next sections, we’ll walk through how each container is built and deployed, how the configuration stays clean, and how everything ties together in our CI/CD pipeline.<br>Let’s dive in. 🚀</p><h3>📦 Project Structure</h3><pre>├── docker-compose.yaml<br>└── app-php/   # your-project<br>│    ├── public/<br>│    │   └── index.php<br>│    ├── src/<br>│    ├── composer.json<br>│    ├── Dockerfile<br>│    ├── .env<br>│<br>├── database<br>│   └── postgres<br>│       ├── Dockerfile<br>│       ├── .env<br>│       └── init.sql<br>│ <br>├── nginx<br>│   ├── beta.conf<br>│   ├── Dockerfile<br>│   ├── .env<br>│   └── fastcgi_params<br>│ <br>└── redis<br>    ├── Dockerfile<br>    ├── .env<br>    └── redis.conf</pre><h3>🚀 To get started quickly, just follow these steps:</h3><p>💡<strong> Note:</strong> Before starting the project locally, make sure you have Docker Desktop and Docker Compose installed on your system.</p><ul><li>Install Docker &amp; Docker Compose on <a href="https://docs.docker.com/desktop/setup/install/mac-install/">macOS</a></li><li>Install Docker &amp; Docker Compose on <a href="https://docs.docker.com/desktop/install/windows-install/">Windows</a></li></ul><p>Once installed, you’re ready to spin up the environment locally.</p><ul><li><strong>Clone the repository “Goku”</strong></li></ul><pre>git clone https://github.com/mlouguid/Goku.git</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6PvpNus3yl9wJzlX.png" /></figure><ul><li><strong>Navigate into the project directory</strong></li></ul><pre>cd Goku</pre><ul><li><strong>Start the local environment with Docker Compose</strong></li></ul><pre>docker-compose up -d</pre><h3><strong>🧭 Goku K8s</strong></h3><h4>📦 shema</h4><pre>kubernetes<br>k8s<br>│   ├── deployments<br>│   │   ├── postgres.yaml  <br>│   │   ├── nginx.yaml<br>│   │   ├── php.yaml<br>│   │   └── redis.yaml<br>│   ├── pvc<br>│   │   ├── postgres_pv.yaml   <br>│   │   └── postgres_pvc.yaml <br>│   ├── secrets<br>│   │   └── postgres_secrets.yaml  <br>│   └── services<br>│       ├── postgres_service.yaml <br>│       ├── nginx_service.yaml<br>│       ├── php_service.yaml<br>│       └── redis_service.yaml</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/0*UWK0_RbxkuQmLlP9.png" /></figure><ul><li><strong>Deploy to Kubernetes</strong></li></ul><pre>kubectl apply -R -f kubernetes/k8s</pre><p>🚀 <strong>Repo </strong><a href="https://github.com/mlouguid/Gogo"><strong>Github</strong></a><strong> : </strong>Feel free to open an issue for any problems you encounter happy testing 😁!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49f5c586e5c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Set Up — PostgreSQL Role Ansible]]></title>
            <link>https://medium.com/@marouanetester/set-up-postgresql-role-ansible-534e549ed57b?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/534e549ed57b</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[ansible]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Tue, 11 Nov 2025 09:29:38 GMT</pubDate>
            <atom:updated>2026-01-28T09:22:58.053Z</atom:updated>
            <content:encoded><![CDATA[<h3>PostgreSQL Role Ansible</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mnkKxpunuinGKfUt.jpg" /></figure><p>Github : <a href="https://github.com/mlouguid/ansible-role-postgresql">https://github.com/mlouguid/ansible-role-postgresql</a></p><p>→ Git Clone the repository and follow the steps…</p><pre>git clone https://github.com/mlouguid/ansible-role-postgresql<br><br>cd ansible-role-postgresql</pre><h3>ansible-role-postgresql</h3><p>Installs and configures PostgreSQL server on Debian/Ubuntu servers</p><h3>Role Variables</h3><p>Available variables are listed on, (defaults/main.yml):</p><pre>postgresql_version: 15<br>postgresql_listen_addresses: &#39;*&#39;<br>postgresql_port: 5432<br>postgresql_admin_user: <br>postgresql_admin_password: &quot;&quot;<br>postgresql_db_name: <br>postgresql_db_user: <br>postgresql_db_password: &quot;&quot;</pre><h3>Playbook</h3><p>PI: run it in a playbook with a global become: yes</p><pre>- hosts: database<br>  roles:<br>    - role: postgresql<br>      become: yes</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=534e549ed57b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ansible: What It Is and Why You Need It ?!]]></title>
            <link>https://medium.com/@marouanetester/ansible-what-it-is-and-why-you-need-it-853f2a5f5f17?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/853f2a5f5f17</guid>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[vmware]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 14:57:50 GMT</pubDate>
            <atom:updated>2025-07-10T09:23:38.223Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Ansible: What It Is and Why You Need It ?! </strong>How it Works !</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*UdFVZbu0XkXEd-vX.png" /></figure><h3>🔧 What is Ansible:</h3><p>Ansible is an open-source automation tool used for configuration management, application deployment, and infrastructure provisioning.</p><h3>⚙️ Why Do We Need Ansible Configuration?</h3><p>Ansible is agentless, simple, and declarative , but it still needs to know how you want it to work. That’s where the configuration helps.</p><h3>🧠 Why Does It Matter?</h3><p>Ansible won’t guess:<br> • Which inventory to use<br> • How to connect to hosts (SSH, user, key)<br> • What plugins or output you prefer<br> • Whether to use sudo</p><p>Configuration makes your automation clear and reliable.</p><h3>🧭 Introduction to Ansible and Configuration</h3><p>Ansible is a powerful automation tool that enables IT teams to manage infrastructure as code in a simple, agentless way. While writing playbooks and roles is at the heart of Ansible usage, it’s the Ansible configuration that controls how Ansible behaves during execution.</p><h3>🔹Where is Configuration Defined?</h3><p>Ansible reads its configuration from a file named <strong>ansible.cfg</strong>, but that file can exist in multiple locations. Ansible uses a well-defined order of precedence to decide which configuration to load, making it highly flexible.</p><h3>🔹 Key Features:</h3><p>Agentless: No need to install software on target machines (uses SSH).<br>Simple Syntax: Uses YAML-based files called Playbooks.<br>Idempotent: Ensures the same result even if run multiple times.<br>Cross-platform: Works on Linux, Windows, cloud, and on-premises systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CgmaJDMciwbOg4Zv.png" /></figure><h3>🔹<strong>structure Ansible</strong></h3><ul><li>an <strong>inventory</strong></li><li>a <strong>role structure</strong></li><li>an example ansible.cfg</li></ul><h4>Example Ansible Infra Structure</h4><pre>infra-ansible/<br>├── ansible.cfg<br>├── inventory/<br>│   ├── hosts<br>│   └── group_vars/<br>│       ├── all.yml<br>│       └── webservers.yml<br>├── playbooks/<br>│   ├── site.yml<br>│   └── deploy.yml<br>└── roles/<br>    ├── common/<br>    │   ├── tasks/<br>    │   │   └── main.yml<br>    │   ├── handlers/<br>    │   │   └── main.yml<br>    │   ├── templates/<br>    │   │   └── motd.j2<br>    │   └── files/<br>    │       └── example.conf<br>    └── webserver/<br>        ├── tasks/<br>        │   └── main.yml<br>        ├── handlers/<br>        │   └── main.yml<br>        ├── templates/<br>        │   └── nginx.conf.j2<br>        └── files/<br>            └── index.html</pre><h4>🔧 Sample ansible.cfg</h4><pre>[defaults]<br>inventory = ./inventory/hosts<br>roles_path = ./roles</pre><h4>📋 Sample Inventory (inventory/hosts)</h4><pre>all:<br>  children:<br>    webservers:<br>      hosts:<br>        web1.example.com:<br>          ansible_host: 20.20.20.1<br>          ansible_python_interpreter: &quot;/usr/bin/python3&quot;<br>          ansible_user: &quot;root&quot;<br>        web2.example.com:<br>          ansible_host:20.20.20.2<br>          ansible_python_interpreter: &quot;/usr/bin/python3&quot;<br>          ansible_user: &quot;root&quot;<br>    dbservers:<br>      hosts:<br>        db1.example.com:<br>          ansible_host:20.20.20.3<br>          ansible_python_interpreter: &quot;/usr/bin/python3&quot;<br>          ansible_user: &quot;root&quot;<br><br>📌 # should you have access to the servers hosts via ssh </pre><h3>🔹<strong>basic and useful Ansible commands</strong></h3><pre># Check if hosts are reachable<br>ansible all -m ping<br><br># Run a playbook<br>ansible-playbook site.yml<br><br># check what would change without actually changing<br>ansible-playbook site.yml --check<br><br># See your inventory<br>ansible-inventory --list -y<br><br># Test a specific host &quot;webservers&quot;<br>ansible webserver1 -m ping</pre><h3>🔹A<strong>dvanced and very practical Ansible commands</strong></h3><pre>#  Limit execution to specific hosts or groups<br>ansible-playbook site.yml --limit=webservers<br><br># Run with tags &quot;define/skip&quot;<br># Define tags in your playbook <br>ansible-playbook site.yml --tags &quot;setup&quot;<br><br># skip some tags:<br>ansible-playbook site.yml --skip-tags &quot;restart&quot;<br><br># Use a custom inventory<br>ansible-inventory -i inventory/env/hosts<br><br># Verbose output &quot;See more details&quot;:<br>ansible-playbook site.yml -v       # verbose<br>ansible-playbook site.yml -vv      # more verbose<br>ansible-playbook site.yml -vvv     # even more<br>ansible-playbook site.yml -vvvv    # debug connection details<br><br># Start from a specific task<br>ansible-playbook site.yml --start-at-task=&quot;Install mariadb&quot;</pre><h3>🔄 CI/CD &amp; Automation:</h3><blockquote><em>We can use and run Ansible in Jenkins, GitLab, or AWX pipelines to build, test, and deploy our applications.</em></blockquote><ul><li>Use Ansible to define and run what to deploy.</li><li>Use AWX/Tower to manage and schedule Ansible tasks at scale.</li><li>Use Jenkins to build, test, and trigger Ansible deployments.</li></ul><p>✅ This is just a basic test/example, If you need more advanced information, you can check the official <a href="https://docs.ansible.com/">Ansible community documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=853f2a5f5f17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step Monitoring with Prometheus Exporters Using Ansible]]></title>
            <link>https://medium.com/@marouanetester/step-by-step-monitoring-with-prometheus-exporters-using-ansible-f82dd195033e?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f82dd195033e</guid>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[exporters]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[prometheus]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Fri, 16 May 2025 09:37:07 GMT</pubDate>
            <atom:updated>2025-05-21T10:25:39.602Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy Prometheus Exporter using ansible</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*saNfQwd6ZiXv5bJIKuL90Q.png" /></figure><p><strong>Why Monitoring Matters and How to Make It Easier ?!!</strong></p><p>To keeping an eye on your infrastructure is essential for running reliable systems. If you’re using Prometheus, you probably know how time-consuming it can be to manually set up exporters on every server. But there’s good news the <strong>ansible-prometheus-exporters</strong> collection makes this job much easier.</p><h3>🛠️<strong> What Is It?</strong></h3><p>🐰<a href="https://github.com/mlouguid/ansible-prometheus-exporters"><strong>mlouguid/ansible-prometheus-exporters</strong></a><strong> </strong>is a flexible and actively maintained Ansible collection designed to automate the installation and configuration of popular Prometheus exporters.</p><p>This repository contains an Ansible playbook to automate the installation and configuration of various Prometheus exporters on Linux servers.</p><h3>🚀 Supported Exporters</h3><pre>• Node Exporter (System metrics)<br>• NGINX Exporter (NGINX metrics)<br>• MySQL Exporter (MySQL/MariaDB metrics)<br>• Logstash Exporter (Logstash performance metrics)<br>• PHP Exporter (PHP-FPM metrics)<br>• Elasticsearch Exporter (Elasticsearch cluster metrics)<br>• InfluxDB Exporter (InfluxDB monitoring)<br>• Redis Exporter (Redis database monitoring)</pre><h3>📂 Directory Structure</h3><pre>├── ansible<br>│   ├── inventories/<br>│   │   ├── local<br>│   ├── roles/<br>│   │   ├── node_exporter/<br>│   │   ├── nginx_exporter/<br>│   │   ├── mysql_exporter/<br>│   │   ├── logstash_exporter/<br>│   │   ├── php_exporter/<br>│   │   ├── elasticsearch_exporter/<br>│   │   ├── influxdb_exporter/<br>│   │   ├── redis_exporter/<br>│   ├── exporters_playbook.yml<br>│   ├── ansible.cfg</pre><h3>🛠 Prerequisites</h3><p>• Install Ansible (pip install ansible)<br>• SSH access to target servers<br>• Sudo privileges on remote machines</p><h3>🎯 Installation &amp; Deployment</h3><p>Clone the repository:</p><pre>git clone https://github.com/mlouguid/ansible-prometheus-exporters.git<br>cd ansible-prometheus-exporters<br>ansible-playbook -i inventories/local/hosts exporters_playbook.yml</pre><h3>📊 <strong>Exporters ID Dashboards:</strong></h3><pre>Node Exporter<br>1860<br>NGINX Exporter<br>12708<br>MySQL Exporter<br>7362<br>Logstash Exporter<br>13978<br>PHP-FPM Exporter<br>11378<br>Elasticsearch Exporter<br>4358<br>Redis Exporter<br>763 or 11835</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f82dd195033e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy a PHP web app with Docker & K8s, with NGINX, PHP, and a CI/CD pipeline powered by GitHub…]]></title>
            <link>https://blog.devops.dev/deploy-a-php-web-app-with-docker-k8s-with-nginx-php-and-a-ci-cd-pipeline-powered-by-github-40cf267ee7c1?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/40cf267ee7c1</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 10:10:36 GMT</pubDate>
            <atom:updated>2025-09-21T20:08:44.212Z</atom:updated>
            <content:encoded><![CDATA[<h3>Master App php Deployment: Step-by-Step Guide to Docker, K8s, and GitHub Actions CI/CD “Goku”</h3><p>🚀 <strong>Repo </strong><a href="https://github.com/mlouguid/Gogo"><strong>Github</strong></a></p><p><strong>Goku v1.1 </strong>is the standard development environment used to deploy your app locally or in production, with minimal resource usage to optimize your infrastructure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*dx8h_7-cegcnqVeTQmeKVQ.png" /></figure><p>This quick article walks through how we containerized our app with a clean and efficient Docker setup — featuring NGINX, PHP, Redis, and PostgreSQL, all running seamlessly on Containers.</p><p>This time we decided to use Docker and k8s The Right Way: only one element per container…</p><h4>🧱 Project Requirements</h4><p>• Containerized application using PHP, Nginx, PostgreSQL, and Redis<br>• Simple PHP application code for demonstration<br>• CI/CD setup using GitHub Actions<br>• Deployment to Kubernetes (K8s)</p><h4>🧱 The web container — Nginx &amp; Software Collections</h4><p>• NGINX handles the static files and routing.<br> • PHP runs our backend logic.<br> • PostgreSQL takes care of our persistent data.<br> • Redis supports session caching and fast key-value magic.</p><p>We kept the architecture modular and efficient. Each service is built into its own container with a carefully crafted Dockerfile, making the environment clean, easy to maintain, and ready to scale. Instead of relying on a local-only setup, we build our images and push them to Docker Hub, ensuring consistency across environments. In the next sections, we’ll walk through how each container is built and deployed, how the configuration stays clean, and how everything ties together in our CI/CD pipeline.<br>Let’s dive in. 🚀</p><h4>📦 Project Structure</h4><pre>├── docker-compose.yaml<br>└── app-php/   # your-project<br>│    ├── public/<br>│    │   └── index.php<br>│    ├── src/<br>│    ├── composer.json<br>│    ├── Dockerfile<br>│    ├── .env<br>│<br>├── database<br>│   └── postgres<br>│       ├── Dockerfile<br>│       ├── .env<br>│       └── init.sql<br>│ <br>├── nginx<br>│   ├── beta.conf<br>│   ├── Dockerfile<br>│   ├── .env<br>│   └── fastcgi_params<br>│ <br>└── redis<br>    ├── Dockerfile<br>    ├── .env<br>    └── redis.conf  </pre><h4>🚀 To get started quickly, just follow these steps:</h4><p>💡<strong> Note:</strong> Before starting the project locally, make sure you have Docker Desktop and Docker Compose installed on your system.</p><ul><li>Install Docker &amp; Docker Compose on <a href="https://docs.docker.com/desktop/setup/install/mac-install/">macOS</a></li><li>Install Docker &amp; Docker Compose on <a href="https://docs.docker.com/desktop/install/windows-install/">Windows</a></li></ul><p>Once installed, you’re ready to spin up the environment locally.</p><ul><li><strong>Clone the repository “Goku”</strong></li></ul><pre>git clone https://github.com/mlouguid/Goku.git</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lAqlHPZH0Ea4f4UgEjgjtQ.png" /></figure><ul><li><strong>Navigate into the project directory</strong></li></ul><pre>cd Goku</pre><ul><li><strong>Start the local environment with Docker Compose</strong></li></ul><pre>docker-compose up -d</pre><p><strong>🧭 Goku K8s</strong></p><h4>📦 shema</h4><pre>kubernetes<br>k8s<br>│   ├── deployments<br>│   │   ├── postgres.yaml  <br>│   │   ├── nginx.yaml<br>│   │   ├── php.yaml<br>│   │   └── redis.yaml<br>│   ├── pvc<br>│   │   ├── postgres_pv.yaml   <br>│   │   └── postgres_pvc.yaml <br>│   ├── secrets<br>│   │   └── postgres_secrets.yaml  <br>│   └── services<br>│       ├── postgres_service.yaml <br>│       ├── nginx_service.yaml<br>│       ├── php_service.yaml<br>│       └── redis_service.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*BepQmNaruWt0eN6OpzxC1g.png" /></figure><ul><li><strong>Deploy to Kubernetes</strong></li></ul><pre>kubectl apply -R -f kubernetes/k8s</pre><p>🚀 <strong>Repo </strong><a href="https://github.com/mlouguid/Gogo"><strong>Github</strong></a><strong> : </strong>Feel free to open an issue for any problems you encounter happy testing 😁!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40cf267ee7c1" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/deploy-a-php-web-app-with-docker-k8s-with-nginx-php-and-a-ci-cd-pipeline-powered-by-github-40cf267ee7c1">Deploy a PHP web app with Docker &amp; K8s, with NGINX, PHP, and a CI/CD pipeline powered by GitHub…</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up Replication in MySQL “db-slave”]]></title>
            <link>https://medium.com/@marouanetester/mysql-db-replication-master-slave-db-v5-7-v8-x-x-1687b2826844?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1687b2826844</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[replication]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Wed, 12 Mar 2025 16:06:03 GMT</pubDate>
            <atom:updated>2025-05-14T10:27:29.837Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_xGlbNsvbAbkL2wS.png" /></figure><h3>How to set up Database Master-Slave Replication</h3><p>Database replication is a crucial technique for ensuring high availability, fault tolerance, and improved performance of database systems. In this article, we’ll explore the master-slave replication architecture, how it works, its benefits, challenges, and best practices for implementation.</p><h3>What is Master-Slave Replication?</h3><p>Master-slave replication (also known as primary-replica replication) is a database architecture where one database server acts as the master (primary) while one or more other database servers act as slaves (replicas). The master database processes all write operations (INSERT, UPDATE, DELETE) while slaves replicate the data from the master and typically handle read operations.</p><h3>How Master-Slave Replication Works</h3><h3>The Replication Process</h3><ol><li><strong>Binary Log Recording</strong>: The master records all changes to its data in a binary log file.</li><li><strong>Log Transfer</strong>: The slave connects to the master and requests all binary log events that it hasn’t yet processed.</li><li><strong>Relay Log</strong>: The slave stores the binary log events from the master in its relay log.</li><li><strong>SQL Thread Execution</strong>: A dedicated SQL thread on the slave reads events from the relay log and applies them to its local database.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c6BlD4wXLsml4jFp.png" /></figure><h3>Configuration MySQL Master-Slave Replication</h3><p>This step-by-step guide will walk you through setting up MySQL master-slave replication. I’ll focus on MySQL as it’s one of the most commonly used database systems, but the concepts apply to many other database platforms with some syntax differences.</p><h3>Prerequisites</h3><ul><li>Two MySQL server instances (one for master, one for slave)</li><li>Root or administrative access to both servers</li><li>Network connectivity between the servers</li><li>MySQL version 5.7+ (examples use MySQL 8.0 syntax)</li></ul><h3>S1: Configure the Master Server</h3><h3>1.1 Edit the MySQL Configuration File</h3><p>On the master server, edit the MySQL configuration file (/etc/mysql/my.cnf or /etc/my.cnf):</p><pre>[mysqld]<br>server-id = 1<br>log_bin = /var/log/mysql/mysql-bin.log<br>binlog_format = ROW<br>binlog_expire_logs_seconds = 604800<br>sync_binlog = 1<br>innodb_flush_log_at_trx_commit = 1</pre><h3>1.2 Restart MySQL Service</h3><pre>sudo systemctl restart mysql</pre><h3>1.3 Create Replication User</h3><p>Log in to MySQL as root:</p><pre>mysql -u root -p</pre><pre>CREATE USER &#39;replication_user&#39;@&#39;%&#39; IDENTIFIED BY &#39;strong_password&#39;;<br>GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO &#39;replication_user&#39;@&#39;%&#39;;<br>FLUSH PRIVILEGES;</pre><h3>1.4 Get Binary Log Position</h3><p>While still in the MySQL console, run:</p><pre>SHOW MASTER STATUS;</pre><pre>+------------------+----------+--------------+------------------+-------------------+<br>| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |<br>+------------------+----------+--------------+------------------+-------------------+<br>| mysql-bin.000003 | 1234     |              |                  |                   |<br>+------------------+----------+--------------+------------------+-------------------+</pre><h3>S2: Take a Snapshot of the Master Database</h3><p>If you’re setting up replication for an existing database, you need to create a consistent snapshot:</p><h3>2.1 Lock Tables and Get Binary Log Position</h3><pre>FLUSH TABLES WITH READ LOCK;<br>SHOW MASTER STATUS;</pre><h3>2.2 Create a Backup</h3><p>In a new terminal (keep the MySQL console open with the lock in place)</p><pre>mysqldump -u root -p --all-databases --master-data=2 &gt; master_dump.sql</pre><h3>2.3 Release the Lock</h3><p>Back in the MySQL console:</p><pre>UNLOCK TABLES;<br>EXIT;</pre><h3>2.4 Transfer the Dump File to Slave</h3><pre>scp master_dump.sql user@slave_server:/tmp/</pre><h3>S3: Configure the Slave Server</h3><h3>3.1 Edit the MySQL Configuration File</h3><p>On the slave server, edit the MySQL configuration file:</p><pre>[mysqld]<br>server-id = 2<br>relay_log = /var/log/mysql/mysql-relay-bin.log<br>relay_log_purge = 1<br>sync_relay_log = 1<br>sync_relay_log_info = 1<br>sync_master_info = 1<br>read_only = ON<br>skip_slave_start = ON</pre><h3>3.2 Restart MySQL Service</h3><pre>sudo systemctl restart mysql</pre><h3>3.3 Import the Master Database (If you took a snapshot)</h3><pre>mysql -u root -p &lt; /tmp/master_dump.sql</pre><h3>3.4 Configure Replication</h3><p>Log in to MySQL on the slave:</p><pre>mysql -u root -p</pre><p>Configure the slave to connect to the master:</p><pre>CHANGE MASTER TO<br>  MASTER_HOST=&#39;master_server_ip&#39;,<br>  MASTER_USER=&#39;replication_user&#39;,<br>  MASTER_PASSWORD=&#39;strong_password&#39;,<br>  MASTER_LOG_FILE=&#39;mysql-bin.000003&#39;,  -- Use the File value from SHOW MASTER STATUS<br>  MASTER_LOG_POS=1234;                 -- Use the Position value from SHOW MASTER STATUS</pre><p>For MySQL 8.0.23+, you can use the newer syntax:Copy</p><pre>CHANGE REPLICATION SOURCE TO<br>  SOURCE_HOST=&#39;master_server_ip&#39;,<br>  SOURCE_USER=&#39;replication_user&#39;,<br>  SOURCE_PASSWORD=&#39;strong_password&#39;,<br>  SOURCE_LOG_FILE=&#39;mysql-bin.000003&#39;,<br>  SOURCE_LOG_POS=1234;</pre><h3>3.5 Start Replication</h3><pre># MySQL 5.7<br>START SLAVE;<br>#MySQL 8.0.22+<br>START REPLICA;</pre><h3>3.6 Verify Replication Status</h3><pre># MySQL 5.7<br>SHOW SLAVE STATUS\G<br>#MySQL 8.0.22+<br>SHOW REPLICA STATUS\G</pre><p>Look for:</p><ul><li>Slave_IO_Running: Yes</li><li>Slave_SQL_Running: Yes</li><li>No errors in Last_Error field</li></ul><h3>S4: Verify Replication</h3><h3>4.1 Test Replication</h3><p>On the master server:</p><pre>CREATE DATABASE test_replication;<br>USE test_replication;<br>CREATE TABLE sample (id INT, name VARCHAR(50));<br>INSERT INTO sample VALUES (1, &#39;Test Replication&#39;);</pre><p>On the slave server:</p><pre>SELECT * FROM test_replication.sample;</pre><p>You should see the data created on the master.</p><h3>GOOD LUCK 😁</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1687b2826844" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWX on Single Node K3s]]></title>
            <link>https://medium.com/@marouanetester/awx-on-single-node-k3s-c0a9c094922a?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0a9c094922a</guid>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[awx]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 10:04:23 GMT</pubDate>
            <atom:updated>2025-02-13T10:57:08.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7X133s4kCIKcdHYD.jpg" /></figure><h3>Requirements</h3><ul><li>Computing resources</li><li>2 CPUs and 4 GiB RAM minimum.</li></ul><h3>Set up a K3s Kubernetes Cluster on Ubuntu/Debian</h3><p>Install the K3s using the following command.</p><pre>curl -sfL https://get.k3s.io | sh -</pre><p>Verify if it is running or not</p><pre>systemctl status k3s</pre><p>see all Kubernetes objects deployed in the cluster in the kube-system namespace. kubectl is installed automatically during the K3s installation</p><pre>sudo kubectl get all -n kube-system</pre><h3>Install AWX Operator</h3><pre>cd ~<br>git clone https://github.com/kurokobo/awx-on-k3s.git<br>cd awx-on-k3s<br>git checkout 2.19.1</pre><p>Then invoke kubectl apply -k operator to deploy AWX Operator.</p><pre>kubectl apply -k operator</pre><p>The AWX Operator will be deployed to the namespace awx.</p><pre>kubectl -n awx get all</pre><pre>NAME                                                   READY   STATUS    RESTARTS   AGE<br>pod/awx-operator-controller-manager-687b856498-kckzt   2/2     Running   0          16s<br><br>NAME                                                      TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE<br>service/awx-operator-controller-manager-metrics-service   ClusterIP   10.43.150.245   &lt;none&gt;        8443/TCP   16s<br><br>NAME                                              READY   UP-TO-DATE   AVAILABLE   AGE<br>deployment.apps/awx-operator-controller-manager   1/1     1            1           16s<br><br>NAME                                                         DESIRED   CURRENT   READY   AGE<br>replicaset.apps/awx-operator-controller-manager-68d787cfbd   1         1         1       16s</pre><h3>Prepare required files to deploy AWX</h3><p>Generate a Self-Signed certificate.</p><pre>AWX_HOST=&quot;awx.local.com&quot;<br>openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out ./base/tls.crt -keyout ./base/tls.key -subj &quot;/CN=${AWX_HOST}/O=${AWX_HOST}&quot; -addext &quot;subjectAltName = DNS:${AWX_HOST}&quot;</pre><p>Modify hostname in base/awx.yaml.</p><pre>...<br>spec:<br>  ...<br>  ingress_type: ingress<br>  ingress_hosts:<br>    - hostname: awx.local.com   👈👈👈<br>      tls_secret: awx-secret-tls<br>...</pre><p>Modify the two password entries in base/kustomization.yaml.</p><pre>...<br>  - name: awx-postgres-configuration<br>    type: Opaque<br>    literals:<br>      - host=awx-postgres-15<br>      - port=5432<br>      - database=awx<br>      - username=awx<br>      - password=halamadrid<br>      - type=managed<br><br>  - name: awx-admin-password<br>    type: Opaque<br>    literals:<br>      - password=dimakokab  # password awx platform<br>...</pre><p>Prepare directories for Persistent Volumes defined in base/pv.yaml.</p><pre>sudo mkdir -p /data/postgres-15<br>sudo mkdir -p /data/projects<br>sudo chown 1000:0 /data/projects</pre><h3>Deploy AWX</h3><p>Deploy AWX, this takes few minutes to complete.</p><pre>kubectl apply -k base</pre><p>To monitor the progress of the deployment, check the logs of deployments/awx-operator-controller-manager:</p><pre>kubectl -n awx logs -f deployments/awx-operator-controller-manager<br># display namespace awx<br>kubectl -n awx get awx,all,ingress,secrets</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9AHVAEmb2syFepvQdpeStw.png" /></figure><p>Now your AWX is available at <a href="https://awx.example.com/">https://awx.local.com/</a> or the hostname you specified 🎊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XmW5OsvszIdtkwoupjPfJA.png" /></figure><h3>have a good deploy 🚀</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0a9c094922a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes “kubeadm v1.29” Deployment Using Ansible]]></title>
            <link>https://medium.com/@marouanetester/kubernetes-kubeadm-v1-29-deployment-using-ansible-58439c2538fd?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/58439c2538fd</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ansible]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Tue, 10 Dec 2024 13:35:14 GMT</pubDate>
            <atom:updated>2025-01-21T13:37:11.734Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LApS_-iQo553jVrz.png" /></figure><p>This guide outlines the steps to deploy Kubernetes on a target machine or cluster using Ansible. The playbook automates the installation and configuration of Kubernetes components on the target system.</p><h3>Prerequisites</h3><p>Before you begin, ensure the following prerequisites are met:</p><ul><li>A control machine where Ansible is installed.<br>You can install Ansible using the following commands:</li><li>For Ubuntu/Debian:</li></ul><pre>sudo apt update <br>sudo apt install ansible</pre><p>A target machine (or multiple nodes) where:</p><ul><li>Python 3 is installed and accessible.</li><li>sudo privileges are available for the user running the Ansible playbook.</li></ul><h3>Step 1: Setting Up the Inventory File</h3><p>Create an inventory file to define the hosts (target machine) for Kubernetes deployment. The following example shows how to configure the target machine IP:</p><pre>all:<br>  children:<br>    kubernetes:<br>      hosts:<br>        your-ip &lt;102.168.1.1&gt;:<br>          ansible_connection: local<br>          ansible_python_interpreter: /usr/bin/python3</pre><h3>Step 2: Cloning the Project</h3><p>Clone the Kubernetes deployment project from the repository:<br><a href="https://github.com/mlouguid/k8b-Ansible.git">https://github.com/mlouguid/k8s-Ansible.git</a> 🚀</p><pre>git clone https://github.com/mlouguid/k8s-Ansible.git<br>cd k8b-Ansible</pre><h3>Step 3: Kubernetes Role Structure</h3><p>Ensure your kubernetes role has the following directory structure:</p><pre>roles/<br>└── kubernetes/<br>    ├── tasks/<br>    │   ├── main.yml<br>    │   ├── install_k8s.yml<br>    │   ├── containerd.yml<br>    │   └── kube_prereqs.yml<br>    ├── handlers/<br>      └── main.yml</pre><h3>step 4: deploy the playbook</h3><pre>ansible-playbook kubernetes_playbook.yml -i inventories/local/hosts --limit=kubernetes --ask-become-pass</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58439c2538fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Uptime Kuma “Real-Time” Using Docker]]></title>
            <link>https://medium.com/@marouanetester/setting-up-uptime-kuma-with-docker-ba01367283f4?source=rss-98e88e1711b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba01367283f4</guid>
            <category><![CDATA[real-time-analytics]]></category>
            <dc:creator><![CDATA[Marouane Louguid]]></dc:creator>
            <pubDate>Wed, 04 Dec 2024 10:50:16 GMT</pubDate>
            <atom:updated>2024-12-06T11:30:53.791Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jj8dStvKiAm0xGtp.jpg" /></figure><p><strong>Uptime Kuma</strong> is a self-hosted monitoring tool that allows users to track the availability and performance of websites, APIs, and services. It provides real-time updates and detailed statistics through a user-friendly dashboard. <strong>Uptime Kuma</strong> supports multiple protocols, including HTTP, TCP, ICMP (ping), DNS, and more, making it versatile for monitoring various types of services.</p><h4>Key Features:</h4><p>• Real-time Notifications: Send alerts via popular services like Telegram, Slack, Discord, and email.<br> • Customizable Monitoring: Set intervals and configure alert thresholds.<br> • Detailed Reports: Visualize uptime and performance metrics over time.<br> • Multiple Probes: Monitor services from different locations to check global availability.<br> • Open Source: It is free and can be deployed on various platforms using Docker or manual installation.</p><h4>Use Cases:</h4><p>• Website Monitoring: Check if websites are online and performing optimally.<br> • Service Health Checks: Monitor internal or external services, APIs, or databases.<br> • Network Monitoring: Track server and network performance using ICMP or custom ports.</p><p>To set up <strong>Uptime Kuma</strong> using Docker, follow these steps:</p><p><strong>Prerequisites:</strong></p><ul><li><strong>Docker</strong> and <strong>Docker Compose</strong> must be installed on your system.</li><li>Ports <strong>3001</strong> (Uptime Kuma) and <strong>9090</strong> (Prometheus, if needed) should be free and available .</li></ul><p><strong>Steps to Deploy Uptime Kuma:</strong></p><ol><li><strong>Create a Project Directory</strong>:</li></ol><pre>mkdir uptime-kuma<br>cd uptime-kuma</pre><p>2. <strong>Create a </strong>docker-compose.yml<strong> File</strong>:</p><pre>version: &#39;3.8&#39;<br><br>services:<br>  uptime-kuma:<br>    image: louislam/uptime-kuma:latest<br>    container_name: uptime-kuma<br>    ports:<br>      - &quot;80:3001&quot;<br>    environment:<br>      - DB_TYPE=sqlite<br>      - DB_STORAGE=/app/data/uptime-kuma.db<br>      - SOFTWARE_VERSION_TAG=latest<br>      - URL=https://your-domain.com<br>    volumes:<br>      - uptime-kuma-data:/app/data<br>    restart: always<br>    <br><br>volumes:<br>  uptime-kuma-data:</pre><p>3. <strong>Start the Container</strong>:</p><pre>docker-compose up -d</pre><p>This will launch Uptime Kuma on <a href="http://localhost:3001,">http://localhost:3001,</a> where you can configure it to monitor services and websites</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba01367283f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>