Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
63c778b
mgr/dashboard_v2: Initial commit of the dashboard_v2 Manager module
LenzGr Jan 22, 2018
c0bba26
mgr/dashboard_v2: Make host and port configurable.
votdev Jan 23, 2018
46c7ae0
mgr/dashboard_v2: ceph_module mock to support unit testing
rjfd Feb 27, 2018
5eda0e1
mgr/dashboard_v2: added first unit test example
rjfd Feb 27, 2018
7002f80
mgr/dashboard_v2: updated READMED with unit testing info
rjfd Jan 23, 2018
001201c
mgr/dashboard_v2: Fix cherrypy shutdown handler
rjfd Jan 23, 2018
0281b2c
mgr/dashboard_v2: Add command to create/update username/password.
votdev Jan 23, 2018
4adc9ec
mgr/dashboard_v2: Create proper text editor config files to maintain …
votdev Jan 23, 2018
61a9139
mgr/dashboard_v2: Auth API
Jan 23, 2018
c72c01e
mgr/dashboard_v2: Added pylint support and fixed linting errors
rjfd Feb 27, 2018
59eb149
mgr/dashboard_v2: Added `RESTResource` Python class.
sebastian-philipp Jan 24, 2018
bb35284
mgr/dashboard_v2: added tox conf file to run unit tests and linting
rjfd Feb 27, 2018
48e3df1
mgr/dashboard_v2: Fix python 2/3 compability problems
rjfd Jan 24, 2018
01eeb84
mgr/dashboard_v2: Updated README
Jan 24, 2018
654c35e
mgr/dashboard_v2: Log script_name on unauthorized access
votdev Jan 25, 2018
82faee0
mgr/dashboard_v2: Added test_restresource.py
sebastian-philipp Jan 25, 2018
0051050
mgr/dashboard_v2: use float values when checking session expire time
sebastian-philipp Jan 25, 2018
7d42d04
mgr/dashboard_v2: Ignore the __pycache__ directory.
votdev Jan 25, 2018
d418853
mgr/dashboard_v2: pass json body keys as args to REST resource methods
rjfd Jan 24, 2018
1333d3d
mgr/dashboard_v2: auth module refactoring
rjfd Jan 25, 2018
ec57819
mgr/dashboard_v2: Very simple ping example
rjfd Jan 25, 2018
1021615
mgr/dashboard_v2: Added developer notes to README
rjfd Jan 25, 2018
b37a3b6
mgr/dashboard_v2: Renamed/moved RESTResource to RESTController
rjfd Jan 25, 2018
1f21d68
mgr/dashboard_v2: add initial frontend code
Jan 22, 2018
85344da
mgr/dashboard_v2: Added RESTController test case
sebastian-philipp Jan 25, 2018
17ac1cd
mgr/dashboard_v2: Refactoring of unit tests
rjfd Jan 25, 2018
694a305
mgr/dashboard_v2: Fix pylint executor and warnings/errors
rjfd Jan 25, 2018
4fd405e
mgr/dashboard_v2: Combine coverage and tests results from py27 and py3
rjfd Jan 26, 2018
54b00a9
mgr/dashboard_v2: Add frontend login/logout
Jan 25, 2018
acd7b6f
mgr/dashboard_v2: Rename angular components prefix
Jan 26, 2018
5ec7d35
mgr/dashboard_v2: Unit tests refactoring
rjfd Jan 26, 2018
6fd59d1
mgr/dashboard_v2: Moved set-login-cred command logic to Auth class
rjfd Jan 26, 2018
371f263
mgr/dashboard_v2: Added unit test for module.py
rjfd Jan 26, 2018
34c189e
mgr/dashboard_v2: .gitignore update
rjfd Jan 26, 2018
d57b092
mgr/dashboard_v2: add support for frontend CI coverage and unit testing
rjfd Jan 26, 2018
c1a683e
mgr/dashboard_v2: fix pycodestyle to exclude the frontend files
rjfd Jan 26, 2018
289050f
mgr/dashboard_v2: several code style enhancements
votdev Jan 26, 2018
454e5f3
mgr/dashboard_v2: Disable CherryPi autoreload feature.
votdev Jan 26, 2018
275a315
mgr/dashboard_v2: removed auth handler form test_auth.py setup
rjfd Jan 29, 2018
1d2b792
mgr/dashboard_v2: simplify router and fix navigation
Jan 29, 2018
fa9e93b
mgr/dashboard_v2: Refactoring of the access to mgr module instance
rjfd Jan 29, 2018
cfa9130
mgr/dashboard_v2: Updated README with more developer notes
rjfd Jan 29, 2018
d0b166c
mgr/dashboard_v2: Added API controller listing endpoint.
sebastian-philipp Jan 30, 2018
f416efc
mgr/dashboard_v2: Refactor controller base class
votdev Jan 30, 2018
77e5bf4
mgr/dashboard_v2: Fix bug in AuthRequired decorator
rjfd Jan 30, 2018
274cf8e
mgr/dashboard_v2: Add hosts page
Jan 27, 2018
e47eaf3
mgr/dashboard_v2: Fix typo on method isLoginActive
Jan 30, 2018
9a8a742
mgr/dashboard_v2: Rename "host" module to "cluster"
Jan 30, 2018
8ba6e24
mgr/dashboard_v2: Added status route to cluster
sebastian-philipp Jan 30, 2018
c866b73
mgr/dashboard_v2: Fix content type of JSON responses
Jan 25, 2018
f462494
mgr/dashboard_v2: Fix content type (body) of error page
Jan 26, 2018
814938b
mgr/dashboard_v2: Session expire at browser close
votdev Jan 27, 2018
cbf9bfc
mgr/dashboard_v2: Don't use localized config for auth
Jan 30, 2018
bd38d90
mgr/dashboard_v2: Refactored logging
sebastian-philipp Jan 31, 2018
8ea2589
mgr/dashboard_v2: Use Awesome Bootstrap Checkbox.
votdev Jan 31, 2018
5243334
mgr/dashboard_v2: Mark text with the i18n attribute
votdev Feb 1, 2018
7eca790
mgr/dashboard_v2: Fix linting errors
sebastian-philipp Feb 1, 2018
b7c2ffa
mgr/dashboard_v2: Notification queue
rjfd Jan 31, 2018
4120556
mgr/dashboard_v2: Updated README with notification queue instructions
rjfd Feb 1, 2018
c803df1
mgr/dashboard_v2: mocking of rados and rbd modules
rjfd Feb 2, 2018
437e3c6
mgr/dashboard_v2: Move hosts option to cluster menu
Feb 2, 2018
468e384
mgr/dashboard_v2: Add breadcrumb on Hosts page
Feb 2, 2018
06066f0
mgr/dashboard_v2: Updated README with instruction on how to mock ceph…
rjfd Feb 5, 2018
41c50f4
mgr/dashboard_v2: Add table component
Feb 1, 2018
0f4adc4
mgr/dashboard_v2: add missing codealizer recommended rules
Feb 3, 2018
80b7d14
mgr/dashboard_v2: add tslint import linting rule
Feb 4, 2018
ad96ddb
mgr/dashboard_v2: add some eslint rules to tslint
Feb 4, 2018
8d65f9c
mgr/dashboard_v2: add tslint no-consecutive-blank-lines rule
Feb 4, 2018
d1d966f
mgr/dashboard_v2: decrease max-line-length to 100
Feb 6, 2018
4216759
mgr/dashboard_v2: add style guide to the frontend README
Feb 5, 2018
f6d9793
mgr/dashboard_v2: force whitespace in imports list
Feb 6, 2018
3913d54
mgr/dashboard_v2: Migrate RGW daemon REST resource
p-se Feb 5, 2018
a71f7c6
mgr/dashboard_v2: Added coverage tracking to module code
rjfd Feb 8, 2018
e71c6d8
mgr/dashboard_v2: add more debug message to tools.py
rjfd Feb 8, 2018
e59c7c1
mgr/dashboard_v2: removed mock classes, unit tests now run against re…
rjfd Feb 8, 2018
2d5596e
mgr/dashboard_v2: Fix copy-webpack-plugin version
rjfd Feb 8, 2018
1dd62fd
mgr/dashboard_v2: clean rados connection on shutdown
rjfd Feb 6, 2018
349c1ff
mgr/dashboard_v2: adaptation of dashboard RemoteViewCache as a decorator
rjfd Feb 6, 2018
7d2b500
mgr/dashboard_v2: add health page and its dependencies
Feb 1, 2018
407c84b
mgr/dashboard_v2: Add block pools page
Jan 31, 2018
7457e39
mgr/dashboard_v2: table component style improvements
Feb 6, 2018
f307d93
mgr/dashboard_v2: Let the pagination input field look nicer
votdev Feb 7, 2018
4cfd508
mgr/dashboard_v2: Add cdPasswordButton directive
votdev Feb 6, 2018
5699586
mgr/dashboard_v2: Add support for nested controllers
p-se Feb 7, 2018
45a6aae
mgr/dashboard_v2: Fix linting errors
Feb 9, 2018
d307fb1
mgr/dashboard_v2: Use datatable on Cluster/Hosts page.
votdev Feb 8, 2018
8ebde83
mgr/dashboard_v2: fix frontend bug in table.component.hml
rjfd Feb 13, 2018
5ffece4
mgr/dashboard_v2: Easy table cell transformation
Feb 12, 2018
54f97ac
mgr/dashboard_v2: Update documentation
Feb 10, 2018
5f4823f
mgr/dashboard_v2: Add RGW page.
votdev Feb 5, 2018
0c56065
mgr/dashboard_v2: Highlight clickable datatable rows.
votdev Feb 14, 2018
1fda217
mgr/dashboard_v2: add node as a local dependency
Feb 13, 2018
8d37835
mgr/dashboard_v2: fix visibility of frontend class properties
rjfd Feb 14, 2018
ba0e105
mgr/dashboard_v2: add view cache component
Feb 9, 2018
8bfdb07
mgr/dashboard_v2: adapt pool detail with cache view component
Feb 9, 2018
efd339c
mgr/dashboard_v2: Updated README.rst, added HACKING.rst
Feb 15, 2018
7de16ae
mgr/dashboard_v2: Migrate standby module
p-se Feb 14, 2018
0c78d5e
mgr/dashboard_v2: add performance counter page
Feb 14, 2018
5c255b7
mgr/dashboard_v2: move datatable module
Feb 14, 2018
afd896d
mgr/dashboard_v2: add sparkline component
Feb 14, 2018
1a9619d
mgr/dashboard_v2: add router link table template
Feb 14, 2018
d9a334d
mgr/dashboard_v2: add monitors page
Feb 14, 2018
f3f076e
mgr/dashboard_v2: Renamed `block_pool` controller to `rbd`
sebastian-philipp Feb 15, 2018
e6692ed
mgr/dashboard_v2: add 404 page
Feb 9, 2018
95d5645
mgr/dashboard_v2: Create links to perf counters
votdev Feb 15, 2018
6d1d02d
mgr/dashboard_v2: Add bin dir to PATH
sebastian-philipp Feb 13, 2018
2c7844f
mgr/dashboard_v2: Added tcmu iSCSI controller.
sebastian-philipp Feb 13, 2018
48efbcc
mgr/dashboard_v2: Add port to `ControllerTestCase.__init__`
sebastian-philipp Feb 13, 2018
7244fc0
mgr/dashboard_v2: Datatable related code improvements
votdev Feb 15, 2018
886d76b
mgr/dashboard_v2: add filesystem page
Feb 15, 2018
d9e393e
mgr/dashboard_v2: Use monospace font on logs
Feb 19, 2018
bd93fe2
mgr/dashboard_v2: Add iSCSI page
Feb 16, 2018
6141242
mgr/dashboard_v2: Migrate cluster configuration
p-se Feb 19, 2018
ab599d9
mgr/dashboard_v2: Prevent double click on table refresh
Feb 20, 2018
f60e2cd
mgr/dashboard_v2: Auto refresh hosts
Feb 20, 2018
69c0c12
mgr/dashboard_v2: Add footer and header to hosts table
Feb 20, 2018
0a82e85
mgr/dashboard_v2: Reorder menu entries
Feb 21, 2018
b185e63
mgr/dashboard_v2: Improve empty row style
Feb 21, 2018
434cf2f
mgr/dashboard_v2: Fixed capitalization on login page
Feb 21, 2018
e346bca
mgr/dashboard_v2: Also protect `/api`
sebastian-philipp Feb 21, 2018
189c31b
mgr/dashboard_v2: Data transform in k/v table
Feb 16, 2018
a881e43
mgr/dashboard_v2: Service class base code
rjfd Feb 21, 2018
34f17d0
mgr/dashboard_v2: added CephService service class
rjfd Feb 21, 2018
bcb7664
mgr/dashboard_v2: get rbd pool list using CephService
rjfd Feb 21, 2018
e7e958e
mgr/dashboard_v2: get tcmu_runner service list using CephService
rjfd Feb 21, 2018
9f9dd86
mgr/dashboard_v2: get rgw service list using CephService
rjfd Feb 21, 2018
dc396f9
mgr/dashboard_v2: Add missing i18n attributes
votdev Feb 21, 2018
dbd9f1f
mgr/dashboard_v2: Add missing 'aria-current' attribute to active brea…
votdev Feb 22, 2018
b09a019
mgr/dashboard_v2: Fix hosts columns width
Feb 21, 2018
fcfedcc
make-dist: Added dashboard_v2 frontend build files to dist tarball
rjfd Feb 13, 2018
9b3351b
vstart: mgr/dashboard_v2 enabling and configuration
rjfd Feb 13, 2018
33a7db0
mgr/dashboard_v2: fix tox.ini to handle the vstart changes
rjfd Feb 13, 2018
71ac216
ceph.spec: added dashboard_v2 development and runtime dependencies
rjfd Feb 14, 2018
57f2709
debian/control: add dashboard_v2 development dependencies
rjfd Mar 1, 2018
b6d9464
install-deps: install dashboard_v2 development dependencies
rjfd Feb 14, 2018
0ef8d2d
mgr/dashboard_v2: updated .gitignore
rjfd Feb 14, 2018
020afef
mgr/dashboard_v2: add ceph configuration documentation page
Feb 16, 2018
d7735fa
mgr/dashboard_v2: Add RBD mirroring functionality
Feb 19, 2018
92ef46e
mgr/dashboard_v2: Move `dashboard/toplevel` to a new controller
sebastian-philipp Feb 22, 2018
56318c1
mgr/dashboard_v2: Fix datatable header layout in configuration doc
votdev Feb 23, 2018
ed58749
mgr/dashboard_v2: OSD pages
Jan 26, 2018
d3c0bf7
mgr/dashboard_v2: Add rbd_mirroring to `/api/summary`
sebastian-philipp Feb 23, 2018
24e5ee1
mgr/dashboard_v2: add mirroring page
Feb 19, 2018
3e3776e
mgr/dashboard_v2: Adapt status datatable to default design of cd-table
votdev Feb 23, 2018
482074c
mgr/dashboard_v2: Updated reference documentation
Feb 23, 2018
53c65ea
mgr/dashboard_v2: enable rbd-mirror perf counters
Feb 23, 2018
4f9f387
mgr/dashboard_v2: Add links on dashboard
Feb 19, 2018
5a40394
mgr/dashboard_v2: Add support for $PREFIX config
Feb 23, 2018
f71e683
mgr/dashboard_v2: Enable table header and footer on perfcounters
Feb 23, 2018
1f5051a
mgr/dashboard_v2: Fixed exception in rbd_mirroring
sebastian-philipp Feb 23, 2018
772609f
mgr/dashboard_v2: Auto reload cd-table
Feb 21, 2018
c6fcf5e
mgr/dashboard_v2: Fix OSD menu entry position
Feb 26, 2018
5fa2d07
mgr/dashboard_v2: use global manager instance instead of injection
rjfd Feb 26, 2018
a9fd022
mgr/dashboard_v2: Remove `BaseControllerMeta` meta class
p-se Feb 22, 2018
12f3c7a
mgr/dashboard_v2: Remove `Service` and `ServiceMeta` class
p-se Feb 27, 2018
d7ead63
mgr/dashboard_v2: Integrate dashboard_v2 into `make check`
sebastian-philipp Feb 27, 2018
24e216b
mgr/dashboard_v2: Add CMake target to build the frontend.
sebastian-philipp Feb 28, 2018
97606b4
mgr/dashboard_v2: Add mgr-dashboard_v2 frontend unittests to `ctest`
sebastian-philipp Feb 28, 2018
19bb5db
mgr/dashboard_v2: Added smoke test.
sebastian-philipp Mar 1, 2018
86264d4
qa/tasks/mgr: move test initialization to setUpClass method
rjfd Feb 28, 2018
966fe36
qa/tasks/mgr/dashboard_v2: implementation of backend API tests
rjfd Feb 28, 2018
7eba318
qa/suites/mgr/dashboard_v2: added suite yaml for testing dashboard_v2
rjfd Feb 28, 2018
5449857
mgr/dashboard_v2: added script to run backend API tests locally
rjfd Mar 1, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ else()
endif()
set(Boost_USE_MULTITHREADED ON)

# dashboard angular2 frontend
option(WITH_MGR_DASHBOARD_V2_FRONTEND "Build the mgr/dashboard_v2 frontend using `npm`" ON)

include_directories(SYSTEM ${PROJECT_BINARY_DIR}/include)

find_package(Threads REQUIRED)
Expand Down
19 changes: 19 additions & 0 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,23 @@ BuildRequires: python3-Cython
BuildRequires: python%{_python_buildid}-cherrypy
BuildRequires: python%{_python_buildid}-pecan
BuildRequires: python%{_python_buildid}-werkzeug
BuildRequires: python%{_python_buildid}-tox
BuildRequires: python%{_python_buildid}-coverage
%if 0%{?fedora}
BuildRequires: python%{_python_buildid}-bcrypt
%endif
%if 0%{?rhel}
BuildRequires: py-bcrypt
%endif
%endif
%if 0%{?suse_version}
BuildRequires: python%{_python_buildid}-CherryPy
BuildRequires: python%{_python_buildid}-Werkzeug
BuildRequires: python%{_python_buildid}-pecan
BuildRequires: python%{_python_buildid}-numpy-devel
BuildRequires: python%{_python_buildid}-bcrypt
BuildRequires: python%{_python_buildid}-tox
BuildRequires: python%{_python_buildid}-coverage
%endif
%endif
# lttng and babeltrace for rbd-replay-prep
Expand Down Expand Up @@ -358,13 +369,20 @@ Requires: python%{_python_buildid}-jinja2
Requires: python%{_python_buildid}-pecan
Requires: python%{_python_buildid}-werkzeug
Requires: pyOpenSSL%{_python_buildid}
%if 0%{?fedora}
Requires: python%{_python_buildid}-bcrypt
%endif
%if 0%{?rhel}
Requires: py-bcrypt
%endif
%endif
%if 0%{?suse_version}
Requires: python%{_python_buildid}-CherryPy
Requires: python%{_python_buildid}-Jinja2
Requires: python%{_python_buildid}-Werkzeug
Requires: python%{_python_buildid}-pecan
Requires: python%{_python_buildid}-pyOpenSSL
Requires: python%{_python_buildid}-bcrypt
Recommends: python%{_python_buildid}-influxdb
%endif
%description mgr
Expand Down Expand Up @@ -888,6 +906,7 @@ cmake .. \
-DWITH_EMBEDDED=OFF \
-DWITH_MANPAGE=ON \
-DWITH_PYTHON3=ON \
-DWITH_MGR_DASHBOARD_V2_FRONTEND=OFF \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why OFF, though?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The frontend build requires internet access which is not available in packaging build services, such as OBS. Because of this reason we build the frontend when generating the tarball and include the result files in the tarball.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rjfd yeah, i have the same question. since make-dist is updated to include the generated files under src/pybind/mgr/dashboard_v2/frontend/dist , we can safely enable this option in debian/rules and ceph.spec.in, i think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the WITH_MGR_DASHBOARD_V2_FRONTEND enables/disables the frontend compilation, if we enable it during the packaging build (inside OBS, or other packaging service) it will require nodejs and npm as system dependencies, and will try to download all nodejs packages frontend dependencies when running npm install (https://github.com/ceph/ceph/pull/20103/files#diff-bb5b00ad365f9278caa7bfa071fc7ce3R15). This will fail for two reasons:

a) usually the nodejs and npm system dependencies are too old, that's why we have to upgrade node and npm in install-deps.sh
b) packaging services don't allow internet access during build and npm install will fail

This is the reason why we include the frontend compiled files in the tarball to avoid the above problems.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's counter-intuitive for the dashboard to be set to "OFF" in the packaging. There is an analogous situation with Boost, which is downloaded by make-dist. During the build cmake checks for the existence of a Boost-specific file, and only attempts the download if that file doesn't exist. See https://github.com/ceph/ceph/blob/master/cmake/modules/BuildBoost.cmake#L132-L159 for the implementation.

If doing that is too much trouble, could we at least rename the option to something more descriptive (and non-negative) like "-DWITH_MGR_DASHBOARD_V2_NODEJS_DEPS_IN_TARBALL=ON"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If doing that is too much trouble, could we at least rename the option to something more descriptive (and non-negative) like "-
DWITH_MGR_DASHBOARD_V2_NODEJS_DEPS_IN_TARBALL=ON"

From a POV of cmake, this flag disables or enables the build of the frontend. Changing this cmake flag has no effect on the tarball creation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smithfarm I agree with your concern, and I think we can even drop the cmake option, but that will require another round of build testing that takes some time. Can I open a PR after this one is merged dropping the cmake option?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rjfd Yes, I was going to say that this concern of mine should not block merge of this PR.

%if %{with python2}
-DWITH_PYTHON2=ON \
%else
Expand Down
4 changes: 4 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Build-Depends: bc,
python-jinja2,
python-nose,
python-pecan,
python-bcrypt,
python-tox,
python-coverage,
python-prettytable,
python-setuptools,
python-sphinx,
Expand Down Expand Up @@ -173,6 +176,7 @@ Depends: ceph-base (= ${binary:Version}),
python-cherrypy3,
python-openssl,
python-pecan,
python-bcrypt,
python-werkzeug,
${misc:Depends},
${python:Depends},
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export DESTDIR=$(CURDIR)/debian/tmp

export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_EMBEDDED=OFF
extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_EMBEDDED=OFF -DWITH_MGR_DASHBOARD_V2_FRONTEND=OFF

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why OFF?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same reason as above

extraopts += -DWITH_CEPHFS_JAVA=ON
extraopts += -DWITH_SYSTEMD=ON -DCEPH_SYSTEMD_ENV_DIR=/etc/default
# assumes that ceph is exmpt from multiarch support, so we override the libdir.
Expand Down
44 changes: 41 additions & 3 deletions doc/mgr/dashboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,29 @@ dashboard plugin
================

Dashboard plugin visualizes the statistics of the cluster using a web server
hosted by ``ceph-mgr``.
hosted by ``ceph-mgr``. The dashboard currently provides insight into the
following aspects of your Ceph cluster:

* **Overall cluster health**: The overall cluster status, storage utilization
(e.g. number of objects, raw capacity, usage per pool), a list of pools and
their status and usage statistics, access to the cluster log file.
* **Hosts**: A list of all hosts associated to the cluster, which services
are running and which version of Ceph is installed.
* **Performance counters**: Display detailed statistics for each running service.
* **Monitors**: List of all MONs, their quorum status, open sessions.
* **Configuration Reference**: List all available configuration options, their
description and default values.
* **OSDs**: A list of all OSDs, their status and usage statistics as well as
detailed information like attributes (OSD map), metadata, performance counters
and usage histograms for read/write operations.
* **iSCSI**: List all hosts that run the TCMU runner service, list of all images
and their performance characteristics (read/write ops, traffic).
* **RBD**: List of all RBD images and their properties (size, objects, features)
in a given pool.
* **CephFS**: List all active filesystem clients and associated pools, including
their usage statistics.
* **Object Gateway**: List of all active object gateways and their performance
counters.

Enabling
--------
Expand Down Expand Up @@ -39,6 +61,23 @@ If the port is not configured, the web app will bind to port ``7000``.
If the address it not configured, the web app will bind to ``::``,
which corresponds to all available IPv4 and IPv6 addresses.

In order to be able to log in, you need to define a username and password, which
will be stored in the MON's configuration database::

ceph dashboard set-login-credentials <username> <password>

The password will be stored in the configuration database in encrypted form
using ``bcrypt``. This is a global setting that applies to all dashboard instances.

You can now access the dashboard using your (JavaScript-enabled) web browser, by
pointing it to the selected TCP port and any of the host names or IP addresses
where a manager instance runs on, e.g. ``http://<$IP>:<$PORT>/``.

You should then be greeted by the dashboard login page, requesting your
previously defined username and password. Select the **Keep me logged in**
checkbox if you want to skip the username/password request when accessing the
dashboard in the future.

Reverse proxies
---------------

Expand All @@ -51,5 +90,4 @@ to use hyperlinks that include your prefix, you can set the

ceph config-key set mgr/dashboard/url_prefix $PREFIX

so you can access the dashboard at ``http://$IP:$PORT/$PREFIX/``.

so you can access the dashboard at ``http://$IP:$PORT/$PREFIX/``.
71 changes: 71 additions & 0 deletions install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ if test $(id -u) != 0 ; then
fi
export LC_ALL=C # the following is vulnerable to i18n

ARCH=`uname -m`

function munge_ceph_spec_in {
local OUTFILE=$1
sed -e 's/@//g' -e 's/%bcond_with make_check/%bcond_without make_check/g' < ceph.spec.in > $OUTFILE
Expand Down Expand Up @@ -105,6 +107,68 @@ EOF
fi
}

function ensure_min_npm_version {
local install_npm_pkg_cmd=$1

if [ "$ARCH" = "aarch64" ]; then
# we don't support dashboard frontend development in arm64 architecture
return 0
fi

if ! type npm > /dev/null 2>&1; then
$SUDO $install_npm_pkg_cmd
fi

NODE_VER=`node -v`
NODE_VER_MAJOR=`node -v | sed 's/v\(\w\+\).*/\1/g'`
NODE_VER_MINOR=`node -v | sed 's/v\w\+\.\(\w\+\).*/\1/g'`

# The minimum node version required is 4.8.0 so that we can use yarn below
UPDATE_NODE=false
if [ $NODE_VER_MAJOR -lt 4 ]; then
UPDATE_NODE=true
elif [ $NODE_VER_MAJOR -eq 4 ] && [ $NODE_VER_MINOR -lt 8 ]; then
UPDATE_NODE=true
fi
if $UPDATE_NODE; then
$SUDO npm install -g n
# installs nodejs version 4.8.0
$SUDO n 4.8.0
$SUDO npm uninstall -g n
hash -d node > /dev/null 2>&1 || true
fi

NPM_VER=`npm -v`
NPM_VER_MAJOR=`npm -v | sed 's/\(\w\+\).*/\1/g'`

# The minimum npm version required is 5.0.0 so that we can install and use
# a local nodejs installation (required by the dashboard angular2 frontend)
if [ $NPM_VER_MAJOR -lt 5 ]; then
$SUDO npm install -g yarn
$SUDO yarn global add npm@^5.0.0 # install npm version 5.0.0 or later
fi
hash -d npm > /dev/null 2>&1 || true

NEW_NODE_VER=`node -v`
NEW_NPM_VER=`npm -v`
if [ ! "$NODE_VER" = "$NEW_NODE_VER" ]; then
cat <<EOF
*****************************************************************************
YOUR NODE VERSION WAS UPDATED FROM $NODE_VER TO $NEW_NODE_VER
*****************************************************************************
EOF
fi
if [ ! "$NPM_VER" = "$NEW_NPM_VER" ]; then
cat <<EOF
*****************************************************************************
YOUR NPM VERSION WAS UPDATED FROM $NPM_VER TO $NEW_NPM_VER
TO RETURN TO VERSION $NPM_VER run the following command:
$ $SUDO yarn global remove npm && hash -d npm
*****************************************************************************
EOF
fi
}

if [ x`uname`x = xFreeBSDx ]; then
$SUDO pkg install -yq \
devel/babeltrace \
Expand Down Expand Up @@ -190,6 +254,11 @@ else
$SUDO env DEBIAN_FRONTEND=noninteractive mk-build-deps --install --remove --tool="apt-get -y --no-install-recommends $backports" $control || exit 1
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove ceph-build-deps
if [ -n "$backports" ] ; then rm $control; fi
if [ ! "$ARCH" = "aarch64" ]; then
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs
[ ! -e /usr/bin/node ] && $SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs-legacy
ensure_min_npm_version "env DEBIAN_FRONTEND=noninteractive apt-get -y install npm"
fi
;;
centos|fedora|rhel|ol|virtuozzo)
yumdnf="yum"
Expand Down Expand Up @@ -250,13 +319,15 @@ else
ensure_decent_gcc_on_rh $dts_ver
fi
! grep -q -i error: $DIR/yum-builddep.out || exit 1
ensure_min_npm_version "$yumdnf install -y npm"
;;
opensuse|suse|sles)
echo "Using zypper to install dependencies"
zypp_install="zypper --gpg-auto-import-keys --non-interactive install --no-recommends"
$SUDO $zypp_install lsb-release systemd-rpm-macros
munge_ceph_spec_in $DIR/ceph.spec
$SUDO $zypp_install $(rpmspec -q --buildrequires $DIR/ceph.spec) || exit 1
ensure_min_npm_version "zypper --non-interactive install npm"
;;
alpine)
# for now we need the testing repo for leveldb
Expand Down
11 changes: 11 additions & 0 deletions make-dist
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ download_boost() {
rm -rf src/boost
}

build_dashboard_frontend() {
CURR_DIR=`pwd`
cd src/pybind/mgr/dashboard_v2/frontend
npm install
npm run build -- --prod
cd $CURR_DIR
tar cf dashboard_frontend.tar $outfile/src/pybind/mgr/dashboard_v2/frontend/dist
}

# clean out old cruft...
echo "cleanup..."
rm -f $outfile*
Expand Down Expand Up @@ -113,9 +122,11 @@ download_boost $boost_version b2dfbd6c717be4a7bb2d88018eaccf75 \
https://dl.bintray.com/boostorg/release/$boost_version/source \
https://downloads.sourceforge.net/project/boost/boost/$boost_version \
https://download.ceph.com/qa
build_dashboard_frontend
tar --concatenate -f $outfile.all.tar $outfile.version.tar
tar --concatenate -f $outfile.all.tar $outfile.boost.tar
tar --concatenate -f $outfile.all.tar $outfile.tar
tar --concatenate -f $outfile.all.tar dashboard_frontend.tar
mv $outfile.all.tar $outfile.tar
rm $outfile
rm -f $outfile.version.tar
Expand Down
33 changes: 33 additions & 0 deletions qa/suites/rados/mgr/tasks/dashboard_v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

tasks:
- install:
- ceph:
# tests may leave mgrs broken, so don't try and call into them
# to invoke e.g. pg dump during teardown.
wait-for-scrub: false
log-whitelist:
- overall HEALTH_
- \(MGR_DOWN\)
- \(PG_
- replacing it with standby
- No standby daemons available
- \(FS_DEGRADED\)
- \(MDS_FAILED\)
- \(MDS_DEGRADED\)
- \(FS_WITH_FAILED_MDS\)
- \(MDS_DAMAGE\)
- rgw: [client.0]
- cephfs_test_runner:
modules:
- tasks.mgr.test_dashboard_v2
- tasks.mgr.dashboard_v2.test_auth
- tasks.mgr.dashboard_v2.test_cephfs
- tasks.mgr.dashboard_v2.test_cluster_configuration
- tasks.mgr.dashboard_v2.test_dashboard
- tasks.mgr.dashboard_v2.test_host
- tasks.mgr.dashboard_v2.test_monitor
- tasks.mgr.dashboard_v2.test_osd
- tasks.mgr.dashboard_v2.test_perf_counters
- tasks.mgr.dashboard_v2.test_summary
- tasks.mgr.dashboard_v2.test_rgw
- tasks.mgr.dashboard_v2.test_rbd
3 changes: 2 additions & 1 deletion qa/tasks/ceph_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def wait_until_equal(self, get_fn, expect_val, timeout, reject_fn=None):

log.debug("wait_until_equal: success")

def wait_until_true(self, condition, timeout):
@classmethod
def wait_until_true(cls, condition, timeout):
period = 5
elapsed = 0
while True:
Expand Down
Empty file.
Loading