-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathgenerateUsageDoc.sh
executable file
·83 lines (59 loc) · 1.99 KB
/
generateUsageDoc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
# This script generates the USAGE.md file
USAGE_FILE=USAGE.md
writeHelp () {
IFS=''
echo "" >> $USAGE_FILE
node "$1" --help | while read LINE; do
if [[ -z $LINE ]]; then
LINE=" "
fi
echo " ""$LINE" >> $USAGE_FILE
if [[ $LINE == "Options:" ]]; then
echo "" >> $USAGE_FILE
fi
done
}
# onboard
cat > $USAGE_FILE << EOL
# Usage
## onboard.js
Does initial configuration and provisioning of a BIG-IP.
EOL
writeHelp scripts/onboard.js
# cluster
cat >> $USAGE_FILE << EOL
## cluster.js
Sets up BIG-IPs in a cluster.
EOL
writeHelp scripts/cluster.js
# autoscale
cat >> $USAGE_FILE << EOL
## autoscale.js
Runs autoscale code to elect primary and cluster
EOL
writeHelp scripts/autoscale.js
# network
cat >> $USAGE_FILE << EOL
## network.js
Sets up default gateway, VLANs and self IPs
EOL
writeHelp scripts/network.js
#runScript
cat >> $USAGE_FILE << EOL
## runScript.js
Runs an arbitrary script.
EOL
writeHelp scripts/runScript.js
# standalone licensing
cat >> $USAGE_FILE << EOL
## Standalone licensing
### Install
admin@(bigip1)(cfg-sync Standalone)(NO LICENSE)(/Common)(tmos)# run util bash -c "mkdir -p /config/licensing; cd /config/licensing; npm --loglevel=error install @f5devcentral/f5-cloud-libs"
### License from BIG-IQ
admin@(bigip1)(cfg-sync Standalone)(NO LICENSE)(/Common)(tmos)# license path <install_path> password <big_ip_admin_password> big-iq-host <big_iq_ip_address> big-iq-user <big_iq_admin_user> big-iq-password <big_iq_admin_password> license-pool-name <license_pool>
### Issue revoke request to BIG-IQ
admin@(bigip1)(cfg-sync Standalone)(NO LICENSE)(/Common)(tmos)# license path <install_path> password <big_ip_admin_password> big-iq-host <big_iq_ip_address> big-iq-user <big_iq_admin_user> big-iq-password <big_iq_admin_password> license-pool-name <license_pool> revoke
### Other licensing options
admin@(bigip1)(cfg-sync Standalone)(NO LICENSE)(/Common)(tmos)# license help
EOL