diff --git a/files/fvwm/config b/files/fvwm/config new file mode 100644 index 0000000..8f4f1a2 --- /dev/null +++ b/files/fvwm/config @@ -0,0 +1 @@ +Module FvwmMLF diff --git a/files/fvwm/rabbitmq-osd-debug.py b/files/fvwm/rabbitmq-osd-debug.py new file mode 100644 index 0000000..83134ba --- /dev/null +++ b/files/fvwm/rabbitmq-osd-debug.py @@ -0,0 +1,30 @@ +import pika +import pprint +import json +import re +import libtmux +import os +import subprocess + +rabbitmq_url = "amqp://user:password@192.168.49.2:30466/%2f" + +connection = pika.BlockingConnection(pika.URLParameters(rabbitmq_url)) +rabbitmq_channel = connection.channel() + +exchange_name = "events" +result = rabbitmq_channel.queue_declare(queue="", exclusive=True) +queue_name = result.method.queue + +rabbitmq_channel.queue_bind(exchange=exchange_name, queue=queue_name) + +def display_message(message): + command = f'echo "{message}" | bash /home/bebebeko/mindwm/compiled/fvwm/bin/aosd_show.sh' + subprocess.run(command, shell=True) + +def callback(ch, method, properties, body): + pprint.pprint(body.decode()) + display_message(body.decode()) + +rabbitmq_channel.basic_consume(queue=queue_name, on_message_callback=callback, auto_ack=True) +print("Waiting for messages. To exit, press Ctrl+C") +rabbitmq_channel.start_consuming() diff --git a/inventory/classes/neo4j/common.yml b/inventory/classes/neo4j/common.yml index 1f2cd56..51d7b21 100644 --- a/inventory/classes/neo4j/common.yml +++ b/inventory/classes/neo4j/common.yml @@ -3,6 +3,7 @@ parameters: neo4j_ip4_port: 7687 neo4j_release_name: neo4j neo4j_namespace: neo4j - neo4j_version: 5.11.0 + neo4j_version: 5.13.0 + #neo4j_version: 4.4.0 neo4j_user: neo4j neo4j_password: password diff --git a/inventory/classes/neo4j/helm.yml b/inventory/classes/neo4j/helm.yml index ffbf75d..170603c 100644 --- a/inventory/classes/neo4j/helm.yml +++ b/inventory/classes/neo4j/helm.yml @@ -3,7 +3,9 @@ classes: - helm - neo4j.common parameters: - neo4j_chart_version: 5.11.0 + neo4j_chart_version: 5.13.0 + neo4j_chart_name: neo4j + # neo4j_chart_version: 4.4.27 neo4j_helm_chart_path: files/helm-charts/neo4j bash: @@ -18,4 +20,4 @@ parameters: type: helm source: https://helm.neo4j.com/neo4j version: ${neo4j_chart_version} - chart_name: neo4j + chart_name: ${neo4j_chart_name} diff --git a/inventory/classes/rabbitmq/common.yml b/inventory/classes/rabbitmq/common.yml index 6ecba9e..407a286 100644 --- a/inventory/classes/rabbitmq/common.yml +++ b/inventory/classes/rabbitmq/common.yml @@ -58,6 +58,14 @@ parameters: name: openai type: fanout durable: true + clipboard: + name: clipboard + type: fanout + durable: true + events: + name: events + type: fanout + durable: true rabbitmq_version: 3.12.4 rabbitmq_user: user diff --git a/inventory/classes/vector/common.yml b/inventory/classes/vector/common.yml new file mode 100644 index 0000000..53ec169 --- /dev/null +++ b/inventory/classes/vector/common.yml @@ -0,0 +1,4 @@ +--- +parameters: + vector_http_server_port: 31398 + diff --git a/inventory/targets/fvwm.yml b/inventory/targets/fvwm.yml new file mode 100644 index 0000000..a7f2eab --- /dev/null +++ b/inventory/targets/fvwm.yml @@ -0,0 +1,80 @@ +--- +classes: + - vim + - bash.functions + - bash.kapitan + - bash.script + - common + - tmuxinator + - tmuxinator.kapitan + - vector.common +parameters: + target_name: fvwm + + bash: + functions: + aosd_show: | + aosd_cat -x 700 -y -600 -e 1 -f 0 -u 1000 + fvwm_send: | + FvwmCommand -c -f /tmp/fvwm_mfl.sock + clipnotify_run: | + clipboard_type=$1 + while ${clipnotify_bin} -s $clipboard_type; do + cat</dev/null + done + clipnotify_primary: + clipnotify_run primary + clipnotify_secondary: + clipnotify_run secondary + clipnotify_clipboard: + clipnotify_run clipboard + + + clipnotify_path: ${kapitan_root}/files/github.com/cdown/clipnotify + clipnotify_bin: ${clipnotify_path}/clipnotify + + kapitan: + dependencies: + - source: https://github.com/cdown/clipnotify + type: git + output_path: ${clipnotify_path} + ref: 25ba143c7da8ae0f196cb0db2797d30e6d04e15c + + tmuxinator: + windows: + fvwm: + panes: + - + - cd ${kapitan_root}/files/fvwm + - + - cd ${kapitan_root}/files/fvwm + - + - cd ${kapitan_root}/files/fvwm + clipnotify: + panes: + - + - cd ${clipnotify_path} + - # make + - + - cd ${clipnotify_path} + - + - clipnotify_primary + - + - clipnotify_secondary + - + - clipnotify_clipboard + aosd-debug: + panes: + - + - cd ${kapitan_root}/files/fvwm/ + - . venv/bin/activate + - python3 ./rabbitmq-osd-debug.py diff --git a/inventory/targets/neo4j.yml b/inventory/targets/neo4j.yml index d344455..c8a7686 100644 --- a/inventory/targets/neo4j.yml +++ b/inventory/targets/neo4j.yml @@ -17,6 +17,24 @@ parameters: neo4j: name: ${neo4j_release_name} password: ${neo4j_password} + config: + server.directories.plugins: "/var/lib/neo4j/labs" + dbms.security.procedures.unrestricted: "apoc.*" + server.config.strict_validation.enabled: "false" + dbms.security.procedures.allowlist: "apoc.*" + apoc_config: + apoc.export.file.enabled: "true" + apoc.trigger.enabled: "true" + apoc.import.file.enabled: "true" + env: + NEO4J_apoc_export_file_enabled: "true" + NEO4J_apoc_import_file_enabled: "true" + NEO4J_apoc_import_file_use__neo4j__config: "true" + NEO4J_PLUGINS: '["apoc-extended"]' + serviceMonitor: + enabled: false + podDisruptionBudget: + enabled: false volumes: data: mode: defaultStorageClass diff --git a/inventory/targets/vector.yml b/inventory/targets/vector.yml index feaece8..42f7217 100644 --- a/inventory/targets/vector.yml +++ b/inventory/targets/vector.yml @@ -18,6 +18,7 @@ classes: # - vector.tmux-kafka # - vector.console-output - opensearch + - vector.common - vector.config - helm - vector.helm @@ -57,7 +58,6 @@ parameters: ) vector_aggregator_port: ${mindwm:k8s:vector_aggregator_port} - vector_http_server_port: 31398 @@ -313,6 +313,16 @@ parameters: encoding: codec: json + events: + type: amqp + inputs: + - http_server + connection: + connection_string: "amqp://${rabbitmq_user}:${rabbitmq_password}@${rabbitmq_release_name}.${rabbitmq_namespace}:5672/%2f?timeout=10" + exchange: ${rabbitmq_exchanges:events:name} + encoding: + codec: json + # opensearch-tmux-io-context: # type: elasticsearch diff --git a/lib/jsonnet/bash/scripts.jsonnet b/lib/jsonnet/bash/scripts.jsonnet index d159d62..5fa511a 100644 --- a/lib/jsonnet/bash/scripts.jsonnet +++ b/lib/jsonnet/bash/scripts.jsonnet @@ -5,7 +5,7 @@ local p = inventory.parameters; { [func_name + ".sh"]: kap.jinja2_template("templates/bash/script.sh", { inventory: inventory, - script: p.bash.functions[func_name] + " $*" + script: p.bash.functions[func_name] }) for func_name in std.objectFieldsAll(p.bash.functions) } diff --git a/templates/bash/script.sh b/templates/bash/script.sh index 8462baa..fe021c3 100755 --- a/templates/bash/script.sh +++ b/templates/bash/script.sh @@ -6,4 +6,3 @@ set -eo pipefail . {{ p.compiled_dir }}/functions.bash {{ script }} -