Skip to content

Commit 62ab909

Browse files
author
Afreen Rahman
committed
added environment variable in script and updated readme
Signed-off-by: Afreen Rahman <[email protected]>
1 parent 0af3819 commit 62ab909

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1-
## Installing unreleased OCS build
1+
## Installing unreleased ODF build
22

33
### Requirements
44
- [jq](https://stedolan.github.io/jq/) should be present
5+
- Export an environment variable by name `ODF_PULL_SECRET` having the odf pull secret.
6+
7+
For example:
8+
9+
```
10+
# Edit bashrc
11+
bash vi ~/.bashrc
12+
13+
#Add pull secret ODF_PULL_SECRET
14+
export ODF_PULL_SECRET=<odf-pull-secret>
15+
```
16+
_Note: Make sure to use `ODF_PULL_SECRET` as the name of the variable in order to get the script working_
17+
518
619
### Installation
720
@@ -13,11 +26,11 @@
1326
2. Login to your OCP cluster
1427
3. Run the file as `./install-ocs.sh`
1528
4. Pass the token secret when asked and wait for script to finish.
16-
5. Go to the console > Operator hub > Storage > Choose the non-GA version to install OCS
29+
5. Go to the console > Operator hub > Storage > Choose the non-GA version to install ODF
1730

1831
Note: _It can take upto 7-10 minutes to get the pull secret updated and hence the ODF catalog to appear in hub_
1932

20-
## Installing m4.2xlarge cluster for OCS
33+
## Installing m4.2xlarge cluster for ODF
2134

2235
1. Install the `openshift-installer`
2336
2. Create install config
@@ -37,4 +50,4 @@ Save the changes.
3750
./openshift-installer create cluster --dir my-dir
3851
```
3952

40-
Note: These machines incur more cost hence use wisely. Destroy the cluster when not in use by `openshift-installer destroy cluster --dir mydir`
53+
_Note: These machines incur more cost hence use wisely. Destroy the cluster when not in use by `openshift-installer destroy cluster --dir mydir`_

install-ocs.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ install_ocs() {
44
echo "Updating the pull secret..."
55

66
oc get -n openshift-config secret/pull-secret -ojson | jq -r '.data.".dockerconfigjson"' | base64 -d | jq > secret.json
7-
jq --arg secret $PULL_SECRET '.auths."quay.io"={auth: $secret, email: ""}' secret.json > temp-secret.json
7+
jq --arg secret $ODF_PULL_SECRET '.auths."quay.io"={auth: $secret, email: ""}' secret.json > temp-secret.json
88
oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=temp-secret.json
99

1010
sleep 1m
@@ -32,11 +32,6 @@ install_ocs() {
3232
EOF
3333
}
3434

35-
echo "Enter the pull secret"
3635

37-
read PULL_SECRET
38-
39-
if [[ ! -z "$PULL_SECRET" ]]; then
40-
install_ocs
41-
fi
36+
install_ocs
4237

0 commit comments

Comments
 (0)