Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test V2 "Azure" destination with SpaceX "Capsules" and with Hubspot with "demo" api key #242

Open
beckyconning opened this issue Mar 8, 2022 · 4 comments

Comments

@beckyconning
Copy link

beckyconning commented Mar 8, 2022

Its gonna be something like this

{
  "container": "",
  "storageUrl": "",
  "credentials": {
    "auth":"activeDirectory",
    "clientId":"7542263e-a044-4fa2-8336-fd525ee5d72c",
    "tenantId":"57b38702-3849-4db2-8295-7cef65a0e6dc",
    "clientSecret":"475f8873-090b-42e5-ae49-36de8b6f4ccf"
  }
}

Use demo3.

@nicflores
Copy link
Contributor

<2>

@nicflores
Copy link
Contributor

<1>

@nicflores
Copy link
Contributor

Steps to re-create:

  1. Create a resource group:
az group create -l eastus -n <resoure-group-name>

this command will some json similar to this:

{
  "id": "/subscriptions/8ea74114-ffb2-42f9-b84d-85af2a674855/resourceGroups/<resoure-group-name>",
  "location": "eastus",
  "managedBy": null,
  "name": "<resoure-group-name>",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": null,
  "type": "Microsoft.Resources/resourceGroups"
}
  1. Create a service principal:
az ad sp create-for-rbac -n <service-principal-name> --role Contributor --scopes <id-from-json-above>

note you'll need to grab the id returned from the resource group and feed it to the scopes flag.

This command will return some json similar to this:

{
  "appId": "067acde4-4b7c-4104-a0e4-f28900db2292",
  "displayName": "<service-principal-name>",
  "password": "ZV.VLecDwGBl~4wnIs6RHoG0HLowGbse5a",
  "tenant": "b7dfc748-d61e-435f-8dbe-c550d2e8c134"
}

these values will be the values that you will need to give Precog V2.

clientId = appId
tenantId = tenant
clientSecret = password
  1. Now, from the Azure console, create a Storage account and assign the service principal with the role of "Storage Blob Data Contributor". Note the name of this bucket will be in the stoargeUrl of he json we give Precog V2, so be sure to choose a name without symbols that need to be url encoded. A single name without spaces and symbols works best.4.
storageUrl = https://<storage-account-name>.blob.core.windows.net/

Screen Shot 2022-03-11 at 10 27 45 AM

Select the subscription containing the resource group you created above:

Screen Shot 2022-03-11 at 10 28 11 AM

Go through the creation of the Storage account, leaving the default settings should work.
Once you create the Storage account click on it and select Access Control (IAM) from the left control panel.

Screen Shot 2022-03-11 at 10 30 25 AM

Then click on Role assignments

Screen Shot 2022-03-11 at 10 32 02 AM

Then click +Add to add a role assignment search for the role Storage Blob Data Contributor click Next and then search for the service principal from the list of members, then select it and click Next and finally Review+assign.

  1. Now you need to create a container within the Storage account you just created. Find the storage you just created from the console, click on it and then click on Containers under the Data storage left hand panel. Then click +Container to add a container. This will be the value of container in the json we will give Precog V2.

  2. Finally the JSON you will need to formulate to give Precog V2 will have this format:

{
  "container": "<container-name>",
  "storageUrl": "https://<storage-account-name>.blob.core.windows.net/",
  "credentials": {
    "auth":"activeDirectory",
    "clientId":"<appId-from-step-2> ",
    "tenantId":"<tenant-from-step-2>",
    "clientSecret":"<password-from-step-2>"
  }
}

@nicflores
Copy link
Contributor

<0>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants