Skip to content

Instantly share code, notes, and snippets.

@adamgoucher
Last active October 9, 2015 16:37
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 adamgoucher/067f033bad234e4e6a84 to your computer and use it in GitHub Desktop.
Save adamgoucher/067f033bad234e4e6a84 to your computer and use it in GitHub Desktop.
machinations necessary to host your own codedeploy package in a local reprepro instance as it requires the Priority field in the control filenow it. (the 'source' attribute on package type isnt supported on ubuntu which is the aws-samples way of doing this.)
Get the latest install script
Adam-Gouchers-MacBook:machinations adam$ aws s3 cp s3://aws-codedeploy-us-west-2/latest/VERSION . --region us-west-2
download: s3://aws-codedeploy-us-west-2/latest/VERSION to ./VERSION
Adam-Gouchers-MacBook:machinations adam$
understand the current version
Adam-Gouchers-MacBook:machinations adam$ cat VERSION
{"rpm":"releases/codedeploy-agent-1.0-1.751.noarch.rpm","deb":"releases/codedeploy-agent_1.0-1.751_all.deb"}
Adam-Gouchers-MacBook:machinations adam$
get the specific package
Adam-Gouchers-MacBook:machinations adam$ aws s3 cp s3://aws-codedeploy-us-west-2/releases/codedeploy-agent_1.0-1.751_all.deb . --region us-west-2
download: s3://aws-codedeploy-us-west-2/releases/codedeploy-agent_1.0-1.751_all.deb to ./codedeploy-agent_1.0-1.751_all.deb
Adam-Gouchers-MacBook:machinations adam$
unpack things
Adam-Gouchers-MacBook:machinations adam$ mkdir contents
Adam-Gouchers-MacBook:machinations adam$ cd contents/
Adam-Gouchers-MacBook:contents adam$ dpkg-deb -x ../codedeploy-agent_1.0-1.751_all.deb .
Adam-Gouchers-MacBook:contents adam$ dpkg-deb -e ../codedeploy-agent_1.0-1.751_all.deb ./DEBIAN
Adam-Gouchers-MacBook:contents adam$
check if things are still uninstallable
Adam-Gouchers-MacBook:contents adam$ grep Priority DEBIAN/control
Adam-Gouchers-MacBook:contents adam$
yup. add Priority.
Adam-Gouchers-MacBook:contents adam$ grep Priority DEBIAN/control
Priority: Optional
Adam-Gouchers-MacBook:contents adam$
package it all back up.
Adam-Gouchers-MacBook:contents adam$ dpkg-deb -b . ../codedeploy-agent_1.0-1.751_all.deb
dpkg-deb: building package 'codedeploy-agent' in '../codedeploy-agent_1.0-1.751_all.deb'.
Adam-Gouchers-MacBook:contents adam$
now it can up hosted in reprepro.
and installed via puppet's package resource
and managed further by ensuring the update cron job (codedeploy-agent-update) isn't present via puppet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment