Ansible setup to provide testing servers, closes #3

This commit is contained in:
sveneh
2015-01-27 12:21:36 +01:00
parent cd0d7ef899
commit 52b83a4451
13 changed files with 1024 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get upgrade -y
# Ethereum dependencies
RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcurl4-openssl-dev wget
RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons
RUN apt-get install -qy libjsoncpp-dev libargtable2-dev
# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 )
RUN apt-get install -qy libncurses5-dev
# Qt-based GUI
# RUN apt-get install -qy qtbase5-dev qt5-default qtdeclarative5-dev libqt5webkit5-dev
# Ethereum PPA
RUN apt-get install -qy software-properties-common
RUN add-apt-repository ppa:ethereum/ethereum
RUN apt-get update
RUN apt-get install -qy libcryptopp-dev libjson-rpc-cpp-dev
# Build Ethereum (HEADLESS)
RUN git clone --depth=1 --branch master https://github.com/ethereum/cpp-ethereum
RUN mkdir -p cpp-ethereum/build
RUN cd cpp-ethereum/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install
RUN ldconfig
ENTRYPOINT ["/usr/local/bin/eth"]

View File

@@ -0,0 +1,22 @@
---
- name: copy Dockerfile to server
copy: src=docker-cpp dest=/home/{{ ansible_ssh_user }}
- name: build C++ client
sudo: true
docker_image:
path: /home/{{ ansible_ssh_user }}/docker-cpp
name: cpp
state: build
async: 1200
poll: 5
- name: start ethereum client w/ JSON-RPC and bootstrapping
sudo: true
docker:
image: cpp
expose: ["8080", "30303"]
ports: ["8080:8080", "30303:30303"]
# parameters given to client
command: --bootstrap --json-rpc