How to Upload Multiple Files to Aws Elastic Beanstalk
v0.42 / Operations Guide / Running Metabase on Elastic Beanstalk
Covered in this guide:
- Running Metabase on AWS Elastic Beanstalk
- Quick Launch
- Footstep 1 - Creating the Awarding
- Application information
- Environment information
- Platform
- Stride two - Configure the bones Metabase architecture
- 2.1 Enabling enhanced health checks
- 2.two Enabling VPC
- 2.3 Terminal step and deploy
- Step 3 - Wait for your environment to showtime
- Optional extras
- Instance Details
- Application Database creation inside Elastic Beanstalk configuration (non recommended)
- Permissions
- Set or change environment variables
- Notifications
- Deploying New Versions of Metabase on Elastic Beanstalk
This quick launch setup is intended for testing purposes only, and is not intended for production use. We'll focus on deploying Metabase with a unmarried instance and the embedded H2 database with the following components:
- a region (where your Metabase awarding will exist)
- a network (where your application will reside and interact with other applications or servers if needed)
- a security group (a firewall, for keeping everything secure)
- a load balancer (to make this deployment future proof and likewise provide features similar HTTPS or Web Application Firewall security features) If you want to encounter a high-level architectural diagram of what y'all will achieve once y'all follow this guide, click here.
If you would like a reliable, scalable and fully managed Metabase, please consider Metabase Cloud.
Quick Launch
Download the Metabase Customs Edition AWS source bundle file to upload to Elastic Beanstalk.
Metabase provides several pre-configured Elastic Beanstalk launch URLs to help you get started. Open i of the links below in a new tab to create an Rubberband Beanstalk deployment with a few choices pre-filled. Then just follow the footstep-by-step instructions below to consummate your installation.
Cull your region based on the proximity of your users, or if you have strict regulatory requirements that don't let yous spin up servers in other countries:
- US-East-one North Virginia
- The states-East-2 Ohio
- United states of america-West-1 North California
- US-west-ii Oregon
- CA-Central-ane Canada
- EU-n-ane Stockholm
- EU-West-three Paris
- EU-W-2 London
- Eu-West-one Ireland
- EU-Central-one Frankfurt
- AP-S-1 Mumbai
- AP-Northeast-ane Tokyo
- AP-Northeast-2 Seoul
- AP-Southeast-1 Singapore
- AP-Southeast-2 Sydney
- SA-due east-1 São Paulo
After clicking any launch URL, you should see a screen that looks like this:
Step 1 - Creating the Application
Awarding information
Elastic Beanstalk is organized into Applications and Environments, then to get started nosotros need to create a new application. You lot can customize the application name in instance you lot need other than the default one.
Environment information
Here's where y'all can pick the environment proper name and the domain URL that y'all want to use for your Metabase instance. The environment name is merely the label you're assigning to this instance of Metabase.
Equally for the domain URL, Experience free to become artistic — just call back that the URL for your Metabase instance must be unique beyond all AWS Rubberband Beanstalk deployments, so you'll have to choice something that nobody else is already using. We ofttimes recommend something like mycompanyname-metabase
. If y'all don't care nigh the URL you can merely get out it to whatever Amazon inputs by default. Just be aware that this can't be changed afterwards.
Platform
While most of the fields here will exist correctly pre-filled by following the launch URL above, you'll just demand to do 2 things:
- Make sure Platform is prepare to
Docker
, with the platform co-operative dropdown set toDocker running on 64bit Amazon Linux two
, and Platform version to the one that has a(Recommended)
tag. - Change the Awarding code setting to
Upload your code
.
- In the Source code origin section click the
Choose file
push with theLocal File
radio button selected and upload the file you dowloaded at the very beginning of this guide (metabase-aws-eb.zip
):
These settings will run the Metabase application using the official Metabase Docker epitome on Dockerhub.
Click Review and launch. You'll exist directed to a page to configure and launch your instance.
2.one Enabling enhanced health checks
To prepare your load balancer, yous'll demand to enable enhanced health checks for your Elastic Beanstalk environment.
Click on the Edit
link under the Load Balancer section as seen here:
Select Application Load Balancer
in the Load Balancer type if not already selected.
In the Processes section, select the default process and click on Actions
→ Edit.
The Wellness check path is where the Load balancer asks the awarding if its good for you and then it can transport traffic to. Set this path to /api/wellness
Afterward configuring this health check you lot tin can click on Salve
at the bottom of the page.
2.2 Enabling VPC
A Virtual Private Deject (VPC) is a virtual network you can employ to isolate resource. Inside these VPC'southward, you can create subnets, firewall rules, road tables and many more than. It'due south one of the foundational features of AWS, and you can learn more about it here.
You must configure your Application launch in a VPC, otherwise you'll receive an error when creating it as AWS no longer supports launching instances outside VPC's. To utilize a VPC, caput to the Network section in the configuration and click on the Edit
button.
Once within the Network configuration, you need to select the VPC where the Application will exist. If you lot oasis't created a VPC, then AWS creates a default
VPC per region that you can utilize.
You need to select at least two zones where the Load Balancer volition residuum the traffic, and at least i zone where the instance will exist. For the load balancer to ship traffic to a living instance, there has to exist a zone in common.
Later configuring the zones for both the load balancer and the application, click Save at the bottom of the page.
2.3 Concluding step and deploy
Now become to the Capacity section and click Edit.
The only modify you need to do here is to reduce the number of Instances from iv (the default number) to 1, as we all the same oasis't created a centralized database where Metabase will save all of its configurations and will be using only the embedded H2 database which lives inside the Metabase container and is not recommended for production workloads as there will be no manner to backup and maintain that database. When your example is restarted for any reason you lot'll lose all your Metabase data. If yous are just doing a quick trial of Metabase that may exist okay but otherwise yous would like to start creating your database engine in RDS separately or deploy one a split server. You can take a expect at the Metabase at Scale article we wrote about how you tin build redundant and scalable Metabase architectures.
Now click on Relieve
at the lesser of the page and you tin now click on Create App
at the cease of the Configuration page to kickoff creating the environment.
Step 3 - Look for your environs to commencement
This can take a little while depending on AWS. It'south not uncommon to see this take ten-15 minutes, so experience free to do something else and come back to check on it. What's happening hither is each part of the surroundings is beingness provisioned with AWS'south infrastructure automation functionality named CloudFormation (then y'all can run across the detailed progress for the creation of your environment if yous open up CloudFormation in another tab).
When it'due south all done you should see something similar this:
To see your new Metabase instance, simply click on the link under your environment name in the top-left (it will end with .elasticbeanstalk.com
)
Now that y'all've installed Metabase, it's time to set it up and connect it to your database.
In that location are many means to customize your Elastic Beanstalk deployment, but usually modified settings include:
Instance Details
-
Example type
(Instances
block) is for picking the size of AWS instance you want to run. Nosotros recommend at to the lowest degreet3a.pocket-size
for most uses. You can ever scale vertically by changing this configuration. -
EC2 key pair
(Security
block) is merely needed if you want to SSH into your instance directly which is not recommended.
Application Database creation inside Elastic Beanstalk configuration (not recommended)
When you hit the Create App
button, AWS Rubberband Beanstalk creates a CloudFormation template. This template means that the database volition be created with the Elastic Beanstalk stack, and removed when you remove the application.
If you want to employ a production-grade database based on best practices to persist all Metabase configurations you lot accept to create i in RDS separately or manage your own on a divide server and and so connect the Rubberband Beanstalk instance/s with the RDS database through environment variables.
If you want to continue on this path and you know what y'all are doing, and so: await for the Database configuration pane every bit below. and click on the Edit
button.
The database settings screen volition give you lot a number of options for your application database. Regarding individual settings, we recommend:
-
Snapshot
should be left asNone
. -
Engine
should be ready topostgres
. Metabase likewise supports MySQL/Maria DB as backing databases, but only on a split running RDS connected via environment variables. Trying to follow these steps and selecting MySQL volition upshot in an error. -
Engine version
can only be left on the default, which should exist the latest version. - For
Instance class
you can choose any size, but we recommenddb.t2.small
or larger for production installs. Metabase is pretty efficient and then at that place is no need to brand this a big example. - You can safely leave
Storage
to the default size. - Pick a
Username
andCountersign
for your database. We suggest y'all hold onto these credentials in a password manager, equally they can exist useful for things like backups or troubleshooting. These settings volition be automatically made available to your Metabase instance. - You can safely leave the
Retention setting
asCreate snapshot
. - Under
Availability
we recommend the default value ofLow (1 AZ)
for most circumstances.
Once yous've entered a password and clicked Salvage
, a message volition appear maxim that an RDS database should have at least 2 Avalability Zones selected, and then you will have to go again to the Network options and select at least two Availability Zones for the Database. We recommend using the same Availability Zone as where the instance resides since you will exist charged for cross-zone traffic otherwise.
Permissions
If this is your first time creating an application for Rubberband Beanstalk then you will exist prompted to create a new IAM office for your launched application. Nosotros recommend but leaving these choices to their defaults.
When yous click Next
a new tab will open in your browser and y'all volition be prompted to create a new IAM role for use with Rubberband Beanstalk. Again, just accept the defaults and click Allow
at the bottom of the page.
Set or alter surroundings variables
In order to configure environs variables for your Elastic Beanstalk deployment (due east.thou., to connect the deployment to a separate RDS database), click on your Metabase environs in Elastic Beanstak, go to Configuration → Software, and look for the Environment Properties in the bottom.
In the Environs Properties section, you'll be able to set or modify the variables for configuring your Metabase deployment.
Notifications
For a simple mode to go along tabs on your application, enter an e-mail address in the Notifications cake to become notifications about your deployment and any changes to your awarding.
Upgrading to the side by side version of Metabase is a very simple process where you lot will catch the latest published Rubberband Beanstalk deployment file from Metabase and upload information technology to your Application Versions
listing. From at that place information technology'due south a couple clicks and you're upgraded.
Here's each step:
- Go to Elastic Beanstalk and select your
Metabase
application. - Click on
Application Versions
on the left nav (you can also chooseApplication Versions
from the dropdown at the top of the page). - Download the latest Metabase Elastic Beanstalk deployment file:
- https://downloads.metabase.com/v0.42.four/metabase-aws-eb.nil
- Upload a new Application Version:
- Click the
Upload
button on the upper right side of the listing. - Give the new version a name, ideally including the Metabase version number (eastward.g. v0.42.4).
- Select
Choose File
and navigate to the file yous just downloaded. - Click the
Upload
button to upload the file. - After the upload completes make sure y'all see your new version in the Awarding Versions listing.
- Click the
- Deploy the new Version:
- Click the checkbox adjacent to the version yous wish to deploy.
- Click the
Deploy
button in the upper correct side of the page. - Select the Environment you wish to deploy the version to using the dropdown list.
- Click the
Deploy
button to begin the deployment. - Wait until all deployment activities are completed, and so verify the deployment by accessing the Metabase application URL.
Once a new version is deployed, you can safely delete the old Application Version. We recommend keeping at to the lowest degree 1 previous version available for a while in case yous desire to revert for any reason.
Source: https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-elastic-beanstalk.html
0 Response to "How to Upload Multiple Files to Aws Elastic Beanstalk"
Post a Comment