Created
August 16, 2017 19:49
-
-
Save thomasmckay/a571b214d86d96fcf4cf3d75fe5f1920 to your computer and use it in GitHub Desktop.
minishift install / setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.openshift.org/latest/minishift/getting-started/installing.html#installing-instructions | |
I think addons is git clone https://github.com/minishift/minishift/addons into minishift dir | |
########### Below is cut&paste to destroy and recreate minishift VM ########################## | |
minishift delete && rm -rf ~/.minishift ~/.kube/* | |
pushd addons | |
minishift addons install registry-route | |
minishift addons enable registry-route | |
minishift addons install anyuid | |
minishift addons enable anyuid | |
popd | |
minishift start --iso-url file:///home/thomasmckay/code/minishift-centos-iso/build/minishift-centos7.iso \ | |
--v 4 --openshift-version v3.6.0 \ | |
--insecure-registry 172.30.0.0/16 --insecure-registry minishift --insecure-registry 192.168.0.24:53206 | |
oc login -u system:admin | |
oc adm policy add-cluster-role-to-user cluster-admin developer | |
oc adm policy add-role-to-user cluster-admin developer | |
oc adm policy add-role-to-user admin developer -n default | |
oc adm policy add-cluster-role-to-user system:image-signer developer | |
oc login -u developer | |
oc project default | |
oc create -n default -f https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_hosted_templates/files/v3.6/origin/registry-console.yaml | |
oc create route passthrough --service registry-console --port registry-console -n default | |
oc new-app -n default --template=registry-console -p OPENSHIFT_OAUTH_PROVIDER_URL="https://$(minishift ip):8443" -p REGISTRY_HOST=$(oc get route registry-console -n default --template='{{ .spec.host }}') -p COCKPIT_KUBE_URL=$(oc get route registry-console -n default --template='https://{{ .spec.host }}') | |
echo " | |
apiVersion: v1 | |
kind: Route | |
metadata: | |
name: registry-access | |
spec: | |
host: docker-registry.`minishift ip`.nip.io | |
to: | |
kind: Service | |
name: docker-registry | |
weight: 100 | |
port: | |
targetPort: 5000-tcp | |
tls: | |
termination: edge | |
insecureEdgeTerminationPolicy: Allow | |
status: | |
ingress: | |
- | |
host: docker-registry.`minishift ip`.nip.io | |
routerName: router | |
conditions: | |
- | |
type: Admitted | |
status: 'True' | |
" | oc create -n default -f - | |
oc project myproject | |
sudo sed -i -e "s/docker-registry.*nip\.io:443/docker-registry\.`minishift ip`\.nip\.io:443/" /etc/sysconfig/docker | |
sudo systemctl restart docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment