Skip to main content

Rudder

Installation rudder server

wget --quiet -O /etc/apt/trusted.gpg.d/rudder_apt_key.gpg "https://repository.rudder.io/apt/rudder_apt_key.gpg"
echo "deb http://repository.rudder.io/apt/7.2/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/rudder.list
echo "machine download.rudder.io login LOGIN password PASSWORD" > /etc/apt/auth.conf.d/rudder.conf
chmod 640 /etc/apt/auth.conf.d/rudder.conf
apt-get update
apt-get install rudder-server

Change LOGIN and PASSWORD by yours

Then create an admin user:

rudder server create-user -u USERNAME

Replace USERNAME by what you want to name the admin account


Installation rudder agent

wget --quiet -O /etc/apt/trusted.gpg.d/rudder_apt_key.gpg "https://repository.rudder.io/apt/rudder_apt_key.gpg"
echo "deb http://repository.rudder.io/apt/7.2/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/rudder.list
echo "machine download.rudder.io login LOGIN password PASSWORD" > /etc/apt/auth.conf.d/rudder.conf
chmod 640 /etc/apt/auth.conf.d/rudder.conf
apt-get update
apt-get install rudder-agent

Change LOGIN and PASSWORD by yours

Then join the rudder server

rudder agent policy-server <IP>

force the agent to run

rudder agent inventory
rudder agent run

Go on the rudder web GUI in Pending nodes tab and accept the new node

pending_node.png


Use Rudder as ansible inventory provider

Get the conf file and pt it in the ansible dir

cd /usr/share/ansible
wget https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/rudder.py
wget https://raw.githubusercontent.com/ansible-community/contrib-scripts/main/inventory/rudder.ini

open rudder.py and change the first line to

#!/usr/bin/env python
#!/usr/bin/env python3

chmod rudder.py to 777 and then modify rudder.ini

uri = https://rudder.local/rudder/api
uri = https://<ip srv root rudder>/rudder/api

token = aaabbbccc
token = <token readonly>

add script plugin in ansible.cfg

enable_plugins=script, auto, yaml, ini, toml, host_list

run the list command with rudder.py as inventory

ansible-inventory -i rudder.py --list

Change root policy on node

rudder agent factory-rest
rudder agent policy-server <ip>
rudder agent inventory
rudder agent run

Then accept the node on the root UI