Register now for better personalized quote!

What is Mantl API?

Sep, 09, 2024 Hi-network.com
|

When developing applications, one to the first obstacles we encountered was around installing applications and frameworks. To address this complicated ecosystem, we developed a service framework and API. The Mantl APIis a feature built in to Mantl that helps you find and install applications and Mesos frameworks. Think of the effort involved to build a multi-node Elasticsearch, HDFS, or Cassandra cluster using traditional configuration management tools. With Mantl, Mantl API, and the underlying Mesos platform, you can launch any of the above (and several others) with a single API call.

It can be complicated to install applications and frameworks on Mesos. Each framework has it's own specific configuration options. And there is no conventions or standards for common options. The configuration mechanisms vary as well. Command line arguments, environment variables, and configuration files in varying formats are all common ways to configure frameworks. It often takes someone who has deep knowledge of the underlying application and the Mesos platform (and all ofitsdependencies) to figure out how to install and configure any given framework.

Mantl API and its packaging system allow you to install a number of frameworks and applications that are pre-configured to work with Marathon, Mesos, Zookeeper, Consul, Traefik, and other Mantl components. Most packages will work without any additional configuration but you do have the ability to customize the deployment to meet your needs. Things like how much CPU and memory to allocate, the number of instances to run (for multi-node applications), and other framework-specific options can be specified in a single JSON file when deploying.

At the time of this writing, the following packages are available:

  • Arangodb
  • Cassandra
  • Chronos
  • Elasticsearch
  • Elasticsearch-client
  • HDFS
  • Kafka
  • Kibana
  • Kibana-mesos
  • Memsql
  • Spark

Using Mantl API

Let's take a look at how you can use Mantl API.

Mantl API is available at/apion your control nodes. By default, it is protected with SSL and basic authentication. I will be usingcurland the invaluablejqutility in the following examples.

Listing Packages

The actual list of packages shown above can be obtained using the Mantl API/packagesendpoint. This is the API request used:

curl -sku admin:passwordhttps://mantl-control-01/api/1/packages|jq -r'.[].name'

This issues an authenticated GET request to the/packagesendpoint which returns a JSON representation of the all packages and associated metadata. I use thejqcommand to extract just the name from each package. The result is the list of available packages that you see above.

Of course, you will need to change the username, password, and host name to values appropriate for your Mantl cluster if you are following along.

Installing a Package

Installing packages is really easy. For example, let's install Elasticsearch.

curl -sku admin:password -d"{\"name\"": \""elasticsearch\""}"" https://mantl-control-01/api/1/packages

tag-icon Hot Tags : Mantl shipped elasticsearch Mesos Apache Spark HDFS Cassandra

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.