Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From Code to Cloud: Turbocharging your Java App...

Anca Ghenade
December 13, 2024
8

From Code to Cloud: Turbocharging your Java Apps for AWS

Slides for the presentation at the JUG SF on Dec 11th 2024

Anca Ghenade

December 13, 2024
Tweet

More Decks by Anca Ghenade

Transcript

  1. 2. Developing on a local machine, they soon find out

    that there are lots of dependencies with resources in the cloud
  2. 3. They realize that the dev & test loop is

    extremely slow and tedious. Every local change needs to be packaged and uploaded to the cloud for testing.
  3. 4. Now someone has a red build on their feature

    branch, but can’t efficiently test and debug their code in the CI/CD pipeline.
  4. 5. The whole team is using Git flow for development

    - one CI build per feature branch. There is an explosion of different environments required for development (branches x developers).
  5. 6. The manager approaches the team and complains that AWS

    dev/test resources are not being cleaned up properly causing cost spikes.
  6. What is LocalStack and how can it help you? A

    fully functional local cloud stack that was born out of these exact concerns.
  7. • Enables a highly efficient dev & test loop for

    cloud apps • Ships as a Docker image, easy to install and start up • Support for 100 (-ish) services (and growing): ◦ compute (Lambda, ECS, EKS) ◦ various databases (DynamoDB, RDS) ◦ messaging (SQS, Kinesis, MSK) ◦ some sophisticated/exotic APIs (Athena, Glue) • CI integrations & advanced collaboration features • Branching out into other areas: Chaos Engineering, IAM Security Testing, Cloud Ephemeral Environments, 3rd Party Extensions, etc
  8. Let’s find a solution for each and every one of

    those issues and move fast to get to our goal.
  9. Number 1: Development (Follow the instructions in the README file,

    using terraform-local + “dev” profile)
  10. Two ways of doing that: • Manually testing while developing

    👆 • Along with your code tests using Testcontainers 👇
  11. Number 3: Testing Code Please use this repo for this

    use-case: https://github.com/tinyg210/terraform-testcontainers-shipmen t-list-demo (It’s the same project, without generating random bucket names - for ease of use)
  12. • Automated Testing • Continuous Deployment • Integration Testing •

    Code Quality Analysis • Infrastructure as Code (IaC) Validation • Containerization and Orchestration • Feature Branch Testing • Rollbacks and Blue/Green Deployments • Performance Testing and Scalability • Automated Documentation Generation
  13. • Automated Testing • Continuous Deployment • Integration Testing •

    Code Quality Analysis • Infrastructure as Code (IaC) Validation • Containerization and Orchestration • Feature Branch Testing • Rollbacks and Blue/Green Deployments • Performance Testing and Scalability • Automated Documentation Generation
  14. Number 5: PR Preview & final checks (.github/workflows/ci.yml) When the

    GitHub Actions pipeline runs successfully a snapshot (Cloud Pod) of the LocalStack instance is taken and used to create a remote instance, which will have the connection URL displayed after creation.
  15. Number 6: Deployment to AWS Run the backend using the

    profile “prod” + use Terraform with the same main.tf file.