Skip to content

Latest commit

 

History

History
122 lines (93 loc) · 4.2 KB

README-old.adoc

File metadata and controls

122 lines (93 loc) · 4.2 KB

PLAYING WITH ISTIO

Install minishift:

brew cask install minishift
brew cask reinstall minishift
minishift start --memory 8GB

(login op https://192.168.64.6:8443/console als developer/anypass of syste/admin )

Installing Minishift and Istio

cd
curl -L https://git.io/getLatestIstio | sh -
export PATH="$PATH:/Users/robbert/istio-1.0.6/bin"
cd ~/istio-1.0.6/
oc login -u system:admin

oc adm policy add-scc-to-user anyuid -z istio-egressgateway-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z istio-citadel-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z istio-ingressgateway-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z istio-cleanup-old-ca-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z istio-mixer-post-install-account -n istio-system
oc adm policy add-scc-to-user anyuid -z istio-mixer-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z istio-pilot-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z istio-sidecar-injector-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z istio-galley-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z prometheus -n istio-system
oc adm policy add-scc-to-user privileged -z default -n myproject

oc apply -f install/kubernetes/helm/istio/templates/crds.yaml
oc apply -f install/kubernetes/istio-demo-auth.yaml
oc get svc -n istio-system
oc get pods -n istio-system

Test: Build images

./build1.sh
./build2.sh


== Test: Deploy sample pods without sidecar

oc login -u system:admin oc create -f service1/openshift-scripts/deployconfig.yml -n myproject oc create -f service1/openshift-scripts/service.yml -n myproject oc expose svc/service1 oc create -f service2/openshift-scripts/deployconfig.yml -n myproject oc create -f service2/openshift-scripts/service.yml -n myproject oc expose svc/service2

Test: Deploy sample pods with sidecar

oc login -u system:admin
export PATH="$PATH:~/istio-1.0.6/bin"
#kubectl label namespace default istio-injection=enabled --overwrite

istioctl kube-inject -f service1/openshift-scripts/deployconfig.yml | oc create -n myproject -f -
oc create -f service1/openshift-scripts/service.yml -n myproject
oc expose svc/service1

istioctl kube-inject -f service2/openshift-scripts/deployconfig.yml | oc create -n myproject -f -
oc create -f service2/openshift-scripts/service.yml -n myproject
oc expose svc/service2


#oc create -f service1/openshift-scripts/gateway.yml -n myproject
#oc create -f service1/openshift-scripts/virtualservice.yml -n myproject

# get details:
# oc get virtualservices service1 -o json
# oc get gateways service1-gateway -o json
minishift ip

Delete the sample pods without istio

oc delete -f service1/openshift-scripts/service.yml -n myproject
oc delete -f service1/openshift-scripts/deployconfig.yml -n myproject
oc delete routes service1
oc delete -f service2/openshift-scripts/service.yml -n myproject
oc delete -f service2/openshift-scripts/deployconfig.yml -n myproject

Delete the sample pods with istio

oc delete -f service1/openshift-scripts/service.yml -n myproject
oc delete -f service1/openshift-scripts/gateway.yml -n myproject
oc delete -f service1/openshift-scripts/virtualservice.yml -n myproject
oc delete -f service1/openshift-scripts/deployconfig.yml -n myproject
oc delete -f service2/openshift-scripts/deployconfig.yml -n myproject

Delete Istio on minishift:

oc delete -f install/kubernetes/istio-demo-auth.yaml

Delete minishift:

minishift delete
rm -rf ~.minishift/
rm -rf ~/.kube