Vue The Series — Chapter 2.2: Deploy on AWS Elastic Beanstalk
Howdy! , pretty fast from Chapter 2.1 now our application running on EC2.
What we gonna do next?
We will deploy our container to Elastic Beanstalk.
Now I will call it “EB” (Lazy to type 🤭)
Elastic Beanstalk
What is EB look like?
It looks like a Service that you just upload your application and it will automatically handle many things of your service like load balancing, scaling, etc.
for more information click here.
From the first chapter that we have the application and ready to deploy.
We have many ways to deploy our application such as upload by a web browser or using EB CLI.
Create your application env and deploy with EB CLI.
First, make sure you have EB CLI installed on your machine.
$eb --version
EB CLI 3.14.6 (Python 2.7.1)
Let’s create our deployment environment
$eb init
Select a default region: 7) ap-southeast-1 : Asia Pacific (Singapore)
Select an application to use: 2) [ Create new Application ]
Enter Application Name: poseidon-eb
It appears you are using Docker: Y
Select a platform version: 1
Do you wish to continue with CodeCommit?: n
Do you want to set up SSH for your instances?: Y
Select a keypair: 2) [ Create new KeyPair ]
Type a keypair name: aws-eb
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
as you see in command we can config our instance.
$eb create poseidon-eb-app
If you open the All Applications in EB (left-side) you will see poseidon-eb-app is creating. Look inside to your application, if you see createEnvironment is starting your app is ready.
then deploy application
$eb deploy
Take some rest, drink some beer ⏰
When your app already running you can access from your application by URL that on your right side of your application name.
Here we are 🚀
If I want to deploy a new version, how to update the existing application?
You just use deploy command.
$eb deploy
It’s easier right? I don’t even config the security for access the application from the internet (allow port 80) and EB gives you monitoring, health status, etc. for your application.
How can we implement CI (continuous integration) to our application?
Thank you and see you next chapter💪🏻
Thank for review: Bhuridech Sudsee , Pornmongkon Pongsai