Skip to content

Commit 80dbac0

Browse files
committed
updated README to 0.3.0
1 parent 154fb4f commit 80dbac0

File tree

1 file changed

+80
-33
lines changed

1 file changed

+80
-33
lines changed

README.md

Lines changed: 80 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,42 @@
22

33
csi-cvmfs provides read-only mounting of CVMFS volumes in CSI-enabled container orchestrators.
44

5-
## Compiling
5+
## Building
66

77
The CSI CernVM-FS driver can be compiled in a form of a binary file or an image. When compiled as a binary, the resulting file gets stored in `_output` directory. When compiled as an image, it gets stored in local Docker image store.
88

9-
Building a binary file: `$ make cvmfsplugin`
10-
Building a Docker image: `$ make image`
11-
12-
## Deployment
13-
14-
**Kubernetes 1.10**
15-
16-
Enable CSI in Kubernetes:
17-
18-
- kube-apiserver must be launched with `--feature-gates=CSIPersistentVolume=true,MountPropagation=true` and `--runtime-config=storage.k8s.io/v1alpha1=true`
19-
- kube-controller-manager must be launched with `--feature-gates=CSIPersistentVolume=true`
20-
- kubelet must be launched with `--feature-gates=CSIPersistentVolume=true,MountPropagation=true`
21-
22-
Deploy the external attacher and provisioner sidecar containers as StatefulSets:
23-
9+
Building a binary:
2410
```bash
25-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-attacher-rbac.yaml
26-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-attacher.yaml
11+
$ make cvmfsplugin
2712
```
28-
```bash
29-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-provisioner-rbac.yaml
30-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-provisioner.yaml
13+
14+
Building a Docker image:
15+
```
16+
$ make image
3117
```
3218

33-
Deploy the driver-registrar sidecar container and the csi-cvmfsplugin as DaemonSet:
19+
## Configuration
3420

35-
```bash
36-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-rbac.yaml
37-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-.yaml
38-
```
21+
**Available command line arguments:**
3922

40-
## StorageClass parameters
23+
Option | Default value | Description
24+
------ | ------------- | -----------
25+
`--endpoint` | `unix://tmp/csi.sock` | CSI endpoint, must be a UNIX socket
26+
`--drivername` | `csi-cvmfsplugin` | name of the driver (Kubernetes: `provisioner` field in StorageClass must correspond to this value)
27+
`--nodeid` | _empty_ | This node's ID
28+
29+
**Available volume parameters:**
4130

4231
Parameter | Required | Description
4332
--------- | -------- | -----------
44-
`repository` | yes | Name of the CVMFS repository
33+
`repository` | yes | Address of the CVMFS repository
4534
`tag` | no | `CVMFS_REPOSITORY_TAG`. Defaults to `trunk`
4635
`hash` | no | `CVMFS_REPOSITORY_HASH`
47-
`proxy` | no | `CVMFS_HTTP_PROXY`. Defaults to the value sourced from `default.local`. See [CVMFS configuration](#cvmfs-configuration)
48-
49-
Note that specifying both `tag` and `hash` is not allowed.
50-
51-
### CVMFS configuration
36+
`proxy` | no | `CVMFS_HTTP_PROXY`. Defaults to the value sourced from `default.local`. See instructions below.
5237

5338
By default, csi-cvmfs is distributed with `default.local` containing CERN defaults. You can override those at runtime by overwriting `/etc/cvmfs/default.local`, which is then sourced into any later CVMFS client configs used for mounting.
5439

40+
5541
**CVMFS configuration in Kubernetes**
5642
You can use Kubernetes [config map](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) to inject a custom `default.local` file.
5743

@@ -76,3 +62,64 @@ volumeMounts:
7662
mountPath: /etc/cvmfs/default.local
7763
subPath: cvmfs-override
7864
```
65+
66+
## Deployment with Kubernetes
67+
68+
Requires Kubernetes 1.11+
69+
70+
Your Kubernetes cluster must allow privileged pods (i.e. `--allow-privileged` flag must be set to true for both the API server and the kubelet). Moreover, as stated in the [mount propagation docs](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation), the Docker daemon of the cluster nodes must allow shared mounts.
71+
72+
YAML manifests are located in `deploy/kubernetes`.
73+
74+
**Deploy RBACs for sidecar containers and node plugins:**
75+
76+
```bash
77+
$ kubectl create -f csi-attacher-rbac.yaml
78+
$ kubectl create -f csi-provisioner-rbac.yaml
79+
$ kubectl create -f csi-nodeplugin-rbac.yaml
80+
```
81+
82+
Those manifests deploy service accounts, cluster roles and cluster role bindings.
83+
84+
**Deploy CSI sidecar containers:**
85+
86+
```bash
87+
$ kubectl create -f csi-cvmfsplugin-attacher.yaml
88+
$ kubectl create -f csi-cvmfsplugin-provisioner.yaml
89+
```
90+
91+
Deploys stateful sets for external-attacher and external-provisioner sidecar containers for CSI CernVM-FS.
92+
93+
**Deploy the CSI CernVM-FS driver:**
94+
95+
```bash
96+
$ kubectl create -f csi-cvmfsplugin.yaml
97+
```
98+
99+
Deploys a daemon set with two containers: CSI driver-registrar and the CSI CernVM-FS driver.
100+
101+
## Verifying the deployment in Kubernetes
102+
103+
After successfuly completing the steps above, you should see output similar to this:
104+
```bash
105+
$ kubectl get all
106+
NAME READY STATUS RESTARTS AGE
107+
pod/csi-cvmfsplugin-attacher-0 1/1 Running 0 1m
108+
pod/csi-cvmfsplugin-bhqck 2/2 Running 0 1m
109+
pod/csi-cvmfsplugin-provisioner-0 1/1 Running 0 1m
110+
111+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
112+
service/csi-cvmfsplugin-attacher ClusterIP 10.104.25.190 <none> 12345/TCP 1m
113+
service/csi-cvmfsplugin-provisioner ClusterIP 10.101.197.42 <none> 12345/TCP 1m
114+
115+
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
116+
daemonset.apps/csi-cvmfsplugin 1 1 1 1 1 <none> 1m
117+
118+
NAME DESIRED CURRENT AGE
119+
statefulset.apps/csi-cvmfsplugin-attacher 1 1 1m
120+
statefulset.apps/csi-cvmfsplugin-provisioner 1 1 1m
121+
122+
...
123+
```
124+
125+
You can try deploying a demo pod from `examples/` to test the deployment further.

0 commit comments

Comments
 (0)