Git Product home page Git Product logo

hammer_cli_foreman_azure_rm's Introduction

hammer_cli_foreman_azure_rm

Description

CLI tool for AzureRM compute resource in Foreman foreman_azure_rm

Installation

Package

# yum install tfm-rubygem-hammer_cli_foreman_azure_rm

Foreman Installer

# foreman-installer --enable-foreman-cli-azure
# hammer -r

Please note that hammer -r will reload Apipie cache so that command options for azurerm compute resource will get loaded.

Development Setup

Clone the repo from github:

git clone https://github.com/theforeman/hammer_cli_foreman_azure_rm.git

Edit ~/.hammer/cli.modules.d/foreman_azure_rm.yml and enter in the following:

:foreman_azure_rm:
  :enable_module: true

Compute Resource Creation

hammer compute-resource create --name cli_azure_cr --provider azurerm --tenant <tenant-id> --app-ident <client-id> --secret-key <client-secret> --sub-id <subscription-id> --region <region>

Please note that the region value must be provided in lowercase.

List available networks

hammer compute-resource networks --id <compute-resource-id>

Please copy the subnet ID from this list to be passed to compute_network attribute during Host creation.

Host Creation

hammer host create --compute-resource-id 7 --compute-attributes="resource_group=test-rg,vm_size=Standard_B1s,username=myuser,password=mypassword,platform=Linux,script_command=date" --interface="compute_public_ip=Dynamic,compute_network=mysubnetID,compute_private_ip=false" --name="test-host-cli" --location-id 1 --organization-id 2 --domain-id 2 --architecture-id 1 --operatingsystem-id 1 --image-id 1

Compute Profile Creation

hammer compute-profile create --name cli_cp

Compute Profile Attributes Creation

hammer compute-profile values create --compute-attributes="resource_group=aditi-rg,vm_size=Standard_B1s,username=myuser,password=mypassword,platform=Linux" --interface="compute_public_ip=Dynamic,compute_network=mysubnetID,compute_private_ip=false" --compute-profile "cli_cp" --compute-resource-id 7 --location-id 1 --organization-id 2

Host Creation with Compute Profile

host create --compute-resource-id 7 --compute-profile "cli_cp" --name="test-host-cli-cp" --location-id 1 --organization-id 2 --domain-id 2 --architecture-id 1 --operatingsystem-id 1 --image-id 1

hammer_cli_foreman_azure_rm's People

Contributors

apuntamb avatar ofedoren avatar upadhyeammit avatar

Watchers

 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.