mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 06:45:49 +00:00
Create deploy.yml
This commit is contained in:
parent
91fa97102f
commit
aeae224096
1 changed files with 51 additions and 0 deletions
51
deploy.yml
Normal file
51
deploy.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
---
|
||||||
|
- hosts: QA
|
||||||
|
tasks:
|
||||||
|
- name: Install add-apt-repostory
|
||||||
|
become: yes
|
||||||
|
apt: name=software-properties-common state=latest
|
||||||
|
|
||||||
|
- name: Add Oracle Java Repository
|
||||||
|
become: yes
|
||||||
|
apt_repository: repo='ppa:webupd8team/java'
|
||||||
|
- name: Accept Java 8 License
|
||||||
|
become: yes
|
||||||
|
debconf: name='oracle-java8-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select'
|
||||||
|
|
||||||
|
- name: Install Oracle Java 8
|
||||||
|
become: yes
|
||||||
|
apt: name={{item}} state=latest
|
||||||
|
with_items:
|
||||||
|
- oracle-java8-installer
|
||||||
|
- ca-certificates
|
||||||
|
- oracle-java8-set-default
|
||||||
|
|
||||||
|
- name: Create Folder
|
||||||
|
file:
|
||||||
|
path: /home/ubuntu/tomcat
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
owner: ubuntu
|
||||||
|
group: ubuntu
|
||||||
|
|
||||||
|
- name: Download Tomcat
|
||||||
|
get_url: url=https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.27/bin/apache-tomcat-8.0.27.tar.gz dest=/home/ubuntu/tomcat
|
||||||
|
|
||||||
|
- name: Extract archive
|
||||||
|
unarchive: src=/home/ubuntu/tomcat/apache-tomcat-8.0.27.tar.gz dest=/home/ubuntu/tomcat remote_src=yes
|
||||||
|
|
||||||
|
- name: Download Application
|
||||||
|
get_url: url=https://s3-us-west-1.amazonaws.com/tejanew/petclinic.war dest=/home/ubuntu/
|
||||||
|
- name: start apache-tomcat-8.0.27
|
||||||
|
command: /home/ubuntu/tomcat/apache-tomcat-8.0.27/bin/startup.sh
|
||||||
|
|
||||||
|
- name: copy petclinic.war
|
||||||
|
shell: cp /home/ubuntu/petclinic.war /home/ubuntu/tomcat/apache-tomcat-8.0.27/webapps/
|
||||||
|
|
||||||
|
- name: stop apache-tomcat-8.0.27
|
||||||
|
command: nohup "/home/ubuntu/tomcat/apache-tomcat-8.0.27/bin/shutdown.sh"
|
||||||
|
|
||||||
|
- name: start apache-tomcat-8.0.27
|
||||||
|
command: nohup "/home/ubuntu/tomcat/apache-tomcat-8.0.27/bin/startup.sh"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue