Remove -passwordfile option
The only two options should be `-password` and `WEAVE_PASSWORD`.
This commit is contained in:
1 parent
833fcce792
commit
5e08ba677e
2 files changed
+12
-16
No files matched your search
+8
-8
@@ -131,23 +131,23 @@ sharing it between applications:
|
||||
### <a name="security"></a>Security
|
||||
|
||||
In order to connect containers across untrusted networks, weave peers
|
||||
can be told to encrypt traffic by supplying a `-password` or
|
||||
`-passwordfile` option when launching weave, e.g.
|
||||
can be told to encrypt traffic by supplying a `-password` option or
|
||||
`WEAVE_PASSWORD` environment variable when launching weave, e.g.
|
||||
|
||||
host1# weave launch -password wEaVe
|
||||
|
||||
or
|
||||
|
||||
host1# weave launch -passwordfile /path/to/file
|
||||
host1# export WEAVE_PASSWORD=wEaVe
|
||||
host1# weave launch
|
||||
|
||||
where the file must contain a single line like this:
|
||||
|
||||
WEAVE_PASSWORD=wEaVe
|
||||
_NOTE: The command line option takes precedence over the environment
|
||||
variable._
|
||||
|
||||
The same password must be specified for all weave peers; it is a
|
||||
component in the creation of ephemeral session keys for connections
|
||||
between peers. See the
|
||||
[crypto documentation](how-it-works.html#crypto) for more details.
|
||||
between peers. See the [crypto documentation](how-it-works.html#crypto)
|
||||
for more details.
|
||||
|
||||
### <a name="host-network-integration"></a>Host network integration
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ SCRIPT_VERSION="(unreleased version)"
|
||||
usage() {
|
||||
echo "Usage:"
|
||||
echo "weave setup"
|
||||
echo "weave launch [-password <password> | -passwordfile <path>] <peer> ..."
|
||||
echo "weave launch [-password <password>] <peer> ..."
|
||||
echo "weave launch-dns <cidr>"
|
||||
echo "weave connect <peer>"
|
||||
echo "weave run [--with-dns] <cidr> <docker run args> ..."
|
||||
@@ -471,19 +471,15 @@ case "$COMMAND" in
|
||||
fi
|
||||
if [ "$1" = "-password" ] ; then
|
||||
[ $# -gt 1 ] || usage
|
||||
PASSWORD_ARGS="-e WEAVE_PASSWORD=$2"
|
||||
shift 2
|
||||
elif [ "$1" = "-passwordfile" ] ; then
|
||||
[ $# -gt 1 ] || usage
|
||||
PASSWORD_ARGS="--env-file=$2"
|
||||
WEAVE_PASSWORD="$2"
|
||||
export WEAVE_PASSWORD
|
||||
shift 2
|
||||
fi
|
||||
# Set WEAVE_DOCKER_ARGS in the environment in order to supply
|
||||
# additional parameters, such as resource limits, to docker
|
||||
# when launching the weave container.
|
||||
CONTAINER=$(docker run --privileged -d --name=$CONTAINER_NAME \
|
||||
-p $PORT:$PORT/tcp -p $PORT:$PORT/udp \
|
||||
${PASSWORD_ARGS:-"-e WEAVE_PASSWORD"} \
|
||||
-p $PORT:$PORT/tcp -p $PORT:$PORT/udp -e WEAVE_PASSWORD \
|
||||
$WEAVE_DOCKER_ARGS $IMAGE -name $MACADDR -iface $CONTAINER_IFNAME "$@")
|
||||
with_container_netns $CONTAINER launch >/dev/null
|
||||
echo $CONTAINER
|
||||
|
||||
Reference in new issue
Block a user