You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+74Lines changed: 74 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,3 +58,77 @@ If you end up wanting to modify an auth context later on, you can do so with `au
58
58
59
59
## LiquidWeb Cloud
60
60
The Cloud features you can use in manage.liquidweb.com on your Cloud Servers you can do with this command line tool. See `help cloud` for a full list of features and capabilities.
61
+
62
+
## Plans
63
+
64
+
A plan is a pre-defined yaml with optional template variables that can be used to
65
+
repeate specific tasks.
66
+
67
+
Currently only "lw cloud server create" is implemented.
68
+
69
+
Example:
70
+
71
+
`lw plan --file plan.yaml`
72
+
73
+
```
74
+
---
75
+
cloud:
76
+
server:
77
+
create:
78
+
- type: "SS.VPS"
79
+
password: "{{- generatePassword 25 -}}"
80
+
template: "UBUNTU_1804_UNMANAGED"
81
+
zone: 27
82
+
hostname: "web1.somehost.org"
83
+
ips: 1
84
+
public-ssh-key: "your public ssh key here
85
+
config-id: 88
86
+
backup-plan: "None"
87
+
bandwidth: "SS.5000"
88
+
```
89
+
90
+
### Plan Variables
91
+
92
+
Plan yaml can make use of golang's template variables. Allows variables to be passed on the
93
+
command line and it can access environment variables.
94
+
95
+
#### Environment Variables
96
+
Envonrment variables are defined as `.Env.VARNAME`. On most linux systems and shells you can
97
+
get the logged in user with `{{ .Env.USER }}`.
98
+
99
+
#### User Defined Variables
100
+
If you wanted to pass user defined variables on the command line you would use the `--var` flag
101
+
(multiple `--var` flags can be passed). For example, if you wanted to generate the hostname of
102
+
`web3.somehost.org` you would use the following command and yaml:
103
+
104
+
`lw plan --file play.yaml --var node=3 --var role=web`
0 commit comments