docs(nexus): adiciona MFE-URLS.md com referencia de enderecos do mfe-shell
Documenta os dois arquivos onde ficam os enderecos no mfe-shell: - public/federation.manifest.json (URLs dos remotes em runtime) - src/app/core/config/environment.service.ts (URLs das APIs backend) Inclui valores atuais (localhost/AWS), URLs OCI corretas a aplicar e checklist de pendencias para funcionar em producao.
This commit is contained in:
parent
389ec232de
commit
ea34eabf99
2 changed files with 102 additions and 0 deletions
101
inventcloud/invista/nexus/MFE-URLS.md
Normal file
101
inventcloud/invista/nexus/MFE-URLS.md
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
# MFE Shell — Configuração de Endereços
|
||||||
|
|
||||||
|
Referência rápida de onde ficam os endereços no `mfe-shell` (branch `devops`).
|
||||||
|
|
||||||
|
> Documentação completa: [`tf_oci_clusters/docs/mfe-architecture.md`](https://dev.azure.com/CN-Squad/Invista%20FIDC%20-%20Nexus/_git/tf_oci_clusters?path=/docs/mfe-architecture.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. URLs dos MFEs remotos — `public/federation.manifest.json`
|
||||||
|
|
||||||
|
Arquivo: `mfe-shell/public/federation.manifest.json`
|
||||||
|
|
||||||
|
Este arquivo é lido em runtime pelo `main.ts` (`initFederation('federation.manifest.json')`).
|
||||||
|
Diz ao shell onde encontrar o `remoteEntry.json` de cada MFE remoto.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mfe-auth": "https://localhost:4201/remoteEntry.json",
|
||||||
|
"mfe-user": "https://localhost:4202/remoteEntry.json",
|
||||||
|
"mfe-person": "https://localhost:4203/remoteEntry.json"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Estado atual:** aponta para `localhost` (desenvolvimento local).
|
||||||
|
> **Em OCI/produção deve apontar para:** os buckets Object Storage de cada MFE.
|
||||||
|
|
||||||
|
**URLs OCI corretas (a aplicar):**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mfe-auth": "https://objectstorage.sa-saopaulo-1.oraclecloud.com/n/grbb7qzeuoag/b/mfe-auth-dev/o/remoteEntry.json",
|
||||||
|
"mfe-user": "https://objectstorage.sa-saopaulo-1.oraclecloud.com/n/grbb7qzeuoag/b/mfe-user-dev/o/remoteEntry.json",
|
||||||
|
"mfe-person": "https://objectstorage.sa-saopaulo-1.oraclecloud.com/n/grbb7qzeuoag/b/mfe-person-dev/o/remoteEntry.json",
|
||||||
|
"mfe-formalization": "https://objectstorage.sa-saopaulo-1.oraclecloud.com/n/grbb7qzeuoag/b/mfe-formalization-dev/o/remoteEntry.json",
|
||||||
|
"mfe-poc": "https://objectstorage.sa-saopaulo-1.oraclecloud.com/n/grbb7qzeuoag/b/mfe-poc-dev/o/remoteEntry.json"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. URLs das APIs backend — `src/app/core/config/environment.service.ts`
|
||||||
|
|
||||||
|
Arquivo: `mfe-shell/src/app/core/config/environment.service.ts`
|
||||||
|
|
||||||
|
Este serviço é **exposto via federation** (`./EnvironmentService`) para que todos os MFEs remotos
|
||||||
|
consumam as URLs de API sem precisar defini-las individualmente.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
private config: AppConfig = {
|
||||||
|
production: false,
|
||||||
|
baseUrl: 'https://llbywpgzxj.execute-api.us-east-2.amazonaws.com/dev/api',
|
||||||
|
authUrl: 'https://llbywpgzxj.execute-api.us-east-2.amazonaws.com/dev/api/auth',
|
||||||
|
userUrl: 'https://04fy406qme.execute-api.us-east-2.amazonaws.com/dev/api/user',
|
||||||
|
personUrl: 'https://qfmruzhrlj.execute-api.us-east-2.amazonaws.com/dev/api/person',
|
||||||
|
userExternalUrl: 'https://04fy406qme.execute-api.us-east-2.amazonaws.com/dev/api/user-external',
|
||||||
|
ssoUrl: 'https://n7u24ds9cg.execute-api.us-east-2.amazonaws.com/dev/api/sso/Auth',
|
||||||
|
version: '1.0.0',
|
||||||
|
appName: 'Invista App'
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Estado atual:** aponta para **AWS API Gateway** (us-east-2) — legado.
|
||||||
|
> **Pendente:** migrar para `api-gateway-nexus-dev` (OCI, 10.6.0.123).
|
||||||
|
|
||||||
|
**URLs OCI corretas (a aplicar):**
|
||||||
|
|
||||||
|
| Chave | URL OCI |
|
||||||
|
|-------|---------|
|
||||||
|
| `baseUrl` | `https://api-dev.invista.com.br/api` |
|
||||||
|
| `authUrl` | `https://api-dev.invista.com.br/api/auth` |
|
||||||
|
| `userUrl` | `https://api-dev.invista.com.br/api/user` |
|
||||||
|
| `personUrl` | `https://api-dev.invista.com.br/api/person` |
|
||||||
|
| `userExternalUrl` | `https://api-dev.invista.com.br/api/user-external` |
|
||||||
|
| `ssoUrl` | `https://api-dev.invista.com.br/api/sso/Auth` |
|
||||||
|
|
||||||
|
> O domínio `api-dev.invista.com.br` é roteado via Cloudflare → LB Test_Crivo_Dev → api-gateway-nexus-dev.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Onde cada MFE usa esses endereços
|
||||||
|
|
||||||
|
| MFE | federation.manifest.json | EnvironmentService |
|
||||||
|
|-----|--------------------------|--------------------|
|
||||||
|
| `mfe-auth` | `remoteEntry.json` do bucket `mfe-auth-dev` | `authUrl`, `ssoUrl` |
|
||||||
|
| `mfe-user` | `remoteEntry.json` do bucket `mfe-user-dev` | `userUrl`, `userExternalUrl` |
|
||||||
|
| `mfe-person` | `remoteEntry.json` do bucket `mfe-person-dev` | `personUrl` |
|
||||||
|
| `mfe-formalization` | `remoteEntry.json` do bucket `mfe-formalization-dev` | `baseUrl` |
|
||||||
|
| `mfe-poc` | `remoteEntry.json` do bucket `mfe-poc-dev` | `baseUrl` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Pendências para funcionar em OCI
|
||||||
|
|
||||||
|
- [ ] Atualizar `public/federation.manifest.json` com URLs OCI dos remotes
|
||||||
|
- [ ] Atualizar `environment.service.ts` com URLs do `api-gateway-nexus-dev` (OCI)
|
||||||
|
- [ ] Configurar DNS Cloudflare: `mfe-*.invista.com.br` e `api-dev.invista.com.br`
|
||||||
|
- [ ] VCN peering: vcn-oke ↔ DRG-Invista-Shared (para LB acessar API Gateway MFE)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Atualizado em: 2026-03-01 | Leitura direta do repo mfe-shell (branch devops, Azure DevOps)*
|
||||||
|
|
@ -96,6 +96,7 @@ Cloudflare (*.invista.com.br)
|
||||||
- [Cloudflare](./CLOUDFLARE.md) — DNS e proxy
|
- [Cloudflare](./CLOUDFLARE.md) — DNS e proxy
|
||||||
|
|
||||||
### MFEs
|
### MFEs
|
||||||
|
- [MFE URLs e Endpoints](./MFE-URLS.md) — Onde ficam os endereços no mfe-shell (federation.manifest.json + EnvironmentService)
|
||||||
- [MFE Padronizacao OCI](./OCI-MFE-PADRONIZACAO.md) — Como todos os 6 MFEs foram migrados para OCI
|
- [MFE Padronizacao OCI](./OCI-MFE-PADRONIZACAO.md) — Como todos os 6 MFEs foram migrados para OCI
|
||||||
- [MFE Tasks / Checklist](./OCI-MFE-TASKS.md) — Status e pendencias
|
- [MFE Tasks / Checklist](./OCI-MFE-TASKS.md) — Status e pendencias
|
||||||
- [MFE User Pipeline](./MFE-USER-PIPELINE.md) — Detalhe da pipeline mfe-user (multi-cloud legado)
|
- [MFE User Pipeline](./MFE-USER-PIPELINE.md) — Detalhe da pipeline mfe-user (multi-cloud legado)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue