In this article, I want to focus on the administrative tools for the Anypoint Platform. They’re all command-line tools primarily used by Admins and DevOps Engineers to interact with the platform and its entities (or used by those developers fulfilling such roles).
Administrative tools for Anypoint Platform can, for example, be used to configure accounts (i.e. set up Business Groups, Users, and Permissions), manage APIs and Deployments, and upload and modify Assets. The application of these tools is extensive, and I cannot briefly summarize all possible uses in a short, concise list.
I believe that even though these tools may not generally be used daily, they are indispensable in managing the platform in a consistent and repeatable way.
Developers must understand that these tools exist (even if they don’t use them themselves). This is because they are often the first point of contact for other engineers within their Organisation who, probably less familiar with MuleSoft, require advice and guidance on using such tooling.
There are a number of necessary prerequisites for installing each of the administrative tools for Anypoint Platform. I will touch upon this when describing each, but these prerequisites are well documented in the tool’s documentation, and this is where more detailed information can be found if necessary.
Note also that each tool requires authentication against the Anypoint Platform before it can be used, and detailed information can be found in the tool’s documentation.
This is the official command line tool supported by MuleSoft. It is currently at version 3.x with over 150 commands and allows for interaction with many different entities across the platform. It is a valuable way for Administrators to query the platform and make changes to assets and configuration. DevOps Engineers may also find this tool helpful in scripts that can be run in deployment pipelines.
It can also interact with on-premise servers (not just CloudHub) where those instances have been attached to the Anypoint Platform Control Plane.
Below is a quick summary of the areas of the platform the tool can access:
- Anypoint Exchange
- API Manager
- Access Management
- Runtime Manager
- API Designer
- VPCs and DLBs
- API Governance
However, it does not cover Anypoint MQ.
A few software prerequisites are required before this CLI can be installed and used (NodeJS, NPM, and Git). These are all well documented, so I have included a reference to the official MuleSoft documentation in the References section below.
Note that this tool does not work with user accounts that have MFA enabled. Only those without MFA enabled can be used (first, ensuring that those accounts only have the minimum permissions necessary to do the required task). In this situation where such an account doesn’t exist, a platform Connected App can be created, and the CLI can then be used by authenticating with the appropriate Client ID and Client Secret.
Official Documentation: https://docs.mulesoft.com/anypoint-cli/3.x/
Anypoint Terraform Provider
Using the Anypoint Terraform Provider requires prior knowledge of the Terraform tool (which has to be installed before any Provider is used). However, without going into too much detail on this, it is an Intrastructure-as-code (IaC) tool primarily aimed at DevOps engineers – its remit is to manage (create, update and destroy) underlying technical infrastructure. With respect to the Anypoint Platform, this is managing resources within a platform account.
For those wishing to understand more about IaC, there is much documentation available on the subject. I have also included a link to a small video as an introduction.
To quickly summarise the Provider itself, below is a list of resources it can manage:
- Users, Roles, and Teams
- Business Groups and Environments
- VPCs and DLBs
Once again, its current version (1.x), does not interact with Anypoint MQ. However, I do not believe it is yet to be considered feature-complete so expect to see additional functionality in the future.
This Terraform Provider is an open-source community project hosted in GitHub and managed by a number of MuleSoft technical staff. Be aware that it is not an official tool from MuleSoft, and so, as an Organisation, they do not support it. Though, I’m sure the project owners would be happy to offer assistance where they can – and would, additionally, be extremely grateful for any community involvement to support the enhancement of the Provider.
Templates have also been provided, which can be used to create standard setups. Though if needed, these can be used as the basis of a template for your alternate configuration.
Provider Documentation: https://registry.terraform.io/providers/mulesoft-anypoint/anypoint/latest
Provider Templates: https://github.com/mulesoft-consulting/terraform-provider-anypoint-templates
Anypoint MQ CLI
The third tool I want to mention is the Anypoint MQ CLI. As the name suggests, this aims to provide a tool for interacting specifically with Anypoint MQ, which, as I have stated, is not covered by the other tools. This is also an open-source tool hosted on GitHub, and being a community project, it isn’t supported by MuleSoft.
It is written in python (which must first be installed) and utilizes the relevant Anypoint Platform API to interact with Anypoint MQ. Those with some understanding of Python should be able to read and understand the code.
Again, this CLI does not work with user accounts that have MFA enabled.
Source Code: https://github.com/mulesoft-catalyst/anypoint-mq-cli
Runtime Fabric CLT
I mention this tool for the completeness of this article. Interacting with RTF is generally only done by those with the necessary training and skills. They should already be fully aware of this tool and its use, although if not (and for the sake of other people’s interest), below are references to the documentation.
Official Documentation: https://docs.mulesoft.com/runtime-fabric/1.13/install-rtfctl
The tools above are an excellent way to interact with the Anypoint Platform from the command line.
Although using the command line is not everybody’s first choice (many prefer UI interaction), administrative tools for Anypoint Platform are valuable tools, especially when interaction needs to be scripted for automation.
One final point to mention is that these tools do utilize the platform APIs to interact with the Anypoint Platform. As is the very nature of software development lifecycles, from the point an API is updated (for example, to add new functionality), it can take up to six months to see the associated changes reflected in any tooling. If there is an aspect of one of the platform APIs you wish to use, you may need to be patient before you see it available in these tools.
To discuss your API approach, get in touch with Devoteam to learn more.