brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [50/50] [abbrv] brooklyn-server git commit: remove the sandbox/ and release/ dirs from the build
Date Mon, 01 Feb 2016 17:51:06 GMT
remove the sandbox/ and release/ dirs from the build

and update the README in the root

and delete the old in the root.
(it is not maintained; it doesn't even refer to the apache downloads.)

basically make the source build look nice when it's unpacked


Branch: refs/heads/0.8.0-incubating
Commit: 1eb6775407bfa785bb804008af8ce93682027137
Parents: f66b1ea
Author: Alex Heneveld <>
Authored: Thu Sep 3 22:56:39 2015 +0100
Committer: Alex Heneveld <>
Committed: Fri Sep 4 14:33:51 2015 +0100

----------------------------------------------------------------------           |  88 ++----------- | 315 -----------------------------------------------
 2 files changed, 11 insertions(+), 392 deletions(-)
diff --git a/ b/
index cfd1393..f068785 100644
--- a/
+++ b/
@@ -1,87 +1,21 @@
-# [![**Brooklyn**](](
+# [![**Brooklyn**](](
-Apache Brooklyn is a library and control plane for deploying and managing distributed applications.
+### Apache Brooklyn helps to model, deploy, and manage systems.
-See []( for details and
+It supports blueprints in YAML or Java, and deploys them to many clouds and other target
+It monitors those deployments, maintains a live model, and runs autonomic policies to maintain
their health.
-Brooklyn's main emphasis is managing live applications (e.g auto-scaling, exception handling,
auto recovery from failure, and working across multiple clouds). Brooklyn considers deployment
part of management, like the opening move in a game of chess. (Distributed-application-management-chess,
no less).
+For more information see **[](**.
-### Deployment
-Brooklyn enables single-click deployment of complex applications, while tying-in with other
great tools, and reusing and complementing existing workflows.
+### To Build
-Use Brooklyn to create an Application Blueprint, instructing Brooklyn how to wire together
your applications and components, customizing and extending them as needed. Share the blueprint
with others (optionally using Brooklyn's Web Service Catalog) to allow them to single-click
deploy your application onto the infrastructure of their choice.
+The code can be built with a:
-Brooklyn features:
+    mvn clean install
-* out-of-the-box support for many common software components.
-* integration with jclouds, allowing deployment to the majority of public and private clouds,
in addition to pools of fixed IP machines.
-* integration with Apache Whirr (and thereby Chef and Puppet), allowing deployment of well-known
services such as Hadoop and elasticsearch (and you can still use POBS, plain-old-bash-scripts).
-* integration with PaaS's such as OpenShift, allowing use of PaaSes alongside self-built
clusters, for maximum flexibility.
+This creates a build in `usage/dist/target/brooklyn-dist`.  Run with `bin/brooklyn launch`.
-In DevOps fashion, Brooklyn allows applications and roll-outs to be version controlled, tested
programatically, and reused across locations and contexts. Develop on localhost, then reuse
the same application descriptor to deploy to QA, and then to your production environment.
-### Management
-Brooklyn enables [autonomic management](
of applications. (i.e. many small, local, distributed control loops).
-Management policies can be attached to every component part in an application, and to logical
groupings of components (clusters, fabrics). Policies can implement both technical and non-technical
(business) requirements.
-At runtime, policies have access to all aspects of the deployment, including deployment topology
(hierarchical) and locations (machines, PaaSes, and jurisdictions), as well as scripts, instrumentation,
and operational goals and constraints. This means that once the application is launched, the
policies are all set to keep the application running optimally, based on whatever optimally
means in that context.
-These deployment patterns and management policies are expressed as Java (or Groovy) classes,
open-sourced here and giving you full control over what you want to happen. More importantly,
however, this code can be shared, improved, and extended.
-### Use As a Library
-Import Brooklyn into your application to natively use its distributed management smarts.
e.g. [Cloudera's Certification Cluster Builder Tool](
-### Use As a Control Plane
-Alternatively, use Brooklyn as an integrated-stand-alone management node for your application
or bespoke platform.
-## Quick Start
-Three quick start options are available:
-* The [getting started guide](
will step you through downloading and installing Brooklyn and running the examples.
-* Alternatively, [download the latest release](
-* Fork or clone the repo: `git clone git://` then
`cd incubator-brooklyn; mvn clean install; cd usage/dist/target/brooklyn-dist; ./brooklyn/bin/brooklyn
-## Community
-* Have a question that's not a feature request or bug report? Ask on the mailing lists: [brooklyn-users](
or [brooklyn-dev](
-* Chat with us over IRC. On the `` server, in the `#brooklyncentral` channel.
-* Follow [@ApacheBrooklyn]( and [@BrooklynCentral](
on Twitter.
-## Bug Tracker
-Have a bug or a feature request? [Please open a new issue](
-## Contributing
-Your input will be welcomed.
-See the [full guide to contributing](
-Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-See the [NOTICE](NOTICE) file distributed with this work for additional information
-regarding copyright ownership and the [incubation disclaimer](DISCLAIMER) file regarding
project status,
-as Apache Brooklyn is currently undergoing Incubation at the Apache Software Foundation.
-The ASF licenses this file to you under the Apache License, Version 2.0 
-(the "License"); you may not use this file except in compliance with the License.  
-You may obtain a copy of the License at [](
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
+The **[developer guide](**
+has more information about the source code.
diff --git a/ b/
deleted file mode 100755
index f73d83c..0000000
--- a/
+++ /dev/null
@@ -1,315 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# Brooklyn remote install script.
-# Usage:
-# [-h] [-q] [-s] [-e] [-g] [-u user] [-k key] [-r root] [-p port]
[-v version] hostname
-#set -x # DEBUG
-function help() {
-    cat <<EOF
-Brooklyn remote install script.
-    -q  Quiet install
-    -s  Create and set up user account (set with -u option)
-    -e  Set up random entropy for SSH
-    -g  Generate a password for the Brooklyn admin user
-    -u  Change the Brooklyn username (default 'brooklyn')
-    -r  Change the remote root username (default 'root')
-    -k  The private key to use for SSH (default '~/.ssh/id_rsa')
-    -p  The SSH port to connect to (default 22)
-    -v  Set the Brooklyn version to install (default '0.7.0-M1')
- [-q] [-s] [-e] [-g] [-u user] [-r root] [-k key] [-p port] [-v version]
-Installs Brooklyn on the given hostname as 'brooklyn' or the specified
-user. Optionally it creates and configures the Brooklyn user.
-Passwordless SSH access as 'root' (or a user that has 'sudo' privileges) to the
-remote host must be available, with the given key.
-    exit 0
-# Global settings
-function log() {
-    if ! ${QUIET}; then
-        echo $@
-    fi
-    date +"Timestamp: %Y-%m-%d %H:%M:%S.%s" >> ${LOG}
-    if [ "$1" == "-n" ]; then
-        shift
-    fi
-    if [ "$*" != "..." ]; then
-        echo "Log: $*" | sed -e "s/\.\.\.//" >> ${LOG}
-    fi
-function fail() {
-    log "...failed!"
-    error "$*"
-function error() {
-    echo "Error: $*" | tee -a "${LOG}"
-    usage
-function usage() {
-    echo "Usage: $(basename ${0}) [-h] [-q] [-s] [-e] [-g] [-u user] [-r root] [-k key] [-p
port] [-v version] hostname"
-    exit 1
-function retry() {
-    COMMAND="$@"
-    MAX=10
-    N=1
-    while [ ${N} -le ${MAX} ]; do
-        eval "${COMMAND}" 2>&1
-        if [ $? -eq 0 ]; then
-            return 0
-        else
-            echo -n "..."
-            sleep 1
-            N=$(($N + 1))
-        fi
-    done
-    return 1
-# Default options
-while getopts ":hqsegu:r:k:p:v:" o; do
-    case "${o}" in
-        h)  help
-            ;;
-        q)  QUIET=true
-            ;;
-        s)  SETUP_USER=true
-            ;;
-        e)  SETUP_RANDOM=true
-            ;;
-        g)  GENERATE_PASSWORD=true
-            log "Warning: Not supported in 0.7.0-M1 and earlier releases"
-            ;;
-        u)  USER="${OPTARG}"
-            SETUP_USER=true
-            ;;
-        r)  ROOT="${OPTARG}"
-            if [ "${ROOT}" != "root" ]; then
-                SUDO="sudo"
-            fi
-            ;;
-        k)  PRIVATE_KEY_FILE="${OPTARG}"
-            ;;
-        p)  SSH_PORT="${OPTARG}"
-            ;;
-            ;;
-        *)  usage "Invalid option: $*"
-            ;;
-    esac
-shift $((OPTIND-1))
-if [ $# -ne 1 ]; then
-    error "Must specify remote hostname as last argument"
-# Configure SSH
-SSH_OPTS="-o StrictHostKeyChecking=no -p ${SSH_PORT}"
-if [ -r "${PRIVATE_KEY_FILE}" ]; then
-    error "SSH private key '${PRIVATE_KEY_FILE}' not found"
-SSH_PUBLIC_KEY_DATA=$(ssh-keygen -y -f ${PRIVATE_KEY_FILE})
-log "Installing Brooklyn ${BROOKLYN_VERSION}"
-# Pre-requisites for this script
-log -n "Checking '${HOST}:${SSH_PORT}' SSH connection... "
-ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} id" >> ${LOG} 2>&1 || fail "SSH connection
as ${ROOT} failed"
-log "...ok!"
-# Install packages
-log -n "Installing prerequisite packages..."
-ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} yum check-update || ${SUDO} apt-get update" >>
${LOG} 2>&1
-for PACKAGE in "curl" "sed" "tar" "wget"; do
-    ssh ${SSH_OPTS} ${ROOT}@${HOST} "which ${PACKAGE} || { ${SUDO} yum -y --nogpgcheck -q
install ${PACKAGE} || ${SUDO} apt-get -y --allow-unauthenticated install ${PACKAGE}; }" >>
${LOG} 2>&1
-log "...done!"
-# Install Java 7
-log -n "Installing Java 7 packages..."
-ssh ${SSH_OPTS} ${ROOT}@${HOST} "which ${JAVA} || { ${SUDO} yum -y --nogpgcheck -q install
java-1.7.0-openjdk-devel || ${SUDO} apt-get -y --allow-unauthenticated install openjdk-7-jdk;
}" >> ${LOG} 2>&1
-for JVM in "jre" "jdk" "java-1.7.0-openjdk" "java-1.7.0-openjdk-amd64"; do
-    if ssh ${SSH_OPTS} ${ROOT}@${HOST} "test -d /usr/lib/jvm/${JVM}"; then
-        JAVA_HOME="/usr/lib/jvm/${JVM}/" && echo "Java: ${JAVA_HOME}" >> ${LOG}
-    fi
-ssh ${SSH_OPTS} ${ROOT}@${HOST}  "which ${JAVA} || test -x ${JAVA_HOME}/bin/${JAVA}" >>
${LOG} 2>&1 || fail "Java is not installed"
-log "...done!"
-# Increase linux kernel entropy for faster ssh connections
-if ${SETUP_RANDOM}; then
-    log -n "Installing rng-tool to increase entropy..."
-    ssh ${SSH_OPTS} ${ROOT}@${HOST} "which rng-tools || { ${SUDO} yum -y --nogpgcheck -q
install rng-tools || ${SUDO} apt-get -y --allow-unauthenticated install rng-tools; }" >>
${LOG} 2>&1
-    if ssh ${SSH_OPTS} ${ROOT}@${HOST} "test -f /etc/default/rng-tools"; then
-        echo "HRNGDEVICE=/dev/urandom" | ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} tee -a
/etc/default/rng-tools" > /dev/null 2>&1
-        ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} /etc/init.d/rng-tools start" >> ${LOG}
-    else
-        echo "EXTRAOPTIONS=\"-r /dev/urandom\"" | ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO}
tee -a /etc/sysconfig/rngd" > /dev/null 2>&1
-        ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} /etc/init.d/rngd start" >> ${LOG}
-    fi
-    log "...done!"
-# Create Brooklyn user if required
-if ! ssh ${SSH_OPTS} ${ROOT}@${HOST} "id ${USER} > /dev/null 2>&1"; then
-    if ! ${SETUP_USER}; then
-        error "User '${USER}' does not exist on ${HOST}"
-    fi
-    log -n "Creating '${USER}' user..."
-    ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} useradd ${USER} -s /bin/bash -d /home/${USER}
-m" >> ${LOG} 2>&1
-    ssh ${SSH_OPTS} ${ROOT}@${HOST} "id ${USER}" >> ${LOG} 2>&1 || fail "User
was not created"
-    log "...done!"
-# Setup Brooklyn user
-if ${SETUP_USER}; then
-    log -n "Setting up '${USER}' user... "
-    echo "${USER} ALL = (ALL) NOPASSWD: ALL" | ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} tee
-a /etc/sudoers" > /dev/null 2>&1
-    ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} sed -i.brooklyn.bak 's/.*requiretty.*/#brooklyn-removed-require-tty/'
-    ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} mkdir -p /home/${USER}/.ssh"
-    ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} chmod 700 /home/${USER}/.ssh"
-    echo "${SSH_PUBLIC_KEY_DATA}" | ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} tee -a /home/${USER}/.ssh/authorized_keys"
> /dev/null 2>&1
-    ssh ${SSH_OPTS} ${ROOT}@${HOST} "${SUDO} chown -R ${USER}.${USER} /home/${USER}/.ssh"
-    ssh ${SSH_OPTS} ${USER}@${HOST} "ssh-keygen -q -t rsa -N \"\" -f .ssh/id_rsa"
-    ssh ${SSH_OPTS} ${USER}@${HOST} "ssh-keygen -y -f .ssh/id_rsa >> .ssh/authorized_keys"
-    log "...done!"
-# Setup Brooklyn
-log -n "Downloading Brooklyn distribution..."
-ssh ${SSH_OPTS} ${USER}@${HOST} "curl -L -s -o brooklyn-${BROOKLYN_VERSION}.tar.gz${BROOKLYN_VERSION}/brooklyn-dist-${BROOKLYN_VERSION}-dist.tar.gz"
-ssh ${SSH_OPTS} ${USER}@${HOST} "tar zxvf brooklyn-${BROOKLYN_VERSION}.tar.gz" >> ${LOG}
-ssh ${SSH_OPTS} ${USER}@${HOST} "test -x brooklyn-${BROOKLYN_VERSION}/bin/brooklyn" || fail
"Brooklyn was not downloaded correctly"
-log "...done!"
-# Configure Brooklyn if no
-if ! ssh ${SSH_OPTS} ${USER}@${HOST} "test -f .brooklyn/"; then
-    log -n "Configuring Brooklyn properties..."
-    ssh ${SSH_OPTS} ${USER}@${HOST} "mkdir -p .brooklyn"
-    ssh ${SSH_OPTS} ${USER}@${HOST} "curl -L -s -o .brooklyn/"
-    # Generate Brooklyn admin password
-    if ${GENERATE_PASSWORD}; then
-        GENERATED=$(dd if=/dev/random bs=1 count=32 2> /dev/null | uuencode -m - | sed
-n 2p | tr -dc "A-Za-z0-9")
-        SALT=$(echo ${GENERATED} | cut -c1-4)
-        PASSWORD=$(echo ${GENERATED} | cut -c5-12)
-        which shasum && SHA256="shasum -a 256"
-        which sha256sum && SHA256="sha256sum"
-        HASH=$(printf '${SALT}${PASSWORD}\\00' | ${SHA256} | cut -d\  -f1)
-        ssh ${SSH_OPTS} ${USER}@${HOST} "tee -a .brooklyn/" > /dev/null
2>&1 <<EOF = ${USER}${USER}.salt = ${SALT}${USER}.sha256 = ${HASH}
-    else
-        ssh ${SSH_OPTS} ${USER}@${HOST} "sed -i.bak 's/^#
=' .brooklyn/"
-    fi
-    log "...done!"
-# Install example Jars and catalog
-log -n "Installing examples and configuring catalog..."
-ssh ${SSH_OPTS} ${USER}@${HOST} "cat > .brooklyn/catalog.xml" <<EOF
-<?xml version="1.0"?>
-    <name>Brooklyn Demos</name>
-    <template type="brooklyn.demo.WebClusterDatabaseExample" name="Demo Web Cluster with
-        <description>Deploys a demonstration web application to a managed JBoss cluster
with elasticity, persisting to MySQL</description>
-        <iconUrl></iconUrl>
-    </template>
-    <template type="brooklyn.demo.GlobalWebFabricExample" name="Demo GeoDNS Web Fabric
-        <description>Deploys a demonstration web application to JBoss clusters around
the world</description>
-        <iconUrl></iconUrl>
-    </template>
-    <template type="brooklyn.demo.SimpleCassandraCluster" name="Demo Cassandra Cluster">
-        <description>Deploys a demonstration Cassandra cluster</description>
-        <iconUrl></iconUrl>
-    </template>
-    <template type="brooklyn.demo.SimpleCouchDBCluster" name="Demo CouchDB">
-        <description>Deploys a demonstration CouchDB cluster</description>
-        <iconUrl></iconUrl>
-    </template>
-    <classpath>
-        <entry>${BROOKLYN_VERSION}/brooklyn-example-simple-web-cluster-${BROOKLYN_VERSION}.jar</entry>
-        <entry>${BROOKLYN_VERSION}/brooklyn-example-simple-nosql-cluster-${BROOKLYN_VERSION}.jar</entry>
-    </classpath>
-log "...done!"
-# Run Brooklyn
-log -n "Starting Brooklyn..."
-ssh -n -f ${SSH_OPTS} ${USER}@${HOST} "nohup ./brooklyn-${BROOKLYN_VERSION}/bin/brooklyn
launch >> ./brooklyn-${BROOKLYN_VERSION}/brooklyn-console.log 2>&1 &"
-retry "ssh ${SSH_OPTS} ${USER}@${HOST} \"test -e ./brooklyn-${BROOKLYN_VERSION}/brooklyn-console.log\""
-retry "ssh ${SSH_OPTS} ${USER}@${HOST} \"grep -q \"Started Brooklyn console at\" ./brooklyn-${BROOKLYN_VERSION}/brooklyn-console.log
-log "...done!"
-URL=$(ssh ${SSH_OPTS} ${USER}@${HOST} "grep 'Started Brooklyn console at' ./brooklyn-${BROOKLYN_VERSION}/brooklyn-console.log
| cut -d' ' -f9 | tr -d ," | sed -e "s/127\.0\.0\.1/${HOST}/g" -e "s/0\.0\.0\.0/${HOST}/g"
-log "Brooklyn Console URL is ${URL}"
-    log "Brooklyn Console password for the '${USER}' user is '${PASSWORD}'"
-    CREDENTIALS="--user=admin --password=${PASSWORD}"
-log -n "Checking Brooklyn connection..."
-if wget -qO- --retry-connrefused --no-check-certificate ${CREDENTIALS} ${URL} &> /dev/null;
-    log "...success!"
-    fail "Cannot connect to Console URL"

View raw message