зеркало из
1
0
Форкнуть 0
Ruby SDK for Azure Resource Manager: build and manage your Azure cloud infrastructure (Compute, Virtual Networks, Storage, etc...) using Ruby.
Перейти к файлу
AutorestCI ba021dd5d6 Generated from 6274e33d94b0bef7bbc62825076287f37ed41633 (#983) 2017-09-26 12:53:15 -07:00
azure_sdk Update ms_rest_azure to version 0.9.0 & azure_sdk to 0.12.0 2017-09-11 12:10:59 -07:00
management Generated from 75926b97fa6ea2c49e751d80c35aa916c6e5523a (#982) 2017-09-26 12:52:34 -07:00
runtime Release ms_rest_azure version 0.9.0 (#963) 2017-09-11 11:41:40 -07:00
scripts Allow failure while testing azure_mgmt_* sdks against latest checked-in runtime (#671) 2017-02-07 13:10:42 -08:00
.env_sample Moving Azure classic (asm) source code to asm brach & deleting from master (#405) 2016-08-05 17:33:17 -07:00
.gitignore Moving Azure classic (asm) source code to asm brach & deleting from master (#405) 2016-08-05 17:33:17 -07:00
.travis.yml Using bundler version 1.14.1 2017-08-21 08:20:22 -07:00
ARM_VERSION Update top level version file & swagger-to-sdk to 0.12.0 2017-09-09 12:14:22 -07:00
ChangeLog.md Update README and ChangeLog 2017-09-11 13:08:47 -07:00
Gemfile Remove use of private fork for azure-core 2017-08-22 08:19:13 -07:00
README.md Update README and ChangeLog 2017-09-11 13:08:47 -07:00
Rakefile Revert "[rake arm:release] Rescue error while publishing (#972)" (#973) 2017-09-11 18:23:56 -07:00
swagger_to_sdk_config.json Update top level version file & swagger-to-sdk to 0.12.0 2017-09-09 12:14:22 -07:00
vcr_helper.rb Ignore query parameters on recording playback (#524) 2016-11-01 17:30:13 -07:00

README.md

Microsoft Azure SDK for Ruby - Resource Management (preview)

Build Status Code Climate

This project provides a Ruby package for Azure Resource Management (ARM). If you're looking for Azure Service Management (ASM) please refer to this repo

Additional info on Azure deployment models https://azure.microsoft.com/en-us/documentation/articles/azure-classic-rm/

Azure Resource Management (preview)

  • Authorization Azure Resource Manager role based authorization
  • Batch Azure Batch Management Account & Application operations management
  • CDN Azure Content Delivery Network
  • Cognitive Services Azure Cognitive Services Account management
  • Commerce Azure Commerce Usage aggregates & Rate card management
  • Compute Virtual Machines, Images, Extensions, Availability Sets, etc...
  • Datalake Analytics Azure Datalake Analytics Account, Catalog and Job management
  • Datalake Store Azure Datalake Store Account and FileSystem management
  • DevTest Labs Azure DevTest Labs LabOperations, ArtifactSourceOperations, ArtifactOperations, CostOperations etc...
  • DNS Azure DNS Record Set and Zone management
  • Features Feature Exposure Controls
  • Graph Azure Active Directory Applications, Users, etc...
  • Monitor Azure Monitor management
  • IoTHub Azure IoTHub's Resource Management
  • Key Vault Azure Key Vault's vault management
  • Locks Management locks for Azure Resources
  • Logic Integration Accounts, AccountSchemas, AccountMaps, AccountPartners etc...
  • Machine Learning Azure Machine Learning web services management
  • Media Services Media Services resource management APIs
  • Mobile Engagement Azure Mobile Engagement's Apps, App Collections, Devices management APIs
  • Network Load Balancers, Network Gateways, Security Groups, etc...
  • Notification Hubs Notification Hubs management
  • Policy Policy Assignment & Policy definition operations
  • Powerbi Embedded Azure Powerbi Embedded Workspace & WorkspaceCollection management
  • Redis Redis resource management
  • Resources Resource Groups, Resource Providers, Template Deployments, Operations, etc...
  • Scheduler Manage scheduled jobs in Azure
  • Search Manage Search resources
  • Server Management Azure Server Management Service like node, gateway, powershell etc..
  • SQL Manage Azure SQL resources
  • Storage Account Creation, Usage Operations, etc...
  • Stream Analytics Create, update, start, stop streaming jobs etc...
  • Subscriptions Manage Azure subscriptions
  • Traffic Manager Azure Traffic Manager's profile & endpoint management
  • WebApps Manage WebApps, formally known as WebSites

Azure Services

Supported Ruby Versions

  • Ruby 2+

Note: x64 Ruby for Windows is known to have some compatibility issues.

Getting Started with Azure Resource Manager Usage (Preview)

Install the rubygem packages

You can install the azure rubygem packages directly.

gem install azure_mgmt_compute
gem install azure_mgmt_storage
gem install azure_mgmt_resources
gem install azure_mgmt_network

Or use them in your Gemfile.

gem 'azure_mgmt_storage'
gem 'azure_mgmt_compute'
gem 'azure_mgmt_resources'
gem 'azure_mgmt_network'

Be aware the Azure Resource Manager Ruby SDK is in preview and will likely have breaking interface changes in upcoming releases. An increased number in Minor version may indicate breaking changes.

Authentication

The first step to using the SDK is authentication and permissions. For people unfamilar with Azure this may be one of the more difficult concepts. For a reference on setting up a service principal from the command line see Authenticating a service principal with Azure Resource Manager or Unattended Authentication. For a more robust explanation of authentication in Azure, see Developers guide to auth with Azure Resource Manager API.

After creating the service principal, you should have three pieces of information, a client id (GUID), client secret (string) and tenant id (GUID) or domain name (string).

Getting Started Samples

The tests for the libraries should provide a good example of how to get started with the clients. You can also see the readme for each of the libraries Compute, Network, Storage, or Resources.

For more getting started samples go to Azure-Samples. Please make sure to look for the azure_mgmt_* gem versions for samples.

Contribute Code or Provide Feedback

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Development Environment Setup

Download Source Code

To get the source code of the SDK via git just type:

git clone https://github.com/Azure/azure-sdk-for-ruby.git
cd ./azure-sdk-for-ruby

Then, run bundler to install all the gem dependencies:

bundle install

Run Recorded Integration Tests

  • Set the environment variable INTEG_RECORDED = true
  • Run rake arm:spec

Re-Record Integration Tests

  • Set the environment variable INTEG_RECORDED = false or un-set it
  • Copy .env_sample to .env
  • Update .env with your Azure credentials .env is in the .gitignore, so should only reside locally
  • Run specific test using rspec example:
 cd ./management/azure_mgmt_compute
 rspec spec/virtual_machines_spec.rb

If vcr cassette exist then it'll replay the test otherwise it'll record it.

Generate Documentation

Running the command yard will generate the API documentation in the ./doc directory.

Re-Gen all azure_mgmt_* SDKs

Follow the steps below to regenerate all the azure_mgmt_* sdks using autorest.ruby generator:

  1. Install Node.js version 7.10.0 or greater
  2. Install autorest using npm install -g autorest
  3. Run bundle install in the root directory of the project
  4. Run rake arm:regen task to regenerate all the management SDKs

Provide Feedback

If you encounter any bugs with the library please file an issue in the Issues section of the project. Please make sure to label the issues with either arm or asm to help us expedite the process.

Azure CLI Tooling

For documentation on Azure PowerShell. For documentation on Azure CLI.


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.