Publish

Your project is configured to be deployed on AWS. You mostly need to use two of the commands we created to build and publish an image:

  1. Execute docker:debug to test, build, tag, run, tail, and launch your app in a browser to test the image:
$ npm run docker:debug
  1. Execute aws:release to configure Docker login with AWS, publish your latest image build, and release it on ECS:
 $ npm run aws:release
  1. Verify that your tasks are up and running at the Service level:
AWS ECS Service
Ensure that running count and desired count are the same.
  1. Verify that your instances are running at the Task level:
AWS ECS task instance

Note the Public IP address and navigate to it; for example, http://54.164.92.137 and you should see your application or LemonMart running.

  1. Verify that the Load Balancer setup is correct at the DNS level.

 

  1. Navigate to the ALB DNS address, for example http://lemon-mart-alb-1871778644.us-east-1.elb.amazonaws.com, and confirm that the app renders, as follows:
LemonMart running on AWS Fargate

Et voilĂ ! Your site should be up and running.

In subsequent releases, following your first, you will be able to observe blue-green deployment in action, as shown:

AWS Service during Blue-Green Deployment

There are two tasks running, with two new ones being provisioned. While the new tasks are being verified, running count will rise up to four tasks. After the new tasks are verified and the connections from old ones drained, the running count will return to two.

You can automate your deployments by configuring CircleCI with your AWS credentials, using a container that has the awscli tool installed and running npm Scripts for AWS. With this technique, you can achieve Continuous Deployment to a staging environment or Continuous Delivery to a production environment.

This is all great, but how much does a basic highly-available configuration cost? Let's examine that in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.194.57