Set up your EC2 instance as a data application location#
In this article, you will learn how easy it is to deploy a self-hosted managed Odoo Data Application on an EC2 instance.
Signup#
If you do not have an Ametnes Cloud account, sign up here to create one.
Set up an Ametnes Data Application Location#
Create your EC2 Instance.#
In your AWS Console.
- On the left menu, click the Instances link.
- On the top right, click Launch Instances.
- Enter the following information.
- Name: ADAL-Test
- Under Quick Start select : Ubuntu.
- Under Instance Type select : t2-large (or the equivalent of 2vCPU and 8GB RAM in your region).
- Select your key pair or create one.
- Select or create a security group allowing SSH and HTTPS traffic.
- Configure storage for 100Gb.
- Click Launch Instance
Configure the EC2 instance as Data Application Location#
Setup your EC2 instance#
Login into your ec2 instance with
Create the setup script
Location UUID#
In your Ametnes Cloud console account, get the default Application Location with
- Login into your Ametnes Cloud account here.
- Navigate to the Service Locations menu on the left
- Copy the default location's UUID
Configure the location#
After a short while, the Data Application location should come online
in your Ametnes Cloud account.
Create the service#
In your Ametnes console.
- Using the Services left menu link, navigate to the service management dashboard.
- Click New Service.
- Enter the Odoo to filter from the list and select Create
- In the displayed form, enter the following info.
- Enter the Name:
Odoo-Service-DSL1
and Description:Odoo-Service-DSL1
. - Select a Version from the list.
- Select the Location:
Default/Location
. - Enter your desired password.
- Select the Public option.
- Click
Create
.
- Enter the Name:
Test connectivity#
-
Using the Services left menu, navigate to the service management dashboard. Your service should be listed.
Service not showing
If your service list is empty, use the filter at the top right corner, to filter for ALL services.
-
After a while, your Data Application status will change to
ready
. - To the right of your service, click the
Admin
button and you will navigate to your service's details page. - At the bottom of the page, copy the endpoint of your service as well as your username/key and password.
- In your browser, paste the URL
https://<your.instance.host.name>/
. -
Login with: Your Ametnes Cloud account email, your configured password.
EC2 Elastic IP Addresses
If you restart an EC2 instance, AWS will likely assign it a different public IP address. Connectivity to your Odoo instancess will fail since your Odoo instance would have been assigned a DNS name mapped to your previous IP address. To get around this, allocate an Elastic IP address and assign it to your EC2 instance before you run the
setup-location.sh
script.
Clean up#
Delete all services#
- In your Ametnes Cloud console, navigate to the Admin section of each service
- Delete the service.
Summary#
In this post, we explored how to set up your local workstation as an Ametnes Data Application location. This then allowed us to deploy a Odoo service that we were able to connect to.