Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
Move to using releases for download. storage class should be install… (
Browse files Browse the repository at this point in the history
…#58)

* Move to using releases for download
* Storage classes should be installed as part of install process
* Use version placeholder
* Add example
  • Loading branch information
garthy authored Feb 7, 2018
1 parent ef8ab9f commit 007daa3
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The oci-volume-provisioner is provided as a Kubernetes deployment.

Create a config.yaml file with contents similar to the following. This file will contain authentication
information necessary to authenticate with the OCI APIs and provision block storage volumes.
The `key_passphrase` field can be left out if your key has no passphrase.

```yaml
auth:
Expand All @@ -28,8 +29,10 @@ auth:
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEUjVBnOgC4wA3j6CeTc6hIA9B3iwuJKyR8i7w...
-----END RSA PRIVATE KEY-----
key_passphrase: supersecretpassphrase
fingerprint: 4d:f5:ff:0e:a9:10:e8:5a:d3:52:6a:f8:1e:99:a3:47
region: us-phoenix-1

````

Submit this as a Kubernetes Secret.
Expand All @@ -42,39 +45,53 @@ kubectl create secret generic oci-volume-provisioner \

## Deploy the OCI Volume Provisioner

If your cluster is configured to use [RBAC][3] you will need to submit the following:
First select the release to deploy. These are listed here. (https://github.com/oracle/oci-volume-provisioner/releases/latest)

If your cluster is configured to use [RBAC][3] you will need to submit the following, replacing the <VERSION> placeholder with the selected version:

```
kubectl apply -f https://raw.githubusercontent.com/oracle/oci-volume-provisioner/master/manifests/oci-volume-provisioner-rbac.yaml
kubectl apply -f https://github.com/oracle/oci-volume-provisioner/releases/download/<VERSION>/oci-volume-provisioner-rbac.yaml
```

Deploy the volume provisioner into your Kubernetes cluster:

```
kubectl apply -f https://raw.githubusercontent.com/oracle/oci-volume-provisioner/master/manifests/oci-volume-provisioner.yaml
kubectl apply -f https://github.com/oracle/oci-volume-provisioner/releases/download/<VERSION>/oci-volume-provisioner.yaml
```

Lastly, verify that the oci-volume-provisioner is running in your cluster. By default it runs in the 'kube-system' namespace.
Deploy the volume provisioner storage classes:

```
kubectl -n kube-system get po | grep oci-volume-provisioner
kubectl apply -f https://github.com/oracle/oci-volume-provisioner/releases/download/<VERSION>/storage-class.yaml
kubectl apply -f https://github.com/oracle/oci-volume-provisioner/releases/download/<VERSION>/storage-class-ext3.yaml
```

## Tutorial
Lastly, verify that the oci-volume-provisioner is running in your cluster. By default it runs in the 'kube-system' namespace.

In this example we'll use the OCI Volume Provisioner to create persistent storage for an NGINX Pod.
```
kubectl -n kube-system get po | grep oci-volume-provisioner
```
### Create a Storage Class
### Below is an example of deploying version '1.0.0'
```
kubectl apply -f https://raw.githubusercontent.com/oracle/oci-volume-provisioner/master/manifests/storage-class.yaml
kubectl apply -f https://github.com/oracle/oci-volume-provisioner/releases/download/1.0.0/oci-volume-provisioner.yaml
kubectl apply -f https://github.com/oracle/oci-volume-provisioner/releases/download/1.0.0/oci-volume-provisioner.yaml
kubectl apply -f https://github.com/oracle/oci-volume-provisioner/releases/download/1.0.0/storage-class.yaml
kubectl apply -f https://github.com/oracle/oci-volume-provisioner/releases/download/1.0.0/storage-class-ext3.yaml

```
## Tutorial
In this example we'll use the OCI Volume Provisioner to create persistent storage for an NGINX Pod.
### Create a PVC
Next we'll create a [PersistentVolumeClaim][4] (PVC).
The storageClassName must match the StorageClass you created previously.
The storageClassName must match the "oci" storage class supported by the provisioner.
The matchLabels should contain the (shortened) Availability Domain (AD) you want to provision a volume in.
For example in Phoenix that would be `PHX-AD-1` and in Ashburn `US-ASHBURN-AD-1`.
Expand Down

0 comments on commit 007daa3

Please sign in to comment.