Skip to content

Commit

Permalink
fix gcp instructions for setting up the storage class (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggilmore authored Oct 16, 2018
1 parent 0a63903 commit 8efd8bb
Showing 1 changed file with 28 additions and 25 deletions.
53 changes: 28 additions & 25 deletions docs/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,39 +400,42 @@ Sourcegraph expects there to be storage class named `sourcegraph` that it uses f
# zones: us-central1-a
```
1. Read through the [Kubernetes storage class documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/), and fill in the `provisioner` and `parameters` fields in `base/sourcegraph.StorageClass.yaml` with the correct values for your hosting provider (e.x.: [GCP](https://kubernetes.io/docs/concepts/storage/storage-classes/#gce), [AWS](https://kubernetes.io/docs/concepts/storage/storage-classes/#aws), [Azure](https://kubernetes.io/docs/concepts/storage/storage-classes/#azure-disk)).
1. Read through the [Kubernetes storage class documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/), and fill in the `provisioner` and `parameters` fields in `base/sourcegraph.StorageClass.yaml` with the correct values for your hosting provider (e.x.: [GCP](https://kubernetes.io/docs/concepts/storage/storage-classes/#gce-pd), [AWS](https://kubernetes.io/docs/concepts/storage/storage-classes/#aws), [Azure](https://kubernetes.io/docs/concepts/storage/storage-classes/#azure-disk)).
**We highly recommend that the storage class use SSDs as the underlying disk type.**
- Note that if you're using GCP with Kubernetes `v1.9.*`, you should omit the `replication-type` parameter mentioned in [the documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#gce-pd) from your `base/sourcegraph.StorageClass.yaml` file. That field wasn't added until Kubernetes `v.1.10.*+`, and you'll see errors like the following if you try to use it with an older version:
Using the snippets below will create a storage class backed by SSDs:
```
Failed to provision volume with StorageClass "sourcegraph": invalid option "replication-type" for volume plugin kubernetes.io/gce-pd
```
- [GCP](https://kubernetes.io/docs/concepts/storage/storage-classes/#gce):
- **We highly recommend that the storage class use SSDs as the underlying disk type.** Using the snippets below will create a storage class backed by SSDs:
```yaml
# base/sourcegraph.StorageClass.yaml
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-ssd
```
- [GCP](https://kubernetes.io/docs/concepts/storage/storage-classes/#gce-pd):
- [AWS](https://kubernetes.io/docs/concepts/storage/storage-classes/#aws):
```yaml
# base/sourcegraph.StorageClass.yaml
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-ssd
```
```yaml
# base/sourcegraph.StorageClass.yaml
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
```
- [AWS](https://kubernetes.io/docs/concepts/storage/storage-classes/#aws):
- [Azure](https://kubernetes.io/docs/concepts/storage/storage-classes/#azure-disk):
```yaml
# base/sourcegraph.StorageClass.yaml
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
```
```yaml
# base/sourcegraph.StorageClass.yaml
provisioner: kubernetes.io/azure-disk
parameters:
storageaccounttype: Premium_LRS
```
- [Azure](https://kubernetes.io/docs/concepts/storage/storage-classes/#azure-disk):
```yaml
# base/sourcegraph.StorageClass.yaml
provisioner: kubernetes.io/azure-disk
parameters:
storageaccounttype: Premium_LRS
```
1. Commit `base/sourcegraph.StorageClass.yaml` to your fork.
Expand All @@ -451,7 +454,7 @@ find . -name "*PersistentVolumeClaim.yaml" -exec sh -c "cat {} | yj | jq '.spec.
GS=base/gitserver/gitserver.StatefulSet.yaml
cat $GS | yj | jq --arg STORAGE_CLASS_NAME $STORAGE_CLASS_NAME '.spec.volumeClaimTemplates = (.spec.volumeClaimTemplates | map( . * {spec:{storageClassName: $STORAGE_CLASS_NAME }}))' | jy -o $GS
````
```
## Configure Lightstep tracing
Expand Down

0 comments on commit 8efd8bb

Please sign in to comment.