Install and start minishift (https://github.com/minishift/minishift#installation)
The following instructions has been tested with minishift v1.0.0.beta4
minishift start
eval $(minishift docker-env)
export OPENSHIFT_USERNAME="developer"
export OPENSHIFT_PASSWORD="developer"
export CHE_OPENSHIFT_PROJECT="eclipse-che"
export CHE_HOSTNAME="che.$(minishift ip).nip.io"
export CHE_OPENSHIFT_SERVICE_ACCOUNT="che"
export CHE_LOG_LEVEL="INFO"
export CHE_DEBUGGING_ENABLED="false"
oc login -u ${OPENSHIFT_USERNAME} -p ${OPENSHIFT_PASSWORD} -n ${CHE_OPENSHIFT_PROJECT}
oc new-project ${CHE_OPENSHIFT_PROJECT}
oc login -u ${OPENSHIFT_USERNAME} -p ${OPENSHIFT_PASSWORD} -n ${CHE_OPENSHIFT_PROJECT}
# Deploy configmaps
oc create configmap che \
--from-literal=hostname-http=${CHE_HOSTNAME} \
--from-literal=workspace-storage="/home/user/che/workspaces" \
--from-literal=workspace-storage-create-folders="false" \
--from-literal=local-conf-dir="/etc/conf" \
--from-literal=openshift-serviceaccountname=${CHE_OPENSHIFT_SERVICE_ACCOUNT} \
--from-literal=che-server-evaluation-strategy="single-port" \
--from-literal=log-level=${CHE_LOG_LEVEL} \
--from-literal=docker-connector="openshift" \
--from-literal=port="8080" \
--from-literal=remote-debugging-enabled=${CHE_DEBUGGING_ENABLED}
# Deploy PVs (gofabric8 way)
# gofabric8 should be installed:
# https://github.com/fabric8io/gofabric8#getting-started
#oc apply -f fabric8-online/apps/che/src/main/fabric8/config-pvc.yml
#oc apply -f fabric8-online/apps/che/src/main/fabric8/data-pvc.yml
#oc apply -f fabric8-online/apps/che/src/main/fabric8/workspace-pvc.yml
#oc login -u system:admin -n ${CHE_OPENSHIFT_PROJECT}
#gofabric8 volumes
#oc login -u ${OPENSHIFT_USERNAME} -p ${OPENSHIFT_PASSWORD} -n ${CHE_OPENSHIFT_PROJECT}
# Deploy PVs (template way)
oc login -u system:admin -n ${CHE_OPENSHIFT_PROJECT}
oc apply -f os-templates/hostPath/pvconf.yaml
oc apply -f os-templates/hostPath/pvdata.yaml
oc apply -f os-templates/hostPath/pvworkspace.yaml
oc login -u ${OPENSHIFT_USERNAME} -p ${OPENSHIFT_PASSWORD} -n ${CHE_OPENSHIFT_PROJECT}
oc apply -f fabric8-online/apps/che/src/main/fabric8/config-pvc.yml
oc apply -f fabric8-online/apps/che/src/main/fabric8/data-pvc.yml
oc apply -f fabric8-online/apps/che/src/main/fabric8/workspace-pvc.yml
# Create and configure service account
oc create serviceaccount ${CHE_OPENSHIFT_SERVICE_ACCOUNT}
oc login -u system:admin -n ${CHE_OPENSHIFT_PROJECT}
oadm policy add-role-to-user -n ${CHE_OPENSHIFT_PROJECT} edit system:serviceaccount:${CHE_OPENSHIFT_PROJECT}:${CHE_OPENSHIFT_SERVICE_ACCOUNT}
oc login -u ${OPENSHIFT_USERNAME} -p ${OPENSHIFT_PASSWORD} -n ${CHE_OPENSHIFT_PROJECT}
#Deploy Che server
echo "apiVersion: \"v1\"
kind: \"DeploymentConfig\"
metadata:
name: \"che\"
$(cat fabric8-online/apps/che/src/main/fabric8/deployment.yml)
" | oc apply -f -
#Create Che service
#Create Che route
oc delete serviceaccount ${CHE_OPENSHIFT_SERVICE_ACCOUNT}
oc login -u system:admin -n ${CHE_OPENSHIFT_PROJECT}
oc delete pv --all -n ${CHE_OPENSHIFT_PROJECT}
oc delete pvc --all -n ${CHE_OPENSHIFT_PROJECT}
oc login -u ${OPENSHIFT_USERNAME} -p ${OPENSHIFT_PASSWORD} -n ${CHE_OPENSHIFT_PROJECT}
oc login -u ${OPENSHIFT_USERNAME} -p ${OPENSHIFT_PASSWORD} -n ${CHE_OPENSHIFT_PROJECT}
oc delete configmap che
Hi,
I'm trying to run this, but running into a few problems.
Where do you get the files refered to here?
os-templates/hostPath/...
fabric8-online/apps/che/src/main/fabric8/...
Also, I have the "oc" binary (through minishift), but not "oadm". Is that a separate binary I can find somewhere, or is that a convenience alias you have added to your profile (instead of "oc adm")?
I'm really interested in getting this running on OpenShift (without having to install fabric8).
Thanks in advance for any guidance you can offer.