Quick launch on Elastic Beanstalk
Let's learn how to quickly launch Metabase on Elastic Beanstalk. These are the absolute minimum number of steps needed:
- After you sign in to the AWS Management Console as the root user, open a new browser tab, and visit .
- Halfway down the page, you will find a link in purple font reading Launch Metabase on Elastic Beanstalk. Click this link.
- Your browser will redirect you to the AWS console with a prompt to Create a Web App. Note that if you were in any other region than Northern Virginia up to this point, clicking this link will change your default region to Northern Virginia.
Many of the fields in the Create a web app form will be pre-populated:
- The Application Name field should be populated with Metabase.
- The Environment Name field should read Metabase-env.
- The Platform section as of this writing will have the platform set as Docker, the Platform Branch set as Docker running on 64bit Amazon Linux 2, and the Platform version set as 3.1.0.. These could change in the future, but whatever is defaulted to here is what you should go with.
- In the Application Code section, click the radio button next to Upload your code. Doing so should reveal a URL under the Public S3 URL radio button. The URL should be from https://downloads.metabase.com.s3.amazonaws.com with a path to the current version's zip file, as in Figure 2.2:
- Once you've done that, you may click the Review and launch button at the bottom of the page.
Now we will learn how to configure our app's environment using the minimum number of steps.
Configuring your application for quick launch
After clicking Review and launch, you will be taken to the configuration page. Here, you will see 12 different cards laid out in a 4x3 grid. The only cards that will need attention are the Capacity, Network, and Database ones:
Let's learn how to configure our Capacity environment for our app.
Capacity
In the Capacity card, scroll down to Instance type. The default value should be t2.small. This is the recommended EC2 instance size for Metabase. However, it is not available on the AWS Free tier, so to keep things free, change it to t2.micro.
Click Save at the bottom of the form to return to the configuration page. Next, we'll configure the Network card.
Network
In the Network card, notice the information prompt reading This environment is not part of a VPC. VPC stands for Virtual Private Cloud and can be thought of as a virtual network, created and maintained by AWS, to simulate a traditional network. A VPC helps you limit traffic to internal resources for security purposes. Later on in the chapter, we'll create our own VPC, but for now, this is all you need to know about them. To fill out this card, we will do the following:
- Click Edit on the Network card to reach the Modify Network page.
- In the Virtual Private Cloud section, there will be a dropdown with your default VPC populating it. When you create an account with AWS, it automatically sets up a VPC for you in each region.
Important note
If, by chance, you see a message reading Your account doesn't have a default VPC for this region, click the link to create a default VPC.
Since this section is the quick launch one, I will not go into detail about what anything on this page means. All will be explained in the next section. For now, all you need to do is the following:
- Set Load Balancer Visibility to Public.
- Check all boxes to On next to the availability zones in the Load Balancer settings.
- Check the box next to Public IP Address in Instance Settings to On.
- Check all the boxes to On next to availability zones in Instances Settings and Databases.
Our network configuration is now done, and we can proceed to set up our application database.
Database
The next card that requires attention is the Database card. Recall that when we deployed Metabase with Heroku in Chapter 1, Overview of Metabase, the deployment process created a Postgres database to serve as the application database. This step accomplishes that same task. Here is what we need to do:
- Click the Edit button in the Database card to open up the page. You'll be taken to another form to fill out, with two red callouts, as shown in figure 2.4:
- Choose a username, for example, mbAppDB.
- Choose a password. I recommend keeping all your credentials organized since we'll be creating quite a few throughout this book.
- To keep AWS costs at zero, change Instance class to db.t2.micro. Keeping it at the default value of db.t2.small will cause you to incur charges.
- Click Save.
Important Note:
Recently a bug in AWS was introduced that may cause the Database card section to malfunction. If you are unable to select values in the Database card form, please visit https://github.com/PacktPublishing/Metabase-Up-and-Running/tree/master/chapter2 for alternative instructions that will unblock you.
You'll be taken back to the page with the 12 cards. At this point, you've done all the configuration needed and you may click Create app. This will trigger the creation of your app's environment, after which you will have successfully deployed Metabase.
Now that we've learned the simple and quick way to deploy, next we will learn how to deploy using best practices. We will also go into greater detail with explanations so that you can understand exactly what each step is accomplishing.