hammer_cli_foreman_azure_rm 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cd5f8e80632f2af3952c995f4f199c60f11892047876907cbeed5e5ee5d7214
4
- data.tar.gz: 77baa96a6072e7916686c4bf31b97f1ae7ef3eb1502aa7c7d9b7cc95e3e201e4
3
+ metadata.gz: aa3f3df335172f5cf90df195bdc8698783eb975191a9bdfae8071f2063a153aa
4
+ data.tar.gz: e3865598912b58b079cb073e4582e755cf7f3dc72489f72a7d7a4fe4544f609b
5
5
  SHA512:
6
- metadata.gz: 7fb4bc0733e87b8ec5e38988d6506df58e48b604d3cbd7c10c6beeb59b28ea753e67b604a8f72700a36611a5683fb6a36269fa2d22d4d12d6bd3ea804c02be29
7
- data.tar.gz: 8b7cf74727ac075989412b8e321268a9eb3af5849ed1bb48b0b8a437e7395ce48fdbf9f1794cd4287ee7821b5b27afdfe8d7ffca2ae7b1d42ae3f93c52563606
6
+ metadata.gz: 505ef40b81ce1f9353df06020b4ee955cc8a53c227a18736b71cce6ac6db785ba4b9e6c55c21844136699677fe6cf21bfd76a40e665b1c56ea5940c17157a981
7
+ data.tar.gz: fae65a2841424d28111232549f3a3c14aa1432d0c9fa36e30ac862dae9c53e4214fdf5ad2fdb340e279d78313164671461f0d9c05987689fe169f32853db171a
data/README.md CHANGED
@@ -3,18 +3,52 @@
3
3
  ## Description
4
4
  CLI tool for AzureRM compute resource in Foreman [foreman_azure_rm](https://github.com/theforeman/foreman_azure_rm)
5
5
 
6
+ ## Installation
7
+
8
+ ### Package
9
+ ```
10
+ # yum install tfm-rubygem-hammer_cli_foreman_azure_rm
11
+ ```
12
+
13
+ ### Foreman Installer
14
+ ```
15
+ # foreman-installer --enable-foreman-cli-azure
16
+ # hammer -r
17
+ ```
18
+ Please note that **hammer -r** will reload Apipie cache so that command options for azurerm compute resource will get loaded.
19
+
20
+ ### Development Setup
21
+
22
+ Clone the repo from github:
23
+ ```bash
24
+ git clone https://github.com/theforeman/hammer_cli_foreman_azure_rm.git
25
+ ```
26
+
27
+ Edit `~/.hammer/cli.modules.d/foreman_azure_rm.yml` and enter in the following:
28
+ ```yaml
29
+ :foreman_azure_rm:
30
+ :enable_module: true
31
+ ```
32
+
6
33
  ## Compute Resource Creation
7
34
 
8
35
  ```
9
- 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 "eastus"
36
+ 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>
10
37
  ```
11
38
 
12
39
  Please note that the region value must be provided in **lowercase**.
13
40
 
41
+ ## List available networks
42
+ ```
43
+ hammer compute-resource networks --id <compute-resource-id>
44
+ ```
45
+
46
+ Please copy the subnet ID from this list to be passed to `compute_network` attribute during Host creation.
47
+
14
48
  ## Host Creation
15
49
 
16
50
  ```
17
- hammer host create --compute-resource-id 7 --compute-attributes="resource_group=aditi-rg,vm_size=Standard_B1s,username=myuser,password=mypassword,platform=Linux,image_id=OpenLogic:CentOS:7.5:latest" --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
51
+ 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
18
52
  ```
19
53
 
20
54
  ## Compute Profile Creation
@@ -26,11 +60,11 @@ hammer compute-profile create --name cli_cp
26
60
  ## Compute Profile Attributes Creation
27
61
 
28
62
  ```
29
- hammer compute-profile values create --compute-attributes="resource_group=aditi-rg,vm_size=Standard_B1s,username=myuser,password=mypassword,platform=Linux,image_id=OpenLogic:CentOS:7.5:latest" --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
63
+ 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
30
64
  ```
31
65
 
32
66
  ## Host Creation with Compute Profile
33
67
 
34
68
  ```
35
- 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
69
+ 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
36
70
  ```
@@ -1,5 +1,5 @@
1
1
  module HammerCLIForemanAzureRM
2
2
  def self.version
3
- @version ||= Gem::Version.new '0.1.1'
3
+ @version ||= Gem::Version.new '0.1.2'
4
4
  end
5
- end
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_foreman_azure_rm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditi Puntambekar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-18 00:00:00.000000000 Z
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gettext