Aerospike Admin
Description
Aerospike Admin provides an interface for Aerospike users to view the stat
of their Aerospike Cluster by fetching information from a running cluster (Cluster mode)
a collectinfo file (Collectinfo-Analyzer), or logs (Log-analyzer mode).
To get started run asadm and issue the help command. The
full documentation can be found here.
Asinfo
The Aerospike Admin repo now contains asinfo. Asinfo has been a long time member of the Aerospike Tools package and is now built together with asadm. Asinfo provides a raw interface to Aerospike info protocol and is useful for debugging and development. The full documentation can be found here.
Build and Install Aerospike Admin
Runtime Dependencies
There are no runtime dependencies. This is because the python interpreter is now bundled with asadm version 2.6 and later.
Build Dependencies
- python 3.12
- pipenv
Build and Install Asadm
- Install python 3.12
- Install pipenv
- Initialize submodules
git submodule update --init - Build Asadm
- There are two ways asadm can be bundled: one-file and one-dir. Both, are related to
pyinstaller's two methods of bundling. The one-file build is great if you want a single
executable artifact. The downside of one-file is that it must decompress into a /tmp
directory in order to execute. This causes a number of problems. On macOS, the startup
time is drastically increased because of the codesigning mechanism. The /tmp directory
must be mounted with the the exec option. If the above scenarios describe your environment
then use the one-dir build.
- one-dir (default)
make one-dir - one-file
make one-file
- one-dir (default)
- There are two ways asadm can be bundled: one-file and one-dir. Both, are related to
pyinstaller's two methods of bundling. The one-file build is great if you want a single
executable artifact. The downside of one-file is that it must decompress into a /tmp
directory in order to execute. This causes a number of problems. On macOS, the startup
time is drastically increased because of the codesigning mechanism. The /tmp directory
must be mounted with the the exec option. If the above scenarios describe your environment
then use the one-dir build.
- Install asadm
sudo make install
Running Aerospike Admin in Live Cluster Mode.
asadm -h <Aerospike Server Address>
Admin> helpRunning Aerospike Admin in Log-analyzer Mode.
asadm -l [-f <location of logs>]
Admin> helpRunning Aerospike Admin in Collectinfo Mode.
asadm -c [-f <location of collectinfo>]
Admin> helpContributing
To contribute to Aerospike Admin, please follow the code style and quality guidelines outlined below.
Code Style and Quality
To maintain consistent code style and quality, Aerospike Admin uses Black and Flake8.
Checking Code Style and Linting Issues:
To check if your code adheres to the defined style and to identify potential linting issues without making any changes to the files:
make format-checkThis command will use Black to check formatting (and show diffs for any non-compliant files) and Flake8 to report on style guide violations and potential bugs.
Automatically Fixing Code Style:
To automatically reformat your code according to project standards:
make formatThis command will format your code using Black.
Automated Checks in Pull Requests:
A GitHub Actions workflow is configured to automatically run make format-check on every push to any branch and on pull requests targeting the master branch. This ensures that all submitted code adheres to the project's style guidelines.
Tests
Asadm has unit, integration, and e2e tests. Tests also support code coverage reporting.
Dependencies
- The e2e tests depend on docker.
- The e2e tests depend on a aerospike features.conf file to run Aerospike Enterprise Edition.
- The e2e tests pull their server image from
artifact.aerospike.io, which requires a login:Override the image withdocker login artifact.aerospike.ioASADM_E2E_IMAGE_REPO/ASADM_E2E_SERVER_TAGif you are using a different registry or server version. - Run
pipenv install --dev.
Running Unit Tests
make unitRunning e2e/integration Tests
FEATKEY=(base64 -i path/to/features.conf) make integrationto test the bundled app run:
ASADM_TEST_BUNDLE=true FEATKEY=(base64 -i path/to/features.conf) make integrationNote for Mac users: If you encounter Docker networking issues on macOS, enable localhost networking:
E2E_TEST_USE_LOCALHOST=true FEATKEY=(base64 -i path/to/features.conf) make integrationDebugging with Docker logs: To capture and save Docker container logs during e2e tests for debugging:
DUMP_DOCKER_LOGS=true FEATKEY=(base64 -i path/to/features.conf) make integrationThis will save container logs to the docker_logs/ directory when containers are stopped.
Running all tests with coverage
FEATKEY=(base64 -i path/to/features.conf) make coverageProfiling
Dependencies
- yappi
Run Profiler
asadm --profile Do not exit with 'ctrl+c' exit with the exit command