All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.brooklyn.entity.nosql.couchbase.pillowfight.yaml Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
#
# 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
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#
services:
- type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
  name: CBC Pillowfight
  launch.command: |
    curl http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list |
      sudo tee /etc/apt/sources.list.d/couchbase.list
    curl http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
    sudo apt-get update
    sudo apt-get install -y libcouchbase2-libevent libcouchbase-dev libcouchbase2-bin
  provisioning.properties:
    # CentOS requires a different launch command, see below
    osFamily: ubuntu
  checkRunning.command: ""
  stop.command: ""
    
  brooklyn.config:
    base_url: http://127.0.0.1:8091/
    
  brooklyn.initializers:
  - type: org.apache.brooklyn.core.effector.ssh.SshCommandEffector
    brooklyn.config:
      name: pillow_fight
      description: runs cbc pillowfight
      command: |
        cbc-pillowfight -U ${base_url}${bucket} \
          `if [ -n "$username" ]; then echo -u $username; fi` \
          `if [ -n "$password" ]; then echo -P $password; fi` \
          `if [ -n "$num_cycles" ]; then echo -c $num_cycles; fi` \
          `if [ -n "$min_size" ]; then echo -m $min_size; fi` \
          `if [ -n "$max_size" ]; then echo -M $max_size; fi` \
          `if [ -n "$ratio" ]; then echo -r $ratio; fi`
      parameters:
        base_url:
          description: base URL (http or couchbases) and list of hosts/port to connect to, including trailing slash
          defaultValue: $brooklyn:config("base_url")
        bucket:
          description: bucket to use
          defaultValue: default
        username:
          description: username to authenticate to the bucket
        password:
          description: password to authenticate to the bucket
        num_cycles:
          description: number of iterations to run
          defaultValue: 1
        min_size:
          description: minimum payload size
          defaultValue: 50
        max_size:
          description: maximum payload size
          defaultValue: 5120
        ratio:
          description: "specify SET/GET command ratio (default: 33, i.e. 33% SETs and 67% GETs)"
          defaultValue: 33

# For CentOS, use the following launch command:
#  launch.command: |
#    curl http://packages.couchbase.com/rpm/couchbase-centos55-x86_64.repo |
#      sudo tee /etc/yum.repos.d/couchbase.repo
#    sudo yum check-update
#    sudo yum install -y libcouchbase2-libevent libcouchbase-devel libcouchbase2-bin




© 2015 - 2024 Weber Informatics LLC | Privacy Policy