diff options
author | Mark Beierl <mark.beierl@emc.com> | 2016-01-19 20:58:35 -0500 |
---|---|---|
committer | Mark Beierl <mark.beierl@emc.com> | 2016-01-29 13:43:04 -0500 |
commit | 488a47d945d3ef3dfa9ee37ca0aac3b480ffc800 (patch) | |
tree | 295ea3f6df99884675ba8f21c207bf892f0170bd /docker | |
parent | 9960601b321f10a11257832a2ecacb91acf03c53 (diff) |
Remote slave agent workload
Add storperf master object to manage stack
lifecycle.
Add configuration db.
Creation of CLI vs. main so that ReST API
and CLI API can be kept clear.
Fixed License in files.
Changed DB objects to be thread safe.
Added ssh server to container if desired
for CLI.
Change-Id: Idfe84bfb7920e6ce19d27462593c21ea86e7b406
JIRA: STORPERF-29
Signed-off-by: Mark Beierl <mark.beierl@emc.com>
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 40 | ||||
-rw-r--r-- | docker/requirements.pip | 10 | ||||
-rw-r--r-- | docker/storperf.pp | 9 | ||||
-rw-r--r-- | docker/supervisord.conf | 16 |
4 files changed, 70 insertions, 5 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 5ad8624..4ca66d0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,13 @@ -######################################## +############################################################################## +# Copyright (c) 2015 EMC and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## # Docker container for STORPERF -######################################## +# # Purpose: docker image for Storperf project # # Maintained by Jose Lausuch, Mark Beierl @@ -8,7 +15,7 @@ # $ docker build -t opnfv/storperf:tag . # # Execution: -# $ docker run -t -i opnfv/storperf /bin/bash +# $ docker run -t opnfv/storperf /bin/bash # @@ -36,6 +43,19 @@ python-dev \ python-pip \ --no-install-recommends + +# Allow root SSH access with 'storperf' as the password + +RUN echo 'root:storperf' | chpasswd +RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config + +# SSH login fix. Otherwise user is kicked off after login +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 +RUN mkdir -p /var/run/sshd + RUN mkdir -p ${repos_dir} RUN mkdir -p /root/.ssh RUN chmod 700 /root/.ssh @@ -45,14 +65,24 @@ RUN git clone https://gerrit.opnfv.org/gerrit/storperf ${repos_dir}/storperf RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng RUN git clone http://git.kernel.dk/fio.git ${repos_dir}/fio RUN cd ${repos_dir}/fio && git checkout tags/fio-2.2.10 -RUN cd ${repos_dir}/fio && make -j 4 install +RUN cd ${repos_dir}/fio && make -j 6 install RUN puppet module install gdsoperations-graphite +RUN chmod 600 ${repos_dir}/storperf/storperf/resources/ssh/storperf_rsa + +RUN pip install -r ${repos_dir}/storperf/docker/requirements.pip + COPY storperf.pp /etc/puppet/manifests/storperf.pp RUN puppet apply /etc/puppet/manifests/storperf.pp -#Let others connect to Graphite if they want our data +# Open access to SSH if desired +EXPOSE 22 + +# Graphite EXPOSE 8000 +# ReST API +EXPOSE 5000 + COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf CMD ["/usr/bin/supervisord"] diff --git a/docker/requirements.pip b/docker/requirements.pip new file mode 100644 index 0000000..be29c28 --- /dev/null +++ b/docker/requirements.pip @@ -0,0 +1,10 @@ +pyyaml==3.10 +python-neutronclient==2.6.0 +python-heatclient==0.8.0 +python-novaclient==2.28.1 +python-glanceclient==1.1.0 +python-cinderclient==1.4.0 +python-keystoneclient==1.6.0 +flask>=0.10 +flask-restful>=0.3.5 +html2text==2016.1.8
\ No newline at end of file diff --git a/docker/storperf.pp b/docker/storperf.pp index 00a6482..7de1024 100644 --- a/docker/storperf.pp +++ b/docker/storperf.pp @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 EMC and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + class { 'python': pip => true, dev => true, diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 80dfe5e..566b4be 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -17,3 +17,19 @@ command = /opt/graphite/bin/gunicorn_django -b0.0.0.0:8000 -w2 graphite/setting stdout_logfile = /var/log/supervisor/%(program_name)s.log stderr_logfile = /var/log/supervisor/%(program_name)s.log autorestart = true + +[program:sshd] +user = root +command = /usr/sbin/sshd =D +stdout_logfile = /var/log/supervisor/%(program_name)s.log +stderr_logfile = /var/log/supervisor/%(program_name)s.log +autorestart = true + +[program:storperf-webapp] +user = root +directory = /home/opnfv/repos/storperf +command = /usr/bin/python /home/opnfv/repos/storperf/rest_server.py +stdout_logfile = /var/log/supervisor/%(program_name)s.log +stderr_logfile = /var/log/supervisor/%(program_name)s.log +autorestart = true + |