File tree Expand file tree Collapse file tree 6 files changed +36
-40
lines changed Expand file tree Collapse file tree 6 files changed +36
-40
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
---
2
- f5_lb_method : ' round-robin'
3
- f5_monitors : ' /Common/http'
4
- f5_pool_name : ' http_pool'
5
- f5_provider :
6
- server : " {{ f5_bigip_server }}"
7
- user : " {{ f5_bigip_user }}"
8
- password : " {{ f5_bigip_password }}"
9
- server_port : 8443
10
- f5_virtual_server : ' webapp_vip'
11
- infoblox_username : ' cloudadmin'
12
- nios_provider :
13
- host : " {{ grid_manager }}"
14
- username : " {{ infoblox_username }}"
15
- password : " {{ infoblox_password }}"
16
- paloalto_username : ' admin'
17
- subnet_netmask : ' 255.255.255.0'
18
- vm_domain : ' domain.com'
19
- vm_network : ' VM Network'
20
- webapp_port : 80
21
- workflow_tower_inventory : ' VMWare_Workflow'
2
+ app_artifact_id : " hello"
3
+ artifact_extension_type : " jar"
4
+ app_folder : " /opt/app"
5
+ app_group_id : " com.redhat.app"
6
+ app_version : " 1.0"
7
+ maven_repository_url : " http://nexus.domain.com:8081/repository/maven-releases/"
8
+ web_app_url : " http://app-server1:9080/hello
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : " Check for any existing running process of {{ app_name }}"
3
- shell : " ps -ef | grep {{ app_name }} | grep -v grep | awk '{print $2}'"
3
+ shell : " ps -ef | grep {{ app_artifact_id }}-{{ app_version }} | grep -v grep | awk '{print $2}'"
4
4
register : app_process_id
5
5
6
6
- name : Terminate existing process
7
7
command : " kill -9 {{ app_process_id.stdout }}"
8
8
when : app_process_id.stdout != ''
9
9
10
- - name : Copy Package
11
- copy :
12
- src : " /tmp/ {{ app_name }}.jar "
13
- dest : " {{ app_folder }}/{{ app_name }}.jar "
10
+ - name : Remove any existing artifact
11
+ file :
12
+ path : " {{ app_folder }}/ {{ app_artifact_id }}-{{ app_version }}.{{ artifact_extension_type }} "
13
+ state : absent
14
14
15
- - name : Deploy Software
16
- shell : " nohup java -jar {{ app_folder }}/{{ app_name }}.jar &"
15
+ - name : Download artifact
16
+ maven_artifact :
17
+ group_id : " {{ app_group_id }}"
18
+ artifact_id : " {{ app_artifact_id }}"
19
+ repository_url : " {{ maven_repository_url }}"
20
+ extension : " {{ artifact_extension_type }}"
21
+ version : " {{ app_version }}"
22
+ dest : " {{ app_folder }}/{{ app_artifact_id }}-{{ app_version }}.{{ artifact_extension_type }}"
23
+
24
+ - name : Deploy artifact
25
+ shell : " nohup java -jar {{ app_folder }}/{{ app_artifact_id }}-{{ app_version }}.jar &"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Perform simple health checks to ensure web page is still running properly
3
+ uri :
4
+ url : " {{ web_app_url }}"
5
+ method : GET
6
+ return_content : yes
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Check that web app is still running after updates
3
+ hosts : localhost
4
+ gather_facts : false
5
+
6
+ roles :
7
+ - sanity_test
You can’t perform that action at this time.
0 commit comments