Mokey is a crawler that crawls an OpenShift cluster caching information about all applications in the cluster.
The component is named after the Mokey Fraggle (http://muppet.wikia.com/wiki/Mokey_Fraggle).
In order to use this project you must set repositories in your ~/.gradle/init.gradle
file.
allprojects {
ext.repos= {
mavenCentral()
jcenter()
}
repositories repos
buildscript {
repositories repos
}
}
We use a local repository for distributionUrl in our gradle-wrapper.properties, you need to change it to a public repo in order to use the gradlew command. ../gradle/wrapper/gradle-wrapper.properties
<...>
distributionUrl=https\://services.gradle.org/distributions/gradle-<version>-bin.zip
<...>
- Log into your OpenShift cluster with
oc
- Start the Main class
- If you want to turn off caching set the mokey.cache property to false
Create a file src/main/http/rest-client.env.json
{
"local":{
"apiUrl":"http://localhost:8080",
"token":""
},
"utv-dev": {
"apiUrl": "http://url-to-mokey-on-your-cluster"
"token": ""
}
}
Fill in the token value with a valid ocp token from oc whoami -t
Run the http commands from Intellij
Mokey must be run as a serviceaccount user; example oc command to grant the privileges:
oc get sa
<list of serviceaccounts>
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:<serviceaccountname>:mokey