hello youtubers hope you're all doing good welcome to this video I'm Ben cat and this is just me an open source channel right in this video let's look at kyani web interface for visualizing your sto components and the traffic that's flowing on the service mesh so it's very interesting component in my previous video I showed how to add a graph on R to your HDL deployment and this time you're going to use HDL along with graph on R and with Kyani so all my previous videos please go through my previous three videos to get a good understanding of how to deploy the sto binary and sto resources in your cube and this cluster and also deploying the sample booking for application so I've done those three videos I'm gonna go through very quickly all the commands here and let's get started okay so cube CDL version - - shot so I'm on washing 1.15 dot 0 I'm running Cuban it is in darker kind I'm doing a separate video on that if you wanna can follow that video you need to have a Cuban Redis cluster helm installed and then a load balancing solution like metal LP so all these individual components have covered in a lot in my Cuban data series so please watch those videos if you want to follow along ok I cube CTL get notes so we have three notes one was to node to worker nodes all of them or docker containers and I've downloaded e steel I am inside the steel directory here samples install and everything so if you want to download sto its curl - L and the URL pipe that - shell and it will install and download the SEO CTL binary we haven't started using a steel CDL yet but we will be using that in the future videos but to get that to get started just install the East your comments at least it will give you the sto directory where they've got all the manifests for this sample applications and easier deployment okay so let's go ahead and install each do first okay so on my other terminal here and going to watch what resources are being deployed cubes - n sto system get all so at the moment there is no namespace called sto system which will be created when we deploy the sto the so the first command is helm install under the install directory kubera netis hell is teo in it so that's for the sto initialization STR in it - - name is going to be is teo in it and we are going to deploy that in the sto system namespace ok so it creates three jobs it prepares your environment for the actually steo deployment so this one is just three jobs and it will deploy lots of custom resource definitions ok so while the containers are getting created while the job is being executed let's go ahead and look at the second command that we need to install sto but before that there is one important step if you want to deploy key ally in your sto installation you have to create a secret for username and password by default if you don't do that step creating a secret which contains the username and password to login to the key ally web interface you can however do it later after installing sto and key ally but it might not take effect immediately might have to delete the key ally pod and then recreate it for the changes to take effect so it's better to create the secret beforehand before creating these tier okay so for that I'm going to refer to the East your documentation sto key ally so sto visualizing your mesh and here create a secret so that's the first say first step so we are going to set couple of environment variables and we will be using a secret or a resource deployment to create a secret so the first one is key ally username and then key ally passphrase so if you're using - use these two commands and if you're using Z shell like mine you have to use these two commands okay let me copy that one control C and then paste it here so Keanu use the name I'm going to leave it as admin okay so clearly pause phrase copy that and then paste it here and for pause phrase I'm gonna use the same admin as my password okay so namespace this is tio system okay so cube CD will create namespace is to your system we don't have to do that because we've already created the namespace cube CTL get namespace sto system is there so we are good to run this command cat here document and then this one here okay paste okay Kiani secret created if I do cube CTL - n sto system described secret key ally so we have the key ally secret created which has the username and phosphorus okay so now we are good to deploy the actual east year so on the bottom pane here you will see a lot of resources getting created when we deploy sto in our cluster okay so the command is helm install under the install directory cuba net is hell sto - - name is sto and we're going to deploy that under sto system namespace - - set graph on ax dot enabled equals true so this is what we did in our previous video to deploy graph on ax add-on for our sto deployment so now i'm going to set another option key ally dot enabled equals true okay so now we have graph honor and key ally added so as you can see here that is the key ally part and we have the graph on apart here so bear in mind griffin and key ally are running as cluster IP service it's not exposed to outside world so you can either update the graph on on key ally service to be a Northport service or you can use port forwarding I will show both in a moment when it's ready container is getting created so I'm gonna pause the video here and come back in a couple of minutes when all of the resources have been deployed alright all the resources have been deployed and it's all working fine so now the next step is to deploy the book info sample application so you'll see I'm going to watch cube CTL get all so we don't have anything in the default namespace we're going to deploy the book info sample application in the default namespace so as you remember from my previous videos the first step is to label the name space if you don't label your namespace East you won't be able to inject the Envoy citecar into your part okay cube CTL label name space default steo injection equals enabled okay so now we are good to deploy our booking for application cube CTL create - F samples look info platform cube booking form oh okay so down here you can see details product page ratings and three versions of reviews micro service so if you followed my second video in the sto series which is part of cube another series I've explained about this book info application what individual micro services in what language they have been written and so on so as you can see here there are two containers in each of these parts so one is the Envoy sidecar container the other one is the actual container so it's gonna take like couple of minutes I'm gonna pause the video here and come back when it's ready so alright all the parts are running so on the next step is to deploy the Gateway because we need to expose these micro services to the outside world at the moment it's only accessible within the cluster so we need to create a gateway which is a custom resource definition deployed by the sta cube CTL create - F samples book info networking sorry I yeah networking booking for gateway dot llamo so we have deployed a gateway and a virtual service and finally we have to define the destination rules cube CDL create - F samples looking for networking destination rule all llamo ok so we are good cube CDL - n sto system get service sto ingress gateway so I've used metal lb and my external IP is 172 17.0 200 let's take a look at the applications 1 7 to 17 year old 200 slash product page ok cool so we can access the application from outside the cluster that's good ok so the next thing here is cube CTL - n sto system gets service CRO fauna so griffin is running as type + r IP and let's look at key ally key Ollie is also running as a cluster IP on for 20,000 won so I'm not going to go into graph ona we talked about in my previous video so this video is about key ollie okay let's take a look at that one but before that I'm going to generate some traffic so watch curl - s for silent mode - oh I don't I'm not bothered about the outputs I'm directing that to dev null and I'm looking at 1 7 to 17 o 200 slash product page so every couple of seconds it's sending a request to that application so we can see the graph in the graph fauna are in key ally ok so now comes the exciting stuff so how the key ally web interface is going to look at and what features or what options we have got to look at that so to access key ally we can either do port forwarding or edit the service and change the type to cluster IP sorry from cluster IP to note port cube CTL - n sto system edit service key ally and you can change the type from plus r IP - where is it yep change the time from cluster IP to north port and you will see the north port and you can access from any of your worker nodes or you can simply use port forwarding let's do port forwarding cube CTL - n sto system port forward key ally part and then the port is twenty thousand one and I'm forwarding that to twenty thousand one on my local host okay so now we should be able to access the key ally dashboard local host : twenty thousand one okay cool so that's our key ally dashboard because I've logged into key ally before it didn't ask me for the password you can see here I've logged in as admin so if you want I can log out so this is what you will see when you start key ally or when you visit the key ally website for the first time and the username and password is what you set as a secret at the start of this video so I've set my username to admin and password to admin there you go so you're a fetching graph owner info graph on a URL so Keeley also looks at graph on R for grabs so we need to configure the graph on a URL in key ally so you will have that here in this documentation which I forgot to do there is it yep - - set key ally dashboard graph on a URL equals hasta TP : graph owner : 3000 so you have to pass that when we did the helm install command - - set - r dot enabled equals true kiala dot enabled equals true and then you also need to pause this one here so if you had passed this one here you wouldn't have got that error okay so that's our key ally web interface so I'm going to maximize this okay so we have on the left here we have graph applications workloads services and history of configuration so the moment it's looking at four different namespaces so this is the default namespace where we have the book info application deployed and this is the sto system namespace where we have all the sto components deployed metal lb that's the namespace where I've deployed my metal lb and storage so that's my dynamic NFS storage so I deployed that in a separate namespace okay so what else can you see here you can filter it refresh interval for how long you need and there's a little graph here the traffic flow so because we have used the curl command to generate some traffic you can see the graph here okay so if I look at here the icons here at the bottom that one is graph second one is application list third is workload list for the service list and first assistir config lists so these five icons here are exactly the same as the sidebar the links to the sidebar here okay so let's take a look at the applications here okay so on the default namespace we have these applications these are micro services we have details product page ratings page reviews page okay workloads so these are the different workloads and these are the different services graph so that's where it's going to get interesting as you can see here the entry point is the ingress gateway so that's the ingress gateway and the virtual service we defined and then the entry point is to the product page and the product page sends requests to the details micro service as well as to the reviews micro service and the reviews micro service calls the ratings micro service the version 2 on version 3 if you remember my second video in sto where I explained about the book info application the version one of the reviews micro service doesn't have any ratings so that's version one subversion to cause the ratings micro service and all the rating stars will be in black color and in version 3 on the rating star will be in red color so this is how the traffic actually flows if you want to take a detailed look you can click on the individual components that will give you more insight but before that I'm gonna show you what are all the different ways to your workloads app graph okay so that's the app graph it doesn't show you the actual versions so product page is going to details and reviews reviews is going to ratings and you don't see the different versions of the reviews page and if you want to see the different version so it is here versioned app graph so that will show you the different versions of your individual micro-services and we have service graph this is just about the service not about the workloads and then we have the workload graph if you want to look at the workload view okay so my personal favorite is version the app graph okay so that's one thing so in here edge labels edges this green line so the the connector between the two components is called edge so we have lemon edges here on this on the right hand side here if you see there are seven apps for services and 11 edges so these are the edges 1 2 3 4 5 6 7 8 9 10 and 11 edges okay on the right here you see some little graph about the HTTP traffic management and the request time and so on okay so labels for the edge request per second so you can see here 0.49 requests per second because we are sending one request every couple of seconds in our curve command so every two seconds we are sending one request so every second it's about half a request so that's what it shows here 0.5 requests per second or you can change the label to request percentage so hundred percentage of the request is going to product page and 50% is going to the details page and 50% is going to the reviews and from reviews if you can see here version 1 version 2 version 3 around 30 percentage of each traffic is going to each version of the reviews page so this is a nice way of viewing your traffic flow what percentage of traffic is going to which micro-service and so on and another important thing I'm going to show you is the display so what are all the different things that you want to see in your graph and the very important thing is traffic animation so if I select that I'm not sure if you're able to see that very clearly and you can see the traffic flow where the traffic is flowing and if you've got any problem with your service mesh or micro service applications you can see it can visualize it you can visualize your entire traffic here if there is a problem between the traffic going from version two to ratings app you will see instead of green green means healthy right so if there is any problem you will see red or orange or some different colors and the traffic won't be flowing so this is a quick animation showing whether the traffic is flowing healthy or not okay so if I want to check any particular component if I want to check for example reviews I click reviews and here on the right hand side if I select reviews so these are the different workloads we have reviews version 1 version 2 version 3 created labels and so on we don't have any virtual service destination rules ok so show on graph is what we are going to delete all traffic routing create weighted routing so I will be covering all this in my next video probably or in the next couple of videos you can either update your manifest or you can dynamically change it on the kiala web interface itself it's very powerful very easy way to visualize it it has lots of nice features and you can do all sorts of things in here itself in the Keowee web interface okay so graph so that's my favorite graph with the traffic animations and so on ok cool so that's the that's a quick introduction I won't say quick but an introduction to key early web interface and in my next video probably I will show you some request routing example say for example if you want to route your request to a specific version of the reviews microservice for example so the moment the product page is going here the product page is requesting reviews and details and the reviews traffic is going to version 1 version 2 version 3 so that's based on our destination rule and in my next video I will show you how to change the percentage of traffic flowing to each of these versions and then based on some of the has TTP headers how to direct the traffic so my next video is all about request routing and traffic management so I will show you both in the command line they are editing the actual llamó files and also doing the same thing on the key early web interface it's makes your life a lot easier but if you want to make it permanent you have to do it on the Yama file because that makes it permanent are not sure whether updating that in the key early web interface makes it permanent I'm not sure let's stick that further in Mari next video ok so if you've got any questions or any feedback please leave me a comment I should be able to get back to you if you like this video please share with your friends and don't forget to subscribe to my channel and those of you who requested me to do this video I'm very grateful to you I'm really really enjoying his to your service smash this is the first time I'm exploring east year and it's been very fantastic awesome - alright I will see you all in my next video bye bye