Skip to content

Commit

Permalink
dist: drop scylla-jmx
Browse files Browse the repository at this point in the history
Since JMX server is deprecated, drop them from submodule, build system
and package definition.

Related scylladb/scylla-tools-java#370
Related scylladb#14856

Signed-off-by: Takuya ASADA <[email protected]>

Closes scylladb#17969
  • Loading branch information
syuu1228 authored and Deexie committed Sep 25, 2024
1 parent 23a5339 commit 082e466
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 42 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
[submodule "abseil"]
path = abseil
url = ../abseil-cpp
[submodule "scylla-jmx"]
path = tools/jmx
url = ../scylla-jmx
[submodule "scylla-tools"]
path = tools/java
url = ../scylla-tools-java
Expand Down
28 changes: 7 additions & 21 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ def find_ninja():
help="Specify the artifacts to build, invoke {} with --list-artifacts to list all available artifacts, if unspecified all artifacts are built".format(sys.argv[0]))
arg_parser.add_argument('--with-seastar', action='store', dest='seastar_path', default='seastar', help='Path to Seastar sources')
add_tristate(arg_parser, name='dist', dest='enable_dist',
help='scylla-tools-java, scylla-jmx and packages')
help='build dist targets')
arg_parser.add_argument('--dist-only', dest='dist_only', action='store_true', default=False,
help='skip compiling code and run dist targets only')

Expand Down Expand Up @@ -2292,12 +2292,11 @@ def write_build_file(f,
f.write(f' mode = {mode}\n')
f.write(f'build dist-server-{mode}: phony $builddir/dist/{mode}/redhat $builddir/dist/{mode}/debian\n')
f.write(f'build dist-server-debuginfo-{mode}: phony $builddir/{mode}/dist/tar/{scylla_product}-debuginfo-{scylla_version}-{scylla_release}.{arch}.tar.gz\n')
f.write(f'build dist-jmx-{mode}: phony $builddir/{mode}/dist/tar/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz dist-jmx-rpm dist-jmx-deb\n')
f.write(f'build dist-tools-{mode}: phony $builddir/{mode}/dist/tar/{scylla_product}-tools-{scylla_version}-{scylla_release}.noarch.tar.gz dist-tools-rpm dist-tools-deb\n')
f.write(f'build dist-cqlsh-{mode}: phony $builddir/{mode}/dist/tar/{scylla_product}-cqlsh-{scylla_version}-{scylla_release}.{arch}.tar.gz dist-cqlsh-rpm dist-cqlsh-deb\n')
f.write(f'build dist-python3-{mode}: phony dist-python3-tar dist-python3-rpm dist-python3-deb\n')
f.write(f'build dist-unified-{mode}: phony $builddir/{mode}/dist/tar/{scylla_product}-unified-{scylla_version}-{scylla_release}.{arch}.tar.gz\n')
f.write(f'build $builddir/{mode}/dist/tar/{scylla_product}-unified-{scylla_version}-{scylla_release}.{arch}.tar.gz: unified $builddir/{mode}/dist/tar/{scylla_product}-{scylla_version}-{scylla_release}.{arch}.tar.gz $builddir/{mode}/dist/tar/{scylla_product}-python3-{scylla_version}-{scylla_release}.{arch}.tar.gz $builddir/{mode}/dist/tar/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz $builddir/{mode}/dist/tar/{scylla_product}-tools-{scylla_version}-{scylla_release}.noarch.tar.gz $builddir/{mode}/dist/tar/{scylla_product}-cqlsh-{scylla_version}-{scylla_release}.{arch}.tar.gz | always\n')
f.write(f'build $builddir/{mode}/dist/tar/{scylla_product}-unified-{scylla_version}-{scylla_release}.{arch}.tar.gz: unified $builddir/{mode}/dist/tar/{scylla_product}-{scylla_version}-{scylla_release}.{arch}.tar.gz $builddir/{mode}/dist/tar/{scylla_product}-python3-{scylla_version}-{scylla_release}.{arch}.tar.gz $builddir/{mode}/dist/tar/{scylla_product}-tools-{scylla_version}-{scylla_release}.noarch.tar.gz $builddir/{mode}/dist/tar/{scylla_product}-cqlsh-{scylla_version}-{scylla_release}.{arch}.tar.gz | always\n')
f.write(f' mode = {mode}\n')
f.write(f'build $builddir/{mode}/dist/tar/{scylla_product}-unified-package-{scylla_version}-{scylla_release}.tar.gz: copy $builddir/{mode}/dist/tar/{scylla_product}-unified-{scylla_version}-{scylla_release}.{arch}.tar.gz\n')
f.write(f'build $builddir/{mode}/dist/tar/{scylla_product}-unified-{arch}-package-{scylla_version}-{scylla_release}.tar.gz: copy $builddir/{mode}/dist/tar/{scylla_product}-unified-{scylla_version}-{scylla_release}.{arch}.tar.gz\n')
Expand Down Expand Up @@ -2344,17 +2343,6 @@ def write_build_file(f,
rule build-submodule-deb
command = cd $dir && ./reloc/build_deb.sh --reloc-pkg $artifact
build tools/jmx/build/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz: build-submodule-reloc | $builddir/SCYLLA-PRODUCT-FILE $builddir/SCYLLA-VERSION-FILE $builddir/SCYLLA-RELEASE-FILE
reloc_dir = tools/jmx
build dist-jmx-rpm: build-submodule-rpm tools/jmx/build/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz
dir = tools/jmx
artifact = build/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz
build dist-jmx-deb: build-submodule-deb tools/jmx/build/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz
dir = tools/jmx
artifact = build/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz
build dist-jmx-tar: phony {' '.join(['$builddir/{mode}/dist/tar/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz'.format(mode=mode, scylla_product=scylla_product, scylla_version=scylla_version, scylla_release=scylla_release) for mode in default_modes])}
build dist-jmx: phony dist-jmx-tar dist-jmx-rpm dist-jmx-deb
build tools/java/build/{scylla_product}-tools-{scylla_version}-{scylla_release}.noarch.tar.gz: build-submodule-reloc | $builddir/SCYLLA-PRODUCT-FILE $builddir/SCYLLA-VERSION-FILE $builddir/SCYLLA-RELEASE-FILE
reloc_dir = tools/java
build dist-tools-rpm: build-submodule-rpm tools/java/build/{scylla_product}-tools-{scylla_version}-{scylla_release}.noarch.tar.gz
Expand Down Expand Up @@ -2388,11 +2376,11 @@ def write_build_file(f,
artifact = build/{scylla_product}-python3-{scylla_version}-{scylla_release}.{arch}.tar.gz
build dist-python3-tar: phony {' '.join(['$builddir/{mode}/dist/tar/{scylla_product}-python3-{scylla_version}-{scylla_release}.{arch}.tar.gz'.format(mode=mode, scylla_product=scylla_product, arch=arch, scylla_version=scylla_version, scylla_release=scylla_release) for mode in default_modes])}
build dist-python3: phony dist-python3-tar dist-python3-rpm dist-python3-deb
build dist-deb: phony dist-server-deb dist-python3-deb dist-jmx-deb dist-tools-deb dist-cqlsh-deb
build dist-rpm: phony dist-server-rpm dist-python3-rpm dist-jmx-rpm dist-tools-rpm dist-cqlsh-rpm
build dist-tar: phony dist-unified-tar dist-server-tar dist-python3-tar dist-jmx-tar dist-tools-tar dist-cqlsh-tar
build dist-deb: phony dist-server-deb dist-python3-deb dist-tools-deb dist-cqlsh-deb
build dist-rpm: phony dist-server-rpm dist-python3-rpm dist-tools-rpm dist-cqlsh-rpm
build dist-tar: phony dist-unified-tar dist-server-tar dist-python3-tar dist-tools-tar dist-cqlsh-tar
build dist: phony dist-unified dist-server dist-python3 dist-jmx dist-tools dist-cqlsh
build dist: phony dist-unified dist-server dist-python3 dist-tools dist-cqlsh
'''))

f.write(textwrap.dedent(f'''\
Expand All @@ -2407,12 +2395,10 @@ def write_build_file(f,
build $builddir/{mode}/dist/tar/{scylla_product}-python3-{arch}-package.tar.gz: copy tools/python3/build/{scylla_product}-python3-{scylla_version}-{scylla_release}.{arch}.tar.gz
build $builddir/{mode}/dist/tar/{scylla_product}-tools-{scylla_version}-{scylla_release}.noarch.tar.gz: copy tools/java/build/{scylla_product}-tools-{scylla_version}-{scylla_release}.noarch.tar.gz
build $builddir/{mode}/dist/tar/{scylla_product}-tools-package.tar.gz: copy tools/java/build/{scylla_product}-tools-{scylla_version}-{scylla_release}.noarch.tar.gz
build $builddir/{mode}/dist/tar/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz: copy tools/jmx/build/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz
build $builddir/{mode}/dist/tar/{scylla_product}-jmx-package.tar.gz: copy tools/jmx/build/{scylla_product}-jmx-{scylla_version}-{scylla_release}.noarch.tar.gz
build $builddir/{mode}/dist/tar/{scylla_product}-cqlsh-{scylla_version}-{scylla_release}.{arch}.tar.gz: copy tools/cqlsh/build/{scylla_product}-cqlsh-{scylla_version}-{scylla_release}.{arch}.tar.gz
build $builddir/{mode}/dist/tar/{scylla_product}-cqlsh-package.tar.gz: copy tools/cqlsh/build/{scylla_product}-cqlsh-{scylla_version}-{scylla_release}.{arch}.tar.gz
build {mode}-dist: phony dist-server-{mode} dist-server-debuginfo-{mode} dist-python3-{mode} dist-tools-{mode} dist-jmx-{mode} dist-unified-{mode} dist-cqlsh-{mode}
build {mode}-dist: phony dist-server-{mode} dist-server-debuginfo-{mode} dist-python3-{mode} dist-tools-{mode} dist-unified-{mode} dist-cqlsh-{mode}
build dist-{mode}: phony {mode}-dist
build dist-check-{mode}: dist-check
mode = {mode}
Expand Down
1 change: 0 additions & 1 deletion dist/common/scripts/scylla_setup
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def interactive_choose_swap_size():
print(f'"{s}" is not valid number, input again')

pkg_files = {
f'{PRODUCT}-jmx': scylladir_p() / 'jmx/scylla-jmx',
f'{PRODUCT}-tools': scylladir_p() / 'share/cassandra/bin/cqlsh',
f'{PRODUCT}-node-exporter': scylladir_p() / 'node_exporter/node_exporter'
}
Expand Down
2 changes: 2 additions & 0 deletions docs/getting-started/install-scylla/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Install ScyllaDB
/getting-started/install-scylla/launch-on-azure
/getting-started/installation-common/scylla-web-installer
/getting-started/install-scylla/install-on-linux
/getting-started/install-scylla/install-jmx
/getting-started/install-scylla/run-in-docker
/getting-started/installation-common/unified-installer
/getting-started/installation-common/air-gapped-install
Expand All @@ -35,6 +36,7 @@ Keep your versions up-to-date. The two latest versions are supported. Also, alwa

* :doc:`Install ScyllaDB with Web Installer (recommended) </getting-started/installation-common/scylla-web-installer>`
* :doc:`Install ScyllaDB Linux Packages </getting-started/install-scylla/install-on-linux>`
* :doc:`Install scylla-jmx Package </getting-started/install-scylla/install-jmx>`
* :doc:`Install ScyllaDB Without root Privileges </getting-started/installation-common/unified-installer>`
* :doc:`Air-gapped Server Installation </getting-started/installation-common/air-gapped-install>`
* :doc:`ScyllaDB Developer Mode </getting-started/installation-common/dev-mod>`
Expand Down
78 changes: 78 additions & 0 deletions docs/getting-started/install-scylla/install-jmx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

======================================
Install scylla-jmx Package
======================================

scylla-jmx becomes optional package from ScyllaDB 6.2, not installed by default.
If you need JMX server you can still install it from scylla-jmx GitHub page.

.. tabs::

.. group-tab:: Debian/Ubuntu
#. Download .deb package from scylla-jmx page.

Access to https://github.com/scylladb/scylla-jmx, select latest
release from "releases", download a file end with ".deb".

#. (Optional) Transfer the downloaded package to the install node.

If the pc from which you downloaded the package is different from
the node where you install scylladb, you will need to transfer
the files to the node.

#. Install scylla-jmx package.

.. code-block:: console
sudo apt install -y ./scylla-jmx_<version>_all.deb
.. group-tab:: Centos/RHEL

#. Download .rpm package from scylla-jmx page.

Access to https://github.com/scylladb/scylla-jmx, select latest
release from "releases", download a file end with ".rpm".

#. (Optional) Transfer the downloaded package to the install node.

If the pc from which you downloaded the package is different from
the node where you install scylladb, you will need to transfer
the files to the node.

#. Install scylla-jmx package.

.. code-block:: console
sudo yum install -y ./scylla-jmx-<version>.noarch.rpm
.. group-tab:: Install without root privileges

#. Download .tar.gz package from scylla-jmx page.

Access to https://github.com/scylladb/scylla-jmx, select latest
release from "releases", download a file end with ".tar.gz".

#. (Optional) Transfer the downloaded package to the install node.

If the pc from which you downloaded the package is different from
the node where you install scylladb, you will need to transfer
the files to the node.

#. Install scylla-jmx package.

.. code:: console
tar xpf scylla-jmx-<version>.noarch.tar.gz
cd scylla-jmx
./install.sh --nonroot
Next Steps
-----------

* :doc:`Configure ScyllaDB </getting-started/system-configuration>`
* Manage your clusters with `ScyllaDB Manager <https://manager.docs.scylladb.com/>`_
* Monitor your cluster and data with `ScyllaDB Monitoring <https://monitoring.docs.scylladb.com/>`_
* Get familiar with ScyllaDB’s :doc:`command line reference guide </operating-scylla/nodetool>`.
* Learn about ScyllaDB at `ScyllaDB University <https://university.scylladb.com/>`_
11 changes: 9 additions & 2 deletions docs/getting-started/install-scylla/install-on-linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Install ScyllaDB

.. code-block:: console
apt-get install scylla{,-server,-jmx,-tools,-tools-core,-kernel-conf,-node-exporter,-conf,-python3}=<your patch version>
apt-get install scylla{,-server,-tools,-tools-core,-kernel-conf,-node-exporter,-conf,-python3}=<your patch version>
The following example shows installing ScyllaDB 5.2.3.

Expand All @@ -88,7 +88,7 @@ Install ScyllaDB
.. code-block:: console
:class: hide-copy-button
apt-get install scylla{,-server,-jmx,-tools,-tools-core,-kernel-conf,-node-exporter,-conf,-python3}=5.2.3-0.20230608.ea08d409f155-1
apt-get install scylla{,-server,-tools,-tools-core,-kernel-conf,-node-exporter,-conf,-python3}=5.2.3-0.20230608.ea08d409f155-1
#. (Ubuntu only) Set Java 11.
Expand Down Expand Up @@ -153,6 +153,13 @@ Install ScyllaDB
sudo yum install scylla-5.2.3
(Optional) Install scylla-jmx
-------------------------------

scylla-jmx becomes optional package from ScyllaDB 6.2, not installed by default.
If you need JMX server, see :doc:`Install scylla-jmx Package </getting-started/install-scylla/install-jmx>`



.. include:: /getting-started/_common/setup-after-install.rst

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ Download and Install
./install.sh --nonroot --python3 ~/scylladb/python3/bin/python3
#. (Optional) Install scylla-jmx

scylla-jmx becomes optional package from ScyllaDB 6.2, not installed by default.
If you need JMX server, see :doc:`Install scylla-jmx Package </getting-started/install-scylla/install-jmx>`

Configure and Run ScyllaDB
----------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ You should take note of the current version in case you want to |ROLLBACK|_ the
sudo apt-get update
sudo apt-get dist-upgrade scylla
#. Remove old scylla-jmx package since the package is not used anymore:

.. code-block:: console
sudo apt-get purge scylla-jmx
scylla-jmx becomes optional package from ScyllaDB 6.2.
If you still need JMX server, see :doc:`Install scylla-jmx Package </getting-started/install-scylla/install-jmx>` and get new version.


Answer ‘y’ to the first two questions.

Expand All @@ -184,6 +193,16 @@ You should take note of the current version in case you want to |ROLLBACK|_ the
sudo yum clean all
sudo yum update scylla\* -y
#. Remove old scylla-jmx package since the package is not used anymore:

.. code:: sh
sudo yum remove scylla-jmx
scylla-jmx becomes optional package from ScyllaDB 6.2.
If you still need JMX server, see :doc:`Install scylla-jmx Package </getting-started/install-scylla/install-jmx>` and get new version.


.. group-tab:: EC2/GCP/Azure Ubuntu Image

If you’re using the ScyllaDB official image (recommended), see the **Debian/Ubuntu**
Expand All @@ -202,6 +221,16 @@ You should take note of the current version in case you want to |ROLLBACK|_ the
sudo apt-get dist-upgrade scylla
sudo apt-get dist-upgrade scylla-machine-image
#. Remove old scylla-jmx package since the package is not used anymore:

.. code-block:: console
sudo apt-get purge scylla-jmx
scylla-jmx becomes optional package from ScyllaDB 6.2.
If you still need JMX server, see :doc:`Install scylla-jmx Package </getting-started/install-scylla/install-jmx>` and get new version.


#. Run ``scylla_setup`` without ``running io_setup``.
#. Run ``sudo /opt/scylladb/scylla-machine-image/scylla_cloud_io_setup``.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Downgrade to the previous release
.. code-block:: console
:substitutions:
sudo apt-get install scylla=|SRC_VERSION|\* scylla-server=|SRC_VERSION|\* scylla-jmx=|SRC_VERSION|\* scylla-tools=|SRC_VERSION|\* scylla-tools-core=|SRC_VERSION|\* scylla-kernel-conf=|SRC_VERSION|\* scylla-conf=|SRC_VERSION|\*
sudo apt-get install scylla=|SRC_VERSION|\* scylla-server=|SRC_VERSION|\* scylla-tools=|SRC_VERSION|\* scylla-tools-core=|SRC_VERSION|\* scylla-kernel-conf=|SRC_VERSION|\* scylla-conf=|SRC_VERSION|\*
sudo apt-get install scylla-machine-image=|SRC_VERSION|\* # only execute on AMI instance
Expand Down
1 change: 0 additions & 1 deletion install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ fi
umask 0022

./seastar/install-dependencies.sh
./tools/jmx/install-dependencies.sh
./tools/java/install-dependencies.sh

if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then
Expand Down
1 change: 0 additions & 1 deletion tools/jmx
Submodule jmx deleted from 89308b
2 changes: 1 addition & 1 deletion unified/build_unified.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if [ -z "$UNIFIED_PKG" ]; then
fi
UNIFIED_PKG="$(realpath -s $UNIFIED_PKG)"
if [ -z "$PKGS" ]; then
PKGS="$BUILD_DIR/dist/tar/$PRODUCT-$VERSION-$RELEASE.$(arch).tar.gz $BUILD_DIR/dist/tar/$PRODUCT-python3-$VERSION-$RELEASE.$(arch).tar.gz $BUILD_DIR/dist/tar/$PRODUCT-jmx-$VERSION-$RELEASE.noarch.tar.gz $BUILD_DIR/dist/tar/$PRODUCT-tools-$VERSION-$RELEASE.noarch.tar.gz $BUILD_DIR/dist/tar/$PRODUCT-cqlsh-$VERSION-$RELEASE.$(arch).tar.gz"
PKGS="$BUILD_DIR/dist/tar/$PRODUCT-$VERSION-$RELEASE.$(arch).tar.gz $BUILD_DIR/dist/tar/$PRODUCT-python3-$VERSION-$RELEASE.$(arch).tar.gz $BUILD_DIR/dist/tar/$PRODUCT-tools-$VERSION-$RELEASE.noarch.tar.gz $BUILD_DIR/dist/tar/$PRODUCT-cqlsh-$VERSION-$RELEASE.$(arch).tar.gz"
fi
BASEDIR="$BUILD_DIR/unified/$PRODUCT-$VERSION"

Expand Down
11 changes: 0 additions & 11 deletions unified/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ if ! $skip_systemd_check && [ ! -d /run/systemd/system/ ]; then
exit 1
fi

if ! scylla-jmx/select-java -version > /dev/null; then
echo "Please install openjdk-8 or openjdk-11 before running install.sh."
exit 1
fi

if [ -z "$prefix" ]; then
if $nonroot; then
prefix=~/scylladb
Expand Down Expand Up @@ -139,27 +134,23 @@ if [ -z "$python3" ]; then
fi

scylla_args=()
jmx_args=()
args=()

if $housekeeping; then
scylla_args+=(--housekeeping)
fi
if $nonroot; then
scylla_args+=(--nonroot)
jmx_args+=(--nonroot)
args+=(--nonroot)
fi
if $supervisor; then
scylla_args+=(--supervisor)
jmx_args+=(--packaging)
fi
if $supervisor_log_to_stdout; then
scylla_args+=(--supervisor-log-to-stdout)
fi
if $without_systemd; then
scylla_args+=(--without-systemd)
jmx_args+=(--without-systemd)
fi
if $debuginfo; then
scylla_args+=(--debuginfo)
Expand All @@ -169,8 +160,6 @@ fi

(cd $(readlink -f scylla-python3); ./install.sh --root "$root" --prefix "$prefix" ${args[@]})

(cd $(readlink -f scylla-jmx); ./install.sh --root "$root" --prefix "$prefix" --sysconfdir "$sysconfdir" ${jmx_args[@]})

(cd $(readlink -f scylla-tools); ./install.sh --root "$root" --prefix "$prefix" ${args[@]})

(cd $(readlink -f scylla-cqlsh); ./install.sh --root "$root" --prefix "$prefix" ${args[@]})
Expand Down

0 comments on commit 082e466

Please sign in to comment.