Code Monkey home page Code Monkey logo

hybrid-python-samples's Introduction

page_type languages products description urlFragment
sample
python
azure
samples to demonstrate various interaction with azure stack using azure python SDK.
Hybrid-Python-Samples

Hybrid-Python-Samples

This repository is for Azure Stack Hub python sdk samples. Each of the sub-directories contain README.md files detailing how to run that sample.

Prerequisites Refer to this azure stack doc for more information: https://docs.microsoft.com/en-us/azure-stack/user/azure-stack-version-profiles-python

  1. If you don't already have it, install Python.

  2. We recommend to use a virtual environnement to run this example, but it's not mandatory. You can initialize a virtualenv this way:

    pip install virtualenv
    virtualenv mytestenv
    cd mytestenv
    source bin/activate
    
  3. Clone the repository.

    git clone https://github.com/Azure-Samples/Hybrid-Python-Samples.git
    
  4. From the root of this repository, install the dependencies using pip.

    pip install -r requirements.txt
    
  5. Create a service principal to work against Azure Stack. Make sure your service principal has contributor/owner role on your subscription.

  6. Make a copy of azureSecretSpConfig.json.dist and azureCertSpConfig.json.dist, then rename those copies to azureSecretSpConfig.json and azureCertSpConfig.json (whichever is needed).

  7. Set the following JSON properties in ./azureSecretSpConfig.json.

    Variable Description
    clientId Service principal application id.
    clientSecret Service principal application secret.
    tenantId Azure Stack Hub tenant id.
    objectId Service principal object id.
    subscriptionId Subscription id used to access offers in Azure Stack Hub.
    resourceManagerEndpointUrl Azure Stack Hub Resource Manager Endpoint.
    location Azure Resource location.
  8. Run the sample within each individual sample folders with the following:

    python example.py
    

hybrid-python-samples's People

Contributors

abbhar avatar bganapa avatar microsoftopensource avatar msftgits avatar theonlywei avatar v-rajagt-zz avatar viananth avatar

Stargazers

 avatar  avatar

Watchers

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

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.