Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs.en-us/articles/rest-pki/core/on-premises/azure/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Rest PKI Core - Setup on Azure App Services

<!-- link to version in Portuguese -->
<div data-alt-locales="pt-br"></div>

<!--
> [!NOTE]
> The documentation for this system is currently under construction. We apologize for any inconvenience this may cause. Please
> contact us if there's any information you need that is not currently documented.

## See also

* [Installing Rest PKI Core on Azure App Services](install.md)
* [Updating Rest PKI Core on Azure App Services](update.md)
* [Troubleshooting](troubleshoot/index.md)
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Installing Rest PKI Core on Azure App Services

<!-- link to version in Portuguese -->
<div data-alt-locales="pt-br"></div>

## See also

* [Updating Rest PKI Core on Azure App Services](update.md)
* [Troubleshooting](troubleshoot/index.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Rest PKI Core - Checking the system logs (Azure App Services)

The standard location on table of the system log is `AppLogs` of **Azure Storage** account, created for the system on the installation moment.

To check which account and table are being used, go to **App Services** &gt; (select the app service) &gt; **Configuration** and check the value of the settings `Serilog:WriteTo:0:Args:connectionString` and `Serilog:WriteTo:0:Args:storageTableName`.

> [!NOTE]
> Some errors, usually those that occur during system startup, may not be logged in the system log file.
> To diagnose such errors, see [Troubleshooting startup errors](startup-errors.md).
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Troubleshooting issues on your Rest PKI Core instance (Azure App Services)

Common issues:

* *HTTP Error 500.30 - ANCM In-Process Start Failure* upon accessing the website - see [Troubleshooting startup errors](startup-errors.md)
* *HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure* upon accessing the website - see [Troubleshooting startup errors](startup-errors.md)

> [!NOTE]
> If the issue you are encountering is not listed here, try [checking the system logs](check-logs.md) or contact us.

## See also

* [Checking the system logs](check-logs.md)
* [Troubleshooting startup errors](startup-errors.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Troubleshooting startup errors (Azure App Services)

Upon starting up your [on-premises instance](../../index.md) of [Rest PKI Core](../../../index.md) hosted on [Azure App Services](../index.md), you might encounter one
of the following errors:

* *HTTP Error 500.30 - ANCM In-Process Start Failure*
* *HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure*

In either case, follow the steps below to enable the startup logs.

## Enabling startup logs

Access the App Service's files through FTP, navigate to the folder */site/wwwroot* and and copy the *web.config* file over to your computer.

Then, change the `aspNetCore` element, setting the `stdoutLogEnabled` attribute to `true`.

For instance, suppose the `aspNetCore` element is initially as follows:

```xml
<aspNetCore processPath="dotnet" arguments=".\Lacuna.RestPki.Site.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
```

After changing the `stdoutLogEnabled` attribute to `true`, it would then look like:

```xml
<aspNetCore processPath="dotnet" arguments=".\Lacuna.RestPki.Site.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
```

Also confirm that the attribute `stdoutLogFile` has the value `.\logs\stdout` as above.

Copy the *web.config* file back to the App Service's folder */site/wwwroot*, replacing the old file.

Wait a few seconds and attempt to access the site again, then refresh the App Service's files on your FTP access. There should be a new folder called *logs*. Navigate
into it and inspect the files. They should reveal the cause of the error.

> [!WARNING]
> Remember to set the `stdoutLogEnabled` attribute back to `false` once your diagnostic is complete, since this will generate a large amount of log data and might
> impair performance.

## See also

* [Troubleshooting issues on your Rest PKI Core instance](index.md)
9 changes: 9 additions & 0 deletions docs.en-us/articles/rest-pki/core/on-premises/azure/update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Updating Rest PKI Core on Azure App Services

<!-- link to version in Portuguese -->
<div data-alt-locales="pt-br"></div>

## See also

* [Installing Rest PKI Core on Azure App Services](install.md)
* [Troubleshooting](troubleshoot/index.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Configure HTTPS redirection - Rest PKI Core

If you have a valid SSL certificate for your [Rest PKI](../index.md) [on-premises instance](index.md)
and have enabled SSL, you may want to redirect users reaching your instance through HTTP to the HTTPS endpoint.

To enable HTTPS redirection, change the section **Bindings** of the configuration file:

* **HttpsMode**: set to `RedirectPages`
* **SslPort**: if your HTTPS endpoint is not on port 443, set the port here

## See also

* [Rest PKI on-premises](index.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1. De volta às configurações do App Service, clique em **Custom domains**
1. Clique em **+ Add custom domain**
1. Selecione **All other domain services**
1. Deixe selecionadas as opções **App Service Managed Certificate** e **SNI SSL**
1. Em *Domain*, preencha o domínio (ex: `app.patorum.com`)
1. Clique em **Validate**
1. Após a validação, clique em **Add**
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Criação de um *Container registry*

Siga os procedimentos abaixo para criar um *container registry* para armazenar localmente uma cópia das imagens de Docker do sistema:

1. Na opção **Container registries**, clique em **+ Create**
1. Na primeira aba (*Basics*)
* Preencha os dados conforme a sua infraestrutura (seguindo a região escolhida para o sistema)
* Tome nota do *registry name* escolhido
* Em *SKU*, escolha **Basic**
1. Clique em **Review + create**, em seguida em **Create**
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Criação do banco de dados

Siga os procedimentos abaixo para criar um banco de dados para o sistema (você precisa ter um *SQL Server* previamente criado):

1. Na opção **SQL databases**, clique em **+ Create**
1. Na primeira aba (*Basics*), preencha os dados conforme a sua infraestrutura (seguindo a região escolhida para o sistema)
1. Clique na aba **Additional settings**
1. Em **Collation** preencha `Latin1_General_100_CI_AI`
1. Clique em **Review + create**
1. Clique em **Create**

> [!WARNING]
> A *collation* do banco de dados **PRECISA SER** `Latin1_General_100_CI_AI`. Criar o banco de dados com uma *collation* diferente provavelmente fará com que a instalação falhe!

Uma vez concluida a criação do banco de dados, clique em **Go to resource**. Em seguida, obtenha a *connection string*:

1. Clique em **Connection strings**
1. Tome nota da connection string exibida na seção **ADO.NET (SQL authentication)**

> [!NOTE]
> Substitua na connection string copiada o trecho `{your_password}` pela senha do banco de dados
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
> [!NOTE]
> Nas instruções abaixo, utilizaremos como exemplo a criação do apontamento para o domínio `app.patorum.com`

1. Em **DNS zones**, clique na zona à qual o domínio pertence (ex: `patorum.com`)
1. Clique em **+ Record set**
1. Em *Name*, digite a porção mais à esquerda do domínio (ex: `app`)
1. Em *Type*, selecione **CNAME**
1. Em *Alias record set*, selecione **No**
1. Em *Alias*, preencha o domínio do App Service (ex: `meu-app-service.azurewebsites.net`)
1. Clique em **OK**
1. Clique novamente em **+ Record set**
1. Em *Name*, digite `asuid.` seguido da porção mais à esquerda do domínio (ex: `asuid.app`)
1. Em *Type*, selecione **TXT**
1. Em *Value*, cole o valor do **Custom Domain Verification ID** anteriormente copiado do App Service
1. Clique em **OK**

> [!NOTE]
> Caso você não utilize o Azure como servidor de DNS das zonas, realize o procedimento equivalente no seu servidor de DNS
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Criação de uma *storage account*

Precisamos de uma *storage account* para armazenar arquivos (o sistema armazena arquivos fora do banco de dados para mantê-lo organizado) e também os
logs de sistema. Siga os passos abaixo para criar uma *storage account* (caso queira utilizar uma conta existente, pule essa parte):

1. Em **Storage accounts**, clique em **+ Create**
1. Na primeira aba (*Basics*), preencha os dados conforme a sua infraestrutura (seguindo a região escolhida para o sistema)
* Em *Performance*, escolha **Standard**
* Em *Redundancy*, escolha a opção que preferir (sugerimos a opção **Zone-redundant storage (ZRS)** -- <a href="https://azure.microsoft.com/documentation/articles/storage-redundancy/" target="_blank">clique aqui</a>
para detalhes sobre as diferentes opções de replicação)
1. Clique em **Review**
1. Clique em **Create**

Uma vez concluída a criação da *storage account*, clique em **Go to resource**. Em seguida, obtenha uma *connection string*:

1. Nas configurações da *storage acount*, clique em **Access keys**
1. Na seção **key1**, tome nota do valor do campo **Connection string**
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Criação do App Service

Siga os procedimentos abaixo para criar um *App Service* (você precisa ter um *App Service Plan* previamente criado com sistema operacional **Linux**):

1. Em **App Services**, clique em **+ Create** em seguida em **+ Web App**
1. Na primeira aba (*Basics*), preencha os dados conforme a sua infraestrutura (seguindo a região escolhida para o sistema)
* Em *Publish*, escolha **Docker Container**
* Em *Operating System*, escolha **Linux**
* Em *Region*, escolha a região onde está o seu *app service plan*
* Em *Linux Plan* , escolha o seu *app service plan*
* Clique em **Next : Docker &gt;**
1. Na aba seguinte (*Docker*), preencha:
* Em *Options*, deixe a opção **Single Container**
* Em *Image Source*, selecione **Azure Container Registry**
* Em *Registry*, selecione o *container registry* criado anteriormente
* Em *Image* e *Tag*, selecione a imagem/tag do sistema conforme o comando `az acr import` realizado anteriormente
* Deixe a opção *Startup Command* **em branco**
* Clique em **Review + create**
1. Clique em **Create**

Uma vez concluída a criação do App Service, clique em **Go to resource**. Em seguida, tome nota de seu domínio, por exemplo `meu-app-service.azurewebsites.net`.

Vá em **Configuration** do App Service e adicione as seguintes configurações:

* `ASPNETCORE_ENVIRONMENT`: `Azure`
* `Bindings__HttpsMode`: `Strict`
* `STANDBY`: `True`

Salve as configurações.

Ainda na configuração do App Service, vá na aba **General settings** e, na opção **HTTPS Only**, marque **Off** (a própria aplicação se encarregará de exigir acesso via HTTPS da maneira mais adequada).

Em seguida, vá em **Custom domains** e copie o **Custom Domain Verification ID** (esse valor será necessário mais à frente).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Configurações opcionais

Recomendamos não alterar essas configurações por ora. Uma vez que a sua instância do Rest PKI Core esteja no ar, você
pode visitar cada um dos links abaixo para habilitar funcionalidades opcionais:

* [Redirecionamento para HTTPS](../../configure-https-redirect.md)
* [Envio de emails](../../configure-email.md)
* [Integração com OpenID Connect](../../configure-oidc.md) (necessário para gerenciamento de usuários)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Sugerimos criar um **resource group** para agrupar os recursos criados. Entretanto, essa é uma medida com propósito meramente de organização. O que
realmente é importante é que **todos os recursos sejam criados na mesma região**. Isso é fundamental para o funcionamento adequado do sistema.

> [!NOTE]
> Os passos abaixo descrevem a criação mais básica de cada recurso. Dependendo da sua infraestrutura você pode querer tomar cuidados
> adicionais de segurança ou resiliência, como por exemplo restringir o acesso a uma rede privada.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!TIP]
> Antes de começar, leia a seção [Planejamento antes da instalação](../index.md#planning).
11 changes: 11 additions & 0 deletions docs.pt-br/articles/rest-pki/core/on-premises/azure/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Rest PKI Core - Setup em Azure App Services

> [!NOTE]
> A documentação deste sistema encontra-se em construção. Pedimos desculpas pela inconveniência. Por favor contate-nos caso
> precise de alguma informação que ainda não está documentada.

## Veja também

* [Instalação do Rest PKI Core em Azure App Services](install.md)
* [Atualização do Rest PKI Core em Azure App Services](update.md)
* [Resolução de problemas](troubleshoot/index.md)
Loading