Skip to content

This project was started to run the gacha API writen by Golang on AWS. Built an API for creating basic applications and designed the infrastructure for operation. It can be run locally with docker-compose. The production will be operated using AWS ECS, AWS RDS (Aurora), etc...

License

Notifications You must be signed in to change notification settings

ren510dev/gacha-api

🏃 gacha-api: Deploy the simple API on Amazon Web Services

Go Language License

Concept of this project

This project was started to run the gacha API writen by Golang on AWS.
Built an API for creating basic applications and designed the infrastructure for operation.
It can be run locally with docker-compose. The production will be operated using AWS ECS, AWS RDS (Aurora), etc...

Overview

First, I would like to be able to use basic AWS services as I catch up.
Then, touching and learning the features of each service, and desire to utilize the technology selection process in the future.
Additionally, this product is designed with The Twelve-Factor App in mind as well as catch-up.
For example, "auto-scale", "load-balancing", "monitoring and notification", "log-collection and log-analysis".
Finally, I will actively incorporate technologies in which we are interested.

Concept of DevOps architecture

architecture

Deployment by CI/CD

dev.png Continuous Integration pushes the Docker image to the ECR via yaml (run) configured in the github workflows.
Image information is defined in JSON and stored in S3.
CodePipeline uses S3 as a source and pull image from ECR and deploy to ECS.
This is typically a continuous deployment.

Design of infrastructure

ops.png First, for fault tolerance, set up separate instances in different Availability-Zone and deploy ALB to distribute traffic.
Additionally, in order to achieve a more production-like service, I used Route53 and added domain names to the operation.
Connection information to Aurora was set up using Systems Manager's ParameterStore with environment variables to enable secure connections.
Finally, in conjunction with CI/CD, we were aware of Immutable Infrastructure so as not to change the configuration of the infrastructure once it was built.
This allows for continuous DevOps even after the start of operations.

Monitoring and Notification 

maintenance.png

  • Monitoring
    When deployed, the system detects CodePipeline events and notifies Slack in combination with AWS's SNS and AWS's Chatbot.
    Additionally, UptimeRobot is incorporated as a monitoring tool and the entire service is monitored externally.

  • Logging
    I used Lambda and Kinesis DataFirehose for logging.
    Typically, this would be completed by Logs Insights. However, I would like to deal with various technologies. This is my concept!
    The acquired logs are stored in S3 and queries are executed from Athena (Glue).

Requirement

Language/FrameWork Version
go 1.18
npm 8.9.0
python 3.9.0
docker-compose 2.5.0
aws-cli 2.7.0

Project managers

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/GotoRen/gacha-api.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Code of Conduct

Everyone interacting in this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

LICENSE

MIT License

About

This project was started to run the gacha API writen by Golang on AWS. Built an API for creating basic applications and designed the infrastructure for operation. It can be run locally with docker-compose. The production will be operated using AWS ECS, AWS RDS (Aurora), etc...

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •