Deploy the Environment
Mục lục
Create a new Application
- Find
Elastic Beanstalkand select Elastic Beanstalk.
- Select Applications and then click Create application.
- Enter
fcj-aws-applicationfor Application name. Click Create.
Create a new Environment
- Go to the console of our fcj-aws-application application and click Create new application.
- In Environment tier, Select Web server environment.
- Type
fcj-aws-application-prod-envfor both Environment name and Domain.
- Click Check availability to check if your name is valid.
- In Platform, select Managed platform for Platform type and then choose .NET Core on Linux.
- Select Sample application for Application code to utilize AWS providing source code.
- In Presets section, select High availability for building high availability environment.
- Click Next.
- Select Create and use new service role to generate new service role automatically.
- Select aws-keypair and fcj-aws-ec2-instance-profile created in the previous steps.
- Click Next.
- Select fcj-aws-vpc.
- Select 2 Private Subnet for Instance Subnets.
- Scroll down then select Next.
- Select 1 minute for Monitoring interval, that means EC2 instance will send metrics for each minute.
- When initialization, Elastic Beanstalk creates a new Security Group for EC2 Instance, so we can skip EC2 security groups section.
- Select Load balanced for Environment type then type the number of minimum instances and maximum instances.
- Instance types, select t2.micro.
- In the Load balancer subnets section, select 2 Public Subnet.
- Select Application load balancer and Dedicated for Load balancer type.
- Select Next.
- Select Enhanced for Health reporting system.
- Select Activated for Log streaming so we can view logs using CloudWatch.
- Enter your email to receive significant messages from Elastic Beanstalk Environment.
- Deployment policy select Rolling and leave others as their default values.
-
Deployment policy types:
- All at once: Deploy the new version to all instances simultaneously. All instances in your environment are out of service for a short time while the deployment occurs.
- Rolling: Deploy the new version in batches. Each batch is taken out of service during the deployment phase, reducing your environment’s capacity by the number of instances in a batch.
- Rolling with additional batch: Deploy the new version in batches, but first launch a new batch of instances to ensure full capacity during the deployment process.
- Immutable: Deploy the new version to a fresh group of instances by performing an immutable update.
- Traffic splitting: Deploy the new version to a fresh group of instances and temporarily split incoming client traffic between the existing application version and the new one.
- Select Activated for Instance log streaming.
- Select Next.
- Review your choices and select Submit.
- Wait for about 10 minutes for the environment to be created.