You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to correctly deploy a toy Play 2.4 app RPM packaged and I'm having problems in setting the correct ownership for all the files/folders installed.
The build.sbt is:
importgilt.sbt.resolvers.GiltReposimportcom.typesafe.sbt.packager.SettingsHelper._
name :="""play-rpm"""
version :="0.0.1"lazyvalroot= (project in file("."))
.enablePlugins(PlayScala, RpmPlugin, RpmDeployPlugin)
scalaVersion :="2.11.6"
libraryDependencies ++=Seq(
jdbc,
cache,
ws,
specs2 %Test
)
// publish configuration for Nexus
publishTo :=Some(GiltRepos.Resolvers.head)
credentials +=Credentials(Path.userHome /".ivy2"/".credentials")
publishMavenStyle :=false
resolvers +="scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"// Play provides two styles of routers, one expects its actions to be injected, the// other, legacy style, accesses its actions statically.
routesGenerator :=InjectedRoutesGenerator// RPM generation
maintainer in Linux:="Ugo Matrangolo <umatrangolo@gilt.com>"
packageSummary in Linux:="Play-Rpm"
packageDescription :="Simple Play svc that uses RPM"
rpmRelease :="1"
rpmVendor :="Ugo Matrangolo"
rpmUrl :=Some("http://umatrangolo.com")
rpmLicense :=Some("Apache v2")
rpmGroup :=Some("TEST")
rpmBrpJavaRepackJars :=true
rpmPrefix :=Some("/opt")
javaOptions in Universal++=Seq(
// -J params will be added as jvm parameters"-J-Xmx2048m",
"-J-Xms2048m",
// others will be added as app parameters"-Dpidfile.path=/var/run/play-rpm/play.pid"
)
With the above I do a simple sbt rpm:packageBin that gets installed on an EC2 instance producing the following layout:
This is the correct layout. Files in /usr/share are owned by root as they should remain unchanged. If your application needs access to the filesystem, this must be granted explicitly (like /var/run/<app>). All other files are readable (and in bin also executable) by everyone.
Hi,
I'm trying to correctly deploy a toy Play 2.4 app RPM packaged and I'm having problems in setting the correct ownership for all the files/folders installed.
The
build.sbt
is:With the above I do a simple
sbt rpm:packageBin
that gets installed on an EC2 instance producing the following layout:/usr/share/play-rpm/ ├── [drwxr-xr-x root ] bin ├── [drwxr-xr-x root ] conf ├── [drwxr-xr-x root ] lib ├── [lrwxrwxrwx root ] logs -> /var/log/play-rpm └── [drwxr-xr-x root ] share └── [drwxr-xr-x root ] doc └── [drwxr-xr-x root ] api ├── [drwxr-xr-x root ] controllers │ └── [drwxr-xr-x root ] javascript ├── [drwxr-xr-x root ] index ├── [drwxr-xr-x root ] lib ├── [drwxr-xr-x root ] router └── [drwxr-xr-x root ] views └── [drwxr-xr-x root ] html
and
and
Please note that while all the files/folders in the
var
folder have correct ownership (play-rpm
) all the rest is owned byroot
.Is this a correct layout ? I was expecting that everything should be owned by the
play-rpm
user but I might be wrong.Please, advice.
The text was updated successfully, but these errors were encountered: