Skip to content

Commit

Permalink
Add self-hosting docs for Azure Container Instances
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Dec 19, 2023
1 parent d0b8998 commit 5bed258
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
"self-hosting/deployment-options/kubernetes-helm",
"self-hosting/deployment-options/aws-ec2",
"self-hosting/deployment-options/gcp-cloud-run",
"self-hosting/deployment-options/azure-container-instances",
"self-hosting/deployment-options/docker-compose",
"self-hosting/deployment-options/digital-ocean-marketplace",
"self-hosting/deployment-options/fly.io"
Expand Down
87 changes: 87 additions & 0 deletions docs/self-hosting/deployment-options/azure-container-instances.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: "Azure Container Instances"
description: "Deploy Infisical with Azure Container Instances"
---

Prerequisites:
- Have an account with [Microsoft Azure](https://azure.microsoft.com/en-us)

<Note>
This brief goes over how to deploy an instance of Infisical with Azure Container Instances without TLS/SSL configuration.

There are various options for enabling TLS/SSL with Azure Container Instances more suitable for production including:
- [Enabling a TLS endpoint in a sidecar container](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-container-group-ssl).
- [Enabling automatic HTTPS with Caddy in a sidecar container](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-container-group-automatic-ssl).
- Using Azure Function Proxies, Application Gateway, etc.
</Note>

<Steps>
<Step title="Create a container instance in Azure Container Instances">
1.1. In Azure, navigate to the **Container Instances** solution and press **Create**.

![Azure container instance](/images/self-hosting/deployment-options/azure-container-instances/aci-select-container-instances.png)

![Azure create container instance](/images/self-hosting/deployment-options/azure-container-instances/aci-create-container-instance.png)

1.2. In the **Basics** section, specify the **Subscription** and **Resource group** to manage the deployed resource.

Also, give the container a friendly name like Infisical and specify a **Region** for it to be deployed to.

![Azure container instance basics](/images/self-hosting/deployment-options/azure-container-instances/aci-create-container-instance-basics-1.png)

Next, select the **Public** option under **Image type** and fill in your intended [Infisical public Docker image](https://hub.docker.com/r/infisical/infisical) in the **Image** field; this will pull the image from Docker Hub.

For example, in order to opt for Infisical `v0.43.4`, you would input: `infisical/infisical:v0.43.4`.

![Azure container instance basics](/images/self-hosting/deployment-options/azure-container-instances/aci-create-container-instance-basics-2.png)

<Note>
Depending on your use-case and requirements, you may find it helpful to further configure your Azure container instance.

For example, you may want to adjust the **Region** option to specify which region to deploy the container for your
instance of Infisical to minimize distance and therefore latency between the instance and your infrastructure.
</Note>

1.3. In the **Networking** section, select the **Public** option under **Networking type**; this will make the container accessible over the public internet.

Next, under the **Ports** section, add an entry for port `8080` and protocol `TCP`.

![Azure container instance networking](/images/self-hosting/deployment-options/azure-container-instances/aci-create-container-instance-networking.png)

1.4. Running Infisical requires a few environment variables to be set for the GCP Cloud Run service.
At minimum, Infisical requires that you set the variables `ENCRYPTION_KEY`, `AUTH_SECRET`, `MONGO_URL`, and `REDIS_URL`
which you can read more about [here](/self-hosting/configuration/envars).

In the **Advanced** section, fill in the required environment variables.

<Note>
To use more features like emailing and single sign-on, you can set additional configuration options [here](/self-hosting/configuration/envars).
</Note>

![Azure container instance advanced](/images/self-hosting/deployment-options/azure-container-instances/aci-create-container-instance-advanced.png)

1.5. Finally, in the **Review + create** section, double check the information from the previous steps and press **Create** to create the Azure container instance.

![Azure container instance review](/images/self-hosting/deployment-options/azure-container-instances/aci-create-container-instance-review.png)
</Step>
<Step title="Navigate to your deployed instance of Infisical">

Head to the **Overview** page of the newly-created container instance to view its **IP address (Public)**; you can access your instance of Infisical by this IP address under the port `:8080`.

For example, in the image below, the IP address of the sample deployed container instance is `4.255.87.109`; the instance would be accessible in the browser by heading to `4.255.87.109:8080`.

![Azure container instance overview](/images/self-hosting/deployment-options/azure-container-instances/aci-container-instance-overview.png)
</Step>
</Steps>

<AccordionGroup>
<Accordion title="Do you have any recommendations for deploying Infisical with Azure Container Instances?">
Yes, here are a few that come to mind:
- In step 1.2, we recommend pinning the Docker image to a specific [version of Infisical](https://hub.docker.com/r/infisical/infisical/tags)
instead of referring to the `latest` tag to avoid any unexpected version-to-version migration issues.
- In step 1.2, we recommend selecting a **Region** option that is closest to your infrastructure/clients to reduce latency.
- Enable TLS/SSL with Azure Container Instances. There are various options for doing so including [enabling a TLS endpoint in a sidecar container](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-container-group-ssl), [enabling automatic HTTPS with Caddy in a sidecar container](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-container-group-automatic-ssl), and using Azure Function Proxies, Application Gateway, etc.

We're working on putting together a fuller list of deployment best practices as well as minimum resource configuration requirements for running Infisical so stay tuned!
</Accordion>
</AccordionGroup>
7 changes: 6 additions & 1 deletion docs/self-hosting/deployment-options/gcp-cloud-run.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Prerequisites:

2.2. In the service creation form, select the **Deploy one revision from an existing container image** option and fill in your intended [Infisical public Docker image](https://hub.docker.com/r/infisical/infisical) in the container image URL.

For example, in order to opt for Infisical `v0.43.4`, you would use the following URL: `docker.io/infisical/infisical:v0.43.4`.
For example, in order to opt for Infisical `v0.43.4`, you would input: `docker.io/infisical/infisical:v0.43.4`.

![GCP Cloud Run create service docker image specification](/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-docker-image.png)

Expand All @@ -48,6 +48,11 @@ Prerequisites:

Finally, press **Create** to finish setting up the GCP Cloud Run service.
</Step>
<Step title="Navigate to your deployed instance of Infisical">
Head to the **Service details** of the newly-created service to view its URL; you can access your instance of Infisical by clicking on the URL.

![GCP Cloud Run service details](/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-service-details.png)
</Step>
</Steps>

<AccordionGroup>
Expand Down
7 changes: 7 additions & 0 deletions docs/self-hosting/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,11 @@ Choose from a variety of deployment options listed below to get started.
>
Deploy Infisical with GCP Cloud Run
</Card>
<Card
title="Azure Container Instances"
color="#ea5a0c"
href="deployment-options/azure-container-instances"
>
Deploy Infisical with Azure Container Instances
</Card>
</CardGroup>

0 comments on commit 5bed258

Please sign in to comment.