Skip to content

Instantly share code, notes, and snippets.

@jeffweiss
Created April 15, 2016 17:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffweiss/50f1f37bf571fd23cfca2e97fdf4ef18 to your computer and use it in GitHub Desktop.
Save jeffweiss/50f1f37bf571fd23cfca2e97fdf4ef18 to your computer and use it in GitHub Desktop.
snippets for elixir continuous delivery pipeline
cmd = [
'fpm',
'-t deb',
'-s dir',
'-d postgresql',
'-m ' + config[:maintainer],
"-n '#{config[:product]}'",
"--prefix /opt/puppet/#{config[:product]}",
'-v ' + deb_version,
"--deb-init #{config[:product]}.init",
"--config-files /opt/puppet/#{config[:product]}/#{config[:product]}.conf",
"--after-install after-install.sh",
]
package {'my_app':
ensure => latest,
configfiles => replace,
}
file {'/opt/puppet/my_app/my_app.conf':
ensure => file,
content => template('profile/my_app/my_app.conf.erb'),
mode => '0600',
subscribe => Package['my_app'],
notify => Service['my_app'],
}
file {'/opt/puppet/my_app/running-config':
ensure => directory,
recurse => true,
mode => '0600',
subscribe => Package['my_app'],
notify => Service['my_app'],
}
service {'my_app':
ensure => running,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment