Giter VIP home page Giter VIP logo

microsoft / openhack Goto Github PK

View Code? Open in Web Editor NEW
219.0 14.0 230.0 307.66 MB

This repository contains Microsoft OpenHack's open source code and documentation specific to (BYOS) Bring Your Own Azure Subscription. Aka.ms/OpenHackBYOS

License: Creative Commons Attribution 4.0 International

PowerShell 5.19% Shell 13.12% Dockerfile 0.98% Groovy 0.11% C# 21.76% Go 8.63% HTML 38.41% Makefile 0.02% CSS 2.20% JavaScript 0.07% TSQL 3.89% Bicep 5.64%

openhack's Introduction

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

openhack's People

Contributors

a11smiles avatar cloudtrainerwork avatar dariuszporowski avatar dwnatwick avatar graememalcolm avatar hadwaabdelhalem avatar hangar18rip avatar jileary23 avatar kitskin avatar kristalmdow avatar kyleburnsdev avatar lee0c avatar luizmacedo avatar mariekekortsmit avatar mattdot avatar mehighlow avatar microsoftopensource avatar mjalloul avatar msimecek avatar mwasham avatar opsgilitybrian avatar r-c-stewart avatar romerve avatar sam-rowe avatar sbovo avatar senthuransivananthan avatar tibor19 avatar trgorr avatar v-davito avatar vyta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhack's Issues

App Modernization deployment issues

There is an issue with the deploy_02_DeployResources.ps1 script. Noticed it was throwing an error because it did not have the ability to find Az.Websites. So I imported that.
Then there was a firewall rule missing that allows a connection to Azure Services

Issue running deploy-gh.sh

Hi @DariuszPorowski

We are preparing for a multi-customer DevOps 3.0 OpenHack taking place next week. We've been running through the deploy-gh script, but are seeing issues running the script.

The issue is related to the creation of Azure Resources -

\e[36m##[command] Checking az command ...
\e[0m
\e[36m##[command] Checking jq command ...
\e[0m
\e[36m##[command] Checking gh command ...
\e[0m
\e[36m##[command] Checking curl command ...
\e[0m
\e[36m##[command] Checking azure-cli varsion ...
\e[0m
\e[36m##[command] Getting unique name...
\e[0m
\e[36m##[command] Checking for azuresp.json file...
\e[0m
\e[36m##[command] Creating Azure resources...
\e[0m
Failed to resolve tenant ''.

Error detail: 
The subscription of '' doesn't exist in cloud 'AzureCloud'.
Installing Bicep CLI v0.4.1272...
Successfully installed Bicep CLI to "/Users/chrisredddington/.azure/bin/bicep".
WARNING: The underlying Active Directory Graph API will be replaced by Microsoft Graph API in a future version of Azure CLI. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-graph-migration
ERROR: Unsupported or invalid query filter clause specified for property 'servicePrincipalNames' of resource 'ServicePrincipal'.
/Users/chrisredddington/Documents/code/OpenHack/byos/devops/deploy/azureStorageAccount.bicep(7,13) : Warning no-loc-expr-outside-params: Use a parameter here instead of 'resourceGroup().location'. 'resourceGroup().location' and 'deployment().location' should only be used as a default value for parameters. [https://aka.ms/bicep/linter/no-loc-expr-outside-params]

{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n  \"status\": \"Failed\",\r\n  \"error\": {\r\n    \"code\": \"ResourceDeploymentFailure\",\r\n    \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n    \"details\": [\r\n      {\r\n        \"code\": \"DeploymentFailed\",\r\n        \"message\": \"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.\",\r\n        \"details\": [\r\n          {\r\n            \"code\": \"BadRequest\",\r\n            \"message\": \"{\\r\\n  \\\"error\\\": {\\r\\n    \\\"code\\\": \\\"InvalidPrincipalId\\\",\\r\\n    \\\"message\\\": \\\"A valid principal ID must be provided for role assignment.\\\"\\r\\n  }\\r\\n}\"\r\n          }\r\n        ]\r\n      }\r\n    ]\r\n  }\r\n}"}]}}
\e[36m##[command] Creating organization repository...
\e[0m
\e[36m##[command] Creating GitHub team...
\e[0m
\e[36m##[command] Updating team repository permissions...
\e[0m
\e[36m##[command] Creating repository project...
\e[0m
\e[36m##[command] Creating repository secrets...

@fortunkam also encountered this issue. Is it possible to look into this ahead of next week, so that we can be sure the setup process will work for our customers? Will do some digging to see if we can identify the issue.

Thanks!

Unsupported region check in OpenHack/byos/devops/deploy/deploy-gh.sh

If you use 'eastus2' as the value for AZURE_LOCATION, the unsupported Azure region check will fail, as the 'if' condition will incorrectly match the AZURE_LOCATION value to the value of 'eastus2euap' in the unsupported_azure_regions array. The same is true if you try using 'centralus'; it ends up mapping to 'centraluseuap'.

The script should allow for both 'eastus2' and 'centralus' as valid regions.

ACI didn't have access to script during data load

Container hack (BYOS) - I ran the deploy.sh from powershell. All the resources were created except that the data (tables and values) were not loaded. Upon debugging, I found that the ACI that pulls the dataload image failed as it didn't have access to sql_data_init.sh

SCI Hack Azure ARM template references questionable repo

In reviewing the ARM template to deploy the azure environment for the SCI OpenHack, there is a call to a "random" github repo seen at line 630:

"https://raw.githubusercontent.com/LODSContent/Tom-Demo/master/ohinstall.ps1"

Why is this script being pulled from the repo https://github.com/LODSContent/Tom-Demo ?
Seems like it should corrected to reference the script in this repo, eg https://raw.githubusercontent.com/microsoft/OpenHack/main/byos/sci/scripts/scripts/ohinstall.ps1

[DevOps OH] az sp show api response change

While bootstrapping the subscription and the GH / ADO project to run the OpenHack DevOps DryRun, we had an issue getting the ObjectID of the Service Principal created for later use in the challenges

The az sp show command result has changed. The ObjectId property has changed to become Id.

Unexpected error on creating database

When attempting to create a database at line 208, an unexpected error is generated:

+ az sql db create -g teamResources -s <serverName> -n mydrivingDB
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/lib/python3.8/site-packages/azure/cli/command_modules/sql/custom.py", line 1029, in db_create
    if not _confirm_backup_storage_redundancy_take_geo_warning():
  File "/usr/local/lib/python3.8/site-packages/azure/cli/command_modules/sql/custom.py", line 993, in 
 confirm_backup_storage_redundancy_take_geo_warning
    confirmation = prompt_y_n("""You have not specified the value for backup storage redundancy
  File "/usr/local/lib/python3.8/site-packages/knack/prompting.py", line 71, in prompt_y_n
    return _prompt_bool(msg, 'y', 'n', default=default, help_string=help_string)
  File "/usr/local/lib/python3.8/site-packages/knack/prompting.py", line 79, in _prompt_bool
    verify_is_a_tty()
  File "/usr/local/lib/python3.8/site-packages/knack/prompting.py", line 28, in verify_is_a_tty
    raise NoTTYException()
knack.prompting.NoTTYException
To open an issue, please run: 'az feedback'

When run interactively, we are prompted for a response to confirm backup storage redundancy policy:

You have not specified the value for backup storage redundancy
which will default to geo-redundant storage. Note that database backups will be geo-replicated
to the paired region. To learn more about Azure Paired Regions visit https://aka.ms/azure-ragrs-regions.
Do you want to proceed? (y/n):

This prompt can be removed by using the --backup-storage-redunancy/--bsr parameter.

PowerPlatform .zip file remove Health.zip

I'm suggesting deleting a file that has been replaced. I just need validation this can be deleted. About PowerPlatform BYOS.

File that is out of date since it has Health scenario content (suggest deleting)
https://github.com/microsoft/OpenHack/blob/main/byos/power-platform/deploy/PowerPlatformOpenHackThings.zip

The replacement file that was uploaded that has the EDU scenario content
https://github.com/microsoft/OpenHack/blob/main/byos/power-platform/deploy/PowerPlatformEducationDocs.zip

MDW OpenHack deployment scripts has deprecated links to anti malware

When I run the ARN deployment template I get this error:

New-AzResourceGroupDeployment : 1:17:05 PM - Error: Code=InvalidContentLink; Message=Unable to download deployment content from 
'https://gallery.azure.com/artifact/20161101/microsoft.antimalware-windows-arm.1.0.2/Artifacts/MainTemplate.json'. The tracking Id is 
'47f64d11-54bc-416c-8767-df7d8e0b241b'. Please see https://aka.ms/arm-deploy for usage details.
At line:1 char:1
+ New-AzResourceGroupDeployment `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
 
New-AzResourceGroupDeployment : The deployment validation failed
At line:1 char:1
+ New-AzResourceGroupDeployment `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzResourceGroupDeployment], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet

You should update the antimalware URI inside this blob to:

https://catalogartifact.azureedge.net/publicartifactsmigration/microsoft.antimalware-windows-arm.1.0.2/Artifacts/MainTemplate.json

Bicep code in DevOps OpenHack fails in South India

For the DevOps OpenHack, selecting South India as the Azure region results in a failure in the Bicep IaC deployment. The error is:

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"Region doesn't support Classic resource mode for Application Insights resources. Please use Workspace-based mode."},{"code":"BadRequest","message":"Region doesn't support Classic resource mode for Application Insights resources. Please use Workspace-based mode."}]}

FEEDBACK: Setup Script Pre-Check - Resources Available to be Deployed in Target Region

When attempting to use the setup script to build the required prereq environment (ie. specifically the Containers Open Hack), it would be a better user experience if the script itself performed a check prior to attempting to deploy the resources.

The reason being (with the Containers Open Hack), it attempts to deploy an Azure SQL Database. However, depending on which Azure Region you select as part of the deployment command... you may encounter the following error:

Creating Azure SQL Server instance...
Deployment failed. Correlation ID: 19039868-35d5-46fe-85c6-248fad5b265b. Location 'West US' is not accepting creation of new Windows Azure SQL Database servers at this time.
Failed to create SQL Server.

The issue with this is that the script will have already deployed (successfully) some of the other resources (ie. Azure Container Registry, Azure Container Instance, Azure Virtual Machine). That means you have a partially successful and partly failed deployment; which you have to clean up first before re-attempting.

Adding a simple check for availability to create the resource(s) in the target region would make this setup far better.

DevOps 3.0: BYOS script deploy-gh.sh not idempotent

Running the DevOps BYOS script deploy-gh.sh with the defaults is not idempotent; each time it is run, it creates a new GitHub repo.

This happened to me: I had to run it a second time due to a problem with the azure setup, and while it saved some of the generated data, it did not save the default team (eg, repo) name, so it created a new github repo.

BYOS: Modern Data Warehousing - Cosmos DB Not Populated

When deploying the MDW openhack resources following the deployment instructions, the Cosmos DB that is supposed to contain the southridge-catalog is unpopulated.

I'm not sure what information will be most useful for debugging. Here's the activity logs from when Cosmos DB was deployed.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.