# AMP Release 4.7.0

* [Introduction](#introduction)
* [Alert of Future Changes](#alert-of-future-changes)
* [New Features](#new-features)
* [Bug Fixes](#bug-fixes)
* [Other Changes](#other-changes)
* [Known Issues](#known-issues)
* [Backwards Compatibility](#backwards-compatibility)
* [Upgrade Instructions](#upgrade-instructions)

## Introduction

Thank you to our community who have contributed a lot of improvements and feedback!
Thanks also go to Brooklyn's commercial users who have funded this development and
made some major contributions.

For more information, please visit https://cloudsoft.io/amp, https://docs.cloudsoft.io
and http://brooklyn.apache.org

This is a major upgrade from AMP version 4.6.0.


## Alert of Future Changes

* Azure Classic (jclouds:azurecompute) is no longer an officially supported feature in AMP. 
  Instead, the newer Azure ARM (jclouds:azurecompute-arm) location should be used.

  However, Azure Classic is still shipped with AMP for backwards compatibility. This will be deleted
  in a future release.


## New Features

### AMP Cluster
We are proud to unveil AMP Cluster, a new project with a focus on scalability. This project 
is currently in beta. Please note that, as this is a beta feature, there will likely be bugs.
Also, if you deploy an AMP cluster please note that future releases of AMP may not be able to 
manage it due to changes in persisted state.

AMP Cluster is a framework designed to enable the deployment and orchestration of a pool of 
AMP nodes from a single point of access. This allows the number of applications which can be 
simultaneously managed, to scale horizontally by adding more AMP nodes, to tens of thousands
of applications.

For more information, see https://docs.cloudsoft.io/operations/amp-cluster

### AMP UI

* Blueprint Composer UX major improvements
  - Users can now drag and drop from the palette
  - Re-styling

* Catalog uploader re-enabled

* YAML Editor updated:
  - Adds YAML folding feature
  - Adds lint support with description of the issue on hover
  - Adds autocomplete on YAML structure, anchors and Brooklyn types

* Sunburst visualization (AKA Kilt Diagram). New diagram to show task status and allow for easy 
  navigation of App Inspector's activities view.

### AMP Network Security
* AMP Network Security has been expanded to support Google Compute Engine (GCE).
  For more information, see https://docs.cloudsoft.io/blueprints/yaml-syntax/networking/

#### Container Service
* A config key can be specified on the `KubernetesLocation` that accepts a `.kube/config` file 
  path, and uses the contents to configure the location. This makes it easier to use provisioned 
  Kubernetes clusters from providers like Bluemix or GKE.

#### Apache Brooklyn Server
* A `forceUpdate` flag can now be specified when adding to the catalog via the UI (it was already
  supported in the rest API). This will allow a user to overwrite a catalog item of the same version already in AMP. 

* Support for inferring AWS credentials from the EC2 instance on which AMP is running (relying on
  the EC2 instance having been assigned an appropriate IAM role.
  This is configured using a new `ComputeServiceRegistry` implementation named 
  `AwsEc2SessionAwareComputeServiceRegistry`.
  See https://github.com/apache/brooklyn-server/pull/723

  For example, a location can be configured with:

    brooklyn.config:
      jclouds.computeServiceRegistry:
        $brooklyn:object:
          type: org.apache.brooklyn.location.jclouds.AwsEc2SessionAwareComputeServiceRegistry

* HTTP command effector improvements. Improves how the responses are handled and improves 
  filtering. You can now filter on more than one field from a json object.

* Update jclouds to 2.0.2. 
  This includes many improvements, including to `azurecompute-arm`.
  See jclouds release notes for details: https://jclouds.apache.org/releasenotes/2.0.2

  
## Bug Fixes

#### Apache Brooklyn Server
* BROOKLYN-522: Installing a karaf feature can trigger a brooklyn restart.
  Previously, Brooklyn would not restart correctly which could leave Brooklyn
  shutdown, though the karaf process was still running.
  Users are strongly discouraged from adding features to a production AMP server using Karaf.
  Instead users should add functionality to AMP by using the bundle API. 
  For more information see [here](https://docs.cloudsoft.io/blueprints/catalog/bundle.html).

* BROOKLYN-520: NullPointerException thrown when type missing in yaml blueprint

* BROOKLYN-516: WindowsPerformanceCounterSensors is not started on rebind

* BROOKLYN-515: WindowsPerformanceCounterSensors does not show values on some Windows deployments

* `WindowsPerformanceCounterFeed$GetPerformanceCountersJob` does not throw exception when no 
  machine is found.

* BROOKLYN-513: yaml location for azurecompute-arm templateOptions.ipOptions fails

* BROOKLYN-510: Provisioning failure when inboundPorts specified, but was not a simple list of integers

* BROOKLYN-509: "winrm.useHttps" usage fails inside provisioning.properties: incorrectly uses http port

* BROOKLYN-449: Intermittent NoClassDefFoundError (org.codehaus.groovy.runtime.InvokerHelper) invoking effector

* BROOKLYN-343: Cross-referencing catalog items fails

* BROOKLYN-41: openIptables config appears to customise entries for requested ports, 
  not the assigned ports

* AMP-1776: Blueprint using auto-generated networking failed to re-deploy in OpenStack.
  Previously, the auto-generated ingress security group was not deleted correctly, and was
  then re-used in subsequent deployments which could cause problems.

* Fix REST API response when result is of type String. Previously, the GUI used to return 
  `"error": "no response from server"`.
  See https://github.com/apache/brooklyn-server/pull/754

* Fix the merging of a location's config and the `provisioning.properties` config set on an entity.
  See https://github.com/apache/brooklyn-server/pull/710

* In the YAML's `brooklyn.parameters`, supports the type `boolean` and allow the default values to 
  be of type `number` and `boolean`

#### Brooklyn CLI
* BROOKLYN-469: CLI: Panic when login attempted with malformed URL

#### AMP UI
* AMP-1761: Locations Manager's location link was broken for locations with no version

* AMP-1748: Error messages such as "Failed to deploy" no longer disappear after a few seconds

* AMP-1724: Deploying imported catalog item gives incorrect link

* AMP-1722: "Save to catalog" modal is confusing and broken in some condition.
  Previously, it did not include "entity" in the drop-down types.
  
* AMP-1721: Edit catalog item in the composer has missing/invalid properties in the save modal

* AMP-1683: Catalog item type overflows column width in the Catalog UI module

* Fix a caching bug in the UI. AMP was caching icons which would fill up a user's local storage 
  over time. We no longer cache generated icons.

* Removes unneeded horizontal scrollbar from logout screen

* Implement better search for catalog selector. The search now:
  - searches for each keyword (separated by space) with AND
  - searches in field 'name', 'type' and 'symbolicName'    

* Displays confirmation and cancel buttons for policy configuration. Also disabled submit on click.

* Fix and update the "save to catalog" modal to work for all catalog items  

* Fix missing ID property in save modal when editing entity from catalog

#### AMP Network Security
* Previously we were only opening the last specified port. We now open all specified ports

* Fix race condition when security groups were updated at the same time as the initial creation.
  Previously, it could incorrectly result in two different security groups being used.


## Other Changes

#### BR CLI
* Show bundle info and message when doing `catalog add`; also supports backwards compatibility as 
  only some API calls support this detail.

#### Apache Brooklyn Server
* New versioning rules as discussed on the brooklyn mailing list. Places where OSGi syntax is 
  required (ie registering/searching OSGi bundles) convert to the OSGi syntax.  Everywhere else 
  uses the version string exactly as supplied by the caller.  Places where mappings to OSGi are 
  not unique result in warnings.
  
  See https://lists.apache.org/thread.html/0dcf40cea3de6077cb3ea01f063d4b07789950ddd69d8aa43693c430@%3Cdev.brooklyn.apache.org%3E

* Some code deprecated in AMP 3.x has been deleted.

* DynamicFabric. Add support for firstMemberSpec in a similar way to DynamicCluster.

* Fix coercion for jclouds reflective builder calls
  [BROOKLYN-513](https://issues.apache.org/jira/browse/BROOKLYN-513)

* Delete deprecated JCloudsUtil methods

* `JcloudsLocationCustomizer.onObtainError` improvements. Makes customizers aware of obtain failures 
  in case they need to clean up. Also wraps the customizer calls into a delegate.

* Bundles can now be uninstalled automatically. We also now support auto-reinstall for snapshot POSTs.  

* A default network is now created when deploying to Azure ARM. This functionality was present in 
  previous versions of AMP, but was removed in jclouds and thus AMP 4.6. It has now been re-instated.

#### AMP UI
* Better display of activity tag filters. This tries to improve the display of the activity tag 
  filters by changing them to a dropdown style.

#### AMP Networking
* Improve resource cleanup when obtain fails
* Various persitence fixes


## Known Issues

Please note that known issues are logged in the Apache Brooklyn Jira available at 
https://issues.apache.org/jira/browse/BROOKLYN

* Cannot add custom config keys in location manager

* AMP-1778 If a windows machine has been deployed to Azure ARM using AMP 4.6.0,
  previous versions of AMP will no longer be able to deploy to Azure until the machine is removed

* In Azure ARM, when a VM is provisioned and removed or when a VM fails to provision, under 
  certain conditions the associated resources are not removed. The current workaround requires 
  manually deleting the orphaned resources:
  - Resource Group
  - Virtual Network
  - Network Security Group
  - Network Interfaces
  - Disks
  - Availability Sets


## Backwards Compatibility

For backwards compatibility with versions of AMP older than 4.6.x, see also the release notes for
intermediate AMP releases.


## Upgrade Instructions

* See detailed upgrade instructions at https://docs.cloudsoft.io/operations/upgrade.html

* Note that from AMP 4.3 onwards, Java SE 8 is required

* Use of RPM and DEB is recommended, rather than the tar.gz.

* CentOS 7.x is recommended, though CentOS 6 and Ubuntu 16.04 are also tested.

* If binding to existing persisted state, an additional command is required to update the existing
  catalog with the latest AMP versions. Assuming AMP has been installed to /opt/amp (as is done by the
  RPM and DEB):

      br add-catalog /opt/amp/catalog/catalog.bom
