Commit becf9b9f authored by skoulouzis's avatar skoulouzis Committed by GitHub

Merge pull request #66 from skoulouzis/argo-usecase

Argo usecase merge
parents 51dba333 4c59918f
# Pull base image
FROM ubuntu:latest
##install java
ARG RABBITMQ_HOST=127.0.0.1
ARG MONOG_HOST=127.0.0.1
ARG RELESE_VERSION=0.1
ARG CERTS=/etc/grid-security/certificates
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
RUN apt-get upgrade -y
RUN apt-get install -y wget software-properties-common build-essential libssl-dev libffi-dev python-dev graphviz graphviz-dev python-dev python-pip
RUN apt-get install -y wget software-properties-common build-essential libssl-dev libffi-dev python-dev graphviz graphviz-dev python-pip
RUN pip install --upgrade pip
RUN pip install pydot
......@@ -21,7 +27,7 @@ RUN pip install paramiko
WORKDIR /root/
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/beta/drip-deployer.tar.gz
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/drip-deployer.tar.gz
RUN tar -xzvf drip-deployer.tar.gz
WORKDIR drip-deployer
......
......@@ -2,23 +2,27 @@ version: '2'
services:
mongo:
image: mongo:3
ports:
- "27017:27017"
command: "mongod --port 27017"
restart: always
image: mongo:3
ports:
- "27017:27017"
command: "mongod --port 27017"
restart: always
rabbit:
image: rabbitmq:latest
ports:
- "5671-5672:5671-5672"
- "15671:15671"
restart: always
image: rabbitmq:3-management
ports:
- "5671-5672:5671-5672"
- "15671:15671"
restart: always
drip-planner:
depends_on:
- rabbit
build: planner/Dockerfile
- rabbit
build:
context: ./planner
dockerfile: Dockerfile
environment:
- RELESE_VERSION=0.3
image: drip-planner:latest
restart: always
environment:
......
......@@ -2,31 +2,42 @@ FROM ubuntu:latest
MAINTAINER S. Koulouzis "S.Koulouzis@uva.nl"
ARG RABBITMQ_HOST=127.0.0.1
ARG MONOG_HOST=127.0.0.1
ARG RELESE_VERSION=0.1
ARG CERTS=/etc/grid-security/certificates
##install java
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openjdk-8-jdk
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
RUN apt-get upgrade -y
RUN apt-get install -y wget git
RUN apt-get install -y wget git software-properties-common build-essential libssl-dev libffi-dev myproxy
RUN apt-get install -y python-software-properties debconf-utils apt-utils
RUN add-apt-repository -y ppa:webupd8team/java
RUN apt-get update
RUN "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
RUN apt-get install -y oracle-java8-installer
##install drip-manager
WORKDIR /root
RUN wget http://www-eu.apache.org/dist/tomcat/tomcat-7/v7.0.75/bin/apache-tomcat-7.0.75.tar.gz
# RUN wget http://www-eu.apache.org/dist/tomcat/tomcat-7/v7.0.75/bin/apache-tomcat-7.0.75.tar.gz
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/0.1/apache-tomcat-7.0.75.tar.gz
RUN tar -xzf apache-tomcat-7.0.75.tar.gz
WORKDIR apache-tomcat-7.0.75
RUN echo
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/beta/drip-api-1.0-SNAPSHOT.tar.gz
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/drip-api-1.0-SNAPSHOT.tar.gz
RUN tar -xzvf drip-api-1.0-SNAPSHOT.tar.gz
ARG RABBITMQ_HOST=172.17.0.2
ARG MONOG_HOST=172.17.0.3
RUN sed -ie "s/^message.broker.host=.*/message.broker.host=$RABBITMQ_HOST/" drip-api-1.0-SNAPSHOT/WEB-INF/classes/drip.properties
RUN sed -ie "s/^db.host=.*/db.host=$MONOG_HOST/" drip-api-1.0-SNAPSHOT/WEB-INF/classes/drip.properties
RUN cat drip-api-1.0-SNAPSHOT/WEB-INF/classes/drip.properties
RUN mv drip-api-1.0-SNAPSHOT webapps/drip-api
WORKDIR /root
RUN echo "./apache-tomcat-7.0.75/bin/startup.sh" >> startAll.sh
RUN echo "/root/apache-tomcat-7.0.75/bin/startup.sh" >> startAll.sh
RUN echo "tail -f ./apache-tomcat-7.0.75/logs/catalina.out" >> startAll.sh
RUN echo "while true" >> startAll.sh
RUN echo "do" >> startAll.sh
......
......@@ -4,12 +4,12 @@ FROM ubuntu:latest
MAINTAINER S. Koulouzis "S.Koulouzis@uva.nl"
##install java
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
RUN apt-get upgrade -y
RUN apt-get install -y wget software-properties-common build-essential libssl-dev libffi-dev python-dev graphviz graphviz-dev python-dev python-pip
RUN apt-get install -y wget git inetutils-ping software-properties-common build-essential libssl-dev libffi-dev python-dev graphviz graphviz-dev python-pip
# Install python stuff
RUN pip install --upgrade pip
RUN pip install pydot
RUN pip install numpy
......@@ -22,17 +22,12 @@ RUN pip install paramiko
# Install deployer
WORKDIR /root/
COPY ../../drip-planner .
RUN ls
# RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/beta/drip-planner.tar.gz
# RUN tar -xzvf drip-planner.tar.gz
# WORKDIR drip-planner
# ARG RABBITMQ_HOST=172.17.0.2
# RUN echo $RABBITMQ_HOST > hostFile
ENTRYPOINT python rpc_server.py $RABBITMQ_HOST
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/drip-deployer.tar.gz
RUN tar -xzvf drip-deployer.tar.gz
ENTRYPOINT python /root/drip-planner/rpc_server.py $RABBITMQ_HOST
# docker build -t drip-planner .
# docker run --name drip-planner-inst -d drip-planner
......@@ -3,33 +3,46 @@ FROM ubuntu:latest
MAINTAINER Huan "h.zhou@uva.nl"
ARG release_version=0.0.3
ARG RABBITMQ_HOST=127.0.0.1
ARG MONOG_HOST=127.0.0.1
ARG RELESE_VERSION=0.1
ARG CERTS=/etc/grid-security/certificates
WORKDIR /root/
#install openssh and wget
RUN apt-get update && apt-get upgrade -y
RUN apt-get install openssh-server wget software-properties-common inetutils-ping -y
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
RUN apt-get upgrade -y
RUN apt-get install -y openssh-server wget git inetutils-ping software-properties-common build-essential libssl-dev libffi-dev graphviz graphviz-dev python-pip
##install jdk 1.8
ENV DEBIAN_FRONTEND=noninteractive
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
##install java
RUN apt-get install -y python-software-properties debconf-utils apt-utils
RUN add-apt-repository -y ppa:webupd8team/java
RUN apt-get update
RUN apt-get install -y oracle-java8-set-default
RUN "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
RUN apt-get install -y oracle-java8-installer
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/beta/drip-provisioner-1.0-SNAPSHOT-jar-with-dependencies.jar
ARG RABBITMQ_HOST=172.17.0.1
WORKDIR /root
RUN echo rabbitmq.host=$RABBITMQ_HOST > provisioner.properties
RUN cat provisioner.properties
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/beta/database.tar.gz
#Install provisioner
WORKDIR /root/
RUN mkdir /root/drip-provisioner/
WORKDIR /root/drip-provisioner/
RUN wget https://raw.githubusercontent.com/EGI-FCTF/fedcloud-userinterface/master/fedcloud-ui.sh
RUN chmod +x fedcloud-ui.sh
RUN ./fedcloud-ui.sh
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/drip-provisioner-1.0-SNAPSHOT-jar-with-dependencies.jar
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/database.tar.gz
RUN tar -xzvf database.tar.gz
RUN echo rabbitmq.host=$RABBITMQ_HOST >> provisioner.properties
RUN echo trusted.certificates.folder=$CERTS >> provisioner.properties
RUN echo domain.info.path=/root/drip-provisioner >> provisioner.properties
RUN cat provisioner.properties
ENTRYPOINT java -jar drip-provisioner-1.0-SNAPSHOT-jar-with-dependencies.jar /root/provisioner.properties
ENTRYPOINT java -jar /root/drip-provisioner/drip-provisioner-1.0-SNAPSHOT-jar-with-dependencies.jar /root/drip-provisioner/provisioner.properties
#Build: docker build -t drip-pro .
# Run: docker run --name drip-pro-inst -d drip-pro
---
- hosts: all
tasks:
- name: install pre-req
apt: name="{{ item }}" update_cache=yes state=latest
with_items: [python, tcsh, expect, jq , bc, python-pip, python-dev, build-essential, libgeos-dev, nmap]
become: true
- {name: pip, pip: name=pyproj}
- {name: pip, pip: name=shapely}
- {name: pip, pip: name=psutil}
- {name: mkdir, command: mkfs.ext4 /dev/vdc, become: yes}
- {name: create mount point, file: path=/mnt/data/ state=directory owner=vm_user group=vm_user}
- {name: create mount point, file: path=/mnt/data/source/ state=directory owner=vm_user group=vm_user}
- {name: create mount point, file: path=/mnt/data/source/output state=directory owner=vm_user group=vm_user}
- {name: mount, command: mount /dev/vdc /mnt/data, become: yes}
- {name: download dataset, get_url: 'url=ftp://ftp.ifremer.fr/ifremer/coriolis/co0547-bigdata-archive/envriplus_euroargo_bigdata.tar.gz dest=/mnt/data'}
- {name: untar, unarchive: src=/mnt/data/envriplus_euroargo_bigdata.tar.gz dest=/mnt/data/}
- {name: download partitioning script, get_url: 'url=https://raw.githubusercontent.com/skoulouzis/dockerfiles/master/ArgoDiffusion/scripts/partitioning.py dest=/mnt/data/source/'}
- {name: download getDelta for time_cover, get_url: 'url=https://raw.githubusercontent.com/skoulouzis/dockerfiles/master/ArgoDiffusion/scripts/getDelta.py dest=/mnt/data/source/'}
- {name: download ar_bigmetadata for the filter script, get_url: 'url=https://raw.githubusercontent.com/skoulouzis/dockerfiles/master/ArgoDiffusion/scripts/ar_bigmetadata.json dest=/mnt/data/source/'}
- {name: download for filter script, get_url: 'url=https://raw.githubusercontent.com/skoulouzis/dockerfiles/master/ArgoDiffusion/scripts/configuration.json dest=/mnt/data/source/'}
- {name: exec partitioning, command: python /mnt/data/source/partitioning.py /mnt/data/source/configuration.json, become_user: vm_user}
- {name: create data_argo.txt, file: path=//mnt/data/data_argo.txt state=touch owner=vm_user group=vm_user}
\ No newline at end of file
var app = angular.module('flapperNews', []);
app.controller('MainCtrl', [
'$scope',
function ($scope) {
$scope.test = 'Hello world!';
}]);
<html>
<head>
<title>My Angular App!</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
<script src="app.js"></script>
</head>
<body ng-app="flapperNews" ng-controller="MainCtrl">
<div>
{{test}}
</div>
</body>
</html>
\ No newline at end of file
<body>
<div class="container">
<h1>This is secured!</h1>
<p>
Hello <b><c:out value="${pageContext.request.remoteUser}"/></b>
</p>
<c:url var="logoutUrl" value="/logout"/>
<form class="form-inline" action="${logoutUrl}" method="post">
<input type="submit" value="Log out" />
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</form>
</div>
</body>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
<head>
<title>Crunchify - Spring MVC Upload Multiple Files Example</title>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>
$(document)
.ready(
function () {
//add more file components if Add is clicked
$('#addFile')
.click(
function () {
var fileIndex = $('#fileTable tr')
.children().length - 1;
$('#fileTable')
.append(
'<tr><td>'
+ ' <input type="file" name="files[' + fileIndex + ']" />'
+ '</td></tr>');
});
});
</script>
<style type="text/css">
body {
background-image:
url('https://cdn.crunchify.com/wp-content/uploads/2013/03/Crunchify.bg_.300.png');
}
</style>
</head>
<body>
<br>
<br>
<div align="center">
<h1>Crunchify - Spring MVC Upload Multiple Files Example</h1>
<form:form method="post" action="savefiles.html"
modelAttribute="uploadForm" enctype="multipart/form-data">
<p>Select files to upload. Press Add button to add more file
inputs.</p>
<table id="fileTable">
<tr>
<td><input name="files[0]" type="file" /></td>
</tr>
<tr>
<td><input name="files[1]" type="file" /></td>
</tr>
</table>
<br />
<input type="submit" value="Upload" />
<input id="addFile" type="button" value="Add File" />
</form:form>
<br />
</div>
</body>
</html>
\ No newline at end of file
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>Crunchify - Upload Multiple Files Example</title>
<style type="text/css">
body {
background-image:
url('https://cdn.crunchify.com/wp-content/uploads/2013/03/Crunchify.bg_.300.png');
}
</style>
</head>
<body>
<br>
<br>
<div align="center">
<h1>Crunchify - Spring MVC Upload Multiple Files Example</h1>
<p>Awesome.. Following files are uploaded successfully.</p>
<ol>
<c:forEach items="${files}" var="file">
- ${file} <br>
</c:forEach>
</ol>
<a href="http://localhost:8080/CrunchifySpringMVC3.2.1/upload.html"><input
type="button" value="Go Back" /></a> <br />
<br />
<br />
<div
style="font-family: verdana; line-height: 25px; padding: 5px 10px; border-radius: 10px; border: 1px dotted #A4A4A4; width: 50%; font-size: 12px;">
Spring MVC Upload Multiple Files Example by <a
href='https://crunchify.com'>Crunchify</a>. Click <a
href='https://crunchify.com/category/java-web-development-tutorial/'>here</a>
for all Java, Spring MVC, Web Development examples.<br>
</div>
</div>
</body>
</html>
\ No newline at end of file
CESNET&&https://carach5.ics.muni.cz:11443&&ubuntu 14.04&&medium&&http://fedcloud.egi.eu/occi/compute/flavour/1.0#medium&&http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_egi_ubuntu_server_14_04_lts_fedcloud_warg_131&&ubuntu
CESNET&&https://carach5.ics.muni.cz:11443&&ubuntu 14.04&&extra_large&&http://schemas.fedcloud.egi.eu/occi/infrastructure/resource_tpl#extra_large&& http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_egi_ubuntu_server_14_04_lts_fedcloud_warg_131&&ubuntu
\ No newline at end of file
CESNET&&https://carach5.ics.muni.cz:11443&&ubuntu 14.04&&medium&&http://fedcloud.egi.eu/occi/compute/flavour/1.0#medium&&http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_38d42ca1_f4e9_5b5c_98de_37eb2d26301a_warg_default_shared_218&&ubuntu
CESNET&&https://carach5.ics.muni.cz:11443&&ubuntu 14.04&&extra_large&&http://schemas.fedcloud.egi.eu/occi/infrastructure/resource_tpl#extra_large&&http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_38d42ca1_f4e9_5b5c_98de_37eb2d26301a_warg_default_shared_218&&ubuntu
\ No newline at end of file
......@@ -24,7 +24,6 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.text.MessageFormat;
import java.util.Properties;
import java.util.concurrent.TimeoutException;
import java.util.logging.Level;
......
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