From 1fbbecb74292db6b943bad06be1a6a06e25c466d Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:39:21 -0400 Subject: [PATCH 01/22] Create redpanda.license --- ansible/rpcn_files/redpanda.license | 1 + 1 file changed, 1 insertion(+) create mode 100644 ansible/rpcn_files/redpanda.license diff --git a/ansible/rpcn_files/redpanda.license b/ansible/rpcn_files/redpanda.license new file mode 100644 index 0000000..a026809 --- /dev/null +++ b/ansible/rpcn_files/redpanda.license @@ -0,0 +1 @@ +#Paste license key here From f366369764a1bba82de6ce8669e4edfda99c95a6 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:40:18 -0400 Subject: [PATCH 02/22] Create pipeline.yaml --- ansible/rpcn_files/pipeline.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ansible/rpcn_files/pipeline.yaml diff --git a/ansible/rpcn_files/pipeline.yaml b/ansible/rpcn_files/pipeline.yaml new file mode 100644 index 0000000..44b69b4 --- /dev/null +++ b/ansible/rpcn_files/pipeline.yaml @@ -0,0 +1,12 @@ +#Example pipeline to smoke test with +input: + label: "file_input" + file: + paths: [ "/opt/rpcn/pipeline.yaml" ] + scanner: + lines: {} + +output: + label: "stdout" + stdout: + codec: lines From b220f4fbb2e41782fa65b29aa676af0b2e488bb4 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:40:49 -0400 Subject: [PATCH 03/22] Create rpcn.service --- ansible/rpcn_files/rpcn.service | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ansible/rpcn_files/rpcn.service diff --git a/ansible/rpcn_files/rpcn.service b/ansible/rpcn_files/rpcn.service new file mode 100644 index 0000000..d43b401 --- /dev/null +++ b/ansible/rpcn_files/rpcn.service @@ -0,0 +1,13 @@ +[Unit] +Description=Redpanda Connect Pipeline +After=network.target + +[Service] +ExecStart=/opt/rpcn/rpk connect run /opt/rpcn/pipeline.yaml +Restart=on-failure +User=ubuntu +#Group=redpanda-connect +Environment="REDPANDA_PIPELINE_ID=%H" + +[Install] +WantedBy=multi-user.target From c3adb23c6ea58c29acfca4182d2cd449dbb61fe6 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:41:09 -0400 Subject: [PATCH 04/22] Create rpcn-ent.service --- ansible/rpcn_files/rpcn-ent.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ansible/rpcn_files/rpcn-ent.service diff --git a/ansible/rpcn_files/rpcn-ent.service b/ansible/rpcn_files/rpcn-ent.service new file mode 100644 index 0000000..dd06e97 --- /dev/null +++ b/ansible/rpcn_files/rpcn-ent.service @@ -0,0 +1,14 @@ +[Unit] +Description=Redpanda Connect Pipeline +After=network.target + +[Service] +ExecStart=/opt/rpcn/rpk connect run /opt/rpcn/pipeline.yaml +Restart=on-failure +User=ubuntu +#Group=redpanda-connect +Environment="REDPANDA_PIPELINE_ID=%H" +Environment="REDPANDA_LICENSE_FILEPATH=/opt/rpcn/redpanda.license" + +[Install] +WantedBy=multi-user.target From 96b5f26f3d9e2757bb318ffb2c7b2fd311f518ba Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:41:48 -0400 Subject: [PATCH 05/22] Create stage-rpcn-ent.yml --- ansible/stage-rpcn-ent.yml | 117 +++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 ansible/stage-rpcn-ent.yml diff --git a/ansible/stage-rpcn-ent.yml b/ansible/stage-rpcn-ent.yml new file mode 100644 index 0000000..0d1b437 --- /dev/null +++ b/ansible/stage-rpcn-ent.yml @@ -0,0 +1,117 @@ +- name: Install rpk and set up rpcn service + hosts: connect + become: true + + vars: + rpcn_dir: /opt/rpcn + local_files_dir: "./rpcn_files" # directory on your control machine to upload + rpk_zip_tmp: /tmp/rpk.zip + arch_map: + x86_64: amd64 + amd64: amd64 + aarch64: arm64 + arm64: arm64 + + pre_tasks: + - name: Ensure unzip is present (Debian/Ubuntu) + apt: + name: unzip + state: present + update_cache: true + when: ansible_facts['os_family'] == "Debian" + + - name: Ensure unzip is present (RHEL-family) + yum: + name: unzip + state: present + when: ansible_facts['os_family'] == "RedHat" + + - name: Resolve architecture to Redpanda asset suffix + set_fact: + rpk_arch: "{{ arch_map.get(ansible_architecture, 'amd64') }}" + + - name: Build download URL for rpk zip + set_fact: + rpk_zip_url: "https://github.com/redpanda-data/redpanda/releases/latest/download/rpk-linux-{{ rpk_arch }}.zip" + + tasks: + # --- Ensure target directory exists before unarchive --- + - name: Ensure /opt exists + file: + path: /opt + state: directory + mode: "0755" + + - name: Ensure target directory exists + file: + path: "{{ rpcn_dir }}" + state: directory + owner: root + group: root + mode: "0755" + + - name: Verify target directory exists + stat: + path: "{{ rpcn_dir }}" + register: rpcn_dir_stat + + - name: Fail if target directory is missing + fail: + msg: "Target directory {{ rpcn_dir }} was not created" + when: not rpcn_dir_stat.stat.exists + + # --- Download & unzip rpk for detected arch --- + - name: Download rpk zip for detected arch + get_url: + url: "{{ rpk_zip_url }}" + dest: "{{ rpk_zip_tmp }}" + mode: "0644" + + - name: Unarchive rpk into /opt/rpcn + unarchive: + src: "{{ rpk_zip_tmp }}" + dest: "{{ rpcn_dir }}" + remote_src: true + creates: "{{ rpcn_dir }}/rpk" # idempotent if rpk already present + + - name: Ensure rpk is executable + file: + path: "{{ rpcn_dir }}/rpk" + mode: "0755" + + # --- Copy your local files to the REMOTE host(s) --- + - name: Copy your local files into /opt/rpcn (recursive) + copy: + src: "{{ local_files_dir }}/" + dest: "{{ rpcn_dir }}/" + owner: root + group: root + mode: "0644" + + # --- Install systemd unit --- + - name: Copy service file from /opt/rpcn to systemd unit dir + copy: + src: "{{ rpcn_dir }}/rpcn-ent.service" + dest: /etc/systemd/system/rpcn-ent.service + owner: root + group: root + mode: "0644" + remote_src: true + notify: daemon-reload + + - name: Enable and start rpcn service + systemd: + name: rpcn-ent.service + enabled: true + state: started + + # --- Cleanup --- + - name: Clean up downloaded archive + file: + path: "{{ rpk_zip_tmp }}" + state: absent + + handlers: + - name: daemon-reload + systemd: + daemon_reload: true From 0e9c0036bd7e16b460f8c77de63e850ec926b296 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:42:12 -0400 Subject: [PATCH 06/22] Create stage-rpcn.yml --- ansible/stage-rpcn.yml | 117 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 ansible/stage-rpcn.yml diff --git a/ansible/stage-rpcn.yml b/ansible/stage-rpcn.yml new file mode 100644 index 0000000..f97beb7 --- /dev/null +++ b/ansible/stage-rpcn.yml @@ -0,0 +1,117 @@ +- name: Install rpk and set up rpcn service + hosts: connect + become: true + + vars: + rpcn_dir: /opt/rpcn + local_files_dir: "./rpcn_files" # directory on your control machine to upload + rpk_zip_tmp: /tmp/rpk.zip + arch_map: + x86_64: amd64 + amd64: amd64 + aarch64: arm64 + arm64: arm64 + + pre_tasks: + - name: Ensure unzip is present (Debian/Ubuntu) + apt: + name: unzip + state: present + update_cache: true + when: ansible_facts['os_family'] == "Debian" + + - name: Ensure unzip is present (RHEL-family) + yum: + name: unzip + state: present + when: ansible_facts['os_family'] == "RedHat" + + - name: Resolve architecture to Redpanda asset suffix + set_fact: + rpk_arch: "{{ arch_map.get(ansible_architecture, 'amd64') }}" + + - name: Build download URL for rpk zip + set_fact: + rpk_zip_url: "https://github.com/redpanda-data/redpanda/releases/latest/download/rpk-linux-{{ rpk_arch }}.zip" + + tasks: + # --- Ensure target directory exists before unarchive --- + - name: Ensure /opt exists + file: + path: /opt + state: directory + mode: "0755" + + - name: Ensure target directory exists + file: + path: "{{ rpcn_dir }}" + state: directory + owner: root + group: root + mode: "0755" + + - name: Verify target directory exists + stat: + path: "{{ rpcn_dir }}" + register: rpcn_dir_stat + + - name: Fail if target directory is missing + fail: + msg: "Target directory {{ rpcn_dir }} was not created" + when: not rpcn_dir_stat.stat.exists + + # --- Download & unzip rpk for detected arch --- + - name: Download rpk zip for detected arch + get_url: + url: "{{ rpk_zip_url }}" + dest: "{{ rpk_zip_tmp }}" + mode: "0644" + + - name: Unarchive rpk into /opt/rpcn + unarchive: + src: "{{ rpk_zip_tmp }}" + dest: "{{ rpcn_dir }}" + remote_src: true + creates: "{{ rpcn_dir }}/rpk" # idempotent if rpk already present + + - name: Ensure rpk is executable + file: + path: "{{ rpcn_dir }}/rpk" + mode: "0755" + + # --- Copy your local files to the REMOTE host(s) --- + - name: Copy your local files into /opt/rpcn (recursive) + copy: + src: "{{ local_files_dir }}/" + dest: "{{ rpcn_dir }}/" + owner: root + group: root + mode: "0644" + + # --- Install systemd unit --- + - name: Copy service file from /opt/rpcn to systemd unit dir + copy: + src: "{{ rpcn_dir }}/rpcn.service" + dest: /etc/systemd/system/rpcn.service + owner: root + group: root + mode: "0644" + remote_src: true + notify: daemon-reload + + - name: Enable and start rpcn service + systemd: + name: rpcn.service + enabled: true + state: started + + # --- Cleanup --- + - name: Clean up downloaded archive + file: + path: "{{ rpk_zip_tmp }}" + state: absent + + handlers: + - name: daemon-reload + systemd: + daemon_reload: true From f98a4f227cf25e001a9bef2e565052a6acf4099d Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:42:49 -0400 Subject: [PATCH 07/22] Create stop-pipeline-ent.yml --- ansible/stop-pipeline-ent.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ansible/stop-pipeline-ent.yml diff --git a/ansible/stop-pipeline-ent.yml b/ansible/stop-pipeline-ent.yml new file mode 100644 index 0000000..b9970ae --- /dev/null +++ b/ansible/stop-pipeline-ent.yml @@ -0,0 +1,14 @@ +- name: Stop rpcn service (skip if unit missing) + hosts: connect + become: true + tasks: + - name: Check if rpcn unit file exists + stat: + path: /etc/systemd/system/rpcn-ent.service + register: rpcn_unit + + - name: Stop rpcn-ent.service when present + systemd: + name: rpcn-ent.service + state: stopped + when: rpcn_unit.stat.exists From cab118a0d547d73514a071596a87f6a80f20e8e7 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:43:11 -0400 Subject: [PATCH 08/22] Create stop-pipleline.yml --- ansible/stop-pipleline.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ansible/stop-pipleline.yml diff --git a/ansible/stop-pipleline.yml b/ansible/stop-pipleline.yml new file mode 100644 index 0000000..3e7bbd5 --- /dev/null +++ b/ansible/stop-pipleline.yml @@ -0,0 +1,14 @@ +- name: Stop rpcn service (skip if unit missing) + hosts: connect + become: true + tasks: + - name: Check if rpcn unit file exists + stat: + path: /etc/systemd/system/rpcn.service + register: rpcn_unit + + - name: Stop rpcn.service when present + systemd: + name: rpcn.service + state: stopped + when: rpcn_unit.stat.exists From 47aa40dad02a86dcbecc230e553a6d3081efdb90 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:43:36 -0400 Subject: [PATCH 09/22] Create update-pipeline-ent.yml --- ansible/update-pipeline-ent.yml | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ansible/update-pipeline-ent.yml diff --git a/ansible/update-pipeline-ent.yml b/ansible/update-pipeline-ent.yml new file mode 100644 index 0000000..f224ff5 --- /dev/null +++ b/ansible/update-pipeline-ent.yml @@ -0,0 +1,37 @@ +- name: Update rpcn pipeline and restart service + hosts: connect + become: true + + vars: + rpcn_dir: /opt/rpcn + local_files_dir: "./rpcn_files" # same convention as your other playbook + + tasks: + - name: Ensure target directory exists + file: + path: "{{ rpcn_dir }}" + state: directory + owner: root + group: root + mode: "0755" + + - name: Copy pipeline.yaml to /opt/rpcn + copy: + src: "{{ local_files_dir }}/pipeline.yaml" + dest: "{{ rpcn_dir }}/pipeline.yaml" + owner: root + group: root + mode: "0644" + notify: + - daemon-reload + - restart rpcn + + handlers: + - name: daemon-reload + systemd: + daemon_reload: true + + - name: restart rpcn + systemd: + name: rpcn-ent.service + state: restarted From 969df815c2922938dc174cf39dc20a0b02b4437f Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Thu, 9 Oct 2025 12:44:10 -0400 Subject: [PATCH 10/22] Create update-pipeline.yml --- ansible/update-pipeline.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ansible/update-pipeline.yml diff --git a/ansible/update-pipeline.yml b/ansible/update-pipeline.yml new file mode 100644 index 0000000..1719bc3 --- /dev/null +++ b/ansible/update-pipeline.yml @@ -0,0 +1,37 @@ +- name: Update rpcn pipeline and restart service + hosts: connect + become: true + + vars: + rpcn_dir: /opt/rpcn + local_files_dir: "./rpcn_files" # same convention as your other playbook + + tasks: + - name: Ensure target directory exists + file: + path: "{{ rpcn_dir }}" + state: directory + owner: root + group: root + mode: "0755" + + - name: Copy pipeline.yaml to /opt/rpcn + copy: + src: "{{ local_files_dir }}/pipeline.yaml" + dest: "{{ rpcn_dir }}/pipeline.yaml" + owner: root + group: root + mode: "0644" + notify: + - daemon-reload + - restart rpcn + + handlers: + - name: daemon-reload + systemd: + daemon_reload: true + + - name: restart rpcn + systemd: + name: rpcn.service + state: restarted From de5d340cf9282a0558df4d5b66cfaa4552e6ba4a Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:18:39 -0400 Subject: [PATCH 11/22] Delete ansible/rpcn_files/rpcn-ent.service --- ansible/rpcn_files/rpcn-ent.service | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 ansible/rpcn_files/rpcn-ent.service diff --git a/ansible/rpcn_files/rpcn-ent.service b/ansible/rpcn_files/rpcn-ent.service deleted file mode 100644 index dd06e97..0000000 --- a/ansible/rpcn_files/rpcn-ent.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Redpanda Connect Pipeline -After=network.target - -[Service] -ExecStart=/opt/rpcn/rpk connect run /opt/rpcn/pipeline.yaml -Restart=on-failure -User=ubuntu -#Group=redpanda-connect -Environment="REDPANDA_PIPELINE_ID=%H" -Environment="REDPANDA_LICENSE_FILEPATH=/opt/rpcn/redpanda.license" - -[Install] -WantedBy=multi-user.target From 1171552f6cd13d613580d2dfa4fec467e20b1efa Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:18:55 -0400 Subject: [PATCH 12/22] Update rpcn.service --- ansible/rpcn_files/rpcn.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/rpcn_files/rpcn.service b/ansible/rpcn_files/rpcn.service index d43b401..a5ac84b 100644 --- a/ansible/rpcn_files/rpcn.service +++ b/ansible/rpcn_files/rpcn.service @@ -3,7 +3,7 @@ Description=Redpanda Connect Pipeline After=network.target [Service] -ExecStart=/opt/rpcn/rpk connect run /opt/rpcn/pipeline.yaml +ExecStart=/etc/redpanda/rpk connect run /etc/redpanda/pipeline.yaml Restart=on-failure User=ubuntu #Group=redpanda-connect From 9bc78640cab6b1697e6eb07f43940267ea2d8ecd Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:19:06 -0400 Subject: [PATCH 13/22] Delete ansible/stage-rpcn-ent.yml --- ansible/stage-rpcn-ent.yml | 117 ------------------------------------- 1 file changed, 117 deletions(-) delete mode 100644 ansible/stage-rpcn-ent.yml diff --git a/ansible/stage-rpcn-ent.yml b/ansible/stage-rpcn-ent.yml deleted file mode 100644 index 0d1b437..0000000 --- a/ansible/stage-rpcn-ent.yml +++ /dev/null @@ -1,117 +0,0 @@ -- name: Install rpk and set up rpcn service - hosts: connect - become: true - - vars: - rpcn_dir: /opt/rpcn - local_files_dir: "./rpcn_files" # directory on your control machine to upload - rpk_zip_tmp: /tmp/rpk.zip - arch_map: - x86_64: amd64 - amd64: amd64 - aarch64: arm64 - arm64: arm64 - - pre_tasks: - - name: Ensure unzip is present (Debian/Ubuntu) - apt: - name: unzip - state: present - update_cache: true - when: ansible_facts['os_family'] == "Debian" - - - name: Ensure unzip is present (RHEL-family) - yum: - name: unzip - state: present - when: ansible_facts['os_family'] == "RedHat" - - - name: Resolve architecture to Redpanda asset suffix - set_fact: - rpk_arch: "{{ arch_map.get(ansible_architecture, 'amd64') }}" - - - name: Build download URL for rpk zip - set_fact: - rpk_zip_url: "https://github.com/redpanda-data/redpanda/releases/latest/download/rpk-linux-{{ rpk_arch }}.zip" - - tasks: - # --- Ensure target directory exists before unarchive --- - - name: Ensure /opt exists - file: - path: /opt - state: directory - mode: "0755" - - - name: Ensure target directory exists - file: - path: "{{ rpcn_dir }}" - state: directory - owner: root - group: root - mode: "0755" - - - name: Verify target directory exists - stat: - path: "{{ rpcn_dir }}" - register: rpcn_dir_stat - - - name: Fail if target directory is missing - fail: - msg: "Target directory {{ rpcn_dir }} was not created" - when: not rpcn_dir_stat.stat.exists - - # --- Download & unzip rpk for detected arch --- - - name: Download rpk zip for detected arch - get_url: - url: "{{ rpk_zip_url }}" - dest: "{{ rpk_zip_tmp }}" - mode: "0644" - - - name: Unarchive rpk into /opt/rpcn - unarchive: - src: "{{ rpk_zip_tmp }}" - dest: "{{ rpcn_dir }}" - remote_src: true - creates: "{{ rpcn_dir }}/rpk" # idempotent if rpk already present - - - name: Ensure rpk is executable - file: - path: "{{ rpcn_dir }}/rpk" - mode: "0755" - - # --- Copy your local files to the REMOTE host(s) --- - - name: Copy your local files into /opt/rpcn (recursive) - copy: - src: "{{ local_files_dir }}/" - dest: "{{ rpcn_dir }}/" - owner: root - group: root - mode: "0644" - - # --- Install systemd unit --- - - name: Copy service file from /opt/rpcn to systemd unit dir - copy: - src: "{{ rpcn_dir }}/rpcn-ent.service" - dest: /etc/systemd/system/rpcn-ent.service - owner: root - group: root - mode: "0644" - remote_src: true - notify: daemon-reload - - - name: Enable and start rpcn service - systemd: - name: rpcn-ent.service - enabled: true - state: started - - # --- Cleanup --- - - name: Clean up downloaded archive - file: - path: "{{ rpk_zip_tmp }}" - state: absent - - handlers: - - name: daemon-reload - systemd: - daemon_reload: true From 1f0e477e5356f944273ca88e53f0525b07d279c6 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:19:15 -0400 Subject: [PATCH 14/22] Delete ansible/stop-pipeline-ent.yml --- ansible/stop-pipeline-ent.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 ansible/stop-pipeline-ent.yml diff --git a/ansible/stop-pipeline-ent.yml b/ansible/stop-pipeline-ent.yml deleted file mode 100644 index b9970ae..0000000 --- a/ansible/stop-pipeline-ent.yml +++ /dev/null @@ -1,14 +0,0 @@ -- name: Stop rpcn service (skip if unit missing) - hosts: connect - become: true - tasks: - - name: Check if rpcn unit file exists - stat: - path: /etc/systemd/system/rpcn-ent.service - register: rpcn_unit - - - name: Stop rpcn-ent.service when present - systemd: - name: rpcn-ent.service - state: stopped - when: rpcn_unit.stat.exists From 19190a42cbd9742e64e8bc6c0550aca9c1c81d6d Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:19:27 -0400 Subject: [PATCH 15/22] Delete ansible/update-pipeline-ent.yml --- ansible/update-pipeline-ent.yml | 37 --------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 ansible/update-pipeline-ent.yml diff --git a/ansible/update-pipeline-ent.yml b/ansible/update-pipeline-ent.yml deleted file mode 100644 index f224ff5..0000000 --- a/ansible/update-pipeline-ent.yml +++ /dev/null @@ -1,37 +0,0 @@ -- name: Update rpcn pipeline and restart service - hosts: connect - become: true - - vars: - rpcn_dir: /opt/rpcn - local_files_dir: "./rpcn_files" # same convention as your other playbook - - tasks: - - name: Ensure target directory exists - file: - path: "{{ rpcn_dir }}" - state: directory - owner: root - group: root - mode: "0755" - - - name: Copy pipeline.yaml to /opt/rpcn - copy: - src: "{{ local_files_dir }}/pipeline.yaml" - dest: "{{ rpcn_dir }}/pipeline.yaml" - owner: root - group: root - mode: "0644" - notify: - - daemon-reload - - restart rpcn - - handlers: - - name: daemon-reload - systemd: - daemon_reload: true - - - name: restart rpcn - systemd: - name: rpcn-ent.service - state: restarted From 6d893b53a8e6e2b10e3bddbba1ef49dc7ba54b55 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:19:55 -0400 Subject: [PATCH 16/22] Update stage-rpcn.yml --- ansible/stage-rpcn.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ansible/stage-rpcn.yml b/ansible/stage-rpcn.yml index f97beb7..b46802a 100644 --- a/ansible/stage-rpcn.yml +++ b/ansible/stage-rpcn.yml @@ -1,9 +1,11 @@ +# stage-rpcn.yml +# ansible-playbook --private-key ~/.ssh/ansible_test -i hosts.ini stage-rpcn.yml -K - name: Install rpk and set up rpcn service hosts: connect become: true vars: - rpcn_dir: /opt/rpcn + rpcn_dir: /etc/redpanda local_files_dir: "./rpcn_files" # directory on your control machine to upload rpk_zip_tmp: /tmp/rpk.zip arch_map: @@ -67,7 +69,7 @@ dest: "{{ rpk_zip_tmp }}" mode: "0644" - - name: Unarchive rpk into /opt/rpcn + - name: Unarchive rpk into /etc/redpanda unarchive: src: "{{ rpk_zip_tmp }}" dest: "{{ rpcn_dir }}" @@ -80,7 +82,7 @@ mode: "0755" # --- Copy your local files to the REMOTE host(s) --- - - name: Copy your local files into /opt/rpcn (recursive) + - name: Copy your local files into /etc/redpanda (recursive) copy: src: "{{ local_files_dir }}/" dest: "{{ rpcn_dir }}/" @@ -89,7 +91,7 @@ mode: "0644" # --- Install systemd unit --- - - name: Copy service file from /opt/rpcn to systemd unit dir + - name: Copy service file from /etc/redpanda to systemd unit dir copy: src: "{{ rpcn_dir }}/rpcn.service" dest: /etc/systemd/system/rpcn.service @@ -115,3 +117,6 @@ - name: daemon-reload systemd: daemon_reload: true + + + From 47534cb2238308afc49d61fddb6731becb481a1b Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:20:10 -0400 Subject: [PATCH 17/22] Update stop-pipleline.yml --- ansible/stop-pipleline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/stop-pipleline.yml b/ansible/stop-pipleline.yml index 3e7bbd5..89a99aa 100644 --- a/ansible/stop-pipleline.yml +++ b/ansible/stop-pipleline.yml @@ -1,3 +1,5 @@ +# stop-pipeline.yml +# ansible-playbook --private-key ~/.ssh/ansible_test -i hosts.ini stop-pipeline.yml -K - name: Stop rpcn service (skip if unit missing) hosts: connect become: true From bb2589d1e75b10f5ab83d1bbd4e59d0689d4b4d0 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:20:27 -0400 Subject: [PATCH 18/22] Update update-pipeline.yml --- ansible/update-pipeline.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/update-pipeline.yml b/ansible/update-pipeline.yml index 1719bc3..f2992be 100644 --- a/ansible/update-pipeline.yml +++ b/ansible/update-pipeline.yml @@ -1,9 +1,11 @@ +# update-pipeline.yml +# ansible-playbook --private-key ~/.ssh/ansible_test -i hosts.ini update-pipeline.yml -K - name: Update rpcn pipeline and restart service hosts: connect become: true vars: - rpcn_dir: /opt/rpcn + rpcn_dir: /etc/redpanda local_files_dir: "./rpcn_files" # same convention as your other playbook tasks: @@ -15,7 +17,7 @@ group: root mode: "0755" - - name: Copy pipeline.yaml to /opt/rpcn + - name: Copy pipeline.yaml to /etc/redpanda copy: src: "{{ local_files_dir }}/pipeline.yaml" dest: "{{ rpcn_dir }}/pipeline.yaml" From bc61837780c5f643d1274ca714949f0fbdd8e35b Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 11:23:42 -0400 Subject: [PATCH 19/22] Update stage-rpcn.yml --- ansible/stage-rpcn.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/stage-rpcn.yml b/ansible/stage-rpcn.yml index b46802a..b548d99 100644 --- a/ansible/stage-rpcn.yml +++ b/ansible/stage-rpcn.yml @@ -38,9 +38,9 @@ tasks: # --- Ensure target directory exists before unarchive --- - - name: Ensure /opt exists + - name: Ensure /etc exists file: - path: /opt + path: /etc state: directory mode: "0755" From 37a798890dea98e8327008b80e5a94ccd7616f3c Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 12:04:03 -0400 Subject: [PATCH 20/22] Update stage-rpcn.yml --- ansible/stage-rpcn.yml | 69 ++++++++++++------------------------------ 1 file changed, 20 insertions(+), 49 deletions(-) diff --git a/ansible/stage-rpcn.yml b/ansible/stage-rpcn.yml index b548d99..3a842f4 100644 --- a/ansible/stage-rpcn.yml +++ b/ansible/stage-rpcn.yml @@ -1,40 +1,22 @@ -# stage-rpcn.yml -# ansible-playbook --private-key ~/.ssh/ansible_test -i hosts.ini stage-rpcn.yml -K -- name: Install rpk and set up rpcn service +- name: Install redpanda-connect and set up systemd service hosts: connect become: true vars: rpcn_dir: /etc/redpanda local_files_dir: "./rpcn_files" # directory on your control machine to upload - rpk_zip_tmp: /tmp/rpk.zip - arch_map: - x86_64: amd64 - amd64: amd64 - aarch64: arm64 - arm64: arm64 pre_tasks: - - name: Ensure unzip is present (Debian/Ubuntu) - apt: - name: unzip - state: present - update_cache: true + - name: Set package script location for Debian/Ubuntu + set_fact: + download_url: "https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh" when: ansible_facts['os_family'] == "Debian" - - name: Ensure unzip is present (RHEL-family) - yum: - name: unzip - state: present - when: ansible_facts['os_family'] == "RedHat" - - - name: Resolve architecture to Redpanda asset suffix + - name: Set package script location for RHEL-family set_fact: - rpk_arch: "{{ arch_map.get(ansible_architecture, 'amd64') }}" + download_url: "https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.rpm.sh" + when: ansible_facts['os_family'] == "RedHat" - - name: Build download URL for rpk zip - set_fact: - rpk_zip_url: "https://github.com/redpanda-data/redpanda/releases/latest/download/rpk-linux-{{ rpk_arch }}.zip" tasks: # --- Ensure target directory exists before unarchive --- @@ -62,24 +44,19 @@ msg: "Target directory {{ rpcn_dir }} was not created" when: not rpcn_dir_stat.stat.exists - # --- Download & unzip rpk for detected arch --- - - name: Download rpk zip for detected arch - get_url: - url: "{{ rpk_zip_url }}" - dest: "{{ rpk_zip_tmp }}" - mode: "0644" - - - name: Unarchive rpk into /etc/redpanda - unarchive: - src: "{{ rpk_zip_tmp }}" - dest: "{{ rpcn_dir }}" - remote_src: true - creates: "{{ rpcn_dir }}/rpk" # idempotent if rpk already present - - - name: Ensure rpk is executable - file: - path: "{{ rpcn_dir }}/rpk" - mode: "0755" + # --- Install redpanda-connect package --- + - name: dnf install redpanda-connect + ansible.builtin.dnf: + name: redpanda-connect + state: present + when: ansible_facts['os_family'] == "RedHat" + + - name: apt install redpanda-connect + ansible.builtin.apt: + name: redpanda-connect + state: present + update_cache: yes + when: ansible_facts['os_family'] == "Debian" # --- Copy your local files to the REMOTE host(s) --- - name: Copy your local files into /etc/redpanda (recursive) @@ -107,12 +84,6 @@ enabled: true state: started - # --- Cleanup --- - - name: Clean up downloaded archive - file: - path: "{{ rpk_zip_tmp }}" - state: absent - handlers: - name: daemon-reload systemd: From 90d07d1b9da8d794d27f039967f490ab03fda3af Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 12:04:12 -0400 Subject: [PATCH 21/22] Update stop-pipleline.yml --- ansible/stop-pipleline.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/ansible/stop-pipleline.yml b/ansible/stop-pipleline.yml index 89a99aa..3e7bbd5 100644 --- a/ansible/stop-pipleline.yml +++ b/ansible/stop-pipleline.yml @@ -1,5 +1,3 @@ -# stop-pipeline.yml -# ansible-playbook --private-key ~/.ssh/ansible_test -i hosts.ini stop-pipeline.yml -K - name: Stop rpcn service (skip if unit missing) hosts: connect become: true From 81cd94138295d20f2f77304f9e916dc0293a9227 Mon Sep 17 00:00:00 2001 From: bfbarkhouse-redpanda Date: Tue, 14 Oct 2025 12:04:21 -0400 Subject: [PATCH 22/22] Update update-pipeline.yml --- ansible/update-pipeline.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/ansible/update-pipeline.yml b/ansible/update-pipeline.yml index f2992be..614af91 100644 --- a/ansible/update-pipeline.yml +++ b/ansible/update-pipeline.yml @@ -1,5 +1,3 @@ -# update-pipeline.yml -# ansible-playbook --private-key ~/.ssh/ansible_test -i hosts.ini update-pipeline.yml -K - name: Update rpcn pipeline and restart service hosts: connect become: true