Skip to content

Commit 901a19d

Browse files
authored
Merge pull request #731 from PureStorage-OpenConnect/post_script
remove post_script
2 parents 6d7f17c + 7786389 commit 901a19d

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ The `defaults.yml` file sets a number of deployment variables:
166166
* `k8s_version` - the version of Kubernetes to deploy
167167
* `tags` - a list of tags to be applied to each node. This is a comma-separate list of name=value pairs, for example: `"Owner=Bob,Purpose=Demo"`
168168
* `stop_after` - stop the intances after this many hours
169-
* `post_script` - script to run on each master after deployment, output will go to stdout
170169
* `nodes` - the number of worker nodes on each cluster
171170
* `lock` - prevents deployment from being deleted by `px-deploy destroy ...`. use `px-deploy unlock -n ...` to unlock
172171
* `platform` - can be set to either k8s, none, ocp4, eks or gke
@@ -202,25 +201,7 @@ The `defaults.yml` file sets a number of deployment variables:
202201
* `ocp4_credentials_mode` - (Optional) set OCP4 CCO credentialsMode. Defaults to "Mint", you may change to "Passthrough"
203202
* `ocp4_pull_secret` - the pull secret `'{"auths" ... }'`
204203

205-
There are two ways to override these variables. The first is to specify a template with the `--template=...` parameter. For example:
206-
```
207-
$ cat templates/px-fio-example.yml
208-
description: An example fio benchmark on a gp2 disk and a Portworx volume on a gp2 disk
209-
scripts: ["install-px", "px-wait", "px-fio-example"]
210-
clusters: 1
211-
nodes: 3
212-
cloud: aws
213-
aws_ebs: "gp2:150 gp2:150"
214-
post_script: cat
215-
auto_destroy: true
216-
env:
217-
px_suffix: "s=/dev/nvme1n1"
218-
cat: "/tmp/output"
219-
```
220-
221-
More on `scripts` below.
222-
223-
The second way to override the defaults is to specify on the command line. See `px-deploy create -h` for a full list. For example, to deploy petclinic into the `foo` deployment:
204+
There are two ways to override these variables. The first is to specify a template with the `--template=...` parameter. The second way to override the defaults is to specify on the command line. See `px-deploy create -h` for a full list. For example, to deploy petclinic into the `foo` deployment:
224205
```
225206
px-deploy create --name=foo --clusters=5 --template=petclinic --nodes=6
226207
```
@@ -259,8 +240,6 @@ cluster:
259240
scripts: ["script-3", "script-4"]
260241
```
261242

262-
`post_script` is a script that will be run on each master node after all of the scripts have completed, and the output will go to stdout. The default is to display the external IP address of master-1, but it could be used to show benchmark outputs, for example.
263-
264243
Last, environment variables can be define in templates or defaults.yml, and these are also available to scripts:
265244
```
266245
$ cat templates/metro.yml

px-deploy.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,7 +1763,6 @@ func write_nodescripts(config Config) {
17631763
var tf_node_scripts []string
17641764
var tf_master_scripts []string
17651765
var tf_common_master_script []byte
1766-
var tf_post_script []byte
17671766
var tf_node_script []byte
17681767
var tf_individual_node_script []byte
17691768
var tf_master_script []byte
@@ -1895,11 +1894,6 @@ func write_nodescripts(config Config) {
18951894
}
18961895
}
18971896

1898-
// add post_script if defined
1899-
if tf_post_script != nil {
1900-
tf_master_script = append(tf_master_script, tf_post_script...)
1901-
}
1902-
19031897
// after running all scripts create file in /var/log/px-deploy/completed
19041898
tf_master_script = append(tf_master_script, "export IP=$(curl -s https://ipinfo.io/ip)\n"...)
19051899
tf_master_script = append(tf_master_script, "echo \"master-"+masternum+" $IP \" >> /var/log/px-deploy/completed/tracking \n"...)

0 commit comments

Comments
 (0)