Showing posts with label education. Show all posts
Showing posts with label education. Show all posts

Saturday, September 30, 2023

Procedure to restore selected list of archivelogs in oracle

Procedure to restore selected list of archivelogs


Steps overview:

0. Verify the control_file_record_keeptime parameter

1. Find out the list of archivelogs really available

2. Now define the goal of which archives we needed to restore

3. Verify if we have backup for the archvielog

4. Kick off the restore from rman

5. Verify if the archivelogs are now showing in v$archived_log


Execution:


0. Verify the control_file_record_keep_time parameter


show parameter control_file_record_keep_time;


Output:


SQL> show parameter control_file_record_keep_time;


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

control_file_record_keep_time        integer     60




1. Find out the list of archivelogs really available


export NLS_DATE_FORMAT='DD/MON/YYYY HH24:MI:SS';

rman> crosscheck archivelog all;

alter session set nls_date_format='DD/MON/YYYY HH24:MI:SS';

set lines 200

set pages 3000

set colsep ,

select sequence#,status,completion_time,first_change#,next_change# from v$archived_log order by 1;


Output:


RMAN> crosscheck archivelog all;


using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=73 device type=DISK

validation succeeded for archived log

archived log file name=/oraarch/GGSRC04T/archivelog/2023_08_26/o1_mf_1_15_lgncg2vp_.arc RECID=7 STAMP=1145901138

validation succeeded for archived log

archived log file name=/oraarch/GGSRC04T/archivelog/2023_09_03/o1_mf_1_16_lh9r7shc_.arc RECID=8 STAMP=1146602380

validation succeeded for archived log

...

validation succeeded for archived log

archived log file name=/oraarch/GGSRC04T/archivelog/2023_09_30/o1_mf_1_35_lkhq2q2r_.arc RECID=41 STAMP=1148894951

validation succeeded for archived log

archived log file name=/oraarch/GGSRC04T/archivelog/2023_09_30/o1_mf_1_36_lkj0lyq4_.arc RECID=42 STAMP=1148904688

Crosschecked 22 objects



RMAN>


SQL> alter session set nls_date_format='DD/MON/YYYY HH24:MI:SS';


Session altered.


SQL> select sequence#,status,completion_time,first_change#,next_change# from v$archived_log order by sequence#;


 SEQUENCE#,S,COMPLETION_TIME     ,FIRST_CHANGE#,NEXT_CHANGE#

----------,-,--------------------,-------------,------------

        15,A,26/AUG/2023 17:52:18,       459810,      460509

        16,A,03/SEP/2023 20:39:40,       460509,      577599

        17,A,03/SEP/2023 20:57:41,       577599,      586943

        18,A,03/SEP/2023 21:19:23,       586943,      590545

        19,A,03/SEP/2023 21:21:02,       590545,      590839

        20,A,03/SEP/2023 21:21:03,       590839,      590846

        21,A,03/SEP/2023 21:24:51,       590846,      591366

..

        33,A,25/SEP/2023 16:50:51,       689053,      689058

        34,A,25/SEP/2023 16:50:53,       689058,      689067

        34,A,25/SEP/2023 16:50:54,       689058,      689067

        35,A,30/SEP/2023 09:29:11,       689067,      721250

        36,A,30/SEP/2023 12:11:28,       721250,      772138


36 rows selected.



2. Now define the goal of which archives we needed to restore


We need archives covering change 459732, this needs to be accessible from logminer. So I am going to restore archive which has this change-1 (459731).


>> goal defined


3. Verify if we have backup for the archvielog


list backup of archivelog from scn 459730;


output:


RMAN> list backup of archivelog from scn 459730;


using target database control file instead of recovery catalog


List of Backup Sets

===================



BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ --------------------

10      655.50K    DISK        00:00:00     26/AUG/2023 17:52:19

        BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TAG20230826T175219

        Piece Name: /oraarch/GGSRC04T/DBBackup/rman_arch_GGSRC04T_3024q42j_1_1


  List of Archived Logs in backup set 10

  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time

  ---- ------- ---------- -------------------- ---------- ---------

  1    14      458962     26/AUG/2023 17:42:45 459810     26/AUG/2023 17:48:39

  1    15      459810     26/AUG/2023 17:48:39 460509     26/AUG/2023 17:52:18




4. Kick off the restore from rman


restore archivelog from scn 459730;


output:


RMAN> restore archivelog from scn 459730;


Starting restore at 30/SEP/2023 12:25:28

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=68 device type=DISK


archived log for thread 1 with sequence 15 is already on disk as file /oraarch/GGSRC04T/archivelog/2023_08_26/o1_mf_1_15_lgncg2vp_.arc

archived log for thread 1 with sequence 16 is already on disk as file /oraarch/GGSRC04T/archivelog/2023_09_03/o1_mf_1_16_lh9r7shc_.arc

archived log for thread 1 with sequence 17 is already on disk as file /oraarch/GGSRC04T/archivelog/2023_09_03/o1_mf_1_17_lh9s9nyw_.arc

...

khq2q2r_.arc

archived log for thread 1 with sequence 36 is already on disk as file /oraarch/GGSRC04T/archivelog/2023_09_30/o1_mf_1_36_lkj0lyq4_.arc

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=14

channel ORA_DISK_1: reading from backup piece /oraarch/GGSRC04T/DBBackup/rman_arch_GGSRC04T_3024q42j_1_1

channel ORA_DISK_1: piece handle=/oraarch/GGSRC04T/DBBackup/rman_arch_GGSRC04T_3024q42j_1_1 tag=TAG20230826T175219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 30/SEP/2023 12:25:30


RMAN>



5. Verify if the archivelogs are now showing in v$archived_log


alter session set nls_date_format='DD/MON/YYYY HH24:MI:SS';

select sequence#,status,completion_time,first_change#,next_change# from v$archived_log order by 1;


Output:


SQL> select sequence#,status,completion_time,first_change#,next_change# from v$archived_log order by 1;


 SEQUENCE#,S,COMPLETION_TIME     ,FIRST_CHANGE#,NEXT_CHANGE#

----------,-,--------------------,-------------,------------

        14,A,30/SEP/2023 12:25:29,       458962,      459810

        15,A,26/AUG/2023 17:52:18,       459810,      460509

        16,A,03/SEP/2023 20:39:40,       460509,      577599

        17,A,03/SEP/2023 20:57:41,       577599,      586943

..

        34,A,25/SEP/2023 16:50:54,       689058,      689067

        35,A,30/SEP/2023 09:29:11,       689067,      721250

        36,A,30/SEP/2023 12:11:28,       721250,      772138


37 rows selected.


SQL> select name from v$archived_log where sequence#=14;


NAME

------------------------------------------------------------------

/oraarch/GGSRC04T/archivelog/2023_09_30/o1_mf_1_14_lkj1f92g_.arc


SQL>



YouTube Video:




Saturday, September 23, 2023

How to plot a Gantt Chart using Google Sheet

Steps to plot a Gantt Chart using Google Sheet


Credits: https://www.youtube.com/watch?v=un8j6QqpYa0


This YouTube video is for Microsoft Excel, but I felt if you use Microsoft Office you will need an ofc365 subscription for full feature usage. The Google Sheet alternatively brings in most of the features of office 365 at no cost though but you can collaborate with others.


1. Populate raw data


To allocate work dates for effort:

=if(networkdays(E9,E9+C9)=C9,E9+C9,E9+(C9-networkdays(E9,E9+C9)+C9))


To allocate nonwork dates for effort:

=if(weekday(E9+(round(C9/2)*7))=0,E9+(round(C9/2)*7),E9+1+(round(C9/2)*7)-weekday(E9+(round(C9/2)*7)))


2. Populate the timeline info

3. Create named range for display_week

4. Relating the timelines for better tracking


=($D$2+(Display_Week-1)*7)


5. Basic formatting

a. Display week border

b. Frame borders for date field

c. Frame shades for date field

c. Format date fields

b. Align milestones


6. Custom formatting 1 (gannt view)


=AND(G$5>=$E7,G$5<=$F7)


7. Custom formatting 2 (progress bar)


8. Custom formatting 3 (gannt chart update)


=1*AND(G$5>=$E7,G$5<=$E7+($D7*($F7-$E7+1))-1)


9. reorder conditional formatting 3 and 1


10. Printing


YouTube vide of the above content:





Sunday, September 10, 2023

How to create a compute instance & compute cluster using azure cli in ML workspace from local Linux machine

How to create a compute instance & compute cluster using azure cli in ML workspace from local linux machine


1) Step verify if there are any compute instance already alive


az resource list

>> pre value collected

az ml compute list -g "rg-dp100-labs" -w "mlw-dp100-labs"


2) Step create compute instance

compute intance:

az ml compute create --name "mlw-dp100-labs-compute01" --size Standard_A1_v2 --type ComputeInstance -w mlw-dp100-labs -g rg-dp100-labs


Actual output:

(azcli) [vagrant@localhost ~]$ az ml compute create --name "mlw-dp100-labs-compute01" --size Standard_A1_v2 --type ComputeInstance -w mlw-dp100-labs -g rg-dp100-labs
{
  "enable_node_public_ip": true,
  "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.MachineLearningServices/workspaces/mlw-dp100-labs/computes/mlw-dp100-labs-compute01",
  "last_operation": {
    "operation_name": "Create",
    "operation_status": "Succeeded",
    "operation_time": "2023-09-09T16:31:17.712Z",
    "operation_trigger": "User"
  },
  "location": "ukwest",
  "name": "mlw-dp100-labs-compute01",
  "network_settings": {
    "private_ip_address": "10.0.0.5",
    "public_ip_address": "51.141.124.49"
  },
  "os_image_metadata": {
    "current_image_version": "23.06.30",
    "is_latest_os_image_version": true,
    "latest_image_version": "23.06.30"
  },
  "provisioning_state": "Succeeded",
  "resourceGroup": "rg-dp100-labs",
  "services": [
    {
      "display_name": "Jupyter",
      "endpoint_uri": "https://mlw-dp100-labs-compute01.ukwest.instances.azureml.ms/tree/"
    },
    {
      "display_name": "Jupyter Lab",
      "endpoint_uri": "https://mlw-dp100-labs-compute01.ukwest.instances.azureml.ms/lab"
    }
  ],
  "size": "STANDARD_A1_V2",
  "ssh_public_access_enabled": false,
  "ssh_settings": {
    "admin_username": "azureuser",
    "ssh_port": "4001"
  },
  "state": "Running",
  "type": "computeinstance"
}


compute cluster:

az ml compute create --name "aml-cluster" --size Standard_A1_v2 --max-instances 2 --type AmlCompute -w mlw-dp100-labs -g rg-dp100-labs

Actual output:

(azcli) [vagrant@localhost ~]$ az ml compute create --name "aml-cluster" --size Standard_A1_v2 --max-instances 2 --type AmlCompute -w mlw-dp100-labs -g rg-dp100-labs

{
  "enable_node_public_ip": true,
  "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.MachineLearningServices/workspaces/mlw-dp100-labs/computes/aml-cluster",
  "idle_time_before_scale_down": 120,
  "location": "ukwest",
  "max_instances": 2,
  "min_instances": 0,
  "name": "aml-cluster",
  "network_settings": {},
  "provisioning_state": "Succeeded",
  "resourceGroup": "rg-dp100-labs",
  "size": "STANDARD_A1_V2",
  "ssh_public_access_enabled": true,
  "tier": "dedicated",
  "type": "amlcompute"
}
(azcli) [vagrant@localhost ~]$


3) Verify again the resource list and compute instances

az resource list

>> no difference to the past output. Since the compute instance and cluster are associated to ML workspace.

az ml compute list -g "rg-dp100-labs" -w "mlw-dp100-labs"


Actual output:


(azcli) [vagrant@localhost ~]$ az ml compute list -g "rg-dp100-labs" -w "mlw-dp100-labs"
[
  {
    "enable_node_public_ip": true,
    "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.MachineLearningServices/workspaces/mlw-dp100-labs/computes/mlw-dp100-labs-compute01",
    "last_operation": {
      "operation_name": "Create",
      "operation_status": "Succeeded",
      "operation_time": "2023-09-09T16:31:17.712Z",
      "operation_trigger": "User"
    },
    "location": "ukwest",
    "name": "mlw-dp100-labs-compute01",
    "network_settings": {
      "private_ip_address": "10.0.0.5",
      "public_ip_address": "51.141.124.49"
    },
    "os_image_metadata": {
      "current_image_version": "23.06.30",
      "is_latest_os_image_version": true,
      "latest_image_version": "23.06.30"
    },
    "provisioning_state": "Succeeded",
    "resourceGroup": "rg-dp100-labs",
    "services": [
      {
        "display_name": "Jupyter",
        "endpoint_uri": "https://mlw-dp100-labs-compute01.ukwest.instances.azureml.ms/tree/"
      },
      {
        "display_name": "Jupyter Lab",
        "endpoint_uri": "https://mlw-dp100-labs-compute01.ukwest.instances.azureml.ms/lab"
      }
    ],
    "size": "STANDARD_A1_V2",
    "ssh_public_access_enabled": false,
    "ssh_settings": {
      "admin_username": "azureuser",
      "ssh_port": "4001"
    },
    "state": "Running",
    "type": "computeinstance"
  },
  {
    "enable_node_public_ip": true,
    "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.MachineLearningServices/workspaces/mlw-dp100-labs/computes/aml-cluster",
    "idle_time_before_scale_down": 120,
    "location": "ukwest",
    "max_instances": 2,
    "min_instances": 0,
    "name": "aml-cluster",
    "network_settings": {},
    "provisioning_state": "Succeeded",
    "resourceGroup": "rg-dp100-labs",
    "size": "STANDARD_A1_V2",
    "ssh_public_access_enabled": true,
    "tier": "dedicated",
    "type": "amlcompute"
  }
]
(azcli) [vagrant@localhost ~]$

How to train a model using Azure ML

How to train a model using Azure ML


1) Launching a terminal for the compute instance


click on compute instance and then "..." near jupyter notebook and launch terminal (if still not launched, use "+" symbol to launch the terminal)


2) installing azure-ai-ml from the terminal


pip uninstall azure-ai-ml


>>> by default none installed


pip install azure-ai-ml


Actual output:


>>> copy/paste wasnt possible (it finished fine with exception for blog and file-share with compatible warnings)


3) cloning azure-ml-labs git repo


git clone https://github.com/MicrosoftLearning/mslearn-azure-ml.git azure-ml-labs


4)  Verify we get new folders created


Users/your-user-name/azure-ml-labs folder has been created.


>> yes we have


5) Open the Labs/02/"Run training script.ipynb" notebook.


6) Verify that the notebook uses the Python 3.8 - AzureML kernel. Each kernel has its own image with its own set of packages pre-installed.


7) Run all cells in the notebook.


>>> here we needed to reauthenticate the visual studio, post reauthentication, we can continue running the cell. The job should run and complete.


8) Check the job progress


Queued -> Preparing -> Running -> finalizing -> Completed


Once job is complete, we can click on the job to see the model's accuracy.

How to create a resource group & ML workspace in Azure using azure cli (az) from local linux machine

How to create a resource group & ML workspace in Azure using azure cli (az) from local linux machine

1) Login to Azure

az login

>>> the command will ask you to authenticate the connection using a code. Finish it before next step.

2) let us list the subscriptions we have:

az account show

3) List down the azure regions:

az account list-locations

Our preferred location:
          "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/locations/ukwest",
          "name": "ukwest",
          "subscriptionId": null



4) Create the azure resource group:

az group create --name "rg-dp100-labs" --location "ukwest"

output:

(azcli) [vagrant@localhost ~]$ az group create --name "rg-dp100-labs" --location "ukwest"
{
  "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs",
  "location": "ukwest",
  "managedBy": null,
  "name": "rg-dp100-labs",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": null,
  "type": "Microsoft.Resources/resourceGroups"
}
(azcli) [vagrant@localhost ~]$


5) List the available resource groups:

Command:

az group list

Output:

(azcli) [vagrant@localhost ~]$ az group list
[
  {
    "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs",
    "location": "ukwest",
    "managedBy": null,
    "name": "rg-dp100-labs",
    "properties": {
      "provisioningState": "Succeeded"
    },
    "tags": null,
    "type": "Microsoft.Resources/resourceGroups"
  }
]
(azcli) [vagrant@localhost ~]$


6) Create Azure ML workspace

az ml workspace create --name "mlw-dp100-labs" -g "rg-dp100-labs"

Actual output:

(azcli) [vagrant@localhost ~]$ az ml workspace create --name "mlw-dp100-labs" -g "rg-dp100-labs"
Class ManagedNetwork: This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
The deployment request mlw-dp100-labs-6349534 was accepted. ARM deployment URI for reference:
https://portal.azure.com//#blade/HubsExtension/DeploymentDetailsBlade/overview/id/%2Fsubscriptions%2F67ed360b-95af-4a7f-b398-f459c8118cc1%2FresourceGroups%2Frg-dp100-labs%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fmlw-dp100-labs-6349534
Creating Log Analytics Workspace: (mlwdp100logalyti0d1ce113  ) ..  Done (16s)
Creating Application Insights: (mlwdp100insightsef9fc48f  )  Done (18s)
Creating Key Vault: (mlwdp100keyvault9db8214d  )  Done (24s)
Creating Storage Account: (mlwdp100storageb8dadeb6f  )   Done (28s)
Creating AzureML Workspace: (mlw-dp100-labs  ) ..  Done (18s)
Total time : 47s
Class ManagedNetworkSchema: This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
Class ManagedNetworkStatusSchema: This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
{
  "application_insights": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.insights/components/mlwdp100insightsef9fc48f",
  "description": "mlw-dp100-labs",
  "discovery_url": "https://ukwest.api.azureml.ms/discovery",
  "display_name": "mlw-dp100-labs",
  "enable_data_isolation": false,
  "hbi_workspace": false,
  "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.MachineLearningServices/workspaces/mlw-dp100-labs",
  "identity": {
    "principal_id": "64a46edf-9d6d-4f59-837a-d7d2eb5079c2",
    "tenant_id": "4e050b03-5c99-495a-8385-689d04c7baed",
    "type": "system_assigned"
  },
  "key_vault": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.Keyvault/vaults/mlwdp100keyvault9db8214d",
  "location": "ukwest",
  "managed_network": {
    "isolation_mode": "disabled",
    "outbound_rules": []
  },
  "mlflow_tracking_uri": "azureml://ukwest.api.azureml.ms/mlflow/v1.0/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.MachineLearningServices/workspaces/mlw-dp100-labs",
  "name": "mlw-dp100-labs",
  "public_network_access": "Enabled",
  "resourceGroup": "rg-dp100-labs",
  "resource_group": "rg-dp100-labs",
  "storage_account": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.Storage/storageAccounts/mlwdp100storageb8dadeb6f",
  "tags": {
    "createdByToolkit": "cli-v2-1.9.0"
  }
}
(azcli) [vagrant@localhost ~]$


7) Verify the azure ml worskspace existance

az ml workspace list

(azcli) [vagrant@localhost ~]$ az ml workspace list
Class ManagedNetworkSchema: This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
Class ManagedNetworkStatusSchema: This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
[
  {
    "application_insights": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.insights/components/mlwdp100insightsef9fc48f",
    "description": "mlw-dp100-labs",
    "discovery_url": "https://ukwest.api.azureml.ms/discovery",
    "display_name": "mlw-dp100-labs",
    "enable_data_isolation": false,
    "hbi_workspace": false,
    "id": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.MachineLearningServices/workspaces/mlw-dp100-labs",
    "identity": {
      "principal_id": "64a46edf-9d6d-4f59-837a-d7d2eb5079c2",
      "tenant_id": "4e050b03-5c99-495a-8385-689d04c7baed",
      "type": "system_assigned"
    },
    "key_vault": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.Keyvault/vaults/mlwdp100keyvault9db8214d",
    "location": "ukwest",
    "managed_network": {
      "isolation_mode": "disabled",
      "outbound_rules": []
    },
    "mlflow_tracking_uri": "azureml://ukwest.api.azureml.ms/mlflow/v1.0/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.MachineLearningServices/workspaces/mlw-dp100-labs",
    "name": "mlw-dp100-labs",
    "public_network_access": "Enabled",
    "resourceGroup": "rg-dp100-labs",
    "resource_group": "rg-dp100-labs",
    "storage_account": "/subscriptions/67ed360b-95af-4a7f-b398-f459c8118cc1/resourceGroups/rg-dp100-labs/providers/Microsoft.Storage/storageAccounts/mlwdp100storageb8dadeb6f",
    "tags": {
      "createdByToolkit": "cli-v2-1.9.0"
    }
  }
]
(azcli) [vagrant@localhost ~]$

Setup Azure CLI Machine Learning (ml) extension on local linux machine to manage & automate all azure tasks

Setup Azure CLI Machine Learning (ml) extension

(azcli) [vagrant@localhost ~]$ az extension remove -n azure-cli-ml
The extension azure-cli-ml is not installed. Please install the extension via `az extension add -n azure-cli-ml`.

(azcli) [vagrant@localhost ~]$ az extension remove -n ml
The extension ml is not installed. Please install the extension via `az extension add -n ml`.
(azcli) [vagrant@localhost ~]$


Before extension installation:

(azcli) [vagrant@localhost ~]$ ls -altr ~/.azure/cliextensions
total 4
drwxrwxr-x. 6 vagrant vagrant 4096 Sep  9 14:51 ..
drwxrwxr-x. 2 vagrant vagrant    6 Sep  9 14:53 .
(azcli) [vagrant@localhost ~]$


Adding Azure Extension:

az extension add -n ml -y

(azcli) [vagrant@localhost ~]$ az extension add -n ml -y
(azcli) [vagrant@localhost ~]$

(azcli) [vagrant@localhost ~]$ echo $?
0
(azcli) [vagrant@localhost ~]$


How does it look after extension is added:

ls -altr ~/.azure/cliextensions

(azcli) [vagrant@localhost ~]$ ls -altr ~/.azure/cliextensions
total 12
drwxrwxr-x.  6 vagrant vagrant 4096 Sep  9 14:51 ..
drwxrwxr-x.  3 vagrant vagrant   16 Sep  9 14:58 .
drwxrwxr-x. 98 vagrant vagrant 4096 Sep  9 14:58 ml
(azcli) [vagrant@localhost ~]$ 
(azcli) [vagrant@localhost ~]$ ls -altr ~/.azure/cliextensions/ml|wc -l
105
(azcli) [vagrant@localhost ~]$ 
(azcli) [vagrant@localhost ~]$ ls -altr ~/.azure/cliextensions/ml|more
total 8312
drwxrwxr-x.  2 vagrant vagrant     117 Sep  9 14:58 opencensus_context-0.1.3.dist-info
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 azure_common-1.1.28.dist-info
drwxrwxr-x.  4 vagrant vagrant    4096 Sep  9 14:58 websocket
drwxrwxr-x.  2 vagrant vagrant     126 Sep  9 14:58 websocket_client-1.6.2.dist-info
drwxrwxr-x.  6 vagrant vagrant    4096 Sep  9 14:58 urllib3
drwxrwxr-x.  2 vagrant vagrant     106 Sep  9 14:58 urllib3-1.26.16.dist-info
-rw-rw-r--.  1 vagrant vagrant  111082 Sep  9 14:58 typing_extensions.py
drwxrwxr-x.  2 vagrant vagrant      81 Sep  9 14:58 typing_extensions-4.7.1.dist-info
drwxrwxr-x.  4 vagrant vagrant    4096 Sep  9 14:58 tqdm
drwxrwxr-x.  2 vagrant vagrant     126 Sep  9 14:58 tqdm-4.66.1.dist-info
-rw-rw-r--.  1 vagrant vagrant   34549 Sep  9 14:58 six.py
drwxrwxr-x.  2 vagrant vagrant      74 Sep  9 14:58 __pycache__
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 six-1.16.0.dist-info
drwxrwxr-x.  3 vagrant vagrant     124 Sep  9 14:58 rpds
drwxrwxr-x.  3 vagrant vagrant      87 Sep  9 14:58 rpds_py-0.10.2.dist-info
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 jwt
drwxrwxr-x.  2 vagrant vagrant     121 Sep  9 14:58 PyJWT-2.8.0.dist-info
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 pydash
drwxrwxr-x.  2 vagrant vagrant     125 Sep  9 14:58 pydash-5.1.2.dist-info
drwxrwxr-x.  4 vagrant vagrant    4096 Sep  9 14:58 pycparser
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 pycparser-2.21.dist-info
drwxrwxr-x.  6 vagrant vagrant     115 Sep  9 14:58 pyasn1
drwxrwxr-x.  2 vagrant vagrant     122 Sep  9 14:58 pyasn1-0.5.0.dist-info
drwxrwxr-x.  4 vagrant vagrant    4096 Sep  9 14:58 psutil
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 psutil-5.9.5.dist-info
drwxrwxr-x.  2 vagrant vagrant      81 Sep  9 14:58 protobuf-4.24.3.dist-info
drwxrwxr-x.  3 vagrant vagrant     175 Sep  9 14:58 portalocker
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 portalocker-2.7.0.dist-info
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 packaging
drwxrwxr-x.  2 vagrant vagrant     122 Sep  9 14:58 packaging-23.1.dist-info
drwxrwxr-x.  6 vagrant vagrant     144 Sep  9 14:58 oauthlib
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 oauthlib-3.2.2.dist-info
drwxrwxr-x.  3 vagrant vagrant     190 Sep  9 14:58 idna
drwxrwxr-x.  2 vagrant vagrant      84 Sep  9 14:58 idna-3.4.dist-info
drwxrwxr-x.  4 vagrant vagrant     149 Sep  9 14:58 colorama
drwxrwxr-x.  3 vagrant vagrant      82 Sep  9 14:58 colorama-0.4.6.dist-info
drwxrwxr-x.  5 vagrant vagrant    4096 Sep  9 14:58 charset_normalizer
drwxrwxr-x.  2 vagrant vagrant     126 Sep  9 14:58 charset_normalizer-3.2.0.dist-info
drwxrwxr-x.  3 vagrant vagrant     112 Sep  9 14:58 certifi
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 certifi-2023.7.22.dist-info
drwxrwxr-x.  3 vagrant vagrant      74 Sep  9 14:58 cachetools
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 cachetools-5.3.1.dist-info
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 attr
drwxrwxr-x.  3 vagrant vagrant     179 Sep  9 14:58 attrs
drwxrwxr-x.  3 vagrant vagrant      82 Sep  9 14:58 attrs-23.1.0.dist-info
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 rsa
drwxrwxr-x.  2 vagrant vagrant     105 Sep  9 14:58 rsa-4.9.dist-info
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 requests
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 requests-2.31.0.dist-info
drwxrwxr-x.  4 vagrant vagrant    4096 Sep  9 14:58 referencing
drwxrwxr-x.  3 vagrant vagrant      82 Sep  9 14:58 referencing-0.30.2.dist-info
drwxrwxr-x.  6 vagrant vagrant    4096 Sep  9 14:58 dateutil
drwxrwxr-x.  2 vagrant vagrant     118 Sep  9 14:58 python_dateutil-2.8.2.dist-info
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 pyasn1_modules
drwxrwxr-x.  2 vagrant vagrant     122 Sep  9 14:58 pyasn1_modules-0.3.0.dist-info
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 marshmallow
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 marshmallow-3.20.1.dist-info
drwxrwxr-x.  4 vagrant vagrant    4096 Sep  9 14:58 isodate
drwxrwxr-x.  2 vagrant vagrant      87 Sep  9 14:58 isodate-0.6.1.dist-info
-rw-rw-r--.  1 vagrant vagrant    1710 Sep  9 14:58 googleapis_common_protos-1.60.0-py3.9-nspkg.pth
drwxrwxr-x.  2 vagrant vagrant     132 Sep  9 14:58 googleapis_common_protos-1.60.0.dist-info
-rwxrwxr-x.  1 vagrant vagrant 1065976 Sep  9 14:58 _cffi_backend.cpython-311-x86_64-linux-gnu.so
drwxrwxr-x.  3 vagrant vagrant    4096 Sep  9 14:58 cffi
drwxrwxr-x.  2 vagrant vagrant     126 Sep  9 14:58 cffi-1.15.1.dist-info
drwxrwxr-x.  4 vagrant vagrant    4096 Sep  9 14:58 strictyaml
drwxrwxr-x.  2 vagrant vagrant     106 Sep  9 14:58 strictyaml-1.7.3.dist-info
drwxrwxr-x.  4 vagrant vagrant     162 Sep  9 14:58 requests_oauthlib
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 requests_oauthlib-1.3.1.dist-info
drwxrwxr-x.  5 vagrant vagrant      88 Sep  9 14:58 jsonschema_specifications
drwxrwxr-x.  3 vagrant vagrant      82 Sep  9 14:58 jsonschema_specifications-2023.7.1.dist-info
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 google_auth-2.22.0.dist-info
drwxrwxr-x. 10 vagrant vagrant    4096 Sep  9 14:58 docker
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 docker-6.1.3.dist-info
drwxrwxr-x.  5 vagrant vagrant     160 Sep  9 14:58 cryptography
drwxrwxr-x.  2 vagrant vagrant     143 Sep  9 14:58 cryptography-41.0.3.dist-info
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 azure_core-1.29.4.dist-info
drwxrwxr-x.  6 vagrant vagrant    4096 Sep  9 14:58 msrest
drwxrwxr-x.  2 vagrant vagrant     105 Sep  9 14:58 msrest-0.7.1.dist-info
drwxrwxr-x.  5 vagrant vagrant    4096 Sep  9 14:58 jsonschema
drwxrwxr-x.  2 vagrant vagrant     190 Sep  9 14:58 bin
drwxrwxr-x.  3 vagrant vagrant     106 Sep  9 14:58 jsonschema-4.19.0.dist-info
-rw-rw-r--.  1 vagrant vagrant     539 Sep  9 14:58 google_api_core-2.11.1-py3.9-nspkg.pth
drwxrwxr-x. 14 vagrant vagrant     170 Sep  9 14:58 google
drwxrwxr-x.  2 vagrant vagrant     132 Sep  9 14:58 google_api_core-2.11.1.dist-info
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 azure_storage_file_share-12.13.0.dist-info
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 azure_storage_blob-12.17.0.dist-info
drwxrwxr-x.  2 vagrant vagrant     120 Sep  9 14:58 azure_mgmt_core-1.4.0.dist-info
drwxrwxr-x.  2 vagrant vagrant     132 Sep  9 14:58 opencensus-0.11.2.dist-info
drwxrwxr-x.  4 vagrant vagrant    4096 Sep  9 14:58 msal
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 msal-1.23.0.dist-info
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 azure_storage_file_datalake-12.12.0.dist-info
drwxrwxr-x.  2 vagrant vagrant      87 Sep  9 14:58 azure_mgmt_resourcegraph-8.0.0.dist-info
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 azure_mgmt_resource-22.0.0.dist-info
drwxrwxr-x.  3 vagrant vagrant     161 Sep  9 14:58 msal_extensions
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 msal_extensions-1.0.0.dist-info
drwxrwxr-x.  8 vagrant vagrant      91 Sep  9 14:58 azure
drwxrwxr-x.  2 vagrant vagrant     102 Sep  9 14:58 azure_identity-1.14.0.dist-info
drwxrwxr-x. 10 vagrant vagrant     133 Sep  9 14:58 opencensus
drwxrwxr-x.  2 vagrant vagrant     117 Sep  9 14:58 opencensus_ext_azure-1.1.9.dist-info
drwxrwxr-x.  6 vagrant vagrant     149 Sep  9 14:58 azext_mlv2
drwxrwxr-x.  2 vagrant vagrant     171 Sep  9 14:58 ml-2.19.1.dist-info
drwxrwxr-x.  3 vagrant vagrant      16 Sep  9 14:58 ..
drwxrwxr-x. 98 vagrant vagrant    4096 Sep  9 14:58 .
-rw-rw-r--.  1 vagrant vagrant 7175844 Sep  9 14:58 ml-2.19.1-py3-none-any.whl
(azcli) [vagrant@localhost ~]$


YouTube Video: