This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wallaby | |
# the "tagging" module patches the Wallaby client library with | |
# support for tag operations | |
import tagging | |
# We'll start by setting up a Wallaby client library session against | |
# the broker on localhost | |
from qmf.console import Session | |
console = Session() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The condor_configd daemon: | |
- Part of the configuration_tools git repo | |
- Provides a configuration file (99configd.config) that can be dropped into LOCAL_CONFIG_DIR | |
- The configd configuration defines LOCAL_CONFIG_FILE | |
- The configd augments existing configuration, but is authoritative for DAEMON_LIST | |
- Needs to know the location of the AMQP broker that is communicating with wallaby (QMF_BROKER_HOST) | |
Setting up a node with the configd daemon: | |
- Install the configd on each condor node to be managed | |
- Ensure the 99configd.config is place in LOCAL_CONFIG_DIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cmd_slacker_nodes.rb | |
# | |
# Licensed 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:47) | |
[GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from qmf.console import Session | |
>>> import wallaby | |
>>> | |
>>> # create a new console object | |
... console = Session() | |
>>> | |
>>> # connect to the broker (on localhost:5672, by default) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# dencx removes the ncx namespace from an epub file so that you can | |
# use it as the input to kindlegen. | |
import zipfile | |
import re | |
with zipfile.ZipFile(sys.argv[1], 'r') as inZip: | |
with zipfile.ZipFile(sys.argv[2], 'w') as outZip: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cmd_api_version.rb: Prints the API version of the Wallaby service. | |
# | |
# Licensed 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# skel: template wallaby-shell class | |
# | |
# Copyright (c) 2009--2010 Red Hat, Inc. | |
# | |
# Licensed 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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Constraints can make use of simple syntactic sugar for specifying times. | |
wallaby:master!? % wallaby inventory -c "not last_checkin.is_never && last_checkin < 2.hours_ago" | |
node name is provisioned? last checkin | |
--------- --------------- ------------ | |
Aldridge-Brownhills provisioned Mon Oct 18 11:23:47 -0500 2010 | |
# Constraints can be defined over any property of a node. | |
wallaby:master!? % wallaby inventory -c "memberships.size == 0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
localhost ~/devel/wallaby | |
19808 wallaby % curl http://localhost:4567/help | |
The Wallaby HTTP server provides read-only access to node | |
configurations. It understands the following requests: | |
GET /config/$NODENAME/ | |
returns a configuration file with the last activated | |
configuration for $NODENAME. | |
GET /config/$NODENAME/at/$VERSION/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#name EightStartds | |
#depends Master | |
#depends NodeAccess | |
USE_PROCD=FALSE | |
COLLECTOR_HOST=condor-collector.freevariable.com | |
ALLOW_WRITE=*.freevariable.com | |
ALLOW_READ=*.freevariable.com | |
SEC_DEFAULT_AUTHENTICATION_METHODS=CLAIMTOBE | |
MASTER.PLUGINS = $(LIB)/plugins/MgmtMasterPlugin-plugin.so | |
STARTD.PLUGINS = $(LIB)/plugins/MgmtStartdPlugin-plugin.so |