Self-hosted deployment

Deploy on Azure

Generate and manage your reports inside your own Azure environnement using Container Apps

Introduction

Deploying Carbone in an Azure Container Apps environment is a very simple and effective way of implementing high-performance document generation while respecting your security and operation processes.

You can use Carbone Community feature for free without licence. To use Carbone Enterprise Edition on Azure, you need a Carbone license. Talk to us to find out more.

Quickstart

Create Azure storage for persistent data

1. Create Storage accounts for Carbone

Go to Storage accounts section in Azure portal and click on Create:

Storage creation step 1

Then set storage name, following carbonestorage, click on Review + create and Create again:

Storage creation step 2

2. Create Template and Render containers

When the Storage Account creation is finalized, you can create 2 containers.

Click on Create in Data storage / Containers section :

Storage creation step 3

Then, create 2 containers : templatesand renders.

Storage creation step 4

3. Get credentials

Finally, you need to get Storage Account Name and Account key form Azure portail. Go to Security + Network / Access Key settings.

Storage creation step 5

Keep these two values for the next step.

Create Carbone service

Go to Container Apps portail, and Create new Container App:

Service creation step 1

Create container carbone with following configuration.

Basic

Service creation step 2

Container

Service creation step 3

Service creation step 4

Ingress

For test simple setup, enable full access and set port to 4000:

Service creation step 5

Enjoy Carbone

Your service is then available via the url of your Container App.

Configuration

Template and Render storage

As indicated in the quick start section, we recommend that you configure the Azure Blob Storage plugin to store rendering templates.

To do this, set the CARBONE_USE_AZURE_PLUGIN environment variable to true, then configure the variables below.

Azure Blob Storage Configuration

Enable Studio

Just set CARBONE_EE_STUDIO to true to enable Carbone Studio on your instance.

Authentification

To enable API authentification, you need to follow these steps :

- Set CARBONE_EE_AUTHENTICATION to true

- Generate private/public Carbone Key

The key generation tool is included in the docker image from Carbone version 5 onwards.

docker run -it --platform "linux/amd64" carbone/carbone-ee:slim-5.0.0-beta.0 generate-keys

The two keys will be generated and displayed in the console.

Conservez le contenu de la clé privé de manière sécurisé. Pour la clé publique, nous vous recommandons de la stocker dans le Key vaults Azure puis de monter ce secret sur vos containers Carbone sur le fichier /app/config/key.pub.

- Generate JWT token

Follow interactive shell :

docker run -it --platform "linux/amd64" carbone/carbone-ee:slim-5.0.0-beta.0 generate-token

## Paste in terminal content of key.pem

A JWT token is then displayed in the console. You can then use it in your API calls.

Terraform sample deployement

Carbone autoscaling deployment with secret storage

A complete terraform deployment example is available.