Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FlorianHeigl/e0c93db1e096264e8221f3a7518e6626 to your computer and use it in GitHub Desktop.
Save FlorianHeigl/e0c93db1e096264e8221f3a7518e6626 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.
write_files:
- content: |
[Rudder_4.1]
name=Rudder 4.1 EL repository
baseurl=http://www.rudder-project.org/rpm-4.1/RHEL_7/
gpgcheck=0
gpgkey=http://www.rudder-project.org/rpm-4.1/RHEL_7/repodata/repomd.xml.key
path: /etc/yum.repos.d/rudder.repo
# Tell the agent which server to contact
write-files:
- path: /var/rudder/cfengine-community/policy_server.dat
content: rudder
owner: root:root
permissions: '0640'
# Fire it up the first time so it's ready to roll!
runcmd:
- rpm -Uvh http://147.75.205.161/rudder-agent-4.1.1.release-1.EL.7.x86_64.rpm
- rudder agent run
- rudder agent run -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment