├── ADB_WORKSHOP.dbc ├── DBXWorkspaceSetup ├── Administration.dbc ├── NewDBXAccountSetup.ps1 └── ResetADPasswords.ps1 ├── README.md ├── Readme.docx ├── SetupEventHubForGBBWorkshop.docx └── imgs ├── cluster_permissions.gif └── workshop_permissions.gif /ADB_WORKSHOP.dbc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azeltov/adb_workshop/3f8fb73bdf071fd22ce95848a89aac9c7ed3b9b8/ADB_WORKSHOP.dbc -------------------------------------------------------------------------------- /DBXWorkspaceSetup/Administration.dbc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azeltov/adb_workshop/3f8fb73bdf071fd22ce95848a89aac9c7ed3b9b8/DBXWorkspaceSetup/Administration.dbc -------------------------------------------------------------------------------- /DBXWorkspaceSetup/NewDBXAccountSetup.ps1: -------------------------------------------------------------------------------- 1 | $customDomain = "azureworkshops.net" 2 | $defaultPwd = "*********" 3 | $removeOldGroups = $false 4 | 5 | # Set the number of groups and the number of users in each group 6 | $numGroups = 10 7 | $numUsersPerGroup = 5 8 | 9 | # Connect to the AD tenant associated with the custom domain if you aren't already connected 10 | try 11 | { 12 | $domain = Get-AzureADDomain -Name $customDomain 13 | } 14 | catch [Microsoft.Open.AzureAD16.Client.ApiException],[Microsoft.Open.AzureAD16.PowerShell.GetDomain], [Microsoft.Open.Azure.AD.CommonLibrary.AadNeedAuthenticationException] 15 | { 16 | Connect-AzureAD -TenantId $customDomain 17 | } 18 | catch 19 | { 20 | Write-Host "An error occurred at login that could not be resolved" 21 | exit 22 | } 23 | finally 24 | { 25 | $groups = Get-AzureADGroup -SearchString "Workshop Group" 26 | } 27 | 28 | # Remove old groups and users if the flag is set 29 | if ($removeOldGroups) 30 | { 31 | Write-Host "" 32 | Write-Host "" 33 | Write-Host "Removing Old Groups" 34 | Write-Host "===================" 35 | 36 | # Remove old users and groups 37 | ForEach ($group in $groups) 38 | { 39 | Write-Host "Removing group: " $group.DisplayName 40 | $_ = Remove-AzureADGroup -ObjectId $group.ObjectId 41 | } 42 | 43 | Write-Host "" 44 | Write-Host "Removing Old Users" 45 | Write-Host "==================" 46 | 47 | For ($g=1; $g -lt (($numGroups*$numUsersPerGroup)+1); $g++) 48 | { 49 | $userName = "user_" + $g.ToString() 50 | $email = $userName + "@" + $customDomain 51 | 52 | Write-Host "Removing user: $userName" 53 | Remove-AzureADUser -ObjectId $email 54 | } 55 | } 56 | 57 | # Set Password and ForceChangePasswordNextLogin parameters 58 | $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile 59 | $PasswordProfile.Password = $defaultPwd 60 | $PasswordProfile.ForceChangePasswordNextLogin = $false 61 | 62 | # Create userNum variable to assign user number since we'll be using nested loops 63 | $userNum = 1 64 | 65 | Write-Host "" 66 | Write-Host "" 67 | Write-Host "Creating New Groups and Users" 68 | Write-Host "=============================" 69 | 70 | # Iterate groups to create groups 71 | For ($g=0; $g -lt $numGroups; $g++) 72 | { 73 | $groupName = "Workshop Group " + ($g + 1).ToString() 74 | $mailNickname = "workshop_group_" + ($g + 1).ToString() 75 | 76 | Write-Host "Creating group: $groupName" 77 | $newGroup = New-AzureADGroup -DisplayName $groupName -MailEnabled $false -SecurityEnabled $true -MailNickName $mailNickname -Description "Azure Databricks Workshop Group" 78 | 79 | # Iterate to create users 80 | For ($i=0; $i -lt $numUsersPerGroup; $i++) 81 | { 82 | $displayName = "User " + $userNum.ToString() 83 | $userName = "user_" + $userNum.ToString() 84 | $userNum++ 85 | 86 | $email = $userName + "@" + $customDomain 87 | 88 | Write-Host "Creating user: $email" 89 | $newUser = New-AzureADUser -AccountEnabled $True -DisplayName $displayName -PasswordProfile $PasswordProfile -UserPrincipalName $email -MailNickName $userName 90 | 91 | # Add user to group 92 | Add-AzureADGroupMember -ObjectId $newGroup.ObjectId -RefObjectId $newUser.ObjectId 93 | } 94 | Write-Host "" 95 | } 96 | -------------------------------------------------------------------------------- /DBXWorkspaceSetup/ResetADPasswords.ps1: -------------------------------------------------------------------------------- 1 | $customDomain = "azureworkshops.net" 2 | $defaultPwd = "jhg342#9)6jk" 3 | 4 | # Set the number of groups and the number of users in each group 5 | $numUsers = 50 6 | 7 | # Connect to the AD tenant associated with the custom domain if you aren't already connected 8 | try 9 | { 10 | $domain = Get-AzureADDomain -Name $customDomain 11 | } 12 | catch [Microsoft.Open.AzureAD16.Client.ApiException],[Microsoft.Open.AzureAD16.PowerShell.GetDomain], [Microsoft.Open.Azure.AD.CommonLibrary.AadNeedAuthenticationException] 13 | { 14 | Connect-AzureAD -TenantId $customDomain 15 | } 16 | catch 17 | { 18 | Write-Host "An error occurred at login that could not be resolved" 19 | exit 20 | } 21 | 22 | # Set Password and ForceChangePasswordNextLogin parameters 23 | $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile 24 | $PasswordProfile.Password = $defaultPwd 25 | $PasswordProfile.ForceChangePasswordNextLogin = $false 26 | 27 | Write-Host "" 28 | Write-Host "" 29 | Write-Host "Resetting Passwords" 30 | Write-Host "===================" 31 | 32 | # Iterate users to reset passwords 33 | For ($userNum=1; $userNum -lt ($numUsers+1); $userNum++) 34 | { 35 | $displayName = "User " + $userNum.ToString() 36 | $userName = "user_" + $userNum.ToString() 37 | 38 | $email = $userName + "@" + $customDomain 39 | 40 | Write-Host "Resetting Password for user: $email" 41 | $user = Get-AzureADUser -ObjectId $email 42 | $objectId = $user.objectid 43 | 44 | Set-AzureADUserPassword -ObjectId $objectId -Password (ConvertTo-SecureString -String $defaultPwd -Force –AsPlainText) 45 | } 46 | Write-Host "" 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Azure Databricks workshop 2 | 3 | Please refer to README.docx to get started with the workshop 4 | 5 | Tools for setting up your own Databricks Workspace are available in the DBXWOrkspaceSetup folder - including DBC files (Databricks Archive Files) and Powershell Scripts. ___THESE TOOLS ARE ALPHA RELEASE.___ -------------------------------------------------------------------------------- /Readme.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azeltov/adb_workshop/3f8fb73bdf071fd22ce95848a89aac9c7ed3b9b8/Readme.docx -------------------------------------------------------------------------------- /SetupEventHubForGBBWorkshop.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azeltov/adb_workshop/3f8fb73bdf071fd22ce95848a89aac9c7ed3b9b8/SetupEventHubForGBBWorkshop.docx -------------------------------------------------------------------------------- /imgs/cluster_permissions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azeltov/adb_workshop/3f8fb73bdf071fd22ce95848a89aac9c7ed3b9b8/imgs/cluster_permissions.gif -------------------------------------------------------------------------------- /imgs/workshop_permissions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azeltov/adb_workshop/3f8fb73bdf071fd22ce95848a89aac9c7ed3b9b8/imgs/workshop_permissions.gif --------------------------------------------------------------------------------