Skip to content

Instantly share code, notes, and snippets.

@oatmealraisin
Last active August 25, 2016 13:19
Show Gist options
  • Save oatmealraisin/fc9fded7f844311eda6528456a85b6fd to your computer and use it in GitHub Desktop.
Save oatmealraisin/fc9fded7f844311eda6528456a85b6fd to your computer and use it in GitHub Desktop.
oc cluster up
oc new-app sonatype/nexus
oc login -u system:admin
echo '{
"apiVersion": "v1",
"kind": "PersistentVolume",
"metadata": {
"name": "nexus-pv",
"labels": {
"type": "local"
}
},
"spec": {
"hostPath": {
"path": "/tmp"
},
"accessModes": [
"ReadWriteOnce"
],
"capacity": {
"storage": "1Gi"
},
"persistentVolumeReclaimPolicy": "Retain"
}
}' > pv.json
oc create -f pv.json
oc login -u developer
oc volumes dc/nexus --remove --confirm
oc volumes dc/nexus --add --type 'persistentVolumeClaim' -m '/sonatype-work' --claim-name 'nexus-pv'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment