Skip to content

Redpill-Linpro/anypointchdeployer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anypoint CloudHub Deployment CLI

This is a command line tool to deploy new and update existing mule application running in Anypoint CloudHub using application artifacts stored in Exchange.

Currently it can only deploy applications that are published to Exchange. There is no support for uploading and deploying local Mule application artifacts.

It uses the Anypoint Access Management API (Authentication) and CloudHub API

Build instructions

go get -d -v ./...
go build -o chdeploy

Usage instructions

This tool uses json files to describe the desired deployments and detect if the desired deployment differs from the one actually running in Cloudhub. If so the running deployment will be updated.

How to run (as user)

./chdeploy -u <username> -p <password> -o <organizationname> -e <environment> -a user  *.json 

Deployment descriptors

The deployment descriptors are in JSON format and derived from the JSON payload handled by the Anypoint Cloudhub API. Below is an example.

{
  "applicationSource" : {
      "artifactId" : "hellomuleworld",
      "groupId" : "deadbeef-abc1-3743-aX61-71337e847d4",
      "organizationId" : "deadbeef-abc1-3743-aX61-71337e847d4",
      "source" : "EXCHANGE",
      "version" : "1.0.0"
   },
   "applicationInfo" : {
      "domain" : "helloworld-ullpo-prod",
      "logLevels" : [],
      "loggingCustomLog4JEnabled" : false,
      "loggingNgEnabled" : true,
      "monitoringAutoRestart" : true,
      "monitoringEnabled" : true,
      "muleVersion" : {
         "version" : "4.4.0"
      },
      "objectStoreV1" : false,
      "persistentQueues" : false,
      "persistentQueuesEncrypted" : false,
      "properties" : {
         "anypoint.platform.config.analytics.agent.enabled" : "true",
         "anypoint.platform.visualizer.layer" : "System",
         "servicename": "production environment",
         "backend.endpoint": "https://httpbin.org/anything"
      },
      "staticIPsEnabled" : false,
      "trackingSettings" : {
         "trackingLevel" : "DISABLED"
      },
      "workers" : {
         "amount" : 1,
         "type" : {
            "name" : "Micro"
         }
      }
   },
   
   "autoStart" : true
}

Contribution Guidelines

All contributions are welcome. Feel free to open a pull request.

About

Anypoint CloudHub Deployer commandline tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages