You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/infra.md
+50-3Lines changed: 50 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
## Container App Environment
1
+
## Container App Env
2
2
3
-
The ACA environment**must** be created with a subnet, because it's required to allow the container apps expose multiple ports. In this case, some containers, like RabbitMQ's and Seq's, will need to expose one HTTP port for the management UI and at least one TCP port, which will be used by the Kairos API to integrate with this infra.
3
+
The Azure Container App (ACA) Environment**must** be created with a subnet, because it's required to allow the container apps expose multiple ports. In this case, some containers, like RabbitMQ's and Seq's, will need to expose one HTTP port for the management UI and at least one TCP port, which will be used by the Kairos API to integrate with this infra.
4
4
5
5
```bash
6
6
RG_NAME="kairos"
@@ -76,7 +76,7 @@ az containerapp create \
76
76
--yaml .github/capp-kairos-rabbitmq.yml
77
77
```
78
78
79
-
# Seq
79
+
##Seq
80
80
81
81
Assuming that the storage account was already created because of RabbitMQ, then the seq infra creation would be the following:
82
82
@@ -113,4 +113,51 @@ az containerapp create \
113
113
--resource-group kairos \
114
114
--environment cae-kairos \
115
115
--yaml .github/capp-kairos-seq.yml
116
+
```
117
+
118
+
## Kairos Broker
119
+
120
+
Before creating the app itself, a user assigned managed identity should be created, because it'll be granted a ACR Pull permission, which will be used by the capp-kairos-broker creation YAML.
Copy file name to clipboardExpand all lines: README.md
+169-1Lines changed: 169 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,4 +41,172 @@ AZURE_CLIENT_ID=
41
41
AZURE_CLIENT_SECRET=
42
42
```
43
43
44
-
After setting the correct values you can simply execute `docker compose up -d`
44
+
After setting the correct values you can simply execute `docker compose up -d`
45
+
46
+
# Infra
47
+
48
+
After manually creating some basic resources such as RG, KV and ACR, the following instructions might come in handy for automatically creating more complex infra, such as vnet, subnet, storage account, file share, ACA environment, the ACAs themselves, etc.
49
+
50
+
## Container App Env
51
+
52
+
The Azure Container App (ACA) Environment **must** be created with a subnet, because it's required to allow the container apps expose multiple ports. In this case, some containers, like RabbitMQ's and Seq's, will need to expose one HTTP port for the management UI and at least one TCP port, which will be used by the Kairos API to integrate with this infra.
53
+
54
+
```bash
55
+
RG_NAME="kairos"
56
+
LOCATION="eastus2"
57
+
VNET_NAME="vnet-kairos"
58
+
SUBNET_NAME="cae-subnet"
59
+
60
+
az network vnet create \
61
+
--resource-group $RG_NAME \
62
+
--name $VNET_NAME \
63
+
--location $LOCATION \
64
+
--address-prefix 10.0.0.0/16
65
+
66
+
az network vnet subnet create \
67
+
--resource-group $RG_NAME \
68
+
--vnet-name $VNET_NAME \
69
+
--name $SUBNET_NAME \
70
+
--address-prefix 10.0.1.0/27 \
71
+
--delegations "Microsoft.App/environments"
72
+
73
+
SUBNET_ID=$(az network vnet subnet show --resource-group $RG_NAME --vnet-name $VNET_NAME --name $SUBNET_NAME --query id -o tsv)
74
+
75
+
az containerapp env create \
76
+
--name cae-kairos \
77
+
--resource-group $RG_NAME \
78
+
--location $LOCATION \
79
+
--infrastructure-subnet-resource-id $SUBNET_ID
80
+
```
81
+
82
+
## RabbitMQ
83
+
84
+
Before creating the RabbitMQ container app, it's required to create an Azure File Share that'll be used for mounting the volume, in order to persist the Rabbit data.
Before creating the app itself, a user assigned managed identity should be created, because it'll be granted a ACR Pull permission, which will be used by the capp-kairos-broker creation YAML.
0 commit comments