Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1fbbecb
Create redpanda.license
bfbarkhouse-redpanda Oct 9, 2025
f366369
Create pipeline.yaml
bfbarkhouse-redpanda Oct 9, 2025
b220f4f
Create rpcn.service
bfbarkhouse-redpanda Oct 9, 2025
c3adb23
Create rpcn-ent.service
bfbarkhouse-redpanda Oct 9, 2025
96b5f26
Create stage-rpcn-ent.yml
bfbarkhouse-redpanda Oct 9, 2025
0e9c003
Create stage-rpcn.yml
bfbarkhouse-redpanda Oct 9, 2025
f98a4f2
Create stop-pipeline-ent.yml
bfbarkhouse-redpanda Oct 9, 2025
cab118a
Create stop-pipleline.yml
bfbarkhouse-redpanda Oct 9, 2025
47aa40d
Create update-pipeline-ent.yml
bfbarkhouse-redpanda Oct 9, 2025
969df81
Create update-pipeline.yml
bfbarkhouse-redpanda Oct 9, 2025
de5d340
Delete ansible/rpcn_files/rpcn-ent.service
bfbarkhouse-redpanda Oct 14, 2025
1171552
Update rpcn.service
bfbarkhouse-redpanda Oct 14, 2025
9bc7864
Delete ansible/stage-rpcn-ent.yml
bfbarkhouse-redpanda Oct 14, 2025
1f0e477
Delete ansible/stop-pipeline-ent.yml
bfbarkhouse-redpanda Oct 14, 2025
19190a4
Delete ansible/update-pipeline-ent.yml
bfbarkhouse-redpanda Oct 14, 2025
6d893b5
Update stage-rpcn.yml
bfbarkhouse-redpanda Oct 14, 2025
47534cb
Update stop-pipleline.yml
bfbarkhouse-redpanda Oct 14, 2025
bb2589d
Update update-pipeline.yml
bfbarkhouse-redpanda Oct 14, 2025
bc61837
Update stage-rpcn.yml
bfbarkhouse-redpanda Oct 14, 2025
37a7988
Update stage-rpcn.yml
bfbarkhouse-redpanda Oct 14, 2025
90d07d1
Update stop-pipleline.yml
bfbarkhouse-redpanda Oct 14, 2025
81cd941
Update update-pipeline.yml
bfbarkhouse-redpanda Oct 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ansible/rpcn_files/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#Example pipeline to smoke test with

Check failure on line 1 in ansible/rpcn_files/pipeline.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[comments]

Missing starting space in comment
input:
label: "file_input"
file:
paths: [ "/opt/rpcn/pipeline.yaml" ]
scanner:
lines: {}

output:
label: "stdout"
stdout:
codec: lines
1 change: 1 addition & 0 deletions ansible/rpcn_files/redpanda.license
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#Paste license key here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should follow the same license install pattern that's used in redpanda-ansible-collection

13 changes: 13 additions & 0 deletions ansible/rpcn_files/rpcn.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Redpanda Connect Pipeline
After=network.target

[Service]
ExecStart=/etc/redpanda/rpk connect run /etc/redpanda/pipeline.yaml
Restart=on-failure
User=ubuntu
#Group=redpanda-connect
Environment="REDPANDA_PIPELINE_ID=%H"

[Install]
WantedBy=multi-user.target
93 changes: 93 additions & 0 deletions ansible/stage-rpcn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
- 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

pre_tasks:
- name: Set package script location for Debian/Ubuntu
set_fact:

Check failure on line 11 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

fqcn[action-core]

Use FQCN for builtin module actions (set_fact).
download_url: "https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh"
when: ansible_facts['os_family'] == "Debian"

- name: Set package script location for RHEL-family
set_fact:

Check failure on line 16 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

fqcn[action-core]

Use FQCN for builtin module actions (set_fact).
download_url: "https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.rpm.sh"
when: ansible_facts['os_family'] == "RedHat"


tasks:
# --- Ensure target directory exists before unarchive ---
- name: Ensure /etc exists
file:

Check failure on line 24 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

fqcn[action-core]

Use FQCN for builtin module actions (file).
path: /etc
state: directory
mode: "0755"

- name: Ensure target directory exists
file:

Check failure on line 30 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

fqcn[action-core]

Use FQCN for builtin module actions (file).
path: "{{ rpcn_dir }}"
state: directory
owner: root
group: root
mode: "0755"

- name: Verify target directory exists
stat:

Check failure on line 38 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

fqcn[action-core]

Use FQCN for builtin module actions (stat).
path: "{{ rpcn_dir }}"
register: rpcn_dir_stat

- name: Fail if target directory is missing
fail:

Check failure on line 43 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

fqcn[action-core]

Use FQCN for builtin module actions (fail).
msg: "Target directory {{ rpcn_dir }} was not created"
when: not rpcn_dir_stat.stat.exists

# --- Install redpanda-connect package ---
- name: dnf install redpanda-connect

Check failure on line 48 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.dnf:
name: redpanda-connect
state: present
when: ansible_facts['os_family'] == "RedHat"

- name: apt install redpanda-connect

Check failure on line 54 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.apt:
name: redpanda-connect
state: present
update_cache: yes

Check failure on line 58 in ansible/stage-rpcn.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[truthy]

Truthy value should be one of [false, true]
when: ansible_facts['os_family'] == "Debian"

# --- Copy your local files to the REMOTE host(s) ---
- name: Copy your local files into /etc/redpanda (recursive)
copy:
src: "{{ local_files_dir }}/"
dest: "{{ rpcn_dir }}/"
owner: root
group: root
mode: "0644"

# --- Install systemd unit ---
- name: Copy service file from /etc/redpanda 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

handlers:
- name: daemon-reload
systemd:
daemon_reload: true



14 changes: 14 additions & 0 deletions ansible/stop-pipleline.yml
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions ansible/update-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
- name: Update rpcn pipeline and restart service
hosts: connect
become: true

vars:
rpcn_dir: /etc/redpanda
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 /etc/redpanda
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