-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.yaml
More file actions
74 lines (61 loc) · 2.24 KB
/
Copy pathscripts.yaml
File metadata and controls
74 lines (61 loc) · 2.24 KB
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
# Create the docker container and load the CLI
docker run -dit --name sno quay.io/ibmmas/cli:<choose your version> bash
# Log in to the container to run commands from the mas cli
docker exec -it sno bash
# Make directory for masconfig inside of docker container
mkdir masconfig
#List out all folder inside of your container to make sure that your created the directory
ls -l
# Exit the docker container so that you can copy the license file into the masconfig folder
exit
# You should default back into your SNO folder, but if you end up in your home directory, log into the SNO folder
cd ~/sno
# This copies the license file out of the sno directory into the masconfig
docker cp license.dat sno:/mascli/masconfig/license.dat
# Log back into the docker container
docker exec -it sno bash
# Install LVM operator from the Operator Hub in the Openshift console
apiVersion: lvm.topolvm.io/v1alpha1
kind: LVMCluster
metadata:
name: sno-lvmcluster
namespace: openshift-storage
spec:
storage:
deviceClasses:
- name: lvm-storage
deviceSelector:
paths:
- /dev/sdb
thinPoolConfig:
name: thin-pool-1
sizePercent: 90
overprovisionRatio: 10
# For LVM storage in the command line. Make the LVM storage class the default
oc patch storageclass lvms-lvm-storage -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
# Create Image registry PVC. Replace the storageClassName with the name of your Storageclass.
oc create -f - <<EOF
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: image-registry-pvc
namespace: openshift-image-registry
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
storageClassName: lvms-lvm-storage
EOF
# Patch the Openshift image registry to use the Operator
oc patch configs.imageregistry.operator.openshift.io/cluster \
--type='json' \
--patch='[
{"op": "replace", "path": "/spec/managementState", "value": "Managed"},
{"op": "replace", "path": "/spec/rolloutStrategy", "value": "Recreate"},
{"op": "replace", "path": "/spec/replicas", "value": 1},
{"op": "replace", "path": "/spec/storage", "value": {"pvc":{"claim": "image-registry-pvc" }}}
]'
# Install MAS
mas install