Skip to content

Latest commit

 

History

History
99 lines (71 loc) · 3.36 KB

userguide.adoc

File metadata and controls

99 lines (71 loc) · 3.36 KB

qDup User’s Guide

1. Introduction

1.1. What is qDup?

qDup is an agent-less, automation and coordination tool. We use it to coordinate tasks across multiple linux computers through standard ssh connections.

1.2. What does qDup do?

qDup allows for the co-ordination of many activities across multiple servers, making complex benchmarks manageable and repeatable.

1.3. How to get started with qDup

The Tutorials are the best place to get started. They walk us from new to qDup to writing coordinated scripts that handle common scripting requirements in 3 tutorials:

After the tutorials, check out the How To for more specific scenarios

1.4. How does qDup work?

qDup uses SSH, no special agents or languages required. We recommend using SSH keys to connect without passwords but user passwords can be included in the YAML files.

The main workflow is broken into 3 stages: setup, run, cleanup

Setup scripts are executed sequentially with a shared SSH session to help capture all the changes and ensure a consistent state for the run stage. Any environment changes to the setup SSH session will be copied to all the run stage sessions.

Run scripts are executed in parallel and will start with the environment changes from the setup stage.

Cleanup scripts are executed sequentially with a shared SSH session to ensure a consistent ending state. They occur after any pending queue-download from the run stage so it is safe to cleanup anything left on the hosts

2. Quickstart

  • Download the latest uber-jar release

  • Add you private key to the target servers

cat ~/.ssh/id_rsa.pub | ssh user@server 'cat >> .ssh/authorized_keys'
Tip
For more information on how to configure ssh, please refer to ssh-config
  • Create a simple test script

cat > helloworld.yaml << 'EOF'
scripts:
    tryme:
    - sh: whoami
    - sh: date
    - sh: echo ${{message}}
hosts:
    server: user@server_name
roles:
    test:
        hosts:
        - server
        run-scripts:
        - tryme
states:
    message: Hello, qDup!
EOF

Check the qdup documentation for the structure of the YAML file.

  • Run the script

java -jar qDup-uber.jar -C -B /tmp qdup.yaml
  • Run again with a different message

java -jar qDup-uber.jar -C -B /tmp  -S message="Greetings, qDup!" qdup.yaml

Check the jar documentation on what else can be done with the uber jar.

3. Concepts

qDup scripts contain the following sections;

  • scripts - The sequence of commands to run on hosts

  • hosts - The configuration for connecting via SSH

  • roles - Assign scripts to hosts to define the steps in the test

  • states - JSON-like data that describes the run-time state

  • globals - Global settings and functions