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 +4 -4
- data/README.md +38 -4
- data/lib/hammer_cli_foreman_azure_rm/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa3f3df335172f5cf90df195bdc8698783eb975191a9bdfae8071f2063a153aa
|
4
|
+
data.tar.gz: e3865598912b58b079cb073e4582e755cf7f3dc72489f72a7d7a4fe4544f609b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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=
|
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
|
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
|
```
|
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.
|
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:
|
11
|
+
date: 2020-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gettext
|