Skip to main content

Posts

Showing posts with the label linux

Simple Nginx Conf for Microservices Application

######################################################################## # Main Nginx configuration file for Dockerized Microservices # # More information about the configuration options is available on  # * the English wiki - http://wiki.nginx.org/Main # * the Russian documentation - http://sysoev.ru/nginx/ # ####################################################################### #---------------------------------------------------------------------- # Main Module - directives that cover basic functionality # # http://wiki.nginx.org/NginxHttpMainModule # #---------------------------------------------------------------------- user nginx; worker_processes auto; error_log /opt/nginx/logs/error.log; #error_log /var/log/nginx/error.log notice; #error_log /var/log/nginx/error.log info; pid /var/run/nginx.pid; #---------------------------------------------------------------------- # Events Module  # # http://wiki.nginx.org/NginxHttpEventsModule # #-----------------------------------...

How to Start with OpenStack

                                                                                                 Photo by Karolina Grabowska OpenStack is a powerful open-source cloud computing platform that provides a range of features and benefits, making it a popular choice for organizations looking to build and manage their own cloud infrastructure. Here are some key features and reasons why you might consider using OpenStack: 1. Open-Source and Vendor-Neutral: OpenStack is open-source, which means it's freely available and not tied to any particular vendor. You have the flexibility to customize and extend it to meet your specific needs. 2. Scalability: OpenStack is designed to scale, making it suitable for smal...

Run Two Systemd Services Alternately

To achieve the desired sequence where `app1` starts, runs for 10 minutes, then `app2` starts and runs for 10 minutes, and this cycle repeats, you can create two separate timer units and services, one for each application, and use a cyclic approach. Here's how you can do it: 1. Create two timer units, one for each application, with cyclic activation:    `myapp1.timer`:    ```ini    [Unit]    Description=Timer for My Application 1    [Timer]    OnBootSec=10min    OnUnitInactiveSec=10min    [Install]    WantedBy=timers.target    ```    `myapp2.timer`:    ```ini    [Unit]    Description=Timer for My Application 2    [Timer]    OnBootSec=20min    OnUnitInactiveSec=10min    [Install]    WantedBy=timers.target    ``` In this configuration, `myapp1.timer` is set to trigger `myapp1.service` 10 minut...