Commit e19fcd2f8652f93240ba776a2c5cefed6c1538ff

Authored by Alexandre Chapellon
1 parent e6ad31bfb7
Exists in master and in 1 other branch rheltarget

move artifacts params in a dict to support different repos

... ... @@ -41,5 +41,4 @@ If some options need to be changed (e.g. java or tomcat version, etc...), edit t
41 41 * Allow Oracle JDK usage
42 42 * Allow non-key based play of the book
43 43 * Attach real VNC server to be able to see what selenium actually doing headless
44   - * move all artifacts URL in a dict, which contains Alfresco version as keys
45 44  
... ...
1   -artifact_repo: https://nexus.alfresco.com/nexus/service/local/repositories/snapshots/content
2   -
3   -bm_server_path: /org/alfresco/alfresco-benchmark-server/2.2.0-SNAPSHOT/alfresco-benchmark-server-2.2.0-20170425.171932-5.war
4   -bm_sample: /org/alfresco/alfresco-benchmark-sample/2.2.0-SNAPSHOT/alfresco-benchmark-sample-2.2.0-20170425.172045-5.war
5   -tests_signup_path: /org/alfresco/alfresco-benchmark-tests-ent-signup/2.5-SNAPSHOT/alfresco-benchmark-tests-ent-signup-2.5-20170425.173139-5.war
6   -tests_cmis_path: /org/alfresco/alfresco-benchmark-tests-cmis/1.7-SNAPSHOT/alfresco-benchmark-tests-cmis-1.7-20160818.133550-1.war
7   -tests_dataload_path: /org/alfresco/alfresco-benchmark-tests-dataload/2.8-SNAPSHOT/alfresco-benchmark-tests-dataload-2.8-20170425.173217-4.war
8   -tests_share_path: /org/alfresco/alfresco-benchmark-tests-share/5.2.0-SNAPSHOT/alfresco-benchmark-tests-share-5.2.0-20170425.173048-48.war
9   -tests_workflow_path: /org/alfresco/alfresco-benchmark-tests-workflow/1.3-SNAPSHOT/alfresco-benchmark-tests-workflow-1.3-20170425.173133-13.war
10   -tests_desktopsync_path: /org/alfresco/alfresco-benchmark-tests-desktop-sync/1.3-SNAPSHOT/alfresco-benchmark-tests-desktop-sync-1.3-20160615.142236-21.war
  1 +---
  2 +artifact_repo: https://nexus.alfresco.com/nexus/service/local/repositories
  3 +
  4 +bm_server_path: { repo: releases, path: /org/alfresco/alfresco-benchmark-server/2.2.0/alfresco-benchmark-server-2.2.0.war }
  5 +bm_sample: { repo: releases, path: /org/alfresco/alfresco-benchmark-sample/2.2.0/alfresco-benchmark-sample-2.2.0.war }
  6 +tests_signup_path: { repo: releases, path: /org/alfresco/alfresco-benchmark-tests-ent-signup/2.4/alfresco-benchmark-tests-ent-signup-2.4.war }
  7 +tests_cmis_path: { repo: releases, path: /org/alfresco/alfresco-benchmark-tests-cmis/1.6/alfresco-benchmark-tests-cmis-1.6.war }
  8 +tests_dataload_path: { repo: releases, path: /org/alfresco/alfresco-benchmark-tests-dataload/2.7/alfresco-benchmark-tests-dataload-2.7.war }
  9 +tests_share_path: { repo: snapshots, path: /org/alfresco/alfresco-benchmark-tests-share/5.2.0-SNAPSHOT/alfresco-benchmark-tests-share-5.2.0-20170505.102335-51.war }
  10 +tests_workflow_path: { repo: releases, path: /org/alfresco/alfresco-benchmark-tests-workflow/1.2/alfresco-benchmark-tests-workflow-1.2.war }
  11 +tests_desktopsync_path: { repo: snapshots, path: /org/alfresco/alfresco-benchmark-tests-desktop-sync/1.3-SNAPSHOT/alfresco-benchmark-tests-desktop-sync-1.3-20160615.142236-21.war }
11 12  
12 13 # Use either Java 7 or 8
13 14 #java_ver: 8
... ... @@ -32,7 +33,7 @@ tests_desktopsync_path: /org/alfresco/alfresco-benchmark-tests-desktop-sync/1.3-
32 33 # DO NOT EDIT FURTHER.
33 34 # Thereafter we only set defaults
34 35  
35   -java_version: "{{ java_ver | default(8) }}"
  36 +java_version: "{{ java_ver | default(7) }}"
36 37 java_flavor: "{{ java_flav | default('openjdk') }}"
37 38 tomcat_version: "{{ tomcat_ver | default(7) }}"
38 39 tomcat_clean: "{{ tomcat_cln | default(False) }}"
... ...
yml/roles/bm-server/tasks/main.yml
... ... @@ -8,7 +8,7 @@
8 8  
9 9 - name: Get Alfresco benchmark server artifact
10 10 get_url:
11   - url: "{{ artifact_repo }}/{{ bm_server_path }}"
  11 + url: "{{ artifact_repo }}/{{ bm_server_path.repo }}/content/{{ bm_server_path.path }}"
12 12 dest: "{{ catalina_home }}/webapps/alfresco-benchmark-server.war"
13 13 owner: "{{ tomcat_user }}"
14 14 group: "{{ tomcat_group }}"
... ...
yml/roles/load-driver/tasks/main.yml
... ... @@ -18,16 +18,16 @@
18 18  
19 19 - name: Get Alfresco benchmark tests artifacts
20 20 get_url:
21   - url: "{{ artifact_repo }}/{{ item.artifact }}"
  21 + url: "{{ artifact_repo }}/{{ item.repo }}/content/{{ item.path }}"
22 22 dest: "{{ catalina_home }}/webapps/{{ item.warfile }}.war"
23 23 owner: "{{ tomcat_user }}"
24 24 group: "{{ tomcat_group }}"
25 25 mode: 0644
26 26 with_items:
27   - - { artifact: "{{ tests_signup_path }}", warfile: 'alfresco-benchmark-tests-signup' }
28   - - { artifact: "{{ tests_cmis_path }}", warfile: 'alfresco-benchmark-tests-cmis' }
29   - - { artifact: "{{ tests_dataload_path }}", warfile: 'alfresco-benchmark-tests-dataload' }
30   - - { artifact: "{{ tests_share_path }}", warfile: 'alfresco-benchmark-tests-share' }
31   - - { artifact: "{{ tests_workflow_path }}", warfile: 'alfresco-benchmark-tests-workflow' }
32   - - { artifact: "{{ tests_desktopsync_path }}", warfile: 'alfresco-benchmark-tests-desktopsync' }
  27 + - { repo: "{{ tests_signup_path.repo }}", path: "{{tests_signup_path.path }}", warfile: 'alfresco-benchmark-tests-signup' }
  28 + - { repo: "{{ tests_cmis_path.repo }}", path: "{{ tests_cmis_path.path }}", warfile: 'alfresco-benchmark-tests-cmis' }
  29 + - { repo: "{{ tests_dataload_path.repo }}", path: "{{ tests_dataload_path.path }}", warfile: 'alfresco-benchmark-tests-dataload' }
  30 + - { repo: "{{ tests_share_path.repo }}", path: "{{ tests_share_path.path }}", warfile: 'alfresco-benchmark-tests-share' }
  31 + - { repo: "{{ tests_workflow_path.repo }}", path: "{{ tests_workflow_path.path }}", warfile: 'alfresco-benchmark-tests-workflow' }
  32 + - { repo: "{{ tests_desktopsync_path.repo }}", path: "{{ tests_desktopsync_path.path }}", warfile: 'alfresco-benchmark-tests-desktopsync' }
33 33  
... ...
yml/roles/tomcat/tasks/config.yml
... ... @@ -32,15 +32,15 @@
32 32 dest: "{{ tomcat_cfg_daemon }}"
33 33 line: JAVA_HOME="{{ java_home }}"
34 34 regexp: '^\s*JAVA_HOME\s*=.*$'
  35 + create: yes
35 36 notify: Restart Tomcat
36   - when: ansible_service_mgr == 'upstart' or ansible_service_mgr == 'init'
37 37  
38 38 - name: Set JAVA_OPTS
39 39 lineinfile:
40 40 dest: "{{ tomcat_cfg_daemon }}"
41 41 line: JAVA_OPTS="$JAVA_OPTS -server -XX:MaxPermSize=512 -Xmx3G -Dmongo.config.host={{ groups['mongodb'][0] }}"
  42 + create: yes
42 43 notify: Restart Tomcat
43   - when: ansible_service_mgr == 'upstart' or ansible_service_mgr == 'init'
44 44  
45 45 - name: Remove all Tomcat webapps
46 46 file: name="{{ catalina_home }}/webapps/{{ item }}" state=absent
... ... @@ -49,12 +49,3 @@
49 49 - alfresco-benchmark-server.war
50 50 when: tomcat_clean == True
51 51  
52   -- name: Get Alfresco benchmark server artifact
53   - get_url:
54   - url: "{{ artifact_repo }}/{{ bm_server_path }}"
55   - dest: "{{ catalina_home }}/webapps/alfresco-benchmark-server.war"
56   - owner: "{{ tomcat_user }}"
57   - group: "{{ tomcat_group }}"
58   - mode: 0644
59   - notify: Restart Tomcat
60   -
... ...