Persistent Perfection - Mastering AWX Project Storage on Kubernetes

There are no available playbook directories in /var/lib/awx/projects. Either that directory is empty, or all of the contents are already assigned to other projects. Create a new directory there and make sure the playbook files can be read by the “awx” system user, or have AWX directly retrieve your playbooks from source control using the Source Control Type option above. How to fix the problem: There are no available playbook directories in /var/lib/awx/projects ? Here is a video tutorial ...

February 24, 2024 · 29 min · 6027 words · sysadmin

A simple guide to the Node-RED Instagram followers counter displayed on Ulanzi TC001

Open Node-RED Import the below flow Node-RED Instagram followers counter flow 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 [ { "id": "8b28f036a227d636", "type": "group", "z": "e9b8998ad5b3fa7d", "name": "", "style": { "label": true }, "nodes": [ "49ae0cc4d71fd031", "66c430817f82be55", "7f41a9f67a7b1e70", "74be1866413b2aa6", "34f297b864caf6db" ], "x": 194, "y": 159, "w": 832, "h": 122 }, { "id": "49ae0cc4d71fd031", "type": "inject", "z": "e9b8998ad5b3fa7d", "g": "8b28f036a227d636", "name": "Every 12 hours", "props": [], "repeat": "43200", "crontab": "", "once": false, "onceDelay": "2", "topic": "", "x": 320, "y": 240, "wires": [ [ "66c430817f82be55" ] ] }, { "id": "66c430817f82be55", "type": "http request", "z": "e9b8998ad5b3fa7d", "g": "8b28f036a227d636", "name": "", "method": "GET", "ret": "obj", "paytoqs": "query", "url": "https://i.instagram.com/api/v1/users/web_profile_info/?username=sysadmin.info.pl", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [ { "keyType": "other", "keyValue": "user-agent", "valueType": "other", "valueValue": "Instagram 76.0.0.15.395 Android (24/7.0; 640dpi; 1440x2560; samsung; SM-G930F; herolte; samsungexynos8890; en_US; 138226743)" } ], "x": 490, "y": 240, "wires": [ [ "7f41a9f67a7b1e70" ] ] }, { "id": "7f41a9f67a7b1e70", "type": "function", "z": "e9b8998ad5b3fa7d", "g": "8b28f036a227d636", "name": "parser", "func": "// Store the incoming message payload in a variable 'json'.\nvar json = msg.payload;\n\n// Check if 'json' and the nested properties 'json.data.user.edge_followed_by' exist.\n// This is to ensure that the specific structure is present in the payload.\nif (json && json.data && json.data.user && json.data.user.edge_followed_by) {\n // Extract the subscriber count from the nested JSON structure.\n var subscriberCount = json.data.user.edge_followed_by.count;\n\n // Modify the message payload to include the subscriber count and additional properties.\n // Here, three properties are set:\n // 'text': a string representation of the subscriber count.\n // 'icon': a static string indicating the icon to be used, in this case, 'instagram'.\n // 'duration': a static value indicating the duration, set to 10 seconds.\n msg.payload = {\n \"text\": subscriberCount.toString(), // Convert the subscriber count to a string.\n \"icon\": \"instagram\", // Set the icon property to 'instagram'.\n \"duration\": 10 // Set the duration property to 10 seconds.\n };\n} else {\n // This block executes if the expected data structure is not present in the payload.\n // It sets the payload to a predefined object indicating that data is not available.\n msg.payload = { \"text\": \"Data not available\" };\n}\n\n// Return the modified message object.\n// This is essential for the function node to pass the message to the next node in the flow.\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 630, "y": 240, "wires": [ [ "74be1866413b2aa6" ] ] }, { "id": "74be1866413b2aa6", "type": "mqtt out", "z": "e9b8998ad5b3fa7d", "g": "8b28f036a227d636", "name": "", "topic": "awtrix_b6d76c/custom/instagram", "qos": "", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "346df2a95aac5785", "x": 860, "y": 240, "wires": [] }, { "id": "34f297b864caf6db", "type": "comment", "z": "e9b8998ad5b3fa7d", "g": "8b28f036a227d636", "name": "Instagram", "info": "ATTENTION:\nTrigger this node as rarely as possible!\nChange your username in the http request node URL", "x": 300, "y": 200, "wires": [] }, { "id": "346df2a95aac5785", "type": "mqtt-broker", "name": "MQTT HA Broker", "broker": "10.10.0.100", "port": "1883", "clientid": "", "autoConnect": true, "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "autoUnsubscribe": true, "birthTopic": "awtrix_b6d76c", "birthQos": "2", "birthRetain": "true", "birthPayload": "", "birthMsg": {}, "closeTopic": "awtrix_b6d76c", "closeQos": "2", "closeRetain": "true", "closePayload": "", "closeMsg": {}, "willTopic": "awtrix_b6d76c", "willQos": "2", "willRetain": "true", "willPayload": "", "willMsg": {}, "userProps": "", "sessionExpiry": "" } ] Change your username in the http request node URL Change the IP address of your MQTT Broker Change the prefix in topic (see the video to find out what I am talking about) Download the Instagram icon from here: Instagram icon Upload the icon to the Ulanzi device via web dashboard. (See the video). Deploy the flow. Run the inject node once. Trigger this node as rarely as possible! The timer is set to fetch the data every 12 hours.

January 25, 2024 · 4 min · 760 words · sysadmin

Boost Your Focus - A Simple Guide to the Node-RED Pomodoro Timer displayed on Ulanzi TC001

Introduction to the Pomodoro Timer Application in Node-RED In the realm of productivity tools, the Pomodoro Technique stands out as a widely adopted method for enhancing focus and efficiency. Recognizing the potential of this technique, we’ve developed a comprehensive Pomodoro Timer application using Node-RED, a flow-based development tool. This application is not just a simple timer; it’s a multifaceted tool that integrates modern web technologies and the Internet of Things (IoT) communication protocols to provide a rich, interactive user experience. ...

January 21, 2024 · 19 min · 3882 words · sysadmin

How to implement pomodoro timer using Node-RED onto Ulanzi TC001

Copy the flow 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 [ { "id": "work-timer-start", "type": "inject", "z": "305da690670f67c0", "name": "Start Work Timer", "props": [{"p": "payload"}], "repeat": "", "crontab": "", "once": false, "topic": "", "payload": "", "payloadType": "date", "x": 100, "y": 100, "wires": [["work-timer-function"]] }, { "id": "work-timer-function", "type": "function", "z": "305da690670f67c0", "name": "Countdown Timer", "func": "var duration = 25 * 60; // 25 minutes in seconds\nfunction countdown() {\n if (flow.get('workTimerRunning') === false) {\n return;\n }\n var message = {\n payload: {\n text: 'Time left: ' + duration + ' sec',\n icon: \"82\",\n color: '#FFA500',\n duration: 1500\n }\n };\n node.send(message);\n duration--;\n if (duration >= 0) {\n setTimeout(countdown, 1000);\n } else {\n var endMessage = {\n payload: {\n text: 'Work Period Ended',\n icon: \"29802\",\n color: '#00FF00',\n duration: 20\n }\n };\n node.send(endMessage);\n }\n}\nflow.set('workTimerRunning', true);\ncountdown();\nreturn null;", "outputs": 1, "x": 300, "y": 100, "wires": [["mqtt-out-work"]] }, { "id": "mqtt-out-work", "type": "mqtt out", "z": "305da690670f67c0", "name": "MQTT Work Timer", "topic": "awtrix_b6d76c/custom/work_timer", "broker": "346df2a95aac5785", "x": 500, "y": 100, "wires": [] }, { "id": "work-timer-stop", "type": "inject", "z": "305da690670f67c0", "name": "Stop Work Timer", "props": [{"p": "payload"}], "repeat": "", "crontab": "", "once": false, "topic": "", "payload": "stop", "payloadType": "str", "x": 100, "y": 160, "wires": [["stop-work-timer-function"]] }, { "id": "stop-work-timer-function", "type": "function", "z": "305da690670f67c0", "name": "Stop Work Timer Function", "func": "flow.set('workTimerRunning', false);\nvar message = {\n payload: {\n text: 'Work Timer Stopped',\n icon: \"29802\",\n color: '#FF0000',\n duration: 20\n }\n};\nreturn message;", "outputs": 1, "x": 300, "y": 160, "wires": [["mqtt-out-work"]] }, { "id": "break-timer-start", "type": "inject", "z": "305da690670f67c0", "name": "Start Break Timer", "props": [{"p": "payload"}], "repeat": "", "crontab": "", "once": false, "topic": "", "payload": "", "payloadType": "date", "x": 100, "y": 200, "wires": [["break-timer-function"]] }, { "id": "break-timer-function", "type": "function", "z": "305da690670f67c0", "name": "Break Countdown Timer", "func": "var duration = 5 * 60; // 5 minutes in seconds\nfunction countdown() {\n if (flow.get('breakTimerRunning') === false) {\n return;\n }\n var message = {\n payload: {\n text: 'Break time left: ' + duration + ' sec',\n icon: \"6396\",\n color: '#FFA500',\n duration: 300\n }\n };\n node.send(message);\n duration--;\n if (duration >= 0) {\n setTimeout(countdown, 1000);\n } else {\n var endMessage = {\n payload: {\n text: 'Break Period Ended',\n icon: \"29802\",\n color: '#00FF00',\n duration: 20\n }\n };\n node.send(endMessage);\n }\n}\nflow.set('breakTimerRunning', true);\ncountdown();\nreturn null;", "outputs": 1, "x": 300, "y": 200, "wires": [["mqtt-out-break"]] }, { "id": "mqtt-out-break", "type": "mqtt out", "z": "305da690670f67c0", "name": "MQTT Break Timer", "topic": "awtrix_b6d76c/custom/break_timer", "broker": "346df2a95aac5785", "x": 500, "y": 200, "wires": [] }, { "id": "break-timer-stop", "type": "inject", "z": "305da690670f67c0", "name": "Stop Break Timer", "props": [{"p": "payload"}], "repeat": "", "crontab": "", "once": false, "topic": "", "payload": "stop", "payloadType": "str", "x": 100, "y": 260, "wires": [["stop-break-timer-function"]] }, { "id": "stop-break-timer-function", "type": "function", "z": "305da690670f67c0", "name": "Stop Break Timer Function", "func": "flow.set('breakTimerRunning', false);\nvar message = {\n payload: {\n text: 'Break Timer Stopped',\n icon: \"29802\",\n color: '#FF0000',\n duration: 20\n }\n};\nreturn message;", "outputs": 1, "x": 300, "y": 260, "wires": [["mqtt-out-break"]] } ] Change the prefix awtrix_b6d76c to your own. ...

January 14, 2024 · 4 min · 657 words · sysadmin

NGINX ingress controller for n8n - how to create it and deploy in Kubernetes

Here is a short video; continue reading to find out more. I recommend to watch the entire video to understand how everything is made and deployed. In a previous tutorial How to deploy n8n in Kubernetes - k3s I deployed n8n. I checked that all is running correctly. ...

January 12, 2024 · 10 min · 1936 words · sysadmin

What is NGINX ingress controller in Kubernetes?

Here is a short video; continue reading to find out more. The NGINX Ingress Controller in Kubernetes can be best understood as a specialized version of the Ingress tool. It’s like a highly skilled receptionist at the main entrance of an apartment building, equipped with additional capabilities and expertise. ...

January 9, 2024 · 2 min · 232 words · sysadmin

What is an ingress in Kubernetes?

Here is a short video; continue reading to find out more. In Kubernetes, Ingress is a tool that manages external access to services within a cluster, primarily for HTTP and HTTPS traffic. It acts as a controller for routing external requests to the internal services. (The rest of the article is under the image.) ...

January 9, 2024 · 1 min · 183 words · sysadmin

What are Port and TargetPort in Kubernetes?

Here is a short video; continue reading to find out more. In Kubernetes, ‘Port’ and ‘TargetPort’ are crucial settings within a service that control how network traffic is routed to the pods. (The rest of the article is under the image.) internal phone system ...

January 9, 2024 · 2 min · 226 words · sysadmin

What is a NodePort in Kubernetes?

Here is a short video; continue reading to find out more. NodePort is a type of service in Kubernetes that makes a pod accessible from outside the Kubernetes cluster. It’s like opening a specific channel for external traffic to reach your pods. (The rest of the article is under the image.) ...

January 6, 2024 · 1 min · 97 words · sysadmin

What is a service in Kubernetes?

Here is a short video; continue reading to find out more. In Kubernetes, a Service is a critical concept that acts like a gateway or a receptionist for pods. It’s a way for Kubernetes to expose pods, either to other pods within the same cluster or to external users and systems. (The rest of the article is under the image.) ...

January 6, 2024 · 2 min · 293 words · sysadmin