Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2018-06-19 03:20:14
Size: 210
Editor: PieterSmit
Comment:
Revision 6 as of 2018-06-26 07:57:20
Size: 1317
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:

== AZ cli tool ==

 * AZ cli {{{
$ docker run -it microsoft/azure-cli
az login
   }}}
 * In the AZ cli, create a principal account to be used by automation [[https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest]]


== Powershell ==
Line 8: Line 19:
 * Run azure
   * https://shell.azure.com/
     {{{
$ azure login
info: Executing command login
- Authenticating...info: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code HAY8K6VD6 to authenticate.
info: Added subscription Free Trial
+
info: login command OK
pieter@Azure:~$
     }}}
   * Get details {{{
$ az account show
     }}}


   * Create a service account {{{
$ az ad sp create-for-rbac --name "SALT-ADMIN"
{
  "appId": "a0a000-0000-00000-0000-20",
  "displayName": "SALT-ADMIN",
  "name": "http://SALT-ADMIN",
  "password": "20000000-0000-0000-0000-000000000005",
  "tenant": "20000000-0000-0000-0000-000000000003"
}
}}}

  * create ResourceGroup {{{
az group create -n testRG -l "Australia East"
    }}}

Azure Cloud (Microsoft)

AZ cli tool

Powershell

  • Powershell on Linux using docker
    •  $ docker pull mcr.microsoft.com/powershell 

    •  $ docker run -it microsoft/powershell 

  • Run azure
    • https://shell.azure.com/

      • $ azure login
        info:    Executing command login
        - Authenticating...info:    To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code HAY8K6VD6 to authenticate.
        info:    Added subscription Free Trial
        +
        info:    login command OK
        pieter@Azure:~$
    • Get details

      $ az account show
    • Create a service account

      $ az ad sp create-for-rbac --name "SALT-ADMIN"
      {
        "appId": "a0a000-0000-00000-0000-20",
        "displayName": "SALT-ADMIN",
        "name": "http://SALT-ADMIN",
        "password": "20000000-0000-0000-0000-000000000005",
        "tenant": "20000000-0000-0000-0000-000000000003"
      }
    • create ResourceGroup

      az group create -n testRG -l "Australia East"

...

Azure (last edited 2024-03-04 04:46:47 by PieterSmit)