Metadata-Version: 2.2
Name: azure-activation-service
Version: 0.2.1
Summary: Auto Activate Azure Roles
Author-email: NCJ <author@example.com>
License: MIT License
        
        Copyright (c) 2024 NCJ
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: azure-identity
Requires-Dist: click>=8.0.0
Requires-Dist: tabulate

# Azure Activation Service

Auto Activate Azure Roles!

The tool works as a companion to the [MSRA Intern's Tool](https://github.com/JeffreyXiang/MSRA-Intern-s-Toolkit). Many thanks for jianfeng's great project.

The tool aims to produce a linux user-space service that runs periodically to activate Azure roles so that you don't need to keep your VSCode open.

## Installation

```bash
pip install azure-activation-service
```

## Usage

```bash
# In a bash shell that has the Azure CLI env set up
aas list-roles  # refresh role list
aas import-config  # import auto-renew config from MSRA Intern's Tool
aas auto-activate  # auto activate roles
aas generate-service  # generate user service
systemctl --user enable azure-pim-activator  # enable user service
loginctl enable-linger $USER  # to keep user service active
```

The tool reads and stores everything in `$AZURE_CONFIG_DIR`, so if you are working with multiple users you can do the above operations with different `$AZURE_CONFIG_DIR` and set a different service name when running `ass generate-service [another-name]`.
