You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by du...@apache.org on 2021/05/20 16:10:00 UTC
[brooklyn-docs] 28/34: Merge apache-brooklyn/master as at commit
6b410121
This is an automated email from the ASF dual-hosted git repository.
duncangrant pushed a commit to branch ruby-3
in repository https://gitbox.apache.org/repos/asf/brooklyn-docs.git
commit 06230ce91c98bee54c16ff9641170fef5ba61e1e
Merge: a6c7aaf 6b41012
Author: Richard Downer <ri...@cloudsoft.io>
AuthorDate: Thu Feb 25 14:49:08 2021 +0000
Merge apache-brooklyn/master as at commit 6b410121
...log-w700.png => quick-launch-template-w700.png} | Bin
...ql-in-catalog.png => quick-launch-template.png} | Bin
guide/blueprints/catalog/schema.md | 1 +
guide/blueprints/catalog/templates.md | 79 +++++++++++++++++++--
guide/dev/tips/debugging-remote-brooklyn.md | 2 +-
guide/ops/configuration/brooklyn_cfg.md | 27 ++++++-
guide/ops/rest.md | 4 +-
7 files changed, 102 insertions(+), 11 deletions(-)
diff --cc guide/blueprints/catalog/templates.md
index 9f54ba3,f429c72..06212d9
--- a/guide/blueprints/catalog/templates.md
+++ b/guide/blueprints/catalog/templates.md
@@@ -1,14 -1,78 +1,79 @@@
---
- title: Templates and the Add-Application Wizard
+ title: Templates and Quick Launch
+layout: website-normal
---
- ### Templates and the Add-Application Wizard
+ A `template` item type is a full application or service. It consists of one or more entities together with policies, configuration, parameters and locations.
+ It is also composable: it can be used as an entity in another entity or application template.
- A `template` is a full application. It consists of one or more entities inside an application
- (though this is also composable: it can be used as part of another application).
- When a `template` is added to the catalog, the blueprint will appear in quick launch on the homepage. A click on these
- items will let you quickly deploy them as shown here:
+ The "Home" screen in the UI includes a "Quick Launch" bar which by default shows all items in the catalog with `itemType: template`,
+ making it easy for users to deploy things without any composition.
+ When an item is selected, it can be simply configured and immediately deployed,
+ or it can be edited in a simple in-line YAML editor
+ or it can be opened in the composer.
- [![MySQL in Brooklyn Catalog](mysql-in-catalog-w700.png "MySQL in Brooklyn Catalog")](mysql-in-catalog.png)
+ If the template is a valid plan without a location, the simple configuration view is used.
+ This prompts a user to select a name, location, and values for the config parameters.
+ The user can then easily deploy it, or if they wish open it in one of the other two modes.
+ The simple YAML editor will edit the YAML that _references_ the template,
+ whereas the composer will actually load the YAML _of_ the item, with any values set in the simple view.
+
+ If the template declares a location -- or if the template is not valid YAML -- then the simple editor is opened immediately,
+ with the template loaded exactly as it is defined. Comments can be included to facilitate editing.
+
+ It is also possible to curate which items appear in "Quick Launch", and which locations.
+ If the tag `catalog_quick_launch` is set on _any_ template in the catalog,
+ then _only_ templates with that tag will be displayed.
+ (If nothing has such a tag, then all templates are displayed.)
+ Of course other tags can be added as usual.
+
+ Similarly with locations, if any locations have that tag, then only locations with that tag will be available in the deploy dropdown.
+ If there is only one location, it is pre-selected. So by tagging just one location, it can be ensured to be automatically selected.
+ Additionally if any locations have that tag, the "Create Location" option is suppressed,
+ as it is assumed the Quick Launch is being used in a curated environment where that option is not meant for end-users.
+ (This can be changed through config options in the code, for users who wish to produce their own UI.)
+
+ For example, the following catalog BOM will add a template for a single server to the catalog,
+ ensuring it appears in Quick Launch (with the tag),
+ and triggering the simple YAML editor when opened (because it has a location defined):
+
+ ~~~ yaml
+ brooklyn.catalog:
+ items:
+ - id: 1-server-template
+ itemType: template
+ name: "Template 1: Server"
+ tags: [ catalog_quick_launch ]
+ description: |
+ Sample YAML to provision a server in a cloud with illustrative VM properties
+ item:
+ name: Server (Brooklyn Example)
+
+ # this basic example shows how Brooklyn can provision a single raw VM
+ # in the cloud or location of your choice
+
+ services:
+ - type: server
+ name: My VM
+
+ # location can be e.g. `softlayer` or `jclouds:openstack-nova:https://9.9.9.9:9999/v2.0/`,
+ # or `localhost` or `byon:(hosts="10.9.1.1,10.9.1.2,produser2@10.9.2.{10,11,20-29}")`
+ location:
+ jclouds:aws-ec2:
+ # edit these to use your credential (or delete if credentials specified in brooklyn.properties)
+ identity: <REPLACE>
+ credential: <REPLACE>
+
+ region: eu-central-1
+
+ # we want Ubuntu, with a lot of RAM
+ osFamily: ubuntu
+ minRam: 8gb
+
+ # set up this user and password (default is to authorize a public key)
+ user: sample
+ password: s4mpl3
+ ~~~
+
+ [![Quick Launch Template Example](quick-launch-template-w700.png "Quick Launch Template Example")](quick-launch-template.png)
diff --cc guide/dev/tips/debugging-remote-brooklyn.md
index 5056fd8,c52da27..84c305e
--- a/guide/dev/tips/debugging-remote-brooklyn.md
+++ b/guide/dev/tips/debugging-remote-brooklyn.md
@@@ -23,9 -21,9 +23,9 @@@ instance. The git commit that was used
This should return details of the build as a JSON string similar to the following (formatted for clarity):
-```json
+{% highlight json %}
{
- "version": "1.0.0-SNAPSHOT", {% comment %}BROOKLYN_VERSION{% endcomment %}
- "version": "1.1.0-SNAPSHOT", // BROOKLYN_VERSION
++ "version": "1.1.0-SNAPSHOT", {% comment %}BROOKLYN_VERSION{% endcomment %}
"buildSha1": "c0fdc15291702281acdebf1b11d431a6385f5224",
"buildBranch": "UNKNOWN"
}
diff --cc guide/ops/configuration/brooklyn_cfg.md
index 317e285,9346d4a..5b08653
--- a/guide/ops/configuration/brooklyn_cfg.md
+++ b/guide/ops/configuration/brooklyn_cfg.md
@@@ -187,17 -177,42 +187,42 @@@ brooklyn.entitlements.perUser.default=u
brooklyn.entitlements.perUser.admin=root
brooklyn.entitlements.perUser.support=readonly
brooklyn.entitlements.perUser.metrics=minimal
-```
+{% endhighlight %}
For more information, see
-[Java: Entitlements]({{book.path.docs}}/blueprints/java/entitlements.md).
+[Java: Entitlements]({{ site.path.guide }}/blueprints/java/entitlements.html).
or
-[EntitlementManager]({{book.url.brooklyn_javadoc}}/org/apache/brooklyn/api/mgmt/entitlement/EntitlementManager.html).
+{% include java_link.html class_name="EntitlementManager" package_path="org/apache/brooklyn/api/mgmt/entitlement" project_subpath="api" %}.
-
## HTTPS Configuration
-See [HTTPS Configuration]({{book.path.docs}}/ops/configuration/https.md) for general information on configuring HTTPS.
+See [HTTPS Configuration](https.html) for general information on configuring HTTPS.
+ ## Session configuration
+
+ Apache Brooklyn uses a util class, `org.apache.brooklyn.rest.util.MultiSessionAttributeAdapter` for ensuring requests
+ in different bundles can get a consistent shared view of the data stored in the session.
+
+ To choose the preferred session for a given request you should call one of the static methods `of` in the class.
+ It will look on the server for a previously marked _preferred session handler_ and return the _preferred session_.
+ If there is no _preferred session handler_, a new one will be created on the CXF bundle. If there is not a
+ _preferred session_ on the _preferred session handler_, a new one will be created. The new elements will be marked as
+ preferred.
+
+ Any processing that wants to set, get or remove an attribute from the session should use the methods in this class,
+ as opposed to calling request.getSession().
+
+ This class marks as used the session on the other modules by resetting the max inactive interval for avoiding the server
+ housekeeper service scavenging it due to inactivity. It also allows you to set up a max age time for the sessions,
+ otherwise, the default configuration of the Jetty the server will be applied.
+
+ The default value for the max inactive interval is 3600s but both values can be modified by adding the time in
+ seconds as properties on `brooklyn.cfg`:
+
+ ```properties
+ org.apache.brooklyn.server.maxSessionAge = 3600
+ org.apache.brooklyn.server.maxInactiveInterval = 3600
+ ```
+