docs: Add missing image on the Azure container instances page

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3517
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: a3b8925cea198a2cf9994062f2741536e4a9ee31
This commit is contained in:
Divya Bhushan 2022-01-31 22:19:11 +05:30 committed by hasura-bot
parent 84df556e47
commit 149f4b53d5
2 changed files with 21 additions and 38 deletions

View File

@ -15,9 +15,7 @@ Hasura GraphQL engine on Azure with Container Instances and Postgres
Introduction
------------
This guide talks about how to deploy the Hasura GraphQL engine on `Azure
<https://azure.microsoft.com>`__ using `Container Instances
<https://azure.microsoft.com/en-us/services/container-instances/>`__ with `Azure
This guide talks about how to deploy the Hasura GraphQL engine on `Azure <https://azure.microsoft.com>`__ using `Container Instances <https://azure.microsoft.com/en-us/services/container-instances/>`__ with `Azure
Database for PostgreSQL server <https://azure.microsoft.com/en-us/services/postgresql/>`__.
One-click deploy using ARM Template
@ -31,24 +29,24 @@ All resources mentioned in this guide can be deployed using the one-click button
.. tab:: With a new Postgres Server
.. image:: https://azuredeploy.net/deploybutton.png
.. image:: /img/graphql/core/deployment/deploybutton.png
:width: 200px
:alt: azure_deploy_button_new_pg
:class: no-shadow
:target: https://portal.azure.com/#create/Microsoft.Template/uri/https%3a%2f%2fraw.githubusercontent.com%2fhasura%2fgraphql-engine%2fstable%2finstall-manifests%2fazure-container-with-pg%2fazuredeploy.json
(This button takes you to the Azure Portal, you might want to :kbd:`Ctrl+Click` to
(This button takes you to the Azure Portal. You might want to :kbd:`Ctrl+Click` to
open it in a new tab. Read more about this Resource Manager Template `here <https://github.com/hasura/graphql-engine/tree/stable/install-manifests/azure-container-with-pg>`__).
.. tab:: With an existing Postgres Server
.. image:: https://azuredeploy.net/deploybutton.png
.. image:: /img/graphql/core/deployment/deploybutton.png
:width: 200px
:alt: azure_deploy_button_existing_pg
:class: no-shadow
:target: https://portal.azure.com/#create/Microsoft.Template/uri/https%3a%2f%2fraw.githubusercontent.com%2fhasura%2fgraphql-engine%2fstable%2finstall-manifests%2fazure-container%2fazuredeploy.json
(This button takes you to the Azure Portal, you might want to :kbd:`Ctrl+Click` to
(This button takes you to the Azure Portal. You might want to :kbd:`Ctrl+Click` to
open it in a new tab. Read more about this Resource Manager Template `here <https://github.com/hasura/graphql-engine/tree/stable/install-manifests/azure-container>`__).
@ -59,11 +57,9 @@ Pre-requisites
here <https://azure.microsoft.com/en-us/free/>`__ for a free trial).
- `Azure CLI <https://docs.microsoft.com/en-us/cli/azure/install-azure-cli>`__.
The actions mentioned below can be executed using the Azure Portal and the Azure CLI. But,
for the sake of simplicity in documentation, we are going to use Azure CLI, so
that commands can be easily copy-pasted and executed.
The actions mentioned below can be executed using the Azure Portal and the Azure CLI. But for the sake of simplicity in documentation, we are using Azure CLI; so that commands can be easily copy-pasted and executed.
Once the CLI is installed, login to your Azure account:
Login to your Azure account once you install the CLI.
.. code-block:: bash
@ -72,8 +68,7 @@ Once the CLI is installed, login to your Azure account:
Create a new Resource Group
---------------------------
As the name suggestes, Resource Groups are used to group together various
resources on Azure. We'll create a resource group called ``hasura`` at the
As the name suggests, Resource Groups group together various resources on Azure. We'll create a resource group called ``hasura`` at the
``westus`` location.
.. code-block:: bash
@ -85,8 +80,7 @@ Provision a PostgreSQL server
.. note::
If you already have a database setup, you can skip these steps and jump
directly to :ref:`azure_allow_access`.
If you already have a database setup, you can skip these steps and jump directly to :ref:`azure_allow_access`.
Once the resource group is created, we create a Postgres server instance:
@ -102,12 +96,10 @@ Once the resource group is created, we create a Postgres server instance:
.. note::
Choose a unique name for ``<server_name>``. Also choose a strong password for
``<server_admin_password>``, including uppercase, lowercase and numeric characters.
This will be required later to connect to the database
Choose a unique name for ``<server_name>``. Also, select a strong password for ``<server_admin_password>``, including uppercase, lowercase, and numeric characters. This will be required later to connect to the database
(make sure you escape the special characters depending on your shell).
Note down the hostname. It will be shown as below in the output:
Note the hostname, that will be shown as below in the output:
.. code-block:: bash
@ -119,8 +111,7 @@ Note down the hostname. It will be shown as below in the output:
.. note::
If you get an error saying ``Specified server name is already used``, change
the value of ``--name`` (``<server_name>``) to something else.
If you get an error saying ``Specified server name is already used``, change the value of ``--name`` (``<server_name>``) to something else.
Create a new database
---------------------
@ -138,7 +129,7 @@ Create a new database on the server:
Allow access to Azure Services
------------------------------
Create a firewall rule allowing acess from Azure internal services:
Create a firewall rule allowing access from Azure internal services:
.. code-block:: bash
@ -178,14 +169,12 @@ If you'd like to connect to an existing database, use that server's database url
username-password from hostname, we need to url-escape it in the username.
Any other special character should be url-encoded.
If the ``<dns-name-label>`` is not available, choose another unique name and
execute the command again.
If the ``<dns-name-label>`` is unavailable, choose another unique name and re-execute the command.
Open the Hasura Console
-----------------------
That's it! Once the deployment is complete, navigate to the container instance's
IP or hostname to open the Hasura console:
That's it! Once the deployment is complete, navigate to the container instance's IP or hostname to open the Hasura console:
.. code-block:: bash
@ -194,8 +183,7 @@ IP or hostname to open the Hasura console:
--query "{FQDN:ipAddress.fqdn,ProvisioningState:provisioningState}" \
--out table
The output will contain the FQDN in the format
``<dns-name-label>.westus.azurecontainer.io``.
The output contains the FQDN in the format ``<dns-name-label>.westus.azurecontainer.io``.
Visit the following URL for the Hasura console:
@ -214,23 +202,18 @@ You can create tables and test your GraphQL queries here.
Troubleshooting
---------------
If your password contains special characters, check if they were URL encoded
and given as environment variables. Also check for proper escaping of
these characters based on your shell.
If your password contains special characters, check if they were URL encoded and given as environment variables. Also, check for proper escaping of these characters based on your shell.
You can check the logs to see if the database credentials are proper and if
Hasura is able to connect to the database.
You can check the logs to see if the database credentials are proper and if Hasura is able to connect to the database.
If you're using an existing/external database, make sure the firewall rules for
the database allow connection for Azure services.
If you're using an existing/external database, make sure the firewall rules for the database allow connection for Azure services.
.. _azure_logs:
Checking logs
^^^^^^^^^^^^^
If the console is not loading, you might want to check the logs and see if something
is wrong:
If the console is not loading, you might want to check the logs and see if something is wrong:
.. code-block:: bash
@ -242,7 +225,7 @@ is wrong:
Tearing down
------------
To clean-up, just delete the resource group:
Delete the resource group to cleanup:
.. code-block:: bash

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB