GithubHelp home page GithubHelp logo

isabella232 / azure-hanaonazure-cli-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure/azure-hanaonazure-cli-extension

0.0 0.0 0.0 162 KB

Microsoft Azure Command-Line Tools SAP HANA Command Module

License: MIT License

Python 100.00%

azure-hanaonazure-cli-extension's Introduction

azure-hanaonazure-cli-extension

Install

To install this extension just use the CLI extension add command:

az extension add --name sap-hana

Usage

HANA instance

To create a new HANA instance:

az hanainstance create \
    --location $LOCATION \
    --resource-group $RESOURCE_GROUP \
    --instance-name $HANA_INSTANCE_NAME \
    --partner-node-id $PARTNER_NODE \
    --ssh-public-key $SSH_PUBLIC_KEY \
    --os-computer-name $COMPUTER_NAME \
    --ip-address $IP_ADDRESS

To list all HANA instances for the subscription:

az hanainstance list

To show details about a specific HANA instance:

az hanainstance show --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME

To add a key-value pair to the Tags field of a specific HANA instance:

az hanainstance update --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME --set tags.newKey=value

To update a key-value pair in the Tags field of a specific HANA instance:

az hanainstance update --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME --set tags.key=updatedValue

To delete a key-value pair from the Tags field of a specific HANA instance:

az hanainstance update --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME --remove tags.key

To delete all key-value pairs in the Tags field of a specific HANA instance:

az hanainstance update --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME --set tags={}

To delete a HANA instance:

az hanainstance delete --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME

To start a specific HANA instance:

az hanainstance start --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME

To restart a specific HANA instance:

az hanainstance restart --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME

To shutdown a specific HANA instance:

az hanainstance shutdown --resource-group $RESOURCE_GROUP --instance-name $HANA_INSTANCE_NAME

SapMonitor

To create a new SapMonitor:

az sapmonitor create \
    --resource-group $RESOURCE_GROUP \
    --monitor-name $SAP_MONITOR_NAME \
    --hana-subnet $HANA_SUBNET_ID \
    --region $REGION

Here is an example of a subnet ID:

/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Network/virtualNetworks/<vnet_name>/subnets/<subnet_name>

To list all SapMonitor for a subscription:

az sapmonitor list

To show details about a specific SapMonitor:

az sapmonitor show --resource-group $RESOURCE_GROUP --monitor-name $SAP_MONITOR_NAME

To add a key-value pair to the Tags field of a specific SapMonitor:

az sapmonitor update --resource-group $RESOURCE_GROUP --monitor-name $SAP_MONITOR_NAME --set tags.newKey=value

To delete all key-value pairs in the Tags field of a specific SapMonitor:

az sapmonitor update --resource-group $RESOURCE_GROUP --monitor-name $SAP_MONITOR_NAME --set tags={}

To delete a SapMonitor:

az sapmonitor delete --resource-group $RESOURCE_GROUP --monitor-name $SAP_MONITOR_NAME

Provider Instance

โš ๏ธ Provider Instance commands cannot be executed in parallel

To create a new provider instance on a SapMonitor:

az sapmonitor provider-instance create \
    --resource-group $RESOURCE_GROUP \
    --monitor-name $SAP_MONITOR_NAME \ 
    --provider-instance-name $PROVIDER_INSTANCE_NAME \
    --provider-instance-type $PROVIDER_INSTANCE_TYPE \
    --provider-instance-properties $PROVIDER_INSTANCE_PROPERTIES \
    --provider-instance-metadata $PROVIDER_INSTANCE_METADATA

Here are examples of provider instance types and their properties

Provider Type Provider Properties Required Metadata
SapHana {"hanaHostname":"10.0.0.6","hanaDbName":"SYSTEMDB","hanaDbSqlPort":30013,"hanaDbUsername":"SYSTEM"," hanaDbPassword":"password"} None
PrometheusHaCluster {"prometheusUrl":"http://10.0.0.20:9664/metrics"} {"sid":"HA1","hostname":"hdb1-0","clustername":"HA1"}
PrometheusOS {"prometheusUrl":"http://10.0.0.21:9100/metrics"} None
MsSqlServer {"sqlHostname":"10.0.0.6","sqlPort":1433,"sqlUsername":"sqladmin","sqlPassword":"password"} {"sid":"HA1"}

To list all provider instances for a SapMonitor:

az sapmonitor provider-instance list --resource-group $RESOURCE_GROUP --monitor-name $SAP_MONITOR_NAME

To show details about a specific provider instances for a SapMonitor:

az sapmonitor provider-instance show --resource-group $RESOURCE_GROUP --monitor-name $SAP_MONITOR_NAME --provider-instance-name $PROVIDER_INSTANCE_NAME

To delete a provider instances for a SapMonitor:

az sapmonitor provider-instance delete --resource-group $RESOURCE_GROUP --monitor-name $SAP_MONITOR_NAME --provider-instance-name $PROVIDER_INSTANCE_NAME

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

azure-hanaonazure-cli-extension's People

Contributors

aprilzhaowy avatar dwj300 avatar jaawasth avatar jovillas avatar lagalbra avatar microsoftopensource avatar msftgits avatar pabowers avatar pakdliu avatar persiaaziz avatar persiaaziz-zz avatar prtyag avatar vipulha 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.