Skip to content

Commit

Permalink
Update config examples
Browse files Browse the repository at this point in the history
Signed-off-by: Blaine Gardner <[email protected]>
  • Loading branch information
BlaineEXE committed Jun 26, 2019
1 parent b0232ab commit fee4202
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 deletions.
8 changes: 8 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# Examaple config.yaml file for octopus.
# This example does not reflect octopus's default values.

# global options
groups-file: $HOME/host-groups.sh
identity-file: ~/.ssh/id_dsa
user: root
port: 22
host-groups: all
verbose: false

# 'copy' options
recursive: true
buffer-size: 128
requests-per-file: 128
33 changes: 10 additions & 23 deletions config/host-groups-file-example
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/usr/bin/env bash

# The host groups file is intended to be able to be used by Bash scripts in addition to Octopus. In
# fact, Octopus will not be able to parse the host groups file if the group entries are not in a Bash
# variable declaration.
# fact, Octopus will not be able to parse the host groups file if the group entries are not in a
# Bash variable declaration. Variables must be exported for Octopus to see them as host groups.

# A sample list of host groups for a theoretical Kubernetes cluster is shown below. In this
# example, the internal cluster network is 172.24.0.0/16, and the internet-facing (public) network
# is 192.168.0.0/16

# In this example, the primary place to run Octopus is from the admin node
admin="172.24.1.1"
export admin="172.24.1.1"
# We may also run it from a laptop, but we will be limited to executing on public nodes
admin_public="192.168.101.1"
export admin_public="192.168.101.1"

# Definitions must begin with (including either a single- or double-quote): <variable_name>=["']
masters="172.24.2.1 172.24.2.2 172.24.2.3"
masters_public="192.168.102.1 192.168.102.2 192.168.102.3"
export masters="172.24.2.1 172.24.2.2 172.24.2.3"
export masters_public="192.168.102.1 192.168.102.2 192.168.102.3"

# Definitions do not need to be on a single line as long as there is a quote following the equal
nodes='
export nodes='
172.24.3.1
172.24.3.2
172.24.3.3
Expand All @@ -27,20 +27,7 @@ nodes='
# nodes do not have an internet-facing network in this example

# Deinitions may include previous definitions as variables just as one could do in Bash
all="${admin} ${masters} ${nodes}"
all_public="${admin_public} ${masters_public}"
export all="${admin} ${masters} ${nodes}"
export all_public="${admin_public} ${masters_public}"

k8s="${masters} ${nodes}"


# Examples of using Octopus with this host groups file. We will assume that the file is named the
# default value of "_node-list".
#
# List all disks on nodes:
# octopus -host-groups nodes -command 'ls /dev/sd*'
#
# Get the date from the admin and the nodes:
# octopus -host-groups admin,nodes -command 'date'
#
# Get the iptables status on all public-facing nodes:
# octopus -host-groups all_public -command 'systemctl status iptables'
export k8s="${masters} ${nodes}"

0 comments on commit fee4202

Please sign in to comment.