summaryrefslogtreecommitdiffstats
path: root/ansible/roles/install_trex/defaults
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-10-11 03:28:51 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-10-11 22:56:09 -0700
commit58d6bbdfaa9d2200323e6d93242ad649b4c3243e (patch)
treee1d6a92ff0896cb9c3a4cb63881e8e5fd3f7cefe /ansible/roles/install_trex/defaults
parent3ffb7fd322dcf35c4bdf69ac4f12525516f11704 (diff)
Move arp route tbl to script and update defailt vnf config files
Change-Id: I8674caa15c9fc32cfacb17f558da5fb31094877e Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'ansible/roles/install_trex/defaults')
0 files changed, 0 insertions, 0 deletions
/ .highlight .ld { color: #e6db74 } /* Literal.Date */ .highlight .m { color: #ae81ff } /* Literal.Number */ .highlight .s { color: #e6db74 } /* Literal.String */ .highlight .na { color: #a6e22e } /* Name.Attribute */ .highlight .nb { color: #f8f8f2 } /* Name.Builtin */ .highlight .nc { color: #a6e22e } /* Name.Class */ .highlight .no { color: #66d9ef } /* Name.Constant */ .highlight .nd { color: #a6e22e } /* Name.Decorator */ .highlight .ni { color: #f8f8f2 } /* Name.Entity */ .highlight .ne { color: #a6e22e } /* Name.Exception */ .highlight .nf { color: #a6e22e } /* Name.Function */ .highlight .nl { color: #f8f8f2 } /* Name.Label */ .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ .highlight .nx { color: #a6e22e } /* Name.Other */ .highlight .py { color: #f8f8f2 } /* Name.Property */ .highlight .nt { color: #f92672 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .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 -e
##############################################################################
# Copyright (c) 2015 Ericsson AB and others.
# stefan.k.berg@ericsson.com
# jonas.bjurel@ericsson.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
#

############################################################################
# BEGIN of Exit handlers
#

do_exit () {
    CID=`cat $CID_FILE </dev/null`
    rm -f $CID_FILE
    rm -rf $CONTEXT_DIR
    set +e
    docker kill $CID > /dev/null 2>&1
    docker rm -f $CID > /dev/null 2>&1
    docker rmi -f $IID > /dev/null 2>&1
    set -e
}

#
# End of Exit handlers
############################################################################

trap do_exit SIGINT SIGTERM EXIT

context=$1
shift
USER_ID=`id -u`
USER=`whoami`
GROUP_ID=`id -g`

GITROOT=`git rev-parse --show-toplevel`
CID_FILE=`mktemp -u -t runcontext.XXXXXXXXXX`
CONTEXT_DIR=`mktemp -d ${GITROOT}/.docker_contextXXXXXX`

# If RSYNC_CONNECT_PROG is used, we need to copy all of
# the SSH structure, should one of the keys need to be
# used.
if [ -n "$RSYNC_CONNECT_PROG" -a -x $HOME/.ssh ]; then
    cp -rp $HOME/.ssh $CONTEXT_DIR
    rm -f $CONTEXT_DIR/.ssh/known_hosts
else
    mkdir $CONTEXT_DIR/.ssh
fi

# Disable verification of unknown keys
cat >> $CONTEXT_DIR/.ssh/config <<EOF
StrictHostKeyChecking=no
EOF

cat > $CONTEXT_DIR/Dockerfile <<EOF
FROM $context
$(env | egrep -i 'proxy|rsync' | sed 's/^/ENV /' | sed 's/=/ /')
RUN date || date
COPY .ssh  $HOME/.ssh
RUN chown -R $USER_ID:$GROUP_ID $HOME/.ssh
RUN chown -R $USER_ID:$GROUP_ID $HOME
RUN chmod 700 $HOME/.ssh
RUN /root/setcontext $USER $USER_ID $GROUP_ID $HOME
EOF

res=`docker build -q --force-rm $CONTEXT_DIR`
IID=`echo $res | sed 's/.* //'`

# Handle proxy settings passed to the context
if env | grep -iq .*proxy; then
    envfile="$(readlink -f $(dirname $0)/..)/environment.mk"

    test -n "$HTTP_PROXY" && my_http_proxy=$HTTP_PROXY
    test -n "$http_proxy" && my_http_proxy=$http_proxy

    test -n "$HTTPS_PROXY" && my_https_proxy=$HTTPS_PROXY
    test -n "$https_proxy" && my_https_proxy=$https_proxy

    test -n "$NO_PROXY" && my_no_proxy=$NO_PROXY
    test -n "$no_proxy" && my_no_proxy=$no_proxy

    # Make sure to add the Docker socket in no_proxy
    if [ -n "$my_no_proxy" ]; then
        my_no_proxy+=",/var/run/docker.sock"
    else
        my_no_proxy="/var/run/docker.sock"
    fi

    echo "Creating $envfile"
    echo "# This file is automatically generated by runcontext, do not edit!" > $envfile
    test -n "$my_http_proxy" && echo "export http_proxy=$my_http_proxy" >> $envfile
    test -n "$my_https_proxy" && echo "export https_proxy=$my_https_proxy" >> $envfile
    test -n "$my_no_proxy" && echo "export no_proxy=$my_no_proxy" >> $envfile
    test -n "$RSYNC_PROXY" && echo "export RSYNC_PROXY=$RSYNC_PROXY" >> $envfile
    test -n "$RSYNC_CONNECT_PROG" && echo "export RSYNC_CONNECT_PROG=$RSYNC_CONNECT_PROG" >> $envfile
    echo "export npm_config_registry=http://registry.npmjs.org/" >> $envfile
else
    echo "No need to generate environment.mk"
    rm -f $envfile
fi

# Evaluate the need for bind mounting the cache directory
if [ -n "$CACHEBASE" ]; then
    if echo $CACHEBASE | grep -q '^file://'; then
        CACHEMOUNT="-v $(echo $CACHEBASE | sed 's;file://;;'):$(echo $CACHEBASE | sed 's;file://;;')"
    fi
fi

RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL -e LATEST_TARGET_UBUNTU -u $USER_ID:$GROUP_ID -w $PWD -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT"

# Passing "debug" puts up an interactive bash shell
if [ "$1" == "debug" ]; then
  echo command: docker run ${RUN_CONTEXT_OPT} $IID bash
  docker run -i -t ${RUN_CONTEXT_OPT} $IID bash
else
  echo command: docker run ${RUN_CONTEXT_OPT} $IID $@
  docker run -t ${RUN_CONTEXT_OPT} $IID $@
fi