Commit 50ba5d6d authored by Romain Reuillon's avatar Romain Reuillon
Browse files

Initial commit

parents
instances/
#!/bin/bash
INSTANCES_DIR=$PWD/instances
for dir in `ls $INSTANCES_DIR`
do
(cd $INSTANCES_DIR/$dir && docker-compose down)
done
#!/bin/sh
set -eu
# Docker
sudo apt remove --yes docker docker-engine docker.io \
&& sudo apt update \
&& sudo apt --yes --no-install-recommends install \
apt-transport-https \
ca-certificates \
&& wget --quiet --output-document=- https://download.docker.com/linux/ubuntu/gpg \
| sudo apt-key add - \
&& sudo add-apt-repository \
"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu \
$(lsb_release --codename --short) \
stable" \
&& sudo apt update \
&& sudo apt --yes --no-install-recommends install docker-ce \
&& sudo usermod --append --groups docker "$USER" \
&& sudo systemctl enable docker \
&& printf '\nDocker installed successfully\n\n'
printf 'Waiting for Docker to start...\n\n'
sleep 3
# Docker Compose
sudo wget \
--output-document=/usr/local/bin/docker-compose \
https://github.com/docker/compose/releases/download/1.24.0/run.sh \
&& sudo chmod +x /usr/local/bin/docker-compose \
&& sudo wget \
--output-document=/etc/bash_completion.d/docker-compose \
"https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose" \
&& printf '\nDocker Compose installed successfully\n\n'
#!/bin/bash
DIR=$PWD
INSTANCES_DIR=$PWD/instances
#sudo echo "I am groot"
mkdir -p $INSTANCES_DIR
if ! [ -x "$(command -v docker-compose)" ]
then
bash -x install-docker.sh
else
echo docker-compose is already installed
fi
for port in $@
do
INSTANCE_DIR=$INSTANCES_DIR/openmole-$port
mkdir -p $INSTANCE_DIR
cp om/* $INSTANCE_DIR/
(cd $INSTANCE_DIR && echo "OM_PORT=$port" >.env && docker-compose build && docker-compose up -d)
done
version: "3"
services:
openmole:
image: openmole/openmole:9.0-SNAPSHOT
#command: openmole-docker --mem 1500m
hostname: openmole
volumes:
- ./data/openmole:/var/openmole/
ports:
- "${OM_PORT}:8443"
cap_add:
- SYS_PTRACE
security_opt:
- seccomp=unconfined
deploy:
resources:
limits:
memory: 3G
#!/bin/bash
curl -L $1 -o /tmp/plugin.jar
INSTANCES_DIR=$PWD/instances
for dir in `ls $INSTANCES_DIR`
do
docker cp /tmp/plugin.jar ${dir}_openmole_1:/var/openmole/.openmole/openmole/plugins
done
#!/bin/bash
INSTANCES_DIR=$PWD/instances
for dir in `ls $INSTANCES_DIR`
do
(cd $INSTANCES_DIR/$dir && docker-compose up -d)
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment