gbartolonifcg/mule-deployer-cli
Deploy to Anypoint Platform your MuleSoft apps with mule-deployer-cli
205
The "gbartolonifcg/mule-deployer-cli" Docker image is a command line tool designed to simplify the deployment process of MuleSoft applications to the Anypoint Platform Runtime Plane. The primary functionality is encapsulated in the "runtime-deploy" sub-command, allowing users to deploy MuleSoft applications seamlessly.
Internally, the tool leverages the mule-maven-plugin to streamline the deployment process. It generates a temporary pom.xml file, acting as a control mechanism for orchestrating the deployment.
This Docker image serves as a powerful and efficient tool for MuleSoft developers aiming to seamlessly deploy their applications to the Anypoint Platform Runtime Plane using a simple and standardized command-line interface.
Here follows the usage instructions of the command:
$ docker run --rm -v $(pwd)/your-manifest.yaml:/manifest.yaml -v $(pwd)/your-artifact.jar:/artifact.jar -it gbartolonifcg/mule-deployer-cli -h
Usage: mule-deployer-cli <command> [-v|--verbose] [-h|--help]
Commands:
runtime-deploy Deploy runtime [-a|--with-artifact <artifact name>] [-d|--dry-run]
runtime-deploy
The runtime-deploy
command facilitates the deployment of MuleSoft applications to the Anypoint Platform Runtime Plane. The core functionality requires a YAML manifest file, serving as a configuration source for the deployment process.
Here follows a sample execution to deploy to Anypoint Runtime Manager referencing an artifact stored on Anypoint Exchange:
$ docker run --rm -v $(pwd)/your-manifest.yaml:/manifest.yaml -it gbartolonifcg/mule-deployer-cli runtime-deploy
Here follows a sample execution to deploy to Anypoint Runtime Manager providing the artifact:
$ docker run --rm -v $(pwd)/your-manifest.yaml:/manifest.yaml -v $(pwd)/your-artifact.jar:/artifact.jar -it gbartolonifcg/mule-deployer-cli runtime-deploy -a
The YAML manifest follows a specific structure:
artifact:
artifactId: ARTIFACT-ID
groupId: GROUP-ID
version: VERSION
deploymentType: DEPLOYMENT-TYPE
configuration:
DEPLOYMENT-PARAMETERS
where:
CloudHub 2 Deployment
artifact:
artifactId: example-exp-sfdc
groupId: "4f88d22c-0a16-4b50-8117-b82526429e61"
version: 1.5.0-SNAPSHOT
deploymentType: cloudhub2Deployment
configuration:
scopeLoggingConfigurations:
scopeLoggingConfiguration:
- scope: org.mule.HttpMessageLogger
logLevel: DEBUG
- scope: org.mule.HttpMessageLogger
logLevel: DEBUG
uri: https://eu1.anypoint.mulesoft.com/
muleVersion: "4.5.1"
applicationName: example-exp-sfdc-dev
target: "example-PS"
provider: "MC"
environment: Dev
replicas: "1"
vCores: "0.1"
businessGroupId: 4f88d22c-0a16-4b50-8117-b82526429e61
properties:
env: dev
anypoint.platform.base_uri: https://eu1.anypoint.mulesoft.com/
anypoint.platform.client_id: "clientid"
secureProperties:
anypoint.platform.client_secret: "123123"
example.exp.sfdc.application.clientId: "username"
secureProperties:
anypoint.platform.client_secret: "123123"
example.exp.sfdc.application.clientId: "username"
connectedAppClientId: "username"
connectedAppClientSecret: "password"
connectedAppGrantType: "client_credentials"
integrations:
services:
objectStoreV2:
enabled: true
deploymentSettings:
generateDefaultPublicUrl: true
http:
inbound:
publicURL: https://api-dev.example.com/example-exp-sfdc
CloudHub 1 Deployment
artifact:
artifactId: example-exp-sfdc
groupId: "4f88d22c-0a16-4b50-8117-b82526429e61"
version: 1.5.0-SNAPSHOT
deploymentType: cloudHubDeployment
configuration:
uri: https://anypoint.mulesoft.com/
muleVersion: "4.6-java8"
applicationName: example-exp-oracle-dev
environment: Dev
region: "eu-central-1"
workers: "1"
workerType: "MICRO"
objectStoreV2: true
persistentQueues: true
businessGroupId: 4f88d22c-0a16-4b50-8117-b82526429e61
connectedAppClientId: "client"
connectedAppClientSecret: "secret"
connectedAppGrantType: "client_credentials"
properties:
env: dev
anypoint.platform.base_uri: https://anypoint.mulesoft.com/
anypoint.platform.client_id: env-clientid
anypoint.platform.visualizer.layer: Experience
anypoint.platform.platform_base_uri: https://anypoint.mulesoft.com/apiplatform
anypoint.platform.analytics_base_uri: https://analytics-ingest.eu1.anypoint.mulesoft.com/
anypoint.platform.contracts_base_uri: https://anypoint.mulesoft.com/apigateway/ccs
anypoint.platform.coreservice_base_uri: https://anypoint.mulesoft.com/accounts
anypoint.platform.visualizer.displayName: example-exp-oracle
anypoint.platform.config.analytics.agent.enabled: "true"
anypoint.platform.client_secret: env-clientsecret
Please write to gbartoloni@florence-consulting.it for suggestions, comments and complaints!
docker pull gbartolonifcg/mule-deployer-cli