Fixing Hugo on Cloudflare

Do you want to update your Hugo website on Cloudflare to use the latest version ? And you just did that and got a wierd error version 'GLIBC_2.33' not found (required by hugo) ? 19:27:47.373 Installing Hugo 0.152.2 19:27:48.269 hugo: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by hugo) 19:27:48.270 hugo: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by hugo) 19:27:48.270 hugo: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by hugo) 19:27:48.270 hugo: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by hugo) 19:27:48.274 Failed: build command exited with code: 1 19:27:49.294 Failed: error occurred while running build command The solution is simple: ...

December 10, 2025 · 1 min · Alex Popescu

xRDP TCP/IP Improvements

Is xRDP slow on your linux vm ? Here is an easy way to improve the TCP/IP performance: Configure the TCP send buffer size Edit the file /etc/xrdp/xrdp.ini and update tcp_send_buffer_bytes tcp_send_buffer_bytes=4194304 Restart the service: systemctl restart xrdp Configure the kernel network buffer size Change the network buffer size to a larger value with using the next command: sudo sysctl -w net.core.wmem_max=8388608 And create a new file /etc/sysctl.d/xrdp.conf with the following content: ...

December 9, 2025 · 1 min · Alex Popescu

Setting Up Proxmox With a Bridge Interface and DHCP

If you’re hosting Proxmox VE on a server with only one public IP, you can still create a private virtual network with NAT and DHCP for your VMs using a Linux bridge. This guide shows how to set up a Proxmox bridge (vmbr0) and run a DHCP server for VMs using a private subnet like 192.168.1.0/24. 🌐 1. Configure Proxmox Bridge (vmbr0) Edit your host’s network config (Debian-style /etc/network/interfaces) and add the setup for vmbr0 at the end, along with iptables for routing. ...

July 20, 2025 · 1 min · Alex Popescu

Installing a simple kubernetes UI

Here is a way to install a minimalist kubernetes UI - Headlamp. A simple way of installing it is using yaml files, like this one: kind: Service apiVersion: v1 metadata: name: headlamp namespace: kube-system spec: ports: - port: 80 targetPort: 4466 selector: k8s-app: headlamp --- kind: Deployment apiVersion: apps/v1 metadata: name: headlamp namespace: kube-system spec: replicas: 1 selector: matchLabels: k8s-app: headlamp template: metadata: labels: k8s-app: headlamp spec: containers: - name: headlamp image: ghcr.io/headlamp-k8s/headlamp:latest args: - "-in-cluster" - "-plugins-dir=/headlamp/plugins" ports: - containerPort: 4466 livenessProbe: httpGet: scheme: HTTP path: / port: 4466 initialDelaySeconds: 30 timeoutSeconds: 30 nodeSelector: 'kubernetes.io/os': linux --- kind: Secret apiVersion: v1 metadata: name: headlamp-admin namespace: kube-system annotations: kubernetes.io/service-account.name: "headlamp-admin" type: kubernetes.io/service-account-token This will install a deployment named headlamp in kube-system namespace, a service to expose the UI, and a secret for the admin user. ...

May 1, 2025 · 2 min · Alex Popescu

Integrate Salesforce as a custom tool in an AI Agents

Do you want a simple way to integrate Salesforce into your smolagents agents? There is an simple way to achieve this. First, let’s add smolagents, python-dotenv and simple-salesforce cli, in requirements.txt file: smolagents[gradio] python-dotenv simple-salesforce Next, let’s code a simple AI Agent: import os import yaml from dotenv import load_dotenv from simple_salesforce import Salesforce from smolagents import (CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool) from Gradio_UI import GradioUI load_dotenv('.env') @tool def get_insurance_policies_by_status(status: str) -> str: """A tool that fetches the number of insurance policies from Salesforce based on their status. Args: status: The status of the insurance policies to fetch (e.g., 'Active', 'Inactive'). Returns: A string indicating the number of insurance policies with the specified status. """ try: # Load Salesforce credentials from environment variables sf_username = os.getenv("SALESFORCE_USERNAME") sf_password = os.getenv("SALESFORCE_PASSWORD") sf_token = os.getenv("SALESFORCE_SECURITY_TOKEN") # Connect to Salesforce sf = Salesforce(username=sf_username, password=sf_password, security_token=sf_token) print("Connected to Salesforce.") # Query Salesforce for active insurance policies query = f"SELECT COUNT() FROM InsurancePolicy__c WHERE Status__c = '{status}'" result = sf.query(query) # Extract the count from the query result policies_count = result['totalSize'] return f"The number of insurance policies with status '{status}' is: {policies_count}" except Exception as e: return f"Error fetching insurance policies with status '{status}': {str(e)}" model = HfApiModel( max_tokens=2096, temperature=0.5, model_id='Qwen/Qwen2.5-Coder-32B-Instruct', custom_role_conversions=None, ) with open("prompts.yaml", 'r') as stream: prompt_templates = yaml.safe_load(stream) agent = CodeAgent( model=model, tools=[get_insurance_policies_by_status], max_steps=6, verbosity_level=1, grammar=None, planning_interval=None, name=None, description=None, prompt_templates=prompt_templates ) GradioUI(agent).launch() The core of our AI Agent is the tool get_insurance_policies_by_status that get the status from the LLM model, calls Salesforce using simple_salesforce and returns the number of active/inactive policies. ...

April 7, 2025 · 2 min · Alex Popescu

AWS Lambda With Magnum and FastAPI

Do you want a simple way to deploy an python FastAPI in AWS Lambda ? There is an simple way to do this with Magnum. First, let’s add FastAPI, magnum and SAM cli, in requirements.txt file: fastapi mangum aws-sam-cli Next, let’s code a simple FastAPI sample app: from fastapi import FastAPI from mangum import Mangum app = FastAPI() @app.get("/high-scores") async def high_scores(): return {"scores": [100, 200, 300]} @app.post("/insert-score") async def insert_score(data: dict): return {"status": "success", "data": data} lambda_handler = Mangum(app, lifespan="off") if __name__ == "__main__": import uvicorn uvicorn.run("app:app", port=5000, log_level="info", reload=True) Next, let’s setup SAM with a template.yml file: ...

March 26, 2025 · 2 min · Alex Popescu

Add a certificate to Nginx Ingress Controller

Having installed Nginx, now it’s the time to setup the TLS for our kubernetes cluster. First we download the certificate from our certificate authority. Next we apply the next secret in our kubernetes cluster, updating the values with the base 64 encoded certificate and key. apiVersion: v1 kind: Secret metadata: name: podrunner-tls namespace: kube-system type: kubernetes.io/tls data: tls.crt: <REPLACE WITH BASE64 OF THE CERTIFICATE> tls.key: <REPLACE WITH BASE64 OF THE KEY> If you need help getting the base64 of the key and certificate, run the next commands: ...

March 11, 2025 · 1 min · Alex Popescu

Replace Traefik with Nginx ingress controller in Kubernetes

If the default ingress controller (Traefik) not ok for you ? Here are some simple instructions on how to replace it with Nginx Uninstall traefik from an existing K3S instance sudo rm -rf /var/lib/rancher/k3s/server/manifests/traefik.yaml helm uninstall traefik traefik-crd -n kube-system sudo systemctl restart k3s Or the proper way to do so on installing k3s: curl -sfL https://get.k3s.io | sh -s - --cluster-init --disable-traefik Install Nginx Ingress Controller helm upgrade --install ingress-nginx ingress-nginx \ --repo https://kubernetes.github.io/ingress-nginx \ --namespace ingress-nginx --create-namespace Setting Static IP to Nginx (if needed): If needed, you can provide a static IP to Nginx using the static-ip-svc.yaml yml: ...

January 14, 2025 · 3 min · Alex Popescu

Single Server Kubernetes Installation

Do you want a simple single server kubernetes that is easy to install? Here is the guide for you. Installing kubernetes First, we install k3s kuberntes using the next command: curl -sfL https://get.k3s.io | sh -s - --cluster-init --node-external-ip <external-ip> Note: Replace external-ip with your server external IP. This is needed in order to get the traefik ingress controller working. Next we should copy the k3s kubernetes configuration file /etc/rancher/k3s/k3s.yaml to the default location ~/.kube/config and change the KUBECONFIG environment variable: ...

January 7, 2025 · 4 min · Alex Popescu

Observability with Elastic APM and Flask

In out last article here , we explained how to send Docker and application logs to ELK. Now is the time to add some observability to our app using Elastic APM. Configure Elastic APM First, we add Elastic APM to our Docker Compose file from last time, using the same version as Elastic Search. apm-server: image: docker.elastic.co/apm/apm-server:7.17.24 container_name: apm-server user: apm-server ports: - "8200:8200" volumes: - ./apm-server.docker.yml:/usr/share/apm-server/apm-server.yml:ro command: > --strict.perms=false -e -E output.elasticsearch.hosts=["http://elasticsearch:9200"] Next, run the containers using the docker compose up command and wait a few minutes. ...

December 23, 2024 · 1 min · Alex Popescu