Skip to content

Commit

Permalink
Merge pull request #1475 from SEKOIA-IO/Update_azure_windows_doc
Browse files Browse the repository at this point in the history
Update azure_windows.md
  • Loading branch information
ka0ula authored Dec 7, 2023
2 parents 5760d43 + 871c068 commit 784ab8e
Showing 1 changed file with 30 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@ Theses changes have to be made from the [Azure Web Portal](https://portal.azure.

### Azure Event Hubs

As a prerequisite, you need to choose an existing resource group, or create a new one (e.g. `company-resource-group`).
As a prerequisite, you need to choose an existing **resource group**, or create a new one (e.g. `company-resource-group`).

#### Retrieve your Subscription ID

You also need your “Subscription ID” if you don't have a default one. In Azure Web Portal, navigate to: “Home”, “Cost Management + Billing”, ”Subscriptions”. From there, copy the relevant “Subscription ID” that will be used in the command line (e.g. `uuid`)
You also need your **Subscription ID** if you don't have a default one.

In Azure Web Portal:

1. Navigate to: `Home` > `Cost Management + Billing` > `Subscriptions`
2. From there, copy the relevant **Subscription ID** that will be used in the command line (e.g. `uuid`)

#### Create the Event Hubs

Use Azure PowerShell (within Cloud Shell interface for example) to create a namespace (e.g. `company-eventhub`) and a specific `Event Hub` (e.g. `windows-event`) within your resource group (e.g. `company-resource-group`)
Use Azure PowerShell (within Cloud Shell interface for example) to create a **namespace** (e.g. `company-eventhub`) and a specific **Event Hub** (e.g. `windows-event`) within your **resource group** (e.g. `company-resource-group`)

```powershell
PS Azure:\> az eventhubs namespace create --name company-eventhub --resource-group company-resource-group --enable-kafka true --subscription uuid
Expand All @@ -35,16 +40,22 @@ PS Azure:\> az eventhubs eventhub create --resource-group company-resource-group
```

!!! info
Please replace :
Please replace the following:

- `company-resource-group` with the name of your resource group.
- `uuid` with your subscription ID retrieved previously (see below).
- `company-resource-group` with the name of your **resource group**.
- `uuid` with your **subscription ID** retrieved previously (see below).

#### Create “Shared Access Policies”

1. Navigate to “Home”, “Event Hubs”, “company-eventhub - Shared access policies”. From there, you can create a policy (e.g. `RootManageSharedAccessKey`) with the claims `Manage`, `Send` and `Listen`, and note the `Primary Key` that will be used as the `SharedAccessKey`.
2. Navigate to “Home”, “Event Hubs”, “company-eventhub”, “windows-event - Shared access policies”. From there, you can create a policy (e.g. `sekoiaio`) with the claims `Listen`. Once created, click on the policy and save the `Connection string-primary key`, to be sent to Sekoia.io.
3. Navigate to “Home”, “Event Hubs”, “company-eventhub”, ”windows-event - Consumer groups”. From there, you can create a consumer group (e.g. `sekoiaio`).
1. Navigate to `Home` > `Event Hubs`> `company-eventhub - Shared access policies`
- From there, you can create a **policy** (e.g. `RootManageSharedAccessKey`) with the claims `Manage`, `Send` and `Listen` and note the **Primary Key** that will be used as the **SharedAccessKey**

2. Navigate to `Home` > `Event Hubs` > `company-eventhub` > `mysql-event - Shared access policies`
- From there, you can create a **policy** (e.g. `sekoiaio`) with the claims `Listen`
- Once created, click on the policy and save the **Connection string-primary key**, to be sent to Sekoia.io

5. Navigate to `Home`> `Event Hubs`> `company-eventhub`> `mysql-event - Consumer groups`
- From there, you can create a **consumer group** (e.g. `sekoiaio`)

#### Create a Blob Storage for Checkpointing

Expand All @@ -62,19 +73,21 @@ PS Azure:\> az storage container create --name "windows-event" --account-name "s

!!! info
The container name, here `windows-event` should be the same as the Event Hub’s one.
You also need to replace `company-resource-group` with the name of your resource group.
You also need to replace `company-resource-group` with the name of your **resource group**.

Finally, you have to retrieve the connection string from Azure Web Portal by going in Storage Accounts, then in the created storage (`sekoiaiocheckpoint`) and finally in the Access Keys section. After clicking on Show keys, you can copy the first of the two connection strings.
Finally, you have to retrieve the connection string from Azure Web Portal by going in **Storage Accounts**, then in the created storage (`sekoiaiocheckpoint`) and finally in the **Access Keys** section. After clicking on **Show keys**, you can copy the first of the two connection strings.

### Windows Virtual Machine

You need to activate and configure the diagnostic extension `Microsoft.Insights.VMDiagnosticsSettings`.

Navigate to “Home”, “Virtual machines”, “virtual machine name” (e.g. `company-windows`), “Settings” and “Extensions”. Install it and note the new `StorageAccount` name created (e.g. `company-storage-account`).
1. Navigate to `Home` > `Virtual machines` > `virtual machine name` (e.g. `company-windows`) > `Settings` > `Extensions`.
Install it and note the new **StorageAccount** name created (e.g. `company-storage-account`).

Navigate to “Home”, “Storage accounts”, “company-storage-account”, ”Access keys”. From there you can note the key value later used as the `storageAccountKey`.
3. Navigate to `Home` > `Storage accounts` > `company-storage-account` > `Access keys`.
From there you can note the key value later used as the **storageAccountKey**.

You need to create two configuration files `public_settings.json` and `protected_settings.json`.
5. You need to create two configuration files `public_settings.json` and `protected_settings.json`.

Once again you need Azure powershell to do it using your favorite text editor:

Expand Down Expand Up @@ -183,9 +196,9 @@ If you do not know how to use and configure it, please check [SwiftOnSecurity gi

Finally, please send to Sekoia.io the following information:

- Azure Event Hub’s Connection string-primary key (e.g. `"Endpoint=sb://company-eventhub.servicebus.windows.net/;SharedAccessKeyName=sekoiaio;SharedAccessKey=XXXXXX;EntityPath=windows-event"`).
- Azure Event Hub’s consumer group name (e.g. `sekoiaio`).
- Azure Blob Storage’s connection string (e.g. `"DefaultEndpointsProtocol=https;AccountName=sekoiaiocheckpoint;AccountKey=XXXXX"`).
- Azure Event Hub’s **Connection string-primary key** (e.g. `"Endpoint=sb://company-eventhub.servicebus.windows.net/;SharedAccessKeyName=sekoiaio;SharedAccessKey=XXXXXX;EntityPath=windows-event"`).
- Azure Event Hub’s **consumer group name** (e.g. `sekoiaio`).
- Azure Blob Storage’s **connection string** (e.g. `"DefaultEndpointsProtocol=https;AccountName=sekoiaiocheckpoint;AccountKey=XXXXX"`).

## Further Readings

Expand Down

0 comments on commit 784ab8e

Please sign in to comment.