Amazon Linux CloudInit packages installation based on
"repo_additions + packages" blocks only supports signed
RPMs.
The reason is that cloudinit's dist_repo_yum.py
does not implement yet "gpgcheck=0".
The workaround is to install the "http://rundeck.org/latest.rpm"
via the [runcmd] block but it is less elegant.
Sample of FAILING "repo_additions+packages"
based Amazon Linux CloudInit script because Rundeck RPM is not
signed:
#cloud-config
repo_additions:
- source: "rundeck-release"
filename: rundeck-release.repo
name: "Rundeck - Release"
baseurl: http://rundeck.org/repo/rundeck/1/release
key: http://rundeck.org/repo/RPM-GPG-KEY-RunDeck.org
enabled: 1
packages:
- rundeck
runcmd:
- [service, rundeckd, start ]
- [usermod, -a, -G, rundeck, ec2-user]
Sample of SUCCESSFUL Amazon Linux CloudInit
script using the [runcmd] block:
#cloud-config
runcmd:
- [rpm, -U, -v, -h, "http://rundeck.org/latest.rpm"]
- [yum, -y, install, rundeck]
- [sh, -xc, "/etc/init.d/rundeckd restart"]
Context: we use CloudInit automated deployment of
rundeck+jenkins+tomcat for training purpose: 1 jenkins + 1 rundeck
+ 2 tomcat per attendee.