Skip to main content

Microsoft Azure

On Azure there is nothing to download or import. The Odoo Host Manager is an offer in the Azure Marketplace: you create a virtual machine from it in the Azure portal, with your SSH key, and the machine installs itself on its first boot like every other ready-made image.

The offer's plan is bring your own license (BYOL). Microsoft bills only the Azure resources the machine uses; there is no software charge on your Azure invoice. Without a license the server runs at the unregistered tier, and you install a license later in the console.

Before you start​

  • An Azure subscription in which you may create virtual machines, and a resource group for the server, or the right to create one.
  • A size with 2 vCPU and 4 GB of memory or more, as Hardware describes. A general-purpose size such as Standard_D2as_v6 (2 vCPU, 8 GB) suits most servers; give Odoo more memory as your instances grow.
  • Your SSH public key, or let Azure make a key pair for you while you create the machine.
  • A DNS name you can point at the machine's public address later, for publicly trusted certificates on your Odoo instances. Optional at this point.

The image is x64 Generation 2 and is created as a Trusted launch virtual machine. Sizes that do not offer both are not shown, or refused, when you create the machine.

Download​

None. The image lives in the Azure Marketplace, and Azure copies it into your subscription when you create the machine. The first boot brings the package up to date if a newer release has come out since the image was made.

Import​

  1. In the Azure portal, search for Marketplace and open it.
  2. Search for Odoo Host Manager and select the offer by Antelao.
  3. Choose the BYOL plan and click Create. The Create a virtual machine page opens with the image already chosen.
  4. On Basics:
    • Subscription and Resource group: where the server goes.
    • Virtual machine name: for example odoo-1. This is also the machine's first host name, until you give it a DNS name.
    • Region: close to your users.
    • Security type: Trusted launch virtual machines. Leave Secure Boot and vTPM on.
    • Image: the Odoo Host Manager image, x64 Gen2, as the offer set it.
    • Size: see Before you start.
  5. On Disks, the OS disk is 40 GB. Set a larger OS disk size now if you want more room; the first boot uses it. A Premium SSD suits a production server.
  6. On Networking, keep the new virtual network and public IP Azure proposes, or choose your own.

Give it your SSH key​

Still on Basics, under Administrator account:

  • Authentication type: SSH public key.
  • Username: the account you sign in with, for example azureuser. On Azure this is the machine's administrator, not debian.
  • SSH public key source: Use existing public key and paste the one line from your .pub file, or Generate new key pair and download the private key when the portal offers it.

Under Inbound port rules, set Public inbound ports to Allow selected ports and select SSH (22), HTTP (80) and HTTPS (443). Leave every other port closed, including the console's 5322 if the portal proposes it: you reach the console through an SSH tunnel. Once the machine exists, narrow the SSH rule in its network security group to your own addresses.

Custom data (optional)​

To decide things up front - the server's DNS name, the mail profile, the provisioning domain - open the Advanced tab and put a cloud-config in Custom data. It writes the bootstrap document before the first boot reads it. Every key is optional, and Every key describes each one; the file's place among the server's other files is in Configuration and state.

#cloud-config
write_files:
- path: /etc/antelao/bootstrap.json
owner: root:root
permissions: '0600'
content: |
{
"hostname": "odoo.example.com",
"provisioningDomain": "odoo.example.com"
}

A second file, /etc/antelao/firstboot.env, carries the ANTELAO_INSTALL_* environment variables the installation reads from the environment only, such as the Cloudflare Turnstile keys. Add it to write_files the same way, with permissions: '0600'. The first boot deletes it once the install has stored what it needed.

Azure keeps the custom data with the machine's configuration, and anyone allowed to read the machine in Azure can read it back. Leave passwords out of it unless that is acceptable, and set them in the console after the first sign-in instead.

Then click Review + create, check the summary and the price of the Azure resources, and click Create.

Start it and wait for the first boot​

Azure starts the machine as soon as it is created. The deployment finishes in a minute or two; the first boot then installs the server in the background, which takes about 10 minutes.

The machine's page shows its Public IP address. Help > Boot diagnostics shows the boot messages if you want to watch; the administrator's password never appears there.

Reach the console​

Sign in over SSH with the username you chose:

ssh azureuser@203.0.113.10

While the first boot runs, the login message says so and shows how to follow it. Once it is done, the login message shows the console's address and where the administrator's first password is:

sudo cat /root/antelao-ohm-handoff.json

Then open the console through an SSH tunnel from your own computer, which opens no port on Azure:

ssh -N -L 5322:127.0.0.1:5322 azureuser@203.0.113.10

Browse to https://localhost:5322/ and accept the self-signed certificate once. Point your DNS name at the machine's public address, then carry on with the installation page:

  1. Check the server
  2. Reach the console
  3. Sign in and finish the setup
  4. Create your first instance

Install your license in the console under Server > License; see Installing a license.

Platform notes and troubleshooting​

  • The size is not offered. The image needs a size that supports Generation 2 and Trusted launch. Choose another size family, or another region.
  • SSH times out. Check the network security group allows port 22 from your address, and that you use the public IP address.
  • SSH refuses the key. Sign in with the Username you chose, not debian and not root. Help > Reset password on the machine's page can put a new public key on it.
  • The DNS name. Without one in the custom data, the server is named after the machine. Point an A record at the public address, then rename the server as the login message shows, or see Renaming the server. Azure can also give the public IP address a name of its own under Settings > Configuration on the public IP's page.
  • A static address. Make the public IP address Static on its configuration page before you point DNS at it, so a stop and start does not change it.
  • The management ports. Keep 5322, 5312 and the other management ports out of the network security group, or open them to your own addresses only. See Restricting the management ports.
  • The first boot failed. The login message says FAILED with the reason. See What the first boot does for how to run it again.