-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the Atos case-study into performance and functional tests
- Loading branch information
Showing
29 changed files
with
1,109 additions
and
6 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...les/stamp/atos/template/citygo/Dockerfile → ...tos/functional/template/citygo/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# See explanation in the README. | ||
|
||
FROM whatever:latest # Generate by CAMP | ||
FROM camp/runtime | ||
|
||
|
||
# Describe here how to install Citygo ontop of the "python" component. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
...les/stamp/atos/template/python/Dockerfile → ...tos/functional/template/python/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# | ||
# CAMP | ||
# | ||
# Copyright (C) 2017, 2018 SINTEF Digital | ||
# All rights reserved. | ||
# | ||
# This software may be modified and distributed under the terms | ||
# of the MIT license. See the LICENSE file for details. | ||
# | ||
|
||
goals: | ||
running: | ||
- Entry | ||
|
||
components: | ||
|
||
browser: | ||
provides_services: [ Entry ] | ||
requires_services: [ Test ] | ||
implementation: | ||
docker: | ||
file: browser/Dockerfile | ||
tests: | ||
command: pytest -v tests.py --junitxml=report.xml | ||
reports: | ||
location: "./" | ||
pattern: ".xml" | ||
format: junit | ||
|
||
hub: | ||
provides_services: [ Test ] | ||
requires_services: [ CityGo ] | ||
implementation: | ||
docker: | ||
image: selenium/hub | ||
|
||
citygo: | ||
provides_services: [ CityGo ] | ||
requires_services: [ Postgres, Mongo ] | ||
requires_features: [ Python ] | ||
implementation: | ||
docker: | ||
file: citygo/Dockerfile | ||
|
||
python: | ||
provides_features: [ Python ] | ||
requires_features: [ HttpProxy ] | ||
implementation: | ||
docker: | ||
file: python/Dockerfile | ||
|
||
apache: | ||
provides_features: [ HttpProxy ] | ||
requires_features: [ Ubuntu ] | ||
variables: | ||
thread_limit: | ||
type: Integer | ||
values: [ 64, 128 ] | ||
realization: | ||
- targets: [ docker-compose.yml ] | ||
pattern: "ThreadLimit=64" | ||
replacements: [ ThreadLimit=64, ThreadLimit=128 ] | ||
threads_per_child: | ||
type: Integer | ||
values: | ||
range: [0, 128] | ||
coverage: 10 | ||
realization: | ||
- targets: [ docker-compose.yml ] | ||
pattern: ThreadsPerChild=25 | ||
replacements: ["ThreadsPerChild={value}"] | ||
max_request_workers: | ||
type: Integer | ||
realization: | ||
- targets: [ docker-compose.yml ] | ||
pattern: MaxRequestWorkers=150 | ||
replacements: ["MaxRequestWorkers={value}"] | ||
implementation: | ||
docker: | ||
file: repo/showcase/Dockerfile | ||
implementation: | ||
docker: | ||
file: apache/Dockerfile | ||
|
||
mongo: | ||
provides_services: [ Mongo ] | ||
implementation: | ||
docker: | ||
image: mongo:4.0.6-xenial | ||
|
||
|
||
postgres: | ||
provides_services: [ Postgres ] | ||
implementation: | ||
docker: | ||
file: postgres/Dockerfile | ||
|
||
ubuntu: | ||
provides_features: [ Ubuntu ] | ||
implementation: | ||
docker: | ||
image: ubuntu:latest | ||
|
||
constraints: | ||
- apache_0_threads_per_child.value < apache_0_thread_limit.value | ||
- apache_0_max_request_workers.value == 16 * apache_0_threads_per_child.value | ||
- Or([And([apache_0_threads_per_child.value >= 100, apache_0_max_request_workers.value >= 200]), And([apache_0_thread_limit.value <= 64, apache_0_max_request_workers.value >= 2])]) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM camp/runtime | ||
|
||
MAINTAINER Fernando Mendez Requena <[email protected]> | ||
|
||
RUN echo "sudo usermod -a -G user apache" | ||
|
||
RUN apt-get update -y && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y \ | ||
libapache2-mod-wsgi \ | ||
python2.7 \ | ||
python-pip \ | ||
lynx \ | ||
apache2 | ||
|
||
RUN pip install mod_wsgi | ||
RUN pip install virtualenv | ||
ADD ./requirements.txt ./ | ||
RUN pip install -r requirements.txt | ||
|
||
WORKDIR ./ | ||
|
||
ADD ./mpm_event.conf ./ | ||
|
||
#RUN mkdir -p /etc/httpd/sites-enabled | ||
#RUN mkdir -p /etc/httpd/sites-available | ||
|
||
ADD ./demo_site.conf /etc/apache2/sites-available/000-default.conf | ||
|
||
#ADD ./httpd.conf /usr/local/apache2/conf/httpd.conf | ||
#ADD ./httpd.conf /etc/httpd/conf/httpd.conf | ||
|
||
CMD service apache2 relaod | ||
|
||
RUN chmod 777 -R /var/log/apache2 | ||
RUN cd /etc/apache2/mods-enabled/ && \ | ||
echo "envsubst < $pwd/mpm_event.conf > ./mpm_event.conf" | ||
|
||
|
||
EXPOSE 80 3500 | ||
|
||
CMD ["apache2ctl", "-D", "FOREGROUND"] | ||
|
40 changes: 40 additions & 0 deletions
40
samples/stamp/atos/performance/template/apache/demo_site.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
WSGIPythonPath /var/www/html/ShowcaseServer/demo_site | ||
|
||
<VirtualHost *:80> | ||
# The ServerName directive sets the request scheme, hostname and port that | ||
# the server uses to identify itself. This is used when creating | ||
# redirection URLs. In the context of virtual hosts, the ServerName | ||
# specifies what hostname must appear in the request's Host: header to | ||
# match this virtual host. For the default virtual host (this file) this | ||
# value is not decisive as it is used as a last resort host regardless. | ||
# However, you must set it for any further virtual host explicitly. | ||
#ServerName www.example.com | ||
|
||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/html/ShowcaseServer | ||
|
||
Alias /static /var/www/html/ShowcaseServer/demo_site/dashboard/static | ||
|
||
|
||
WSGIScriptAlias / /var/www/html/ShowcaseServer/demo_site/citygo_settings/wsgi.py | ||
|
||
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | ||
# error, crit, alert, emerg. | ||
# It is also possible to configure the loglevel for particular | ||
# modules, e.g. | ||
#LogLevel info ssl:warn | ||
|
||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
LogLevel debug | ||
|
||
#CustomLog ${APACHE_LOG_DIR}/malaga_showcase_debug.log combined | ||
|
||
|
||
# For most configuration files from conf-available/, which are | ||
# enabled or disabled at a global level, it is possible to | ||
# include a line for only one particular virtual host. For example the | ||
# following line enables the CGI configuration for this host only | ||
# after it has been globally disabled with "a2disconf". | ||
#Include conf-available/serve-cgi-bin.conf | ||
</VirtualHost> |
19 changes: 19 additions & 0 deletions
19
samples/stamp/atos/performance/template/apache/mpm_event.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# event MPM | ||
# StartServers: initial number of server processes to start | ||
# MinSpareThreads: minimum number of worker threads which are kept spare | ||
# MaxSpareThreads: maximum number of worker threads which are kept spare | ||
# ThreadsPerChild: constant number of worker threads in each server process | ||
# MaxRequestWorkers: maximum number of worker threads | ||
# MaxConnectionsPerChild: maximum number of requests a server process serves | ||
<IfModule mpm_event_module> | ||
StartServers ${StartServers} | ||
MinSpareThreads ${MinSpareThreads} | ||
MaxSpareThreads ${MaxSpareThreads} | ||
ThreadLimit ${ThreadLimit} | ||
ThreadsPerChild ${ThreadsPerChild} | ||
MaxRequestWorkers ${MaxRequestWorkers} | ||
MaxConnectionsPerChild ${MaxConnectionsPerChild} | ||
</IfModule> | ||
|
||
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM selenium/node-chrome-debug | ||
|
||
RUN pip install selenium pytest | ||
|
||
COPY ./tests citygo-tests/tests.py | ||
|
||
CMD echo "Ready!" |
Oops, something went wrong.