Skip to content

Instantly share code, notes, and snippets.

@pjirsa
Last active March 24, 2022 14:48
Show Gist options
  • Save pjirsa/93a93c547c62c4d4ecb05b4ee978e000 to your computer and use it in GitHub Desktop.
Save pjirsa/93a93c547c62c4d4ecb05b4ee978e000 to your computer and use it in GitHub Desktop.
Azure CLI

snippets

Useful code snippets for future reference

Azure Container Instances

Run nextflow-io/hello sample pipeline in ACI

az container create \
  --resource-group demo-aci \
  --name demo-aci \
  --image nextflow/nextflow:21.10.6 \
  --restart-policy Never \
  --command-line "nextflow run nextflow-io/hello"

Create a container instance using a yaml file

az container create --resource-group demo --name openemr --file aci.yml

Virtual Machines

Use secure copy utility to copy files from remote linux VM to local machine scp -r azureuser@simplelinuxvm-hli6aqxtwj2yy.centralus.cloudapp.azure.com:~/pipelines/havoc/. .

Kubernetes

Create a basic 1-node cluster with monitoring

az aks create \
  --resource-group demo \
  --name demoCluster \
  --node-count 1 \
  --enable-addons monitoring \
  --generate-ssh-keys

Azure CLI

Get an access token for resource az account get-access-token --resource=https://graph.microsoft.com --query accessToken --output tsv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment