summaryrefslogtreecommitdiffstats
path: root/docs/configguide
diff options
context:
space:
mode:
authorMaryam Tahhan <maryam.tahhan@intel.com>2016-02-05 13:56:21 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2016-02-05 15:56:16 +0000
commitbb71aacbd42b9fe7349b91abd2bb562c4b7ff1ed (patch)
tree1dbda058e61a3e5ac14ec1097ff78826820d198b /docs/configguide
parent4064fc0e839c26c38a38ee71e63673ed59d8547b (diff)
docs: adding license to all rst files.
Add Creative Commons Creative Commons license to all documentation in vsperf. JIRA: VSPERF-239 Change-Id: I88721205a36078f6e0d4a4c5dd842907729d2b6b Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Diffstat (limited to 'docs/configguide')
-rw-r--r--docs/configguide/index.rst6
-rwxr-xr-xdocs/configguide/installation.rst4
2 files changed, 8 insertions, 2 deletions
diff --git a/docs/configguide/index.rst b/docs/configguide/index.rst
index 7ea39cd1..2afa569d 100644
--- a/docs/configguide/index.rst
+++ b/docs/configguide/index.rst
@@ -1,3 +1,7 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Intel Corporation, AT&T and others.
+
******************************
VSPERF Installation Guide
******************************
@@ -7,5 +11,3 @@ VSPERF Installation Guide
:maxdepth: 3
installation.rst
- trafficgen.rst
- integration.rst
diff --git a/docs/configguide/installation.rst b/docs/configguide/installation.rst
index ebc73bad..158bc6bd 100755
--- a/docs/configguide/installation.rst
+++ b/docs/configguide/installation.rst
@@ -1,3 +1,7 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Intel Corporation, AT&T and others.
+
======================
Installing vswitchperf
======================
/ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/bin/bash
set -x

function wait_for() {
  local total_attempts=$1; shift
  local cmdstr=$*
  local sleep_time=10
  echo "[NOTE] Waiting for cmd to return success: ${cmdstr}"
  # shellcheck disable=SC2034
  for attempt in $(seq "${total_attempts}"); do
    # shellcheck disable=SC2015
    eval "${cmdstr}" && break || true
    echo -n '.'; sleep "${sleep_time}"
  done
}

# Wait for MaaS commissioning/deploy to finish, retry on failure
function maas_fixup() {
  local statuscmd="salt 'mas01*' --out yaml state.apply maas.machines.status"
  wait_for 180 "${statuscmd} | tee /dev/stderr | " \
           "grep -Eq '((Deployed|Ready): 5|status:Failed|status:Allocated)'"
  # shellcheck disable=SC2155
  local statusout=$(eval "${statuscmd}")

  # shellcheck disable=SC2155
  local fcnodes=$(echo "${statusout}" | \
    grep -Po '(?<=system_id:)(.*)(?=,status:Failed commissioning)')
  for node_system_id in ${fcnodes}; do
    salt -C 'mas01*' state.apply maas.machines.delete \
      pillar="{'system_id': '${node_system_id}'}"
  done
  if [ -n "${fcnodes}" ]; then
    salt -C 'mas01*' state.apply maas.machines
    return 1
  fi

  # shellcheck disable=SC2155
  local fdnodes=$(echo "${statusout}" | \
    grep -Po '(?<=system_id:)(.*)(?=,status:(Failed deployment|Allocated))')
  for node_system_id in ${fdnodes}; do
    salt -C 'mas01*' state.apply maas.machines.mark_broken_fixed \
      pillar="{'system_id': '${node_system_id}'}"
  done
  if [ -n "${fdnodes}" ]; then
    salt -C 'mas01*' state.apply maas.machines.deploy
    return 1
  fi

  return 0
}

# MaaS rack/region controller, node commissioning
salt -C 'mas01*' cmd.run "add-apt-repository ppa:maas/stable"

salt -C 'mas01*' state.apply linux,salt,openssh,ntp
salt -C 'mas01*' state.apply linux.network.interface
salt -C 'mas01*' state.apply maas.pxe_nat
salt -C 'mas01*' state.apply maas.cluster
salt -C 'cfg01*' cmd.run \
  "route add -net 192.168.11.0/24 gw ${MAAS_IP:-192.168.10.3}"

wait_for 10 "salt -C 'mas01*' state.apply maas.region"

salt -C 'mas01*' state.apply maas.machines
wait_for 10 maas_fixup

# cleanup outdated salt keys
salt-key --out yaml | awk '!/^(minions|- cfg01|- mas01)/ {print $2}' | \
  xargs -I{} salt-key -yd {}

# MaaS node deployment
salt -C 'mas01*' state.apply maas.machines.deploy
wait_for 10 maas_fixup

salt -C 'mas01*' pillar.item\
  maas:region:admin:username \
  maas:region:admin:password

# KVM, compute node prereqs (libvirt first), VCP deployment
salt -C '* and not cfg01* and not mas01*' saltutil.sync_all

salt -C 'kvm*' pkg.install bridge-utils
salt -C 'kvm*' state.apply linux.network
salt -C 'kvm*' system.reboot
wait_for 90 "! salt 'kvm*' test.ping | tee /dev/stderr | fgrep -q 'Not connected'"

salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp

salt -C 'kvm*' state.sls libvirt

salt -C '* and not cfg01* and not mas01*' state.apply salt
salt -C 'kvm*' saltutil.sync_all
salt -C 'kvm*' state.sls salt.control

vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:node | \
            awk '/\s+\w+:$/ {gsub(/:$/, "*"); print $1}')

# Check all vcp nodes are available
rc=1
while [ $rc -ne 0 ]; do
  rc=0
  for node in $vcp_nodes; do
    salt "$node" test.ping 2>/dev/null || { rc=$?; break; };
  done
  sleep 5
done

wait_for 10 "salt -C '* and not cfg01* and not mas01*' saltutil.sync_all"
wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply salt"
wait_for 10 "! salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp | " \
  "tee /dev/stderr | fgrep -q 'Not connected'"

wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_USER} \
  $(awk 'NR==1{print $2}' "$(eval echo "~${SUDO_USER}/.ssh/authorized_keys")")"