diff options
-rw-r--r-- | build/test/inventory | 2 | ||||
-rw-r--r-- | build/test/nms-collector-test.Dockerfile | 2 | ||||
-rw-r--r-- | build/test/nms-front-test.Dockerfile | 9 | ||||
-rw-r--r-- | build/test/playbook-test.yml | 8 | ||||
-rw-r--r-- | extras/misc/apache2.conf | 4 |
5 files changed, 11 insertions, 14 deletions
diff --git a/build/test/inventory b/build/test/inventory index 2fbb50c..2302eda 100644 --- a/build/test/inventory +++ b/build/test/inventory @@ -1 +1 @@ -localhost +localhost ansible_connection=local diff --git a/build/test/nms-collector-test.Dockerfile b/build/test/nms-collector-test.Dockerfile index be6cb23..4b08f05 100644 --- a/build/test/nms-collector-test.Dockerfile +++ b/build/test/nms-collector-test.Dockerfile @@ -14,6 +14,4 @@ RUN apt-get -y install \ perl-base \ perl-modules RUN mkdir -p /opt/nms -ADD collectors /opt/nms/collectors -ADD include /opt/nms/include CMD /opt/nms/collectors/ping.pl diff --git a/build/test/nms-front-test.Dockerfile b/build/test/nms-front-test.Dockerfile index 256083a..e9d7ef8 100644 --- a/build/test/nms-front-test.Dockerfile +++ b/build/test/nms-front-test.Dockerfile @@ -30,16 +30,13 @@ RUN apt-get -y install \ apache2 RUN mkdir -p /opt/nms -ADD web /opt/nms/web -ADD include /opt/nms/include -ADD extras /opt/nms/extras RUN a2dissite 000-default RUN a2enmod cgi -RUN cp /opt/nms/extras/misc/apache2.conf /etc/apache2/sites-enabled/nms.conf +RUN ln -s /opt/nms/extras/misc/apache2.conf /etc/apache2/sites-enabled/nms.conf RUN mkdir -p /opt/nms/etc -RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /opt/nms/etc/htpasswd-read -RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /opt/nms/etc/htpasswd-write +RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /htpasswd-read +RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /htpasswd-write ADD build/test/dummy-apache2.start / RUN chmod 0755 /dummy-apache2.start CMD /dummy-apache2.start diff --git a/build/test/playbook-test.yml b/build/test/playbook-test.yml index 82df8ce..a2b416a 100644 --- a/build/test/playbook-test.yml +++ b/build/test/playbook-test.yml @@ -24,13 +24,15 @@ - "/api/read/switches-management" tasks: + - command: pwd + register: pwd - name: make all docker_image: state: build name: "{{ item.name }}" docker_api_version: 1.18 dockerfile: build/test/{{ item.name }}.Dockerfile - path: "src/tgnms/" + path: "{{ pwd.stdout }}" with_items: "{{ images }}" - name: stop all @@ -50,15 +52,15 @@ state: started net: bridge links: "{{ item.links }}" + volumes: [ "{{ pwd.stdout }}/:/opt/nms" ] with_items: "{{ images }}" - - name: workaround to get nms-varnish-front-ip shell: "docker inspect nms-varnish-test | grep IPAddress | sed 's/[^0-9.]//g'" register: ip - name: Display IP debug: - msg: "Front is available at http://{{ ip.stdout }}/" + msg: "Front test is available at http://{{ ip.stdout }}/" - name: test index uri: url="http://{{ ip.stdout }}/" diff --git a/extras/misc/apache2.conf b/extras/misc/apache2.conf index e5311a0..9d5cd41 100644 --- a/extras/misc/apache2.conf +++ b/extras/misc/apache2.conf @@ -11,7 +11,7 @@ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch <RequireAny> - AuthUserFile /opt/nms/etc/htpasswd-write + AuthUserFile /htpasswd-write AuthName "Demo/test of nms" AuthType Basic Require valid-user @@ -21,7 +21,7 @@ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch <RequireAny> - AuthUserFile /opt/nms/etc/htpasswd-read + AuthUserFile /htpasswd-read AuthName "Demo/test of nms" AuthType Basic Require valid-user |