Skip to content

Commit

Permalink
Merge pull request #2 from rohitagarwal01/ospackage-packaging
Browse files Browse the repository at this point in the history
ospackage packaging
  • Loading branch information
skorten committed Nov 4, 2015
2 parents 87981eb + 6fd52d7 commit c43a287
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
23 changes: 23 additions & 0 deletions clouddriver-web/clouddriver-web.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,32 @@ ospackage {
release '4'
into "/opt/${project.applicationName}"
from ("${project.buildDir}/install/${project.applicationName}")

postInstall("install --mode=755 --owner=spinnaker --group=spinnaker --directory /var/log/spinnaker/clouddriver")
postUninstall("rm -rf /var/log/spinnaker/clouddriver")

from(file('src/main/resources/clouddriver.conf')) {
into('/etc/init')
user = 'root'
permissionGroup = 'root'
fileType = CONFIG | NOREPLACE
}

from(file('src/main/resources/clouddriver')) {
into('/etc/logrotate.d')
user = 'root'
permissionGroup = 'root'
fileType = CONFIG | NOREPLACE
}
}

buildDeb {
dependsOn installApp
}

buildRpm {
arch = NOARCH
os = LINUX
dependsOn installApp
}

8 changes: 8 additions & 0 deletions clouddriver-web/src/main/resources/clouddriver
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/var/log/spinnaker/clouddriver/clouddriver.log {
copytruncate
daily
rotate 10
compress
missingok
create 0644 spinnaker spinnaker
}
6 changes: 6 additions & 0 deletions clouddriver-web/src/main/resources/clouddriver.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description "clouddriver"

start on filesystem or runlevel [2345]
stop on runlevel [!2345]

exec /opt/clouddriver/bin/clouddriver 2>&1 > /var/log/spinnaker/clouddriver/clouddriver.log &

0 comments on commit c43a287

Please sign in to comment.