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

Azure provider MVP #258

Merged
merged 29 commits into from
Jul 20, 2020
Merged

Azure provider MVP #258

merged 29 commits into from
Jul 20, 2020

Conversation

MarcAstr0
Copy link
Collaborator

@MarcAstr0 MarcAstr0 commented Jul 20, 2020

Description

This PR closes task BOOST-730. It implements a minimum viable Azure provider for Booster. It creates the necessary infrastructure in Azure to be able to run commands and query a read model via GraphQL through HTTP.
The provider at the moment does not support the following features that will be implemented in later tasks:

  • Subscriptions
  • Authentication

Changes

All of the changes are in the packages/framework-provider-azure and packages/framework-provider-azure-infrastructure directories.

Checks

  • Project Builds
  • Project passes tests and checks
  • Updated documentation accordingly

Additional information

In order to use this provider, an Azure subscription is required and the Azure CLI installed in your system.
It is also necessary to create a service principal, this can be done after logging in to your Azure account with the CLI (by running az login) and then running the following CLI command:

az ad sp create-for-rbac --name <service-principal-name>

(See this comment for more information).

After the service principal is created, the following Bash script (with the help of jq) will set up the necessary environment variables required by the provider in order to work:

#!/usr/bin/env bash

SP_DISPLAY_NAME="<service-principal-name>" # replace <service-principal-name> with the name of your own SP
REGION="East US" # replace with a region of your choice, see full list here: https://azure.microsoft.com/en-us/global-infrastructure/locations/

export AZURE_APP_ID=$(az ad sp list --display-name ${SP_DISPLAY_NAME} | jq -r '.[].appId')
export AZURE_TENANT_ID=$(az ad sp list --display-name ${SP_DISPLAY_NAME} | jq -r '.[].appOwnerTenantId')
export AZURE_SECRET=$(az ad sp credential reset --name ${AZURE_APP_ID} | jq -r '.password')
export AZURE_SUBSCRIPTION_ID=$(az account show | jq -r '.id')
export REGION

rdoria1 and others added 29 commits May 28, 2020 14:29
- Implement skeleton for azure-infrastructure
- Implement skeleton for azure-infrastructure
- Addressed some comments.
Templates for Function App and API Management were added
The necessary resources have been added to make a request to the
/graphql endpoint
# Conflicts:
#	packages/framework-provider-azure-infrastructure/package.json
#	packages/framework-provider-azure/package.json
Some dependencies screwed up the types used for stubs and spies with
Sinon. Momentarily @ts-ignore was added to these lines but a better way
to handle these types must be found.
@MarcAstr0
Copy link
Collaborator Author

bot: integration

@MarcAstr0 MarcAstr0 merged commit a471f56 into master Jul 20, 2020
@MarcAstr0 MarcAstr0 deleted the BOOST-730-implement-azure-resources branch July 20, 2020 20:12
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

Successfully merging this pull request may close these issues.

2 participants