Skip to content

Commit

Permalink
Merge pull request #568 from openworm/development
Browse files Browse the repository at this point in the history
Release 0.3.7
  • Loading branch information
tarelli authored Aug 15, 2017
2 parents a1d4e70 + ead224c commit cdc123e
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 103 deletions.
33 changes: 1 addition & 32 deletions eclipse/OpenWormCodeTemplates.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2011 - 2015 OpenWorm.
* http://openworm.org
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the MIT License
* which accompanies this distribution, and is available at
* http://opensource.org/licenses/MIT
*
* Contributors:
* OpenWorm - http://openworm.org/people.html
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************************************/</template></templates>
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment"></template></templates>
10 changes: 5 additions & 5 deletions geppetto.plan
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">


<artifact type="bundle" name="org.geppetto.model" version="0.3.6"/>
<artifact type="bundle" name="org.geppetto.core" version="0.3.6"/>
<artifact type="bundle" name="org.geppetto.model.neuroml" version="0.3.6"/>
<artifact type="bundle" name="org.geppetto.simulation" version="0.3.6"/>
<artifact type="bundle" name="org.geppetto.frontend" version="0.3.6"/>
<artifact type="bundle" name="org.geppetto.model" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.core" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.model.neuroml" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.simulation" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.frontend" version="0.3.7"/>


</plan>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>org.geppetto</groupId>
<artifactId>org.geppetto</artifactId>
<name>Geppetto</name>
<version>0.3.6</version>
<version>0.3.7</version>
<packaging>pom</packaging>
<modules>
<module>../org.geppetto.model</module>
Expand Down
31 changes: 31 additions & 0 deletions utilities/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,36 @@ The extsim directory builds on the persistence build and adds the org.geppetto.s

* eclipse-geppetto-persist-extsim

## Building and Running Dockerfiles
To build the geppetto and geppetto-persistence Dockerfiles use:

For geppetto
* docker build -t="geppetto" --build-arg frontendBranch=development https://github.com/openworm/org.geppetto.git#development:utilities/docker/geppetto/

and for geppetto-persistence

* docker build -t="geppetto_persistence" --build-arg frontendBranch=development --build-arg persistenceBranch=development --build-arg aKey=$accessKey --build-arg sKey=$secretKey https://github.com/openworm/org.geppetto.git#development:utilities/docker/geppetto-persistence/

The geppetto dockerfile takes in an argument as part of the build, this argument is called frontendBranch.
With it you can specify the branch that will be used for the bundle org.geppetto.frontend when the dockerfile
starts to build.

For the geppetto-persistence it also takes an argument, persistenceBranch, which specifies the org.geppetto.persistence branch to use as part of the dockerfile build.
It is also necessary to pass the aws.credentials of the Amazon where the projects will get persisted.
To pass the aws.credentials use build arguments aKey and sKey, for accessKey and secreteKey respectively.

Once they are done building successfully, use the following command to run them.

For Geppetto:
* docker run -t -dit --name=geppetto_container -h localhost -p 28081:8080 geppetto

and for geppetto-persistence:
* docker run -t -dit --name=geppetto_persistence_container -h localhost -p 28081:8080 geppetto_persistence;

The --name argument is not necessary, but makes it easier to identify the running docker containers if each docker
run is given a unique name.

The arguments "-h localhost -p 28081:8080" specify the host address and port where the docker container wiill be run.
This means in the command samples above, to launch geppetto you'll do it with URL "localhost:28081/org.geppetto.frontend"


51 changes: 42 additions & 9 deletions utilities/docker/geppetto-persistence/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
FROM java:7
MAINTAINER Stephen Larson "[email protected]"

RUN apt-get update && apt-get install -y sudo
ARG aKey
ENV aKey=${aKey}
ARG sKey
ENV sKey=${sKey}
ARG persistenceBranch=development
ENV persistenceBranch=${persistenceBranch}
ARG frontendBranch=development
ENV frontendBranch=${frontendBranch}
RUN echo "$frontendBranch";
RUN echo "$persistenceBranch";

RUN apt-get update && apt-get install -qq -y sudo

# Install maven
RUN apt-get update

RUN useradd -ms /bin/bash developer

Expand All @@ -17,9 +31,19 @@ USER developer
ENV HOME /home/developer
WORKDIR /home/developer

# get maven 3.5.0
RUN sudo wget --no-verbose -O /tmp/apache-maven-3.5.0-bin.tar.gz http://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz

# install maven
RUN sudo tar xzf /tmp/apache-maven-3.5.0-bin.tar.gz -C /opt/
RUN sudo ln -s /opt/apache-maven-3.5.0 /opt/maven
RUN sudo ln -s /opt/maven/bin/mvn /usr/local/bin
RUN sudo rm -f /tmp/apache-maven-3.5.0-bin.tar.gz
ENV MAVEN_HOME /opt/maven

#VIRGO INSTALL
USER root
RUN apt-get update && apt-get install -y curl bsdtar maven
RUN apt-get update && apt-get install -y -qq curl bsdtar
USER developer
RUN mkdir -p /home/developer/virgo
RUN curl -L 'http://www.eclipse.org/downloads/download.php?file=/virgo/release/VP/3.6.4.RELEASE/virgo-tomcat-server-3.6.4.RELEASE.zip&mirror_id=580&r=1' | bsdtar --strip-components 1 -C /home/developer/virgo -xzf -
Expand All @@ -28,6 +52,8 @@ ENV SERVER_HOME /home/developer/virgo
#VOLUME /home/developer/virgo
#END VIRGO INSTALL

RUN mvn --version

#GET GEPPETTO SOURCES
USER root
RUN mkdir -p workspace && cd workspace && git clone http://github.com/openworm/org.geppetto && cd org.geppetto && git checkout development
Expand All @@ -37,11 +63,15 @@ USER developer
COPY config.json workspace/org.geppetto/utilities/source_setup/
COPY geppetto.plan workspace/org.geppetto/

RUN cd workspace/org.geppetto/utilities/source_setup && yes n | python setup.py && python gitall.py pull \
&& python gitall.py reset && python gitall.py checkout development
RUN sudo chmod -R 777 workspace
RUN sudo chmod -R 777 workspace;
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.model.git && cd org.geppetto.model && git checkout development && mvn --quiet install;
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.core.git && cd org.geppetto.core && git checkout development && mvn --quiet install;
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.model.neuroml.git && cd org.geppetto.model.neuroml && git checkout development && mvn --quiet install;
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.model.swc.git && cd org.geppetto.model.swc && git checkout development && mvn --quiet install;
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.simulation.git && cd org.geppetto.simulation && git checkout development && mvn --quiet install;
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.frontend.git && cd org.geppetto.frontend && git checkout $frontendBranch && mvn --quiet install;
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.persistence.git && cd org.geppetto.persistence && git checkout $persistenceBranch && mvn --quiet install;

RUN cd workspace/org.geppetto && mvn install
#END GET GEPPETTO SOURCES

#INSTALL MYSQL
Expand All @@ -52,7 +82,7 @@ ENV MYSQL_USER=mysql \
MYSQL_LOG_DIR=/var/log/mysql

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y mysql-server \
&& rm -rf ${MYSQL_DATA_DIR} \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -77,13 +107,16 @@ RUN service mysql start && mysql -uroot < /home/developer/geppetto/init.sql
#END SETUP MYSQL INITIAL DATA

USER developer
RUN cd /home/developer/workspace/org.geppetto.persistence && mvn install && mvn install
RUN cd /home/developer/workspace/org.geppetto.persistence && mvn install --quiet && mvn install --quiet

RUN sudo service mysql start && cd /home/developer/workspace/org.geppetto.persistence && mvn exec:java -Dexec.mainClass="org.geppetto.persistence.util.DBTestData" -Dexec.classpathScope=runtime


#END INSTALL MYSQL

RUN cd /home/developer/workspace/org.geppetto/utilities/source_setup && python update_server.py

RUN sudo echo "accessKey=$aKey" > /home/developer/geppetto/aws.credentials
RUN sudo echo "secretKey=$sKey" >> /home/developer/geppetto/aws.credentials

EXPOSE 8080
CMD sudo service mysql start && /home/developer/virgo/bin/startup.sh
14 changes: 7 additions & 7 deletions utilities/docker/geppetto-persistence/geppetto.plan
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">


<artifact type="bundle" name="org.geppetto.model" version="0.3.3"/>
<artifact type="bundle" name="org.geppetto.core" version="0.3.3"/>
<artifact type="bundle" name="org.geppetto.persistence" version="0.3.3"/>
<artifact type="bundle" name="org.geppetto.model.neuroml" version="0.3.3"/>
<artifact type="bundle" name="org.geppetto.model.swc" version="0.3.3"/>
<artifact type="bundle" name="org.geppetto.simulation" version="0.3.3"/>
<artifact type="bundle" name="org.geppetto.frontend" version="0.3.3"/>
<artifact type="bundle" name="org.geppetto.model" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.core" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.persistence" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.model.neuroml" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.model.swc" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.simulation" version="0.3.7"/>
<artifact type="bundle" name="org.geppetto.frontend" version="0.3.7"/>

<!--
<artifact type="bundle" name="org.geppetto.simulator.external" version="0.3.0"/>
Expand Down
121 changes: 72 additions & 49 deletions utilities/docker/geppetto/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,49 +1,72 @@
FROM java:7
MAINTAINER Stephen Larson "[email protected]"

RUN apt-get update && apt-get install -y sudo

RUN useradd -ms /bin/bash developer

RUN mkdir -p /home/developer && mkdir -p /etc/sudoers.d \
echo "developer:x:1000:1000:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:1000:" >> /etc/group && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer && \
chown developer:developer -R /home/developer && \
chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo

USER developer
ENV HOME /home/developer
WORKDIR /home/developer

#VIRGO INSTALL
USER root
RUN apt-get update && apt-get install -y curl bsdtar maven
USER developer
RUN mkdir -p /home/developer/virgo
RUN curl -L 'http://www.eclipse.org/downloads/download.php?file=/virgo/release/VP/3.6.4.RELEASE/virgo-tomcat-server-3.6.4.RELEASE.zip&mirror_id=580&r=1' | bsdtar --strip-components 1 -C /home/developer/virgo -xzf -
RUN chmod u+x /home/developer/virgo/bin/*.sh
ENV SERVER_HOME /home/developer/virgo
#VOLUME /home/developer/virgo
#END VIRGO INSTALL

#GET GEPPETTO SOURCES
USER root
RUN mkdir -p workspace && cd workspace && git clone http://github.com/openworm/org.geppetto && cd org.geppetto && git checkout development
RUN chmod -R 777 workspace
USER developer
RUN cd workspace/org.geppetto/utilities/source_setup && yes n | python setup.py && python gitall.py pull \
&& python gitall.py reset && python gitall.py checkout development && cd ../../../.. && sudo chmod -R 777 workspace \
&& cd workspace/org.geppetto && mvn install
#END GET GEPPETTO SOURCES

RUN mkdir -p geppetto/

#COPY entrypoint.sh geppetto/
#COPY check_update.sh geppetto/
#RUN sudo chmod +x geppetto/*.sh

RUN cd /home/developer/workspace/org.geppetto/utilities/source_setup && python update_server.py

CMD /home/developer/virgo/bin/startup.sh
FROM java:7
MAINTAINER Stephen Larson "[email protected]"

ARG frontendBranch=development
ENV frontendBranch=${frontendBranch}
RUN echo "$frontendBranch";

RUN apt-get update && apt-get install -qq -y sudo xvfb

RUN useradd -ms /bin/bash developer

RUN mkdir -p /home/developer && mkdir -p /etc/sudoers.d \
echo "developer:x:1000:1000:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:1000:" >> /etc/group && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer && \
chown developer:developer -R /home/developer && \
chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo

USER developer
ENV HOME /home/developer
WORKDIR /home/developer

# get maven 3.5.0
RUN sudo wget -q --no-verbose -O /tmp/apache-maven-3.5.0-bin.tar.gz http://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz

# install maven
RUN sudo tar xzf /tmp/apache-maven-3.5.0-bin.tar.gz -C /opt/
RUN sudo ln -s /opt/apache-maven-3.5.0 /opt/maven
RUN sudo ln -s /opt/maven/bin/mvn /usr/local/bin
RUN sudo rm -f /tmp/apache-maven-3.5.0-bin.tar.gz
ENV MAVEN_HOME /opt/maven
RUN mvn --version

#VIRGO INSTALL
USER root
RUN apt-get update && apt-get install -qq -y curl bsdtar locate
USER developer
RUN mkdir -p /home/developer/virgo
RUN curl -L 'http://www.eclipse.org/downloads/download.php?file=/virgo/release/VP/3.6.4.RELEASE/virgo-tomcat-server-3.6.4.RELEASE.zip&mirror_id=580&r=1' | bsdtar --strip-components 1 -C /home/developer/virgo -xzf -
RUN chmod u+x /home/developer/virgo/bin/*.sh
ENV SERVER_HOME /home/developer/virgo
#VOLUME /home/developer/virgo
#END VIRGO INSTALL

RUN mvn --version

#GET GEPPETTO SOURCES
USER root
RUN mkdir -p workspace && cd workspace && git clone http://github.com/openworm/org.geppetto && cd org.geppetto && git checkout development
RUN chmod -R 777 workspace
USER developer

RUN cd workspace && git clone https://github.com/openworm/org.geppetto.model.git && cd org.geppetto.model && git checkout development
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.core.git && cd org.geppetto.core && git checkout development
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.model.neuroml.git && cd org.geppetto.model.neuroml && git checkout development
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.simulation.git && cd org.geppetto.simulation && git checkout development
RUN cd workspace && git clone https://github.com/openworm/org.geppetto.frontend.git && cd org.geppetto.frontend && git checkout $frontendBranch
RUN sudo chmod -R 777 workspace \
&& cd workspace/org.geppetto && mvn --quiet install
#END GET GEPPETTO SOURCES

RUN mkdir -p geppetto/

#COPY entrypoint.sh geppetto/
#COPY check_update.sh geppetto/
#RUN sudo chmod +x geppetto/*.sh

RUN cd /home/developer/workspace/org.geppetto/utilities/source_setup && python update_server.py

EXPOSE 8080
CMD ["/home/developer/virgo/bin/startup.sh"]

0 comments on commit cdc123e

Please sign in to comment.