Skip to content

Commit f2fd5dd

Browse files
author
Andres Solorzano
committed
Updates bash scripts and config files
1 parent 27855b0 commit f2fd5dd

27 files changed

+471
-406
lines changed

Diff for: .mvn/wrapper/MavenWrapperDownloader.java

-142
This file was deleted.

Diff for: .mvn/wrapper/maven-wrapper.jar

1.17 KB
Binary file not shown.

Diff for: .mvn/wrapper/maven-wrapper.properties

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
# to you under the Apache License, Version 2.0 (the
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
8-
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
1717
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
18-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

Diff for: README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## What is it?
2-
This project uses Quarkus Framework to generate CRUD operations for Quartz jobs that are stored as Tasks records on AWS DynamoDB.
2+
This project uses the Quarkus Framework to generate CRUD operations over Tasks records stored on AWS DynamoDB.
33

44
## Detailed project architecture and components
55
You can find more detail of the configurations and components coded in this project in the following posts:
6-
[Reactive Timer Microservice with Java Quartz, DynamoDB and Quarkus](https://aosolorzano.medium.com/reactive-timer-microservice-with-java-quartz-dynamodb-and-quarkus-bb4cf6e0dc23).
7-
[Deploying Quarkus Native Image Container on AWS Fargate ECS]().
6+
- [Reactive Timer Microservice with Java Quartz, DynamoDB and Quarkus](https://aosolorzano.medium.com/reactive-timer-microservice-with-java-quartz-dynamodb-and-quarkus-bb4cf6e0dc23).
7+
- [Deploying Quarkus Native Image Container on AWS Fargate ECS](https://aosolorzano.medium.com/deploying-a-container-image-with-a-quarkus-native-application-on-aws-fargate-ecs-b09141fe7ff4).
88

99
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/.
1010

@@ -14,6 +14,7 @@ If you want to learn more about Quarkus, please visit its website: https://quark
1414
3. [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
1515
4. GraalVM with OpenJDK 17. You can use [SDKMAN](https://sdkman.io/install).
1616
5. [Maven](https://maven.apache.org/download.cgi).
17+
6. Docker and Docker Compose.
1718

1819
## Running Postgres instance
1920
First, we need to make sure you have a Postgres instance running (Quarkus automatically starts one for dev and test mode). To set up a PostgreSQL database with Docker:
@@ -75,7 +76,7 @@ You can create a native container image as follows:
7576
docker build -f src/main/docker/Dockerfile.multistage \
7677
-t aosolorzano/java-timer-service-quarkus .
7778
```
78-
> **_IMPORTANT:_** Before execute your docker container, export your AWS credential before to pass them to the "docker run":
79+
> **_IMPORTANT:_** Before execute the Timer Service container, export your AWS credential to pass them to the "docker run" command:
7980
```
8081
docker-compose up --scale tasks=2 --scale nginx=1
8182
```
@@ -116,9 +117,9 @@ You can follow the instruction shown in this [tutorial](https://docs.aws.amazon.
116117
Also, you need to follow the instructions shown in this [tutorial](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_Configuration.html) to configure the "ecs-cli" command.
117118

118119
## Related Guides
119-
- Amazon DynamoDB ([guide](https://quarkiverse.github.io/quarkiverse-docs/quarkus-amazon-services/dev/amazon-dynamodb.html)): Connect to Amazon DynamoDB datastore
120-
- Quartz ([guide](https://quarkus.io/guides/quartz)): Schedule clustered tasks with Quartz
120+
- Amazon DynamoDB ([guide](https://quarkiverse.github.io/quarkiverse-docs/quarkus-amazon-services/dev/amazon-dynamodb.html)): Connect to Amazon DynamoDB datastore.
121+
- Quartz ([guide](https://quarkus.io/guides/quartz)): Schedule clustered tasks with Quartz.
121122

122123
## RESTEasy Reactive
123124
Easily start your Reactive RESTful Web Services
124-
[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)
125+
[Related guide section.](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)

Diff for: aws/timer-service-ecs-task-definition.json

+18
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,31 @@
1313
{
1414
"name": "timer-service-container",
1515
"image": "aws_account_id.dkr.ecr.us-east-1.amazonaws.com/timer-service-repository:timer_service_version",
16+
"command": [
17+
"./application", "-Dquarkus.profile=aws", "-Dquarkus.http.host=0.0.0.0"
18+
],
19+
"entryPoint": [],
1620
"portMappings": [
1721
{
1822
"containerPort": 8080,
1923
"hostPort": 8080,
2024
"protocol": "tcp"
2125
}
2226
],
27+
"environment": [
28+
{
29+
"name": "QUARKUS_DATASOURCE_USERNAME",
30+
"value": "postgres"
31+
},
32+
{
33+
"name": "QUARKUS_DATASOURCE_PASSWORD",
34+
"value": "postgres123"
35+
},
36+
{
37+
"name": "QUARKUS_DATASOURCE_JDBC_URL",
38+
"value": "jdbc:postgresql://timer-service-db-cluster.cluster-c393cqt4avmr.us-east-1.rds.amazonaws.com:5432/TimerServiceDB"
39+
}
40+
],
2341
"logConfiguration": {
2442
"logDriver": "awslogs",
2543
"options": {

Diff for: docker-compose.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ services:
88
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
99
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
1010
AWS_DEFAULT_REGION: us-east-1
11-
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://192.168.59.100:5432/timer_service
11+
QUARKUS_DATASOURCE_USERNAME: admin
12+
QUARKUS_DATASOURCE_PASSWORD: admin123
13+
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://192.168.59.100:5432/TimerServiceDB
1214
networks:
1315
- tasks-network
1416
depends_on:
1517
- postgres
1618

1719
# NGINX SERVICE
1820
nginx:
19-
image: nginx:latest
21+
image: nginx:1.21.6
2022
container_name: nginx-webserver
2123
volumes:
2224
- ./nginx.conf:/etc/nginx/nginx.conf:ro
@@ -32,7 +34,7 @@ services:
3234
image: postgres:13.6 # SUPPORTED VERSION BY AWS AURORA SERVERLESS
3335
container_name: timer-service-postgres
3436
environment:
35-
- POSTGRES_DB=timer_service
37+
- POSTGRES_DB=TimerServiceDB
3638
- POSTGRES_USER=admin
3739
- POSTGRES_PASSWORD=admin123
3840
ports:

0 commit comments

Comments
 (0)