Giter Club home page Giter Club logo

cloudformation-aws-farget's Introduction

How to create AWS farget for your Java app

Dokcer-AWS-ECS Jenkins maven server pull a source code from Github, to build jar/war file, send to docker host to build docker image and Push docker image to AWS ECR repository. Then, Running aws cloudformation with below yaml files to deploy docker image on AWS Fargate ECS

  • Create AWS ECR repository command

    $aws ecr create-repository --repository-name << the name of repository >>

  • to loggin to AWS

    $aws ecr get-login --no-include-email | sh

  • create AWS VPC network Run cloudfomation command
    $aws cloudformation create-stack --stack-name vpc --template-body file://$PWD/infrs/vpc.yml

  • If you want to look and copy repository URL in to ecr describe repository do below command
    $aws ecr describe-repositories --repository-name << The name of repository >>

  • tag docker image file ECR repository will shows each version

    $docker tag &lt;&lt; the name of image &gt;&gt; repository_URL/&lt;&lt;Repository_Name&gt;&gt;:v_${BUILD_NUMBER}

  • Push to ECR

    $docker push repository_URL/&lt;&lt;Repository_Name&gt;&gt;:v_${BUILD_NUMBER}

  • Build IAM roles with iam.yml file , and do command as below

    $aws cloudformation create-stack --stack-name iam --template-body file://$PWD/iam.yml --capabilities CAPABILITY_IAM

  • Create app-cluster yaml file then run

    $aws cloudformation create-stack --stack-name app-cluster file://$PWD/app-cluster.yml

  • Run cloudforamtion with api.yml as following

    $aws cloudformation create-stack --stack-name api file://$PWD/api.yml

Port mapping 80:8080, Container port is 8080, and ALB port is 80

cloudformation-aws-farget's People

Contributors

ahmfrank avatar nzhang0430 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.