This repository has been archived on 2021-04-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
hbp-sp8-mip-federation/setupFederationInfrastructure.sh
Lionel Sambuc 196cbe5678 Start independently Portainer
This allows for simpler maintenance on the Portainer service when
required.
2018-03-12 18:02:40 +01:00

38 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# Copyright (c) 2017-2017
# Data Intensive Applications and Systems Labaratory (DIAS)
# Ecole Polytechnique Federale de Lausanne
#
# All Rights Reserved.
#
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright notice
# and this permission notice appear in all copies of the software, derivative
# works or modified versions, and any portions thereof, and that both notices
# appear in supporting documentation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. THE AUTHORS AND ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE
# DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
# USE OF THIS SOFTWARE.
set -e
# Import settings
. ./settings.sh
# Master node/Manager
(
# Initialize swarm
docker swarm init --advertise-addr=${MASTER_IP}
)
docker network create \
--driver=overlay \
--opt encrypted \
--subnet=10.20.30.0/24 \
--ip-range=10.20.30.0/24 \
--gateway=10.20.30.254 \
mip-federation