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

Lab 2 - Task 3 - step 10 Powershell fails #7

Open
Floriszz opened this issue Nov 30, 2021 · 4 comments
Open

Lab 2 - Task 3 - step 10 Powershell fails #7

Floriszz opened this issue Nov 30, 2021 · 4 comments

Comments

@Floriszz
Copy link

Floriszz commented Nov 30, 2021

I see there has been 'toggling' with the Lab numbers and titles. To be clear;

  • Lab 2 - Knowledge Mining with Azure Cognitive Search and Text Analytics
  • Task 3 - Creating Azure Search Indexes
  • step 10. Open a new PowerShell prompt. Enter the following code, which will create an Azure Search data source, index, and indexer.

This step 10 is not clear.

  • Azure Powershell is not possible as creating storage account is not allowed
  • Tried powershell client on the lab vm with Connect-AzAccount, but the script is not ‘parsable’
  • Tried to Bing on “Azure PowerShell function Create-AzureSearchIndex”, but no good examples…
@feaselkl
Copy link
Collaborator

Azure Powershell is not possible as creating storage account is not allowed

There are setup instructions at https://github.com/solliancenet/ai-in-a-day/blob/main/setup/03-setup-workspace.md on which resources need to be created for the lab. It does look like the instructions could be clearer about needing to go through this setup process first assuming you are running this in your own home lab rather than someplace which has incorporated the setup instructions into a deployment process.

Tried powershell client on the lab vm with Connect-AzAccount, but the script is not ‘parsable’

I'm not sure what steps you used to do this, but you shouldn't need to connect to an Azure account. You should be able to copy the code exactly as it appears in the code block, paste it into a PowerShell prompt by right-clicking, strike Enter, and create the function. If you are getting an error, can you show a screenshot of what you're doing and the error?

Tried to Bing on “Azure PowerShell function Create-AzureSearchIndex”, but no good examples…

This is a custom function to do a specific task, so there won't be other examples of it.

@Floriszz
Copy link
Author

I'm not sure what steps you used to do this, but you shouldn't need to connect to an Azure account. You should be able to copy the code exactly as it appears in the code block, paste it into a PowerShell prompt by right-clicking, strike Enter, and create the function.
Where do you run the pwsh.exe? On the lab VM?
The powershell commands need to do/create stuff in Azure. How is this done if not connected to Azure?
I don't have a screenshot and my environment is gone. But the error comes when trying to run the commands in the step after running the function, where you have to point to the downloaded files for creating the indexes.

@feaselkl
Copy link
Collaborator

Run pwsh.exe on whatever machine you downloaded the files to in step 8. If that's the lab VM, then yes, you would open PowerShell on the lab VM; if you downloaded the six files to a local machine, then open PowerShell on the local machine.

The task is invoking web requests against your Azure Search service which has already been created. In step 11, you pass in the account name and API key as parameters (for ease of use; alternatively, they could come from environment variables or secure storage). That's why there's no requirement to use Azure PowerShell modules.

@Floriszz
Copy link
Author

Floriszz commented Nov 30, 2021

Thank you for your quick reply.
What you are saying sounds good, but I could not follow these steps in step 10 and 11.

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