Commit Graph

31 Commits

Author SHA1 Message Date
Pekka Enberg
36ae2fcfd7 dist: Execute Maven in batch mode
The batch mode produces much more readable logs because it's designed
for non-interactive builds and doesn't have the fancy download progress
meters.
Message-Id: <1464770158-32482-1-git-send-email-penberg@scylladb.com>
2016-06-06 16:19:22 +03:00
Pekka Enberg
c6edab5990 dist/redhat: Fix RPM package build
Commit 12daaf5 ("dist/redhat: fix rpm build error") did not fix the
error, at least not on our Jenkins build machines.

Looking at the RPM build logs, we create the build directory:

+ cd /builddir/build/BUILD
+ mkdir build

but then change directory to "scylla-jmx-1.2.rc1":

+ cd /builddir/build/BUILD
+ cd scylla-jmx-1.2.rc1
+ mvn install

and therefore fail the copy:

+ cp dist/common/systemd/scylla-jmx.service.in build/scylla-jmx.service
cp: cannot create regular file 'build/scylla-jmx.service': No such
file or directory

I don't know why Takuya put the "mkdir" in the "prep" section but
something like this should unblock the build.
2016-06-01 10:59:52 +03:00
Takuya ASADA
12daaf546d dist/redhat: fix rpm build error
Since build/ is not exist, 'cp dist/common/systemd/scylla-jmx.service.in build/scylla-jmx.service' will fail.
So create build/ before starting build stage.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1464164524-20867-1-git-send-email-syuu@scylladb.com>
2016-05-25 13:24:04 +03:00
Takuya ASADA
e3c5acfcad dist: Support systemd for Ubuntu 15.10/16.04
Since Ubuntu 15.10/16.04 has moved to systemd, share CentOS/Fedora's systemd unit file with Ubuntu.

Fixes scylladb/scylla#1283

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1464083473-1701-1-git-send-email-syuu@scylladb.com>
2016-05-24 12:53:15 +03:00
Avi Kivity
f6710465ef dist: change scylla-jmx process name from 'java' to 'scylla-jmx'
Helps in top, pgrep and friends.  Unfortunately the only reasonable way
to do it is to create a symlink to /usr/bin/java and run that.
Message-Id: <1463580254-8369-1-git-send-email-avi@scylladb.com>
2016-05-20 13:38:28 +03:00
Takuya ASADA
ef15d95416 dist: #!/bin/bash for all scripts
Like we did on scylla-server, switch to bash.
2016-04-30 07:40:42 +00:00
Avi Kivity
24cebcc9a1 dist: do not always restart jmx on shutdown
Restart=always leads to the following loop:

 1. scylla terminates abnormally
 2. scylla-jmx sees that, and terminates
 3. systemd sees that scylla-jmx terminated, and restarts it.
 4. scylla-jmx requires scylla, so systemd starts it.
 5. goto 1.

To prevent the loop, set Restart=on-abnormal; systemd will restart scylla-jmx
if some JVM bug got it killed, but not otherwise.

The downside to this patch is that if scylla-server goes down, so does
scylla-jmx, but if scylla-server is then restarted, scylla-jmx stays down.
To get scylla and scylla-jmx to start together, we need to create
scylla.service that requires both of them.
2016-01-07 09:11:51 +02:00
Pekka Enberg
4dfa0737ac Rename urchin-mbean.jar to scylla-jmx.jar
Urchin is an obsolete working name for Scylla. Rename the Jar file to
scylla-jmx.jar.

Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-12-17 09:27:58 +02:00
Takuya ASADA
c25a844410 dist: remove unneeded parameters
Since scylla-jmx supports to read configuration from scylla.yaml, we
don't need to pass these parameters from program arguments.

Fixes #17.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2015-12-14 11:29:28 +02:00
Takuya ASADA
18674d67b0 dist: do not overwirte sysconfig file on 'yum update' 2015-12-02 01:27:47 +09:00
Takuya ASADA
bcc99b274f dist: drop dist/common/scripts/jmx_run, use scripts/scylla-jmx 2015-12-02 01:19:03 +09:00
Takuya ASADA
28efc831b1 dist: share scripts both on redhat and ubuntu 2015-10-27 04:17:13 +09:00
Takuya ASADA
a2ad9bb221 dist: use OpenJDK-7 on CentOS 2015-10-27 04:17:13 +09:00
Shlomi Livne
d8b7149292 dist: update rpm build to support centos as well
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-10-13 08:18:28 +03:00
Takuya ASADA
f035be4435 dist: does not need maven for running time
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-25 09:45:06 +03:00
Takuya ASADA
86ae0a38a9 dist: check hostname is resolvable
Warning for #6

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
[ penberg: edit warning text ]
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-24 15:36:24 +03:00
Asias He
4dd0b95083 rpm: Fix build in centos container
mock will call /usr/sbin/mock, but we need /usr/bin/mock.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-24 08:24:24 +03:00
Pekka Enberg
d14ddd5a0c Change license to AGPLv3
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-22 13:33:24 +03:00
Amnon Heiman
7255b7847e JMX run scripts: Set the rmi port to listen on the jmx port
This set the rmi port to listen on the jmx port, so the java will not
choose a random port for it.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-22 10:19:53 +03:00
Takuya ASADA
709bc37fcd dist: use jre-1.8.0/bin/java instead of /usr/bin/java, since 1.8.0 is not default on CentOS
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-09-21 21:10:26 +02:00
Takuya ASADA
ab549e0dc7 dist: we need JDK, instead JRE on building time
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-09-21 21:10:26 +02:00
Shlomi Livne
cdb8aa82bf dist: fix jvm option mistake in run script
-Dcom.sun.management.jmemote.ssl=false need to be
-Dcom.sun.management.jmxremote.ssl=false

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-21 10:09:02 +03:00
Shlomi Livne
f162d740e0 Fix args for booting java process
args must be specified before jar file, updated args

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-17 14:52:56 +03:00
Shlomi Livne
7ce1b07962 dist/redhat: Fix a small bug in script
The prefix should include version without release.

Without this fix I get:

Complete!
Finish: build setup for scylla-jmx-0.8-20150917.b177d24.fc21.src.rpm
Start: rpmbuild scylla-jmx-0.8-20150917.b177d24.fc21.src.rpm
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.gNKOxr
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf scylla-jmx-0.8
+ /usr/bin/tar -xf
/builddir/build/SOURCES/scylla-jmx-0.8-20150917.b177d24.tar
+ cd scylla-jmx-0.8
/var/tmp/rpm-tmp.gNKOxr: line 33: cd: scylla-jmx-0.8: No such file or
directory
error: Bad exit status from /var/tmp/rpm-tmp.gNKOxr (%prep)
    Bad exit status from /var/tmp/rpm-tmp.gNKOxr (%prep)

RPM build errors:
ERROR:
Exception(build/rpmbuild/SRPMS/scylla-jmx-0.8-20150917.b177d24.fc21.src.rpm)
Config(fedora-21-x86_64) 0 minutes 51 seconds
INFO: Results and/or logs in: /home/shlomi/urchin-jmx/build/rpms
INFO: Cleaning up build root ('cleanup_on_failure=True')

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-17 13:24:21 +03:00
Pekka Enberg
ab10c93a1d dist/redhat: Fix RPM package home page URL
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-17 13:07:08 +03:00
Pekka Enberg
b177d24d46 dist/redhat: Add version numbering
This adds version proper version numbering for the scylla-jmx RPM. Please note
that the version number in the server is still hard-coded in the Maven POM
file as "1.0". We need to address that later.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-17 10:23:25 +03:00
Takuya ASADA
3259ef9604 dist: move service command line to scripts/jmx_run
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-17 10:05:29 +03:00
Takuya ASADA
2058cdde7c dist: use mock to build rpm
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-14 11:44:17 +03:00
Takuya ASADA
b0dbe82dad dist: add dependency to scylla-server
Since systemd unit file already has dependency to scylla-server, we need to add
dependency to rpm as well.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-14 11:03:14 +03:00
Pekka Enberg
aa546f3ccb dist/redhat: Fix typo in spec file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-07 13:47:38 +03:00
Takuya ASADA
795c7a5df6 .spec file and scripts to build RPM for Fedora
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-09-07 13:47:15 +03:00