MANTA
Another CLI tool for Alps.
Manta is a frontend cli to interact with CSM and OCHAMI.
Deployment
Prerequisites
Install build dependencies
$ cargo install cargo-release cargo-dist git-cliff
Clone repo
&&
Build container image
This repo contains a Dockerfile to build a Container with manta cli.
docker build -t manta .
Copy configuration file
Start the ochami services from the deployment recipe quickstart.
[!NOTE] Make sure to set the
ACCESS_TOKENenvironment variable and create a CA certificate in the same directory as the config file. This can be done using the convienience functions from the the OpenCHAMI deployment recipe repository.To set the
ACCESS_TOKENenvironment variable and create/renew the CA certificate (assuming you have cloned the deployment recipe quickstart):# collection of useful functions ochami_deployment_recipe_quickstart=path/to/quickstart # set environment variable then create the cert
Run the CLI with one of the two options mentioned above to confirm that manta is working.
[!NOTE] Some commands will not work yet with OpenCHAMI services and will sometimes show a message indicating no implementation for the backend.
| ) |Some of the other commands may fail simply due to CSM services not included with OpenCHAMI if only using the OpenCHAMI deployment recipes:
|
Build from sources
Install Rust toolchain https://www.rust-lang.org/tools/install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install cross to be able to complile on different platforms
cargo install cross
Generate binary (cross compilation)
scripts/build
or
rustup target add x86_64-unknown-linux-gnu
cargo build --target=x86_64-unknown-linux-gnu
Development
Prerequisites
Install 'cargo dist' and 'cargo release'
cargo install cargo-dist
cargo install cargo-release
Configure cargo-dist. Accept default options and only target linux assets
cargo dist init -t $(uname -m)-unknown-$(uname -s | tr '[:upper:]' '[:lower:]')-gnu
Then remove the assets for macos and windows
Make sure a github workflow is created in .github/workflows/release.yml
Deployment
This project is already integrated with github actions through 'cargo release' and 'git cliff'
git cliff will parse your commits and update the CHANGELOG.md file automatically as long as your commits follows conventional commits and git cliff extra commit types
cargo release <bump level> --execute
choose your bump level accordingly
If everything went well, then binary should be located in manta/target/x86_64-unknown-linux-gnu/release/manta
Profiling
Enable capabilities
Install perf
Grant access to kernel address map
Create perf data
Identify bottlenecks and get hotspots for those events
Convert perf data file to a format firefox profiles understands
Go to https://profiler.firefox.com/ and open manta.perf file
DHAT mem alloction profiling
https://docs.rs/dhat/latest/dhat/ lto in Cargo.toml needs to be disabled
Run