Skip to content

Commit ef374dc

Browse files
committed
Merge branch 'master' of baltig.sandia.gov:scot/SCOT
2 parents 4929ae6 + 0821d98 commit ef374dc

File tree

138 files changed

+180331
-1773
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+180331
-1773
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.git
2+
pubdev/

Dockerfile-Activemq

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
#ActiveMQ dockerfile
3+
FROM openjdk:8
4+
5+
ARG HTTPS_PROXY
6+
ARG HTTP_PROXY
7+
ARG https_proxy
8+
ARG http_proxy
9+
ARG no_proxy
10+
11+
ENV https_proxy=${https_proxy}
12+
ENV http_proxy=${http_proxy}
13+
ENV HTTP_PROXY=${HTTP_PROXY}
14+
ENV HTTPS_PROXY=${HTTPS_PROXY}
15+
ENV no_proxy=${no_proxy}
16+
ENV NO_PROXY=${NO_PROXY}
17+
18+
19+
#AMQ
20+
ENV ACTIVEMQ_VERSION 5.14.3
21+
ENV ACTIVEMQ apache-activemq-$ACTIVEMQ_VERSION
22+
ENV ACTIVEMQ_STOMP=61613
23+
ENV ACTIVEMQ_UI=8161
24+
ENV ACTIVEMQ_HOME /opt/activemq
25+
26+
ENV DEBIAN_FRONTEND=noninteractive
27+
28+
#install amq
29+
30+
RUN set -x && \
31+
#wget -qO- https://archive.apache.org/dist/activemq/$ACTIVEMQ_VERSION/$ACTIVEMQ-bin.tar.gz | tar xvz -C /opt && \
32+
curl -k -s -S https://archive.apache.org/dist/activemq/$ACTIVEMQ_VERSION/$ACTIVEMQ-bin.tar.gz | tar xvz -C /opt && \
33+
ln -s /opt/$ACTIVEMQ $ACTIVEMQ_HOME && \
34+
useradd -r -M -d $ACTIVEMQ_HOME activemq && \
35+
chown -R activemq:activemq /opt/$ACTIVEMQ && \
36+
chown -h activemq:activemq $ACTIVEMQ_HOME && \
37+
mkdir -p /var/log/activemq && \
38+
touch /var/log/activemq/scot.amq.log
39+
40+
#Copy over SCOTAQ config stuffs
41+
COPY install/src/ActiveMQ/amq/scotaq/ /opt/activemq/webapps/scot
42+
COPY install/src/ActiveMQ/amq/scotamq.xml /opt/activemq/conf/
43+
COPY install/src/ActiveMQ/amq/jetty.xml /opt/activemq/conf/
44+
45+
USER activemq
46+
WORKDIR $ACTIVEMQ_HOME
47+
EXPOSE $ACTIVEMQ_TCP $ACTIVEMQ_AMQP $ACTIVEMQ_STOMP $ACTIVEMQ_MQTT $ACTIVEMQ_WS $ACTIVEMQ_UI
48+
49+
50+
CMD ["/bin/sh", "-c", "bin/activemq console"]

Dockerfile-Apache

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM ubuntu:16.04
2+
3+
4+
ARG HTTPS_PROXY
5+
ARG HTTP_PROXY
6+
ARG https_proxy
7+
ARG http_proxy
8+
ARG no_proxy
9+
10+
ENV https_proxy=${https_proxy}
11+
ENV http_proxy=${http_proxy}
12+
ENV HTTP_PROXY=${HTTP_PROXY}
13+
ENV HTTPS_PROXY=${HTTPS_PROXY}
14+
ENV no_proxy=${no_proxy}
15+
ENV NO_PROXY=${NO_PROXY}
16+
17+
ENV APACHE_RUN_USER=www-data \
18+
APACHE_RUN_GROUP=www-data \
19+
APACHE_LOG_DIR=/var/log/apache2 \
20+
APACHE_LOCK_DIR=/var/lock/apache2 \
21+
APACHE_RUN_DIR=/var/run/apache2 \
22+
APACHE_PID_FILE=/var/run/apache2.pid
23+
24+
COPY ./docker-configs/apache/run.sh /scripts/
25+
RUN chmod +x /scripts/run.sh
26+
27+
28+
29+
RUN apt-get update && \
30+
apt-get install -y apache2 libldap2-dev libsasl2-dev libssl-dev apache2 libapache2-mod-wsgi \
31+
apache2 libapache2-mod-authnz-external libapache2-mod-rpaf && \
32+
a2enmod proxy_http && a2enmod proxy && \
33+
a2enmod ssl && \
34+
a2ensite default-ssl && \
35+
a2enmod rewrite && \
36+
a2enmod proxy_html && \
37+
a2enmod headers
38+
39+
#If you want to use your own SSL certificates, remove the below RUN line and simply add a data volume to the docker-compose file for your certs (i.e. /etc/apache2/ssl/yourcerts)
40+
RUN mkdir -p /etc/apache2/ssl/ && \
41+
openssl genrsa 2048 > /etc/apache2/ssl/scot.key && \
42+
openssl req -new -key /etc/apache2/ssl/scot.key -out /tmp/scot.csr -subj '/CN=localhost/O=SCOT Default Cert/C=US' && \
43+
openssl x509 -req -days 36530 -in /tmp/scot.csr -signkey /etc/apache2/ssl/scot.key -out /etc/apache2/ssl/scot.crt
44+
45+
COPY docker-configs/apache/scot-revproxy-Ubuntu.conf /etc/apache2/sites-enabled
46+
47+
48+
EXPOSE 443 80
49+
50+
51+
CMD ["/scripts/run.sh"]

Dockerfile-Elastic

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.3
2+
3+
ARG HTTPS_PROXY
4+
ARG HTTP_PROXY
5+
ARG https_proxy
6+
ARG http_proxy
7+
ARG no_proxy
8+
9+
ENV https_proxy=${https_proxy}
10+
ENV http_proxy=${http_proxy}
11+
ENV HTTP_PROXY=${HTTP_PROXY}
12+
ENV HTTPS_PROXY=${HTTPS_PROXY}
13+
ENV no_proxy="elastic,mongodb"
14+
15+
USER root
16+
17+
RUN mkdir -p /opt/scotbackup/elastic
18+
RUN mkdir -p /opt/scot/elastic/
19+
20+
ADD docker-configs/elastic/ /opt/scot/elastic
21+
RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
22+
RUN chown elasticsearch:elasticsearch /opt/scot/elastic
23+
RUN chmod -R +x /opt/scot/elastic/*.sh
24+
RUN chown -R elasticsearch:elasticsearch /opt/scotbackup/elastic
25+
26+
#TODO: Lock these down
27+
RUN chmod -R 0777 /opt/scotbackup/elastic
28+
29+
#used for running Mapping script
30+
RUN mkdir -p /var/lib/elasticsearch/mapping
31+
RUN chown -R elasticsearch:elasticsearch /var/lib/elasticsearch/mapping
32+
33+
USER elasticsearch
34+
35+
ADD docker-configs/elastic/elasticsearch.yml /usr/share/elasticsearch/config/
36+
37+
38+
EXPOSE 9200 9300
39+
40+
CMD /opt/scot/elastic/run.sh

Dockerfile-Flair

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM sandialabs/scot_perl
2+
3+
#Create log directory
4+
RUN mkdir -p /var/log/scot
5+
RUN mkdir -p /opt/scot
6+
7+
COPY install/src/scot/ /opt/scot/etc/
8+
COPY bin/flairer.pl /opt/scot/bin/
9+
COPY install/src/scot /opt/scot/etc/
10+
COPY docker-configs/flair/flair.cfg.pl /opt/scot/etc/
11+
12+
13+
RUN groupadd -g 801 scot && \
14+
useradd -r -u 801 -g scot scot
15+
USER scot
16+
CMD ["/usr/bin/perl", "/opt/scot/bin/flairer.pl"]

Dockerfile-Game

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM sandialabs/scot_perl
2+
3+
#Create log directory
4+
RUN mkdir -p /var/log/scot
5+
RUN mkdir -p /opt/scot
6+
7+
COPY install/src/scot/ /opt/scot/etc/
8+
COPY docker-configs/game/game.pl /opt/scot/bin/
9+
COPY lib/Scot/App/Game.pm /opt/scot/lib/
10+
COPY install/src/scot /opt/scot/etc/
11+
COPY docker-configs/game/game.cfg.pl /opt/scot/etc/
12+
13+
14+
RUN groupadd -g 801 scot && \
15+
useradd -r -u 801 -g scot scot
16+
17+
USER scot
18+
CMD ["/usr/bin/perl", "/opt/scot/bin/game.pl"]

Dockerfile-Mail

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM sandialabs/scot_perl
2+
3+
#Create log directory
4+
RUN mkdir -p /var/log/scot
5+
RUN mkdir -p /opt/scot
6+
7+
COPY install/src/scot/ /opt/scot/etc/
8+
COPY docker-configs/mail/alert.pl /opt/scot/bin/
9+
COPY docker-configs/mail/Mail.pm /opt/scot/lib/Scot/App/
10+
COPY install/src/scot /opt/scot/etc/
11+
COPY docker-configs/mail/alert.cfg.pl /opt/scot/etc/
12+
13+
14+
RUN groupadd -g 801 scot && \
15+
useradd -r -u 801 -g scot scot
16+
17+
#USER scot
18+
19+
CMD ["/usr/bin/perl", "/opt/scot/bin/alert.pl"]

Dockerfile-Mongodb

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM sandialabs/scot_perl
2+
3+
4+
# Installation:
5+
# Import MongoDB public GPG key AND create a MongoDB list file
6+
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
7+
RUN echo "deb http://repo.mongodb.org/apt/ubuntu $(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d= -f2)/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
8+
9+
# Update apt-get sources AND install MongoDB
10+
RUN apt-get update && apt-get install -y mongodb-org
11+
12+
# Create the MongoDB data directory
13+
RUN mkdir -p /var/lib/mongodb && \
14+
mkdir /opt/scotbackup
15+
16+
17+
# Expose port #27017 from the container to the host
18+
EXPOSE 27017
19+
20+
ADD docker-configs/mongodb/mongod.conf /etc/mongod.conf
21+
ADD docker-configs/scot/scot.cfg.pl /opt/scot/etc/
22+
ADD docker-configs/mongodb/ /
23+
ADD install/src/mongodb /opt/scot/install/src/mongodb
24+
25+
#Create /var/lib/mongodb directory
26+
RUN mkdir -p /var/lib/mongodb/
27+
28+
29+
#add entry scripts
30+
RUN chmod 0755 /run.sh
31+
RUN chmod 0755 /set_mongodb_config.sh
32+
33+
#ADD demo files
34+
ADD demo/ /opt/scot/demo/
35+
36+
#set mongodb UID to system created
37+
RUN usermod -u 1061 mongodb
38+
39+
#Set permissions for mongodb user
40+
41+
RUN chown -R 1061:2061 /var/log/mongodb /var/lib/mongodb/
42+
43+
# Set /usr/bin/mongod as the dockerized entry-point application
44+
USER mongodb:mongodb
45+
46+
CMD ["/run.sh"]
47+

Dockerfile-Perl

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
FROM ubuntu:16.04
2+
3+
4+
5+
ARG HTTPS_PROXY
6+
ARG HTTP_PROXY
7+
ARG https_proxy
8+
ARG http_proxy
9+
ARG no_proxy
10+
11+
ENV https_proxy=${https_proxy}
12+
ENV http_proxy=${http_proxy}
13+
ENV HTTP_PROXY=${HTTP_PROXY}
14+
ENV HTTPS_PROXY=${HTTPS_PROXY}
15+
ENV no_proxy=${no_proxy}
16+
ENV NO_PROXY=${NO_PROXY}
17+
18+
19+
ENV no_proxy="elastic,mongodb,scot,activemq,apache"
20+
ENV NO_PROXY="elastic,mongodb,scot,activemq,apache"
21+
22+
23+
RUN apt-get update && \
24+
apt-get -qy upgrade && \
25+
apt-get install -qy perl build-essential cpanminus perl-doc perl-base perl-modules \
26+
perlmagick perltidy libcurses-perl libmagic-dev libxml-perl libyaml-perl libwww-mechanize-perl \
27+
libjson-perl libmath-gmp-perl librose-db-perl libtree-simple-perl libtask-weaken-perl libtree-simple-visitorfactory-perl \
28+
libalgorithm-c3-perl libapparmor-perl libarchive-zip-perl libauthen-krb5-simple-perl libauthen-sasl-perl \
29+
libb-hooks-endofscope-perl libb-keywords-perl libbit-vector-perl libcache-perl libcairo-perl libcarp-assert-more-perl \
30+
libcarp-assert-perl libcarp-clan-perl libcgi-simple-perl libcgi-emulate-psgi-perl libclass-accessor-perl libclass-c3-adopt-next-perl\
31+
libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl libclass-errorhandler-perl libclass-factory-util-perl libclass-inspector-perl \
32+
libclass-singleton-perl libclone-perl libclone-pp-perl libcompress-bzip2-perl libconfig-tiny-perl libdata-dump-perl libdata-dump-perl \
33+
libdata-optlist-perl libdate-manip-perl libdatetime-format-builder-perl libdatetime-format-mysql-perl libdatetime-format-pg-perl \
34+
libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-mysql-perl \
35+
libdbd-pg-perl libdbi-perl libdevel-globaldestruction-perl libdevel-stacktrace-perl libdevel-symdump-perl \
36+
liberror-perl libexception-class-perl libextutils-autoinstall-perl libfcgi-perl libfile-copy-recursive-perl libfile-homedir-perl \
37+
libfile-modified-perl libfile-nfslock-perl libfile-remove-perl libfile-searchpath-perl libfile-slurp-perl libfile-spec-perl \
38+
libfile-which-perl libfont-afm-perl libfreezethaw-perl libglib-perl libgnome2-canvas-perl libgnome2-perl libgnome2-vfs-perl \
39+
libgtk2-perl libheap-perl libhtml-clean-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl \
40+
libhtml-tree-perl libhttp-body-perl libhttp-request-ascgi-perl libhttp-response-encoding-perl libhttp-server-simple-perl \
41+
libio-socket-ssl-perl libio-string-perl libio-stringy-perl libjson-perl libjson-xs-perl liblingua-stem-snowball-perl \
42+
liblist-moreutils-perl liblocale-gettext-perl liblwp-authen-wsse-perl libmailtools-perl libmime-types-perl \
43+
libmldbm-perl libmodule-corelist-perl libmodule-install-perl libmodule-scandeps-perl libmro-compat-perl libnamespace-autoclean-perl \
44+
libnamespace-clean-perl libnet-daemon-perl libnet-dbus-perl libnet-jabber-perl libnet-libidn-perl libnet-ssleay-perl libnet-xmpp-perl \
45+
libpango-perl libpar-dist-perl libparams-util-perl libparams-validate-perl libparse-cpan-meta-perl libparse-debianchangelog-perl \
46+
libpath-class-perl libperl-critic-perl libdbd-pg-perl libdbi-perl libpod-coverage-perl libpod-spell-perl libppi-perl libreadonly-perl \
47+
libreadonly-xs-perl librose-datetime-perl librose-db-object-perl librose-db-perl librose-object-perl librpc-xml-perl libscope-guard-perl \
48+
libscope-upper-perl libsphinx-search-perl libsql-reservedwords-perl libstring-format-perl libstring-rewriteprefix-perl libsub-exporter-perl \
49+
libsub-install-perl libsub-name-perl libsub-uplevel-perl libtask-weaken-perl libterm-readkey-perl libtest-exception-perl \
50+
libtest-longstring-perl libtest-mockobject-perl libtest-perl-critic-perl libtest-pod-coverage-perl libtest-pod-perl libtest-www-mechanize-perl \
51+
libtext-charwidth-perl libtext-iconv-perl libtext-simpletable-perl libtext-wrapi18n-perl libtie-ixhash-perl libtime-clock-perl \
52+
libtimedate-perl libtree-simple-perl libtree-simple-visitorfactory-perl libuniversal-can-perl libuniversal-isa-perl \
53+
liburi-fetch-perl liburi-perl libuuid-perl libvariable-magic-perl libwww-mechanize-perl libwww-perl libxml-atom-perl \
54+
libxml-dom-perl libxml-libxml-perl libxml-libxslt-perl libxml-namespacesupport-perl libxml-parser-perl libxml-perl \
55+
libxml-regexp-perl libxml-sax-expat-perl libxml-sax-perl libxml-stream-perl libxml-twig-perl libxml-xpath-perl \
56+
libxml-xslt-perl libyaml-perl libyaml-syck-perl libyaml-tiny-perl libfile-libmagic-perl liblog-log4perl-perl \
57+
libplack-perl libcurses-perl libfile-libmagic-perl libnet-xmpp-perl && \
58+
apt-get clean && \
59+
rm -rf /var/lib/apt/lists/*, /tmp/*, /var/tmp/*
60+
61+
#Install CPAN modules
62+
63+
RUN cpanm --force IO::AIO AnyEvent::AIO Array::Split Data::Dumper Data::Dumper::HTML Data::Dumper::Concise Data::[email protected] Data::Clean::FromJSON Daemon::Control \
64+
Net::LDAP Net::SMTP::TLS Net::Stomp Net::STOMP::Client Net::IDN::Encode Net::Works::Network Net::IP Moose Moose::Role \
65+
Moose::Util::TypeConstraints MooseX::MetaDescription::Meta::Attribute MooseX::Singleton MooseX::Emulate::Class::Accessor::Fast MooseX::Types \
66+
MooseX::Types::Common MooseX::MethodAttributes Safe Readonly DateTime DateTime::Cron::Simple DateTime::Format::Strptime \
67+
DateTime::Format::Natural Time::HiRes Server::Starter PSGI CGI::PSGI CGI::Compile HTTP::Server::Simple::PSGI JSON DBI Parallel::ForkManager \
68+
Async::Interrupt AnyEvent AnyEvent::STOMP::Client AnyEvent::ForkManager Number::Bytes::Human Sys::RunAlone Encode FileHandle File::Slurp \
69+
File::Temp File::Type HTML::Entities HTML::Scrubber HTML::Strip HTML::StripTags HTML::TreeBuilder HTML::FromText HTML::FormatText \
70+
MIME::Base64 IPC::Run IO::Prompt Log::Log4perl Mail::IMAPClient Mail::IMAPClient::BodyStructure [email protected] MongoDB::[email protected] \
71+
MongoDB::GridFS::[email protected] MongoDB::[email protected] Meerkat Mojo MojoX::Log::Log4perl Mojolicious::Plugin::WithCSRFProtection \
72+
Mojolicious::Plugin::TagHelpers XML::Smart Config::Auto Data::GUID File::LibMagic List::Uniq Domain::PublicSuffix Mozilla::PublicSuffix \
73+
Crypt::PBKDF2 Config::Crontab Test::JSON Math::Int128 GeoIP2 Search::Elasticsearch Term::ANSIColor Courriel Statistics::Descriptive Net::SSH::Perl Net::SFTP Lingua::EN::StopWords
74+
75+
#Mongo stuff
76+
77+
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
78+
RUN echo "deb http://repo.mongodb.org/apt/ubuntu $(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d= -f2)/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
79+
80+
RUN apt-get update && \
81+
apt-get --allow-unauthenticated install -qy mongodb-org
82+
83+
84+
COPY lib/ /opt/scot/lib/
85+
COPY bin/ /opt/scot/bin/
86+

Dockerfile-Reflair

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM sandialabs/scot_perl
2+
3+
#Create log directory
4+
RUN mkdir -p /var/log/scot
5+
RUN mkdir -p /opt/scot
6+
7+
COPY install/src/scot/ /opt/scot/etc/
8+
COPY bin/reflair.pl /opt/scot/bin/
9+
COPY install/src/scot /opt/scot/etc/
10+
COPY docker-configs/reflair/reflair.cfg.pl /opt/scot/etc/
11+
COPY docker-configs/scot/scot.cfg.pl /opt/scot/etc/
12+
13+
RUN groupadd -g 801 scot && \
14+
useradd -r -u 801 -g scot scot
15+
16+
USER scot
17+
18+
CMD ["/usr/bin/perl", "/opt/scot/bin/reflair.pl"]

0 commit comments

Comments
 (0)