cloud-agility / board

0 stars 0 forks source link

Deploy the basic application to vagrant ICp and Bluemix #2

Open raudaviciusm opened 6 years ago

raudaviciusm commented 6 years ago

I have tested istio bookinfo example on ICp vagrant (https://github.com/IBM/deploy-ibm-cloud-private) and it works fine.

Instructions

You need:

VirtualBox 5.1.28 Vagrant 2.0.0

Spinnig up cluster:

$ git clone https://github.com/IBM/deploy-ibm-cloud-private.git

$ cd deploy-ibm-cloud-private

$ vagrant up

Installing istio Installing istio guide

$ curl -L https://git.io/getLatestIstio | sh -

$  cd istio-0.2.7

$ export PATH=$PWD/bin:$PATH

$ kubectl apply -f install/kubernetes/istio.yaml

Ensure istio is running

$ kubectl get pods --namespace istio-system
NAME                             READY     STATUS             RESTARTS   AGE
istio-ca-1707280235-g3j71        1/1       Running            0          2m
istio-egress-1073996764-h0kgb    1/1       Running            0          2m
istio-ingress-4278789961-rsqc0   1/1       Running            0          2m
istio-mixer-1613103353-5xfqr     2/2       Running            0          2m
istio-pilot-727922749-thlnn      1/1       Running   1          10s

$ kubectl get svc --namespace istio-system
NAME            CLUSTER-IP   EXTERNAL-IP   PORT(S)                                                  AGE
istio-egress    10.0.0.5     <none>        80/TCP                                                   2m
istio-ingress   10.0.0.15    <pending>     80:31821/TCP,443:32217/TCP                               2m
istio-mixer     10.0.0.95    <none>        9091/TCP,9093/TCP,9094/TCP,9102/TCP,9125/UDP,42422/TCP   2m
istio-pilot     10.0.0.237   <none>        8080/TCP,443/TCP                                         2m

Install bookinfo Install bookinfo

Within the same istio-0.2.7 folder:

$ kubectl apply -f samples/bookinfo/kube/bookinfo.yaml

$ kubectl apply -f <(istioctl kube-inject -f samples/bookinfo/kube/bookinfo.yaml)

Access bookinfo

Make sure istio pods are up and running:

$ kubectl get pods
NAME             DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
details-v1       1         1         1            0           16s
productpage-v1   1         1         1            0           16s
ratings-v1       1         1         1            0           16s
reviews-v1       1         1         1            0           16s
reviews-v2       1         1         1            0           16s
reviews-v3       1         1         1            0           16s

Getting port for accessing application:

$ kubectl get svc --namespace istio-system | grep ingress
istio-ingress   10.0.0.15    <pending>     80:31821/TCP,443:32217/TCP                               10m

The port will be the one that maps from 80, in the case above it's 31821.

Accessing application: http://clusterIP:port/productpage

chrisesharp commented 6 years ago

Hmm...I get the following when I try to access the productpage:

no healthy upstream

chrisesharp commented 6 years ago

Also, strangely, the output from kubectl get pods is a different format....

NAME                              READY     STATUS            RESTARTS   AGE
details-v1-647530973-fmr3v        0/2       Init:0/2          0          5m
productpage-v1-1878302957-6f7fk   0/2       PodInitializing   0          5m
ratings-v1-2753015925-n5jdk       2/2       Running           0          5m
reviews-v1-168186869-813z2        0/2       Init:0/2          0          5m
reviews-v2-875746513-m28qg        2/2       Running           0          5m
reviews-v3-2932140841-p9jz7       2/2       Running           0          5m