scripts/docker: Added docker.io scripts to bootstrap a fail demo
The docker files provide containers with the full toolchain required to build FAIL*. They also contain a demonstration FI campaign. Change-Id: I280210eb0487718e82505f0343fa9303c21b8048
This commit is contained in:
@ -8,11 +8,12 @@ Required for Fail*:
|
|||||||
- libprotobuf-dev
|
- libprotobuf-dev
|
||||||
- libpcl1-dev
|
- libpcl1-dev
|
||||||
- libboost-thread-dev libboost-system-dev libboost-regex-dev
|
- libboost-thread-dev libboost-system-dev libboost-regex-dev
|
||||||
- libdwarf
|
- libdwarf-dev
|
||||||
- libelf
|
- libelf-dev
|
||||||
- protobuf-compiler
|
- protobuf-compiler
|
||||||
- cmake 2.8.2 (2.8.11 preferred)
|
- cmake 2.8.2 (2.8.11 preferred)
|
||||||
- cmake-curses-gui
|
- fontconfig1-dev
|
||||||
|
- zlib1g-dev
|
||||||
- binutils-dev, on newer systems libiberty-dev
|
- binutils-dev, on newer systems libiberty-dev
|
||||||
- AspectC++ (ag++, ac++): AspectC++ 1.1 or newer is known to work and can be
|
- AspectC++ (ag++, ac++): AspectC++ 1.1 or newer is known to work and can be
|
||||||
obtained from <http://www.aspectc.org>; nightlies can be downloaded from
|
obtained from <http://www.aspectc.org>; nightlies can be downloaded from
|
||||||
@ -26,6 +27,8 @@ Required for Fail*:
|
|||||||
come built this way)
|
come built this way)
|
||||||
- details below
|
- details below
|
||||||
* a MySQL 5.0+ or MariaDB 5.1+ (MariaDB 5.5 recommended) server
|
* a MySQL 5.0+ or MariaDB 5.1+ (MariaDB 5.5 recommended) server
|
||||||
|
- optional: cmake-curses-gui
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Required for the Bochs simulator backend:
|
Required for the Bochs simulator backend:
|
||||||
|
|||||||
1
scripts/.gitignore
vendored
Normal file
1
scripts/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
!*/Makefile
|
||||||
19
scripts/docker/Makefile
Normal file
19
scripts/docker/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all:
|
||||||
|
docker build -t danceos/fail-base fail-base
|
||||||
|
docker build -t danceos/fail-generic-tracing fail-generic-tracing
|
||||||
|
docker build -t danceos/fail-demo fail-demo
|
||||||
|
|
||||||
|
|
||||||
|
run-fail-db:
|
||||||
|
docker run --name fail-db \
|
||||||
|
-e MYSQL_ROOT_PASSWORD=fail \
|
||||||
|
-e MYSQL_USER=fail \
|
||||||
|
-e MYSQL_PASSWORD=fail \
|
||||||
|
-e MYSQL_DATABASE=fail \
|
||||||
|
-d mysql
|
||||||
|
|
||||||
|
run-fail-demo:
|
||||||
|
docker run --name fail-demo -p 127.0.0.1:5000:5000 --link fail-db:mysql -d danceos/fail-demo
|
||||||
|
|
||||||
|
ssh-fail-demo:
|
||||||
|
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no fail@$$(docker inspect --format "{{ .NetworkSettings.IPAddress }}" fail-demo)
|
||||||
59
scripts/docker/fail-base/Dockerfile
Normal file
59
scripts/docker/fail-base/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# Set the base image to Ubuntu Utopic (14.10)
|
||||||
|
FROM ubuntu:utopic
|
||||||
|
|
||||||
|
MAINTAINER Christian Dietrich <stettberger@dokucode.de>
|
||||||
|
|
||||||
|
# Install Packages required to build FAIL*
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y \
|
||||||
|
binutils-dev \
|
||||||
|
build-essential \
|
||||||
|
cmake \
|
||||||
|
git \
|
||||||
|
libboost-regex-dev \
|
||||||
|
libboost-system-dev \
|
||||||
|
libboost-thread-dev \
|
||||||
|
libdwarf-dev \
|
||||||
|
libelf-dev \
|
||||||
|
libfontconfig1-dev \
|
||||||
|
libiberty-dev \
|
||||||
|
libmysqlclient-dev \
|
||||||
|
libpcl1-dev \
|
||||||
|
libprotobuf-dev \
|
||||||
|
libsvga1-dev \
|
||||||
|
llvm-3.4-dev \
|
||||||
|
screen \
|
||||||
|
protobuf-compiler \
|
||||||
|
wget \
|
||||||
|
openssh-server \
|
||||||
|
vim \
|
||||||
|
zlib1g-dev
|
||||||
|
|
||||||
|
# Add a user for compiling FAIL*
|
||||||
|
RUN useradd fail; mkdir /home/fail; chown fail /home/fail
|
||||||
|
RUN echo 'fail:fail' | chpasswd; chsh fail --shell /bin/bash
|
||||||
|
RUN adduser fail sudo
|
||||||
|
|
||||||
|
# SSH login fix. Otherwise user is kicked off after login
|
||||||
|
RUN mkdir /var/run/sshd
|
||||||
|
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
|
||||||
|
|
||||||
|
ENV NOTVISIBLE "in users profile"
|
||||||
|
RUN echo "export VISIBLE=now" >> /etc/profile
|
||||||
|
|
||||||
|
USER fail
|
||||||
|
ENV HOME /home/fail
|
||||||
|
WORKDIR /home/fail
|
||||||
|
|
||||||
|
# Get the latest version of AspectC++ for 64 Bit
|
||||||
|
RUN wget http://aspectc.org:8080/job/Build_Binaries/Platform=linux_x86_64/lastBuild/artifact/binaries.tar.bz2
|
||||||
|
RUN tar xvjf binaries.tar.bz2; mv AspectC++/bin/linux-release bin; rm -rf 'AspectC++'
|
||||||
|
ENV PATH /home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
# Clone FAIL*
|
||||||
|
RUN git clone https://github.com/danceos/fail.git
|
||||||
|
WORKDIR fail
|
||||||
|
|
||||||
|
USER root
|
||||||
|
EXPOSE 22
|
||||||
|
CMD ["/usr/sbin/sshd", "-D"]
|
||||||
45
scripts/docker/fail-demo/Dockerfile
Normal file
45
scripts/docker/fail-demo/Dockerfile
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Inherit from docker container that has the fail source code
|
||||||
|
# prepared, including all tools which are needed to build FAIL*. The
|
||||||
|
# generic-tracing experiment was already built and the binaries are in
|
||||||
|
# place (~fail/bin/*)
|
||||||
|
|
||||||
|
FROM danceos/fail-generic-tracing
|
||||||
|
MAINTAINER Christian Dietrich <stettberger@dokucode.de>
|
||||||
|
|
||||||
|
# Install Additional Packages
|
||||||
|
RUN apt-get install -y \
|
||||||
|
python-minimal \
|
||||||
|
grub-common \
|
||||||
|
xorriso \
|
||||||
|
grub-pc-bin \
|
||||||
|
mysql-client \
|
||||||
|
python-flask \
|
||||||
|
python-mysqldb \
|
||||||
|
python-yaml
|
||||||
|
|
||||||
|
|
||||||
|
# Passwort for MySQL Daemon
|
||||||
|
ADD my.cnf /home/fail/.my.cnf
|
||||||
|
RUN chown fail /home/fail/.my.cnf
|
||||||
|
|
||||||
|
USER fail
|
||||||
|
WORKDIR /home/fail
|
||||||
|
RUN echo 'export PATH=$HOME/bin:$PATH' >> ~/.profile;\
|
||||||
|
echo 'cd $HOME/fail-targets' >> ~/.profile
|
||||||
|
|
||||||
|
RUN git clone https://github.com/danceos/fail-targets.git
|
||||||
|
|
||||||
|
WORKDIR fail
|
||||||
|
RUN mkdir build; cd build; ../configurations/x86_pruning.sh generic-experiment
|
||||||
|
WORKDIR build
|
||||||
|
|
||||||
|
# Make FAIL*
|
||||||
|
RUN make -j$(getconf _NPROCESSORS_ONLN) || make -j$(getconf _NPROCESSORS_ONLN)
|
||||||
|
RUN ln -s /home/fail/fail/build/bin/fail-client /home/fail/bin/generic-experiment-client; \
|
||||||
|
ln -s /home/fail/fail/build/bin/generic-experiment-server /home/fail/bin/; \
|
||||||
|
ln -s /home/fail/fail/tools/analysis/resultbrowser/run.py /home/fail/bin/resultbrowser
|
||||||
|
|
||||||
|
# For the resultbrowser, we expose port 5000 to the outside world.
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
USER root
|
||||||
5
scripts/docker/fail-demo/my.cnf
Normal file
5
scripts/docker/fail-demo/my.cnf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[client]
|
||||||
|
host=mysql
|
||||||
|
user=fail
|
||||||
|
password=fail
|
||||||
|
database=fail
|
||||||
25
scripts/docker/fail-generic-tracing/Dockerfile
Normal file
25
scripts/docker/fail-generic-tracing/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Inherit from docker container that has the fail source code prepared,
|
||||||
|
# including all tools which are needed to build FAIL*
|
||||||
|
FROM danceos/fail-base
|
||||||
|
MAINTAINER Christian Dietrich <stettberger@dokucode.de>
|
||||||
|
|
||||||
|
USER fail
|
||||||
|
|
||||||
|
# Configure the Weather Monitor Experiment
|
||||||
|
ENV PATH /home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
WORKDIR /home/fail/fail
|
||||||
|
RUN mkdir build-tracer; cd build-tracer; ../configurations/x86_pruning.sh generic-tracing
|
||||||
|
WORKDIR build-tracer
|
||||||
|
|
||||||
|
# Make FAIL*
|
||||||
|
RUN make -j$(getconf _NPROCESSORS_ONLN) || make -j$(getconf _NPROCESSORS_ONLN)
|
||||||
|
|
||||||
|
RUN ln -s /home/fail/fail/build-tracer/bin/fail-client /home/fail/bin/fail-x86-tracing; \
|
||||||
|
ln -s /home/fail/fail/build-tracer/bin/import-trace /home/fail/bin/; \
|
||||||
|
ln -s /home/fail/fail/build-tracer/bin/prune-trace /home/fail/bin/; \
|
||||||
|
ln -s /home/fail/fail/build-tracer/bin/dump-trace /home/fail/bin/; \
|
||||||
|
ln -s /home/fail/fail/build-tracer/bin/convert-trace /home/fail/bin/; \
|
||||||
|
cp /home/fail/fail/tools/bochs-experiment-runner/bochs-experiment-runner.py /home/fail/bin/bochs-experiment-runner.py; \
|
||||||
|
chmod a+x /home/fail/bin/bochs-experiment-runner.py;
|
||||||
|
|
||||||
|
USER root
|
||||||
Reference in New Issue
Block a user