Skip to content

Commit

Permalink
Cleanup code.
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaprasadreddy committed May 31, 2020
1 parent e82995c commit 9e6a5a9
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Release Package
runs-on: ubuntu-18.04
env:
REPO: ${{ secrets.DOCKER_REPO }}
REPO: ${{ secrets.DOCKER_USER }}/spring-boot-todolist

steps:
- uses: actions/checkout@v1
Expand Down
27 changes: 27 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!groovy
@Library('jenkins-shared-library')
import com.sivalabs.JenkinsSharedLib

properties([
parameters([
booleanParam(defaultValue: false, name: 'PUBLISH_TO_DOCKERHUB', description: 'Publish Docker Image to DockerHub?')
])
])

def DOCKER_USERNAME = 'sivaprasadreddy'
def APP_IMAGE_NAME = 'spring-boot-todolist'

def utils = new JenkinsSharedLib(this, env, params, scm, currentBuild)

node {

try {
utils.checkout()
utils.runMavenTests("Test")
utils.publishDockerImage("Publish Docker Image", DOCKER_USERNAME, APP_IMAGE_NAME)
}
catch(err) {
echo "ERROR: ${err}"
currentBuild.result = currentBuild.result ?: "FAILURE"
}
}
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
# spring-boot-todolist
Deploying SpringBoot Applications

A sample SpringBoot application to learn various deployment options.

## Deployment

### Run SpringBoot application on a Linux VM
1. Create a VM using Vagrant
2. Provision required software using shell scripts
3. Provision required software using Ansible
4. Create a Vagrant box with required softwares pre-installed and publish to VagrantCloud
5. Run SpringBoot application as a Systemd service
6. Run SpringBoot application as a docker container

### Run SpringBoot application on AWS EC2
1. Create an EC2 instance and RDS (Postgres) on AWS using AWS Console
2. Deploy application as a Systemd service using shell scripts/Ansible

### Run SpringBoot application on AWS EC2 using Terraform
1. Create an EC2 instance and RDS (Postgres) on AWS using Terraform
2. Deploy application as a Systemd service using shell scripts/Ansible

### Run SpringBoot application on AWS EC2 using CloudFormation
1. Create an EC2 instance and RDS (Postgres) on AWS using CloudFormation
2. Deploy application as a Systemd service using shell scripts/Ansible

### Run SpringBoot application on AWS EC2 using AWS CDK
1. Create an EC2 instance and RDS (Postgres) on AWS using AWS CDK
2. Deploy application as a Systemd service using shell scripts/Ansible

### Run SpringBoot application on AWS ECS using CloudFormation
1. Create an EC2 instance and RDS (Postgres) on AWS using CloudFormation
2. Deploy application as a docker container

### Run SpringBoot application on AWS EKS
1. Create an EKS Cluster
2. Deploy application as a docker container
28 changes: 0 additions & 28 deletions deployment/vagrant/Vagrantfile

This file was deleted.

54 changes: 0 additions & 54 deletions deployment/vagrant/ansible/playbook.yml

This file was deleted.

This file was deleted.

43 changes: 0 additions & 43 deletions deployment/vagrant/ansible/roles/spring-boot-app/tasks/main.yml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--<configuration>
<configuration>
<executable>true</executable>
</configuration>-->
</configuration>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 9e6a5a9

Please sign in to comment.