Skip to content

Commit e5c44d9

Browse files
committed
navigation improvements in README
1 parent 3abb807 commit e5c44d9

File tree

1 file changed

+98
-91
lines changed

1 file changed

+98
-91
lines changed

README.md

Lines changed: 98 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
- [Asynchronous Microservices Components](#asynchronous-microservices-components)
2626
- [Bridging Synchronous and Asynchronous Components In DriveDeposits Microservices](#bridging-synchronous-and-asynchronous-components-in-drivedeposits-microservices)
2727
- [Deployment of Microservices](#deployment-of-microservices)
28-
- Serverless: AWS using SAM which uses CloudFormation under the
29-
hood[#serverless-aws-using-sam-which-uses-cloudformation-under-the-hood]
30-
- Server-based: Run the REST and gRPC servers Natively, With Docker Compose And
31-
Kubernetes![#server-based-run-the-rest-and-grpc-servers-natively-with-docker-compose-and-kubernetes]
28+
- [Serverless: AWS using SAM which uses CloudFormation under the hood](#serverless-aws-using-sam-which-uses-cloudformation-under-the-hood)
29+
- [Server-based: Run the REST and gRPC servers Natively, With Docker Compose And Kubernetes!](#server-based-run-the-rest-and-grpc-servers-natively-with-docker-compose-and-kubernetes)
30+
- [Test microservices integration](#test-microservices-integration)
31+
- [Test AWS Lambda microservice directly](#test-aws-lambda-microservice-directly)
3232
- [Hybrid Integration Testing Tool](#hybrid-integration-testing-tool)
3333
- [Running Tests](#running-tests)
3434
- [Integration tests](#integration-tests)
@@ -296,7 +296,7 @@ microservices ecosystem.
296296

297297
### Deployment of Microservices
298298

299-
- Serverless: AWS using SAM which uses CloudFormation under the hood
299+
#### Serverless: AWS using SAM which uses CloudFormation under the hood
300300

301301
This project uses SAM (Serverless Application Model) for deploying the following AWS resources that support our
302302
microservices architecture:
@@ -313,146 +313,156 @@ microservices application.
313313
This project also utilizes the [Justfile](https://github.com/casey/just) for managing project-level recipes and
314314
microservices deployment tasks.
315315

316-
#### Deploy all serverless microservices and AWS resources
316+
- **Deploy all serverless microservices and AWS resources**
317317

318318
`just deploy-drive-deposits-dynamodb-queries`
319319

320320
This command calls dependent recipes to deploy the entire microservices ecosystem, including the event bus, event rules
321321
with lambda targets, and lambda functions for queries.
322322

323-
#### Delete all serverless microservices and AWS resources
323+
- **Delete all serverless microservices and AWS resources**
324324

325325
`just deployed-delete-drive-deposits-event-bus`
326326

327327
This command calls dependent recipes to delete all deployed microservices and resources, including event rules, lambda
328328
targets, event bus, and query-related resources.
329329

330-
#### Deploy event bridge with event rules and target lambda microservices components
330+
- **Deploy event bridge with event rules and target lambda microservices components**
331331

332332
`just deploy-drive-deposits-event-rules`
333333

334334
This command deploys the event-driven components of our microservices architecture, including EventBridge, EventBus, and
335335
related resources.
336336

337-
#### Deploy Lambda Function with API Gateway and DynamoDB Reader microservices components
337+
- **Deploy Lambda Function with API Gateway and DynamoDB Reader microservices components**
338338

339339
`just deploy-drive-deposits-dynamodb-queries-only`
340340

341-
- Server-based: Run the REST and gRPC servers Natively, With Docker Compose And Kubernetes!
342-
- **Natively** (without Docker)
341+
#### Server-based: Run the REST and gRPC servers Natively, With Docker Compose And Kubernetes!
343342

344-
`just run-drive-deposits-grpc-server`
343+
- **Natively** (without Docker)
345344

346-
`just run-drive-deposits-rest-grpc-gateway-server`
345+
`just run-drive-deposits-grpc-server`
347346

348-
- **Docker Compose**
349-
Start Docker Desktop first.
347+
`just run-drive-deposits-rest-grpc-gateway-server`
350348

351-
Then run:
349+
- **Docker Compose**
350+
Start Docker Desktop first.
352351

353-
`just compose-up-grpc-server`
352+
Then run:
354353

355-
`just compose-up-rest-server`
354+
`just compose-up-grpc-server`
356355

357-
- **Kubernetes** (It uses local images to show k8s for local)
358-
Install and start Colima with Kubernetes enabled:
359-
```bash
360-
brew install colima
361-
colima start --cpu 2 --memory 4 --kubernetes
362-
```
363-
When you run colima start --kubernetes, Colima automatically:
356+
`just compose-up-rest-server`
364357

365-
Creates a new Docker context named "colima"
366-
Creates a new Kubernetes context
367-
Sets both contexts as current/active
368-
Updates ~/.docker/config.json for Docker context
369-
Updates ~/.kube/config for Kubernetes context
358+
- **Kubernetes** (It uses local images to show k8s for local)
359+
Install and start Colima with Kubernetes enabled:
360+
```bash
361+
brew install colima
362+
colima start --cpu 2 --memory 4 --kubernetes
363+
```
364+
When you run colima start --kubernetes, Colima automatically:
365+
366+
Creates a new Docker context named "colima"
367+
Creates a new Kubernetes context
368+
Sets both contexts as current/active
369+
Updates ~/.docker/config.json for Docker context
370+
Updates ~/.kube/config for Kubernetes context
371+
372+
List all available Docker and Kubernetes contexts:
373+
```bash
374+
docker context list
375+
kubectl config get-contexts
376+
```
370377

371-
List all available Docker and Kubernetes contexts:
378+
Verify your Docker and Kubernetes context:
372379
```bash
373-
docker context list
374-
kubectl config get-contexts
380+
docker context show
381+
kubectl config current-context
375382
```
383+
Docker also stores context information in ~/.docker/config.json and Kubernetes stores context information in ~
384+
/.kube/config.
376385

377-
Verify your Docker and Kubernetes context:
378-
```bash
379-
docker context show
380-
kubectl config current-context
381-
```
382-
Docker also stores context information in ~/.docker/config.json and Kubernetes stores context information in ~
383-
/.kube/config.
384-
385-
You can always switch back to Colima's context when needed using:
386-
```bash
387-
docker context use colima
388-
kubectl config use-context colima
389-
```
386+
You can always switch back to Colima's context when needed using:
387+
```bash
388+
docker context use colima
389+
kubectl config use-context colima
390+
```
390391

391-
Install Helm if not already installed:
392+
Install Helm if not already installed:
392393

393-
```bash
394-
brew install helm
395-
```
394+
```bash
395+
brew install helm
396+
```
396397

397-
Add and update the nginx-ingress Helm repository:
398+
Add and update the nginx-ingress Helm repository:
398399

399-
```bash
400-
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
401-
helm repo update
402-
helm repo list
403-
```
400+
```bash
401+
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
402+
helm repo update
403+
helm repo list
404+
```
404405

405-
Install the nginx-ingress controller:
406+
Install the nginx-ingress controller:
406407

407-
```bash
408-
helm install ingress-nginx ingress-nginx/ingress-nginx
409-
```
408+
```bash
409+
helm install ingress-nginx ingress-nginx/ingress-nginx
410+
```
410411

411-
Monitor the nginx ingress controller logs:
412+
Monitor the nginx ingress controller logs:
412413

413-
```bash
414-
kubectl logs -l app.kubernetes.io/name=ingress-nginx -f
415-
```
414+
```bash
415+
kubectl logs -l app.kubernetes.io/name=ingress-nginx -f
416+
```
416417

417-
Only if using ingress controller:
418-
Add the domain to your /etc/hosts:
418+
Only if using ingress controller:
419+
Add the domain to your /etc/hosts:
419420

420-
```bash
421-
echo "127.0.0.1 api.drivedeposits.local" | sudo tee -a /etc/hosts
422-
```
421+
```bash
422+
echo "127.0.0.1 api.drivedeposits.local" | sudo tee -a /etc/hosts
423+
```
423424

424-
Create AWS credentials secret for the gRPC server:
425+
Create AWS credentials secret for the gRPC server:
425426

426-
```bash
427-
kubectl create secret generic aws-credentials \
428-
--from-literal=AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
429-
--from-literal=AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
430-
--from-literal=AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION
431-
```
427+
```bash
428+
kubectl create secret generic aws-credentials \
429+
--from-literal=AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
430+
--from-literal=AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
431+
--from-literal=AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION
432+
```
432433

433-
To verify the secret:
434+
To verify the secret:
434435

435-
```bash
436-
kubectl get secret aws-credentials -o json
437-
```
436+
```bash
437+
kubectl get secret aws-credentials -o json
438+
```
438439

439-
Deploy the services:
440+
Deploy the services:
440441

441-
```bash
442-
just k8s-grpc-server
443-
just k8s-rest-server
444-
```
442+
```bash
443+
just k8s-grpc-server
444+
just k8s-rest-server
445+
```
445446

446-
The REST API will now be accessible at http://api.drivedeposits.local
447+
The REST API will now be accessible at http://api.drivedeposits.local
447448

448449
#### Test microservices integration
449450

450451
In justfile set
452+
451453
for native and docker-compose:
454+
455+
```justfile
452456
rest_gateway_server_host := "http://localhost:3000"
457+
```
458+
453459
And
460+
454461
for k8s with ingress:
462+
463+
```justfile
455464
rest_gateway_server_host := "http://api.drivedeposits.local"
465+
```
456466

457467
Send an HTTP request to the REST gateway server, which communicates with other microservices:
458468

@@ -517,11 +527,8 @@ This streamlined approach significantly enhances development efficiency and syst
517527

518528
#### AWS Populated with Basic Data for Queries Lambda
519529

520-
##### Using REST gateway and gRPC Servers: start
521-
522-
`just run-drive-deposits-grpc-server`
523-
524-
`just run-drive-deposits-rest-grpc-gateway-server`
530+
See [Deployment of Microservices](#deployment-of-microservices) section for deploying the microservices and AWS
531+
resources.
525532

526533
##### send curl post requests to populate
527534

0 commit comments

Comments
 (0)