Giter VIP home page Giter VIP logo

azure-sdk-tools-xplat's Introduction

Microsoft Azure Xplat-CLI for Windows, Mac and Linux

NPM version Build Status

This project provides a cross-platform command line interface for developers and IT administrators to develop, deploy and manage Microsoft Azure applications.

Features

  • Accounts
    • Azure Active Directory authentication for Organizational ID
    • Download and import Azure publish settings
    • List imported Azure subscriptions
    • Select current subscription
    • Manage Azure environments
    • Create and manage affinity groups
    • Export management certificate
  • Storage
    • Create and manage Storage Accounts
    • Create and manage container, blob and ACL
  • Websites
    • Create and manage Microsoft Azure websites
    • Download site log files and get real time log streaming
    • Manage Deployments
    • Configure GitHub integration
    • Create, manage and swap slots
    • Create and manage WebJobs
  • Virtual machines
    • Create and manage Windows and Linux Virtual machines
    • Create and manage VM endpoints
    • Create and manage Virtual Machine Images
    • Create and manage certificates
    • CloudInit for Ubuntu VM
    • Create and manage Docker host virtual machines
  • Network
    • Import and export network configuration
    • Create and manage virtual network
    • Create and manage DNS server
  • Mobile Services
    • Create and manage Mobile Services
    • Manage tables, scripts, and configuration
    • Access logs
    • Access data
  • Service Bus
    • Create and manage Service Bus namespaces
  • SQL Database
    • Create and manage SQL Servers, Firewall rules and Databases
  • Resource Manager
    • Manage resource groups and deployments
    • Query and download gallery templates
    • Manage individual resources

Installation

Install from npm

You can install the azure-cli npm package directly.

npm install -g azure-cli

Pre-compiled installers

  • Windows
  • Mac
  • Linux

Download Source Code

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

git clone https://github.com/Azure/azure-sdk-tools-xplat.git
cd ./azure-sdk-tools-xplat
npm install

Configure auto-complete

Auto-complete is supported for Mac and Linux.

To enable it in zsh, run:

echo '. <(azure --completion)' >> .zshrc

To enable it in bash, run:

azure --completion >> ~/azure.completion.sh
echo 'source ~/azure.completion.sh' >> .bash_profile

Get Started

In general, following are the steps:

  • Get yourself authenticated with Microsoft Azure. For details, please check out this article.
    • Option 1: Login with your Organizational account. Azure Active Directory authentication is used in this case. No management certificate is needed. Note: Microsoft account is not supported in this approach right now. You can create an Organizational account from the Azure portal for free.
    • Option 2: Download and import a publish settings file which contains a management certificate.
  • Use the commands

The first step can be different for different environment you are targeting. Following are detail instructions for each supported environment.

Microsoft Azure

If you use both mechanisms on the same subscription, Azure Active Directory authentication always wins. If you want to go back to management certificate authentication, please use azure logout, which will remove the Azure Active Directory information and bring management certificate authentication back in.

Login directly from xplat-cli (Azure Active Directory authentication)

# This will prompt for your password in the console
azure login -u <your organizational ID email address>

# use the commands to manage your services/applications
azure site create --location "West US" mywebsite

Use publish settings file (Management certificate authentication)

# Download a file which contains the publish settings information of your subscription.
# This will open a browser window and ask you to log in to get the file.
azure account download

# Import the file you just downloaded.
# Notice that the file contains credential of your subscription so you don't want to make it public
# (like check in to source control, etc.).
azure account import <file location>

# Use the commands to manage your services/applications
azure site create --location "West US" mywebsite

2 Modes

Starting from 0.8.0, we are adding a separate mode for Resource Manager. You can use the following command to switch between the

  • Service management: commands using the Azure service management API
  • Resource manager: commands using the Azure Resource Manager API

They are not designed to work together.

azure config mode asm # service management
azure config mode arm # resource manager

For more details on the commands, please see the command line tool reference and this How to Guide

Docker

Usage is same as standard vm create.�

azure vm docker create [options] <dns-name> <image> <user-name> [password]

This command only supports Ubuntu 14.04 based images. Docker is configured on the VM using HTTPS as described here: http://docs.docker.io/articles/https/ By default, certificates are put in ~/.docker, and Docker is configured to run on port 4243. These can be configured using new options:

-dp, --docker-port [port]              Port to use for docker [4243]
-dc, --docker-cert-dir [dir]           Directory containing docker certs [.docker/]

After the VM is created. It can be used as a Docker host with the -H option or DOCKER_HOST environment variable.

docker --tls -H tcp://<my-host>.cloudapp.net:4243 run

Note: To run docker commands on windows make sure ssl agent is installed.

Running Tests

See this page for instructions that describe how to run the test suite.

Learn More

For documentation on how to host Node.js applications on Microsoft Azure, please see the Microsoft Azure Node.js Developer Center.

For more extensive documentation on the new cross platform CLI tool for Mac and Linux, please see this reference and this How to Guide

azure-sdk-tools-xplat's People

Contributors

acharyarajiv avatar amarzavery avatar anuchandy avatar babumuralidharan avatar davidni avatar dubistkomisch avatar egamma avatar einaros avatar fkjellberg avatar glennblock avatar guangyang avatar henryrawas avatar jeffwilcox avatar joostdenijs avatar lodejard avatar loudej avatar markcowl avatar orangemocha avatar paulbatum avatar phvannor avatar pofallon avatar pranavkm avatar pvbchak avatar smarx avatar suwatch avatar tjanczuk avatar vsemogutor avatar xmbms avatar yamatoya avatar yugangw-msft avatar

Watchers

 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.