Skip to content

Commit 675eab8

Browse files
authored
Proposal for capibmadm cli tool (#1030)
1 parent 0c395d2 commit 675eab8

File tree

1 file changed

+126
-0
lines changed

1 file changed

+126
-0
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# CLI tool for Cluster API Provider IBM Cloud
2+
3+
## Summary
4+
5+
This proposal aims to provide a cli tool to help users to perform various IBM Cloud operations which helps in creating and
6+
managing Power VS or VPC workload clusters.
7+
8+
## Motivation
9+
10+
In order to create IBM Cloud Power VS cluster using cluster api as a prerequisite we need to create Power VS network, port and need import the appropriate image to Power VS service instance, currently we need to make use of different tools(ibmcloud, pvsadm cli) to achieve this.
11+
12+
The goal is to create a single unified cli tool to handle all the operations required prior creating a kubernetes cluster using cluster-api-provider-ibmcloud.
13+
14+
## Proposed commands
15+
16+
Command will be of following format
17+
18+
```shell
19+
capibmadm <provider> <command> <subcommand>
20+
```
21+
Here provider can be either vpc or powervs
22+
23+
## Power VS Commands
24+
25+
**Environment Variables:**
26+
27+
* IBMCLOUD_API_KEY: IBM Cloud api key of user.
28+
29+
**Arguments:**
30+
* --service-instance-id: Power VS service instance id.
31+
32+
### 1. capibmadm powervs image list
33+
34+
### 2. capibmadm powervs image import
35+
36+
* **Arguments:**
37+
* _Similar to [pvsadm image import](https://github.com/ppc64le-cloud/pvsadm/blob/824f87baebd430b26ed8d3ec517077a9d5b5824b/cmd/image/import/import.go#L63) command_
38+
39+
40+
### 3. capibmadm powervs network create <network_name>
41+
42+
* **Arguments:**
43+
* --dns-servers: Comma separated list of DNS Servers to use for this network.
44+
45+
46+
### 4. capibmadm powervs network delete <network_name>
47+
48+
* **Arguments:**
49+
* force: Boolean flag to force delete network by deleting all the open ports attached to network.
50+
51+
### 5. capibmadm powervs network list
52+
53+
54+
### 6. capibmadm powervs port create
55+
56+
* **Arguments:**
57+
* _Similar to [pvsadm create port](https://github.com/ppc64le-cloud/pvsadm/blob/824f87baebd430b26ed8d3ec517077a9d5b5824b/cmd/create/port/port.go#L34) command_
58+
59+
60+
### 7. capibmadm powervs port delete
61+
62+
* **Arguments:**
63+
* _Similar to [pvsadm delete port](https://github.com/ppc64le-cloud/pvsadm/blob/824f87baebd430b26ed8d3ec517077a9d5b5824b/cmd/delete/port/port.go#L33) command_
64+
65+
66+
### 8. capibmadm powervs port list
67+
68+
* **Arguments:**
69+
* _Similar to [pvsadm get port](https://github.com/ppc64le-cloud/pvsadm/blob/824f87baebd430b26ed8d3ec517077a9d5b5824b/cmd/get/ports/ports.go#L33) command_
70+
71+
### 9. capibmadm powervs key create
72+
73+
* **Arguments:**
74+
* _Similar to ibmcloud pi key-create_
75+
76+
### 10. capibmadm powervs key list
77+
78+
* **Arguments:**
79+
* _Similar to ibmcloud pi keys_
80+
81+
## VPC Commands
82+
* **Environment Variables:**
83+
* IBMCLOUD_API_KEY: IBM Cloud api key of user.
84+
85+
### 1. capibmadm vpc key create
86+
87+
* **Arguments:**
88+
* _Similar to ibmcloud is key-create_
89+
90+
### 2. capibmadm vpc key list
91+
92+
* **Arguments:**
93+
* _Similar to ibmcloud is keys_
94+
95+
96+
### 3. capibmadm vpc image list
97+
98+
* **Arguments:**
99+
* resource-group-name: Resource group name to list images
100+
* region: Region name to list images
101+
102+
### 4. capibmadm vpc image import
103+
104+
* **Arguments:**
105+
* _Similar to ibmcloud is image-create_
106+
107+
108+
## Directory structure
109+
```
110+
|-- cluster-api-provider-ibmcloud
111+
|-- cmd
112+
|-- capibmadm
113+
|-- cmd
114+
| |-- powervs
115+
| | |-- image
116+
| | |-- network
117+
| | |-- port
118+
| | |-- ssh
119+
| |-- vpc
120+
| | |-- image
121+
| | |-- ssh
122+
| |-- root.go
123+
|-- options
124+
|-- utility
125+
|-- main.go
126+
```

0 commit comments

Comments
 (0)