anypointchdeployer

command module
v0.0.0-...-cda2449 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

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.

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL