AWS - Elastic Beanstalk, Exercises
Exercises
EXERCISE 6.1
Deploy Your Application
In this exercise, you will sign up for an AWS account.
- Verify that your source code is packaged as a .zip file and is ready to be retrieved from either your source repository directory or an Amazon S3 bucket.
- You can choose a sample application available from the AWS Management Console.
- Launch the AWS Management Console.
- To select a region in which to launch the application, select AWS Elastic Beanstalk ➢ Region.
- Select AWS Elastic Beanstalk Service.
- Select Get Started or Create New Application. The Get Started option takes you through a wizard of guided steps to launch your first application. After this initial start, the Create New Application dialog box will be displayed for future launches.
- Select the type of application that you want to deploy.
- Enter an application name.
- Select the application platform for your code.
- For your coding language, select the preconfigured platform.
- Select Upload your application.
- Locate the file directory where your .zip file of your code resides or choose the Amazon S3 bucket with the .zip file and select Upload.
- Choose Next.
- To use the architecture with high availability, select High Availability.
- Modify the configurations for your architecture.
- Select Add databases.
- Select RDS database.
- Choose Create App (Application).
- You now have successfully deployed an application on Elastic Beanstalk.
EXERCISE 6.2
Deploy a Blue/Green Solution
In this exercise, you will deploy a blue/green solution.
- Sign in to your AWS account.
- Navigate to your existing AWS Elastic Beanstalk environment and application or upload the sample.
- You can launch a sample application from this location:
- https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/tutorials.html
- Clone your environment or launch a new environment with your new version.
- Deploy the second application version to the new environment. Test that the new version is running.
- From the new environment dashboard, select Actions ➢ Swap Environment URLs.
- Under Select an Environment to Swap, select the current environment name.
- Choose Swap.
- The Elastic Beanstalk service swaps the CNAME records between the two environments.
- On the dashboard, under Recent Events, verify the swap.
You have successfully deployed a blue/green solution on AWS Elastic Beanstalk.
EXERCISE 6.3
Change Your Environment Configuration on AWS Elastic Beanstalk
In this exercise, you will change your environment configuration on AWS Elastic Beanstalk. Use an existing application that is running on Elastic Beanstalk.
- Sign in to your AWS account.
- Navigate to your existing AWS Elastic Beanstalk environment and application.
- Choose Configuration.
- On the Capacity Configuration tab, choose Modify.
- Under Auto Scaling Group, select Load balanced.
- In the Instances row, change Max to 4 and Min to 2.
- On the Modify capacity page, choose Save.
- On the Configuration overview page, choose Apply.
- On the warning message, choose Confirm.
- The environment might take a few minutes to update. After your environment is updated, verify your changes.
- Navigate to the Amazon EC2 service dashboard.
- Choose Load Balancers.
- Check for the instance-id value that matches your Elastic Beanstalk environment instance-id value and view the load balancers.
You have successfully changed an environment configuration on AWS Elastic Beanstalk.
EXERCISE 6.4
Update an Application Version on AWS Elastic Beanstalk
In this exercise, you will update an application version on AWS Elastic Beanstalk from the AWS Management Console.
- Sign in to your AWS account.
- Upload a second version your application that matches the configuration for your current running environment.
- If you are using a sample solution application, you can find other versions at the following address:
- https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.html#GettingStarted.Walkthrough.DeployApp
- On the AWS EB applications page, select getting-started-app.
- Select GettingStartedApp-env.
- In Overview, choose Upload and Deploy.
- Select Choose File and upload the next version of your source bundle that you created or downloaded.
- The console is automatically populated with the version label based on the name of the archive that you upload. For later deployments, if you use a source bundle with the same name, you must type a unique version label.
- Choose Deploy. Elastic Beanstalk deploys your application to your Amazon EC2 instances.
- You can view the status of the deployment on the environment’s dashboard. The Environment Health status turns gray while the application version is being updated. When deployment is complete, Elastic Beanstalk executes an application health check. The status reverts to green when the application responds to the health check. The environment dashboard shows the new running version as the new version label. Your new application version is added to the table of application versions.
- To view the table, select Application Versions.
- You have updated an application version on AWS Elastic Beanstalk.
Comments
Post a Comment