Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Account setup script failing in Cloud Shell #707

Open
gicastel opened this issue Jan 8, 2020 · 7 comments
Open

Account setup script failing in Cloud Shell #707

gicastel opened this issue Jan 8, 2020 · 7 comments

Comments

@gicastel
Copy link

gicastel commented Jan 8, 2020

Created a new cloud shell, run the command and this error is given;

`Installing dependencies...
Finished installing dependencies.
Getting account setup script...
Finished getting account setup script.
Running account setup script...

Getting credentials.
Your credentials class does not support session injection. Performance will not be at the maximum.
Traceback (most recent call last):
File "/home/jack/.local/lib/python3.5/site-packages/msrest/pipeline/requests.py", line 65, in send
self._creds.signed_session(session)
File "/home/jack/.local/lib/python3.5/site-packages/azure/common/credentials.py", line 78, in signed_session
return credentials.signed_session(session)
TypeError: signed_session() takes 1 positional argument but 2 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "account_setup.py", line 332, in
tenant_ids = [tenant.id for tenant in subscription_client.tenants.list()]
File "account_setup.py", line 332, in
tenant_ids = [tenant.id for tenant in subscription_client.tenants.list()]
File "/home/jack/.local/lib/python3.5/site-packages/msrest/paging.py", line 143, in next
self.advance_page()
File "/home/jack/.local/lib/python3.5/site-packages/msrest/paging.py", line 129, in advance_page
self._response = self._get_next(self.next_link)
File "/home/jack/.local/lib/python3.5/site-packages/azure/mgmt/subscription/operations/tenants_operations.py", line 81, in internal_paging
request, header_parameters, **operation_config)
File "/home/jack/.local/lib/python3.5/site-packages/msrest/service_client.py", line 336, in send
pipeline_response = self.config.pipeline.run(request, **kwargs)
File "/home/jack/.local/lib/python3.5/site-packages/msrest/pipeline/init.py", line 197, in run
return first_node.send(pipeline_request, **kwargs) # type: ignore
File "/home/jack/.local/lib/python3.5/site-packages/msrest/pipeline/init.py", line 150, in send
response = self.next.send(request, **kwargs)
File "/home/jack/.local/lib/python3.5/site-packages/msrest/pipeline/requests.py", line 68, in send
request.context.session = session = self._creds.signed_session()
File "/home/jack/.local/lib/python3.5/site-packages/azure/common/credentials.py", line 78, in signed_session
return credentials.signed_session(session)
TypeError: signed_session() takes 1 positional argument but 2 were given`

@alfeuduran
Copy link

Im with the same issue!

@gicastel
Copy link
Author

FYI, after creating resources manually, aztk works.

@anuragsah00
Copy link

I have the same issue.

@alfeuduran
Copy link

FYI, after creating resources manually, aztk works.

Tks for sharing, i will use the Azure AKS for the same propose, for those who are interested

https://docs.microsoft.com/en-us/azure/aks/spark-job

@kkdatta
Copy link

kkdatta commented Jan 30, 2020

FYI, after creating resources manually, aztk works.

Im with the same issue!

FYI, after creating resources manually, aztk works.

can u explain how?

@gicastel
Copy link
Author

can u explain how?

I assume you have already an Azure subscription and that you have run aztk spark init.

You have to:

  • Open Azure AD and get the tenant ID -> copy that into .aztk/secrets.yaml in service_principal.tenant_id
  • Create an app registration in Azure AD and get the application ID -> copy into client_id
  • Create a new client secret -> copy into credential
  • Create a new Batch Account (if you dont'have one already) and give the App you created before the "Contributor" role on that. Then take the Batch Account resource Id from the Properties pane and paste it on the secrets.yaml, service_principal, batch_account_resource_id
  • Create a new Storage Account (if you dont'have one already) and give the App you created before the "Contributor" role on that. Then take the Storage Account resource Id from the Properties pane and paste it on the secrets.yaml, service_principal, storage_account_resource_id
  • (Optional) If you want to use Mixed Mode (spot instances), you have to create a Vnet, to give the app the Contributor role on that, to create a subnet into the Vnet, and to put the subnet Resource ID into cluster.yaml

@manthanthakker
Copy link

manthanthakker commented May 6, 2020

Please follow the manual steps here: https://aztk.readthedocs.io/en/v0.10.2/00-getting-started.html

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

No branches or pull requests

5 participants