mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 15:55:49 +00:00
push all files
This commit is contained in:
parent
100e916e66
commit
acdcc5b154
10 changed files with 81 additions and 0 deletions
29
ansible1.yml
Normal file
29
ansible1.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
---
|
||||
- hosts: dev
|
||||
become: True
|
||||
tasks:
|
||||
- name: Install python pip
|
||||
yum:
|
||||
name: python-pip
|
||||
state: present
|
||||
- name: Install docker
|
||||
yum:
|
||||
name: docker
|
||||
state: present
|
||||
- name: start docker
|
||||
service:
|
||||
name: docker
|
||||
state: started
|
||||
enabled: yes
|
||||
- name: Install docker-py python module
|
||||
pip:
|
||||
name: docker-py
|
||||
state: present
|
||||
- name: Start the container
|
||||
docker_container:
|
||||
name: spring-boot-1
|
||||
image: "suchita2007/spring-boot"
|
||||
state: started
|
||||
published_ports:
|
||||
- 0.0.0.0:8091:8080
|
5
appspec.yml
Normal file
5
appspec.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
version: 0.0
|
||||
os: linux
|
||||
files:
|
||||
- source: ./spring-petclinic-2.4.2.jar
|
||||
destination: /tmp
|
19
buildspec.yml
Normal file
19
buildspec.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
version: 0.2
|
||||
|
||||
phases:
|
||||
install:
|
||||
runtime-versions:
|
||||
java: corretto8
|
||||
build:
|
||||
commands:
|
||||
- echo Build started on `date`
|
||||
- mvn test
|
||||
post_build:
|
||||
commands:
|
||||
- echo Build completed on `date`
|
||||
- mvn package
|
||||
artifacts:
|
||||
files:
|
||||
- target/spring-petclinic-2.4.2.jar
|
||||
- appspec.yml
|
||||
discard-paths: yes
|
13
create_docker_container.yml
Normal file
13
create_docker_container.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- hosts: web-servers
|
||||
become: true
|
||||
tasks:
|
||||
- name: stop previous version docker
|
||||
shell: docker stop suchita_demo
|
||||
- name: remove stopped container
|
||||
shell: docker rm -f suchita_demo
|
||||
- name: remove docker images
|
||||
shell: docker image rm -f suchita2007/suchita_demo
|
||||
|
||||
- name: create docker image
|
||||
shell: docker run -d --name suchita_demo -p 8090:8080 suchita2007/suchita_demo
|
2
inventory.ansible
Normal file
2
inventory.ansible
Normal file
|
@ -0,0 +1,2 @@
|
|||
[dev]
|
||||
172.31.49.240 ansible_user=ec2-user
|
3
scripts/create_or_update_service.sh
Normal file
3
scripts/create_or_update_service.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
ln -s -f /target/spring-petclinic-2.4.2.jar /etc/init.d/cdk-app
|
3
scripts/install_dependencies.sh
Normal file
3
scripts/install_dependencies.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
yum install -y java
|
3
scripts/start_server.sh
Normal file
3
scripts/start_server.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
service cdk-app start
|
4
scripts/stop_server.sh
Normal file
4
scripts/stop_server.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
service cdk-app stop
|
||||
exit 0
|
BIN
spring-petclinic.zip
Normal file
BIN
spring-petclinic.zip
Normal file
Binary file not shown.
Loading…
Reference in a new issue