Skip to content

Instantly share code, notes, and snippets.

@jooooooon
Last active November 28, 2016 17:25
Show Gist options
  • Save jooooooon/630caa2bfbf38d5a2bb1 to your computer and use it in GitHub Desktop.
Save jooooooon/630caa2bfbf38d5a2bb1 to your computer and use it in GitHub Desktop.
These files allow to install a Rudder agent automatically using cloud-init. All you need to do to use them is set the user-data field in your cloud provider to contain "#include" on one line, and the URL to the raw version of this script on the second line. Assuming you're using an image with cloud-init pre-installed, your new instance will spin…
#cloud-config
# Set up the package repository to get Rudder.
# We use the "latest" pseudo-version name to always get an up-to-date agent.
yum_repos:
- rudder-latest:
baseurl: http://www.rudder-project.org/rpm-latest/RHEL_7/
enabled: true
gpgcheck: true
gpgkey: http://www.rudder-project.org/packages.gpg.key
name: Rudder latest repo
# Install the agent itself
packages:
- rudder-agent
# Tell the agent which server to contact
write-files:
- path: /var/rudder/cfengine-community/policy_server.dat
content: rudder.my-company.com
owner: root:root
permissions: '0640'
# Fire it up the first time so it's ready to roll!
runcmd:
- rudder agent run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment