How to Install Elasticsearch and Kibana with Docker | How to disable password in Elasticsearch 8

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone let's go ahead and see how you can install elasticsearch and kivana in Docker on Ubuntu previously I had so new how you can install Docker on Ubuntu you can watch that video on my channel the link of video is given in the description let's go ahead open your web browser in the web browser you need to search here kibana docker all right so it says here install kibana with Docker you need to click on this it will open here a web page something like this all right so once you have web page this you will be seeing here you have a Docker Network create elastic and then elasticsearch and thereafter the Kiwana when we need to install kibana and elasticsearch then we need to install these together and kibana and elastic connects together with the network private Network which is created internally so that network name is elastic here all right so first of all I'm going to create here elastic Network so that the Kiwana and elasticsearch can connect to each other I'm just going to copy that and then I'm gonna paste it here so it's going to create a network elastic and do remember I have already installed Docker so there is no process in this video how to install Docker there is another video to install the docker all right so the network is created thereafter we need to pull elastic search Docker image here is the current latest version by the time you are watching this video this version might get changed so do not worry about that you just need to copy this whole thing from here and then you need to paste that here thereafter it will pull elastic search image from the docker Hub and it will download it or download it on your local PC this is optional which can verify that if you have correctly download elasticsearch I am assuming that we have installed we have downloaded elasticsearch correctly this is not the process of installation this is a process of downloading here then you can run elasticsearch so in fact it is the process of installation but it's not like a local installation on your PC this is a process where you can install elasticsearch inside a container that container here is Docker and the name of container is es node 0 1 and on network it will use here Network elastic Network and then we are mapping here Port 920 with nine two zero zero and nine three zero zero with nine three zero zero all right thereafter it will run in attached mode so we would be able to see our elastic search here open Terminal once again and then paste it here let's go ahead and just run this so as we run this it will take a while to start the elastic search it will start elasticsearch in a Docker mode now you can see elasticsearch has started here so the first time when you install elasticsearch when you start your elastic search the first time then it in in the last it will display some password to you so that password you need to store for your data purpose all right so now you see the elasticsearch has started successfully and you can see here all these password for elasticsearch so I'm just gonna copy this whole thing from here and then I'm gonna paste it inside a notebook a text editor so I'm opening here text editor I have just pasted it for the safety and then I'm gonna just save this file ah elastic okay so this password we will be needing later on to connect our kibana with elasticsearch and also we will be needing these password to access our elastic search okay so elasticsearch has successfully installed now we need to install Kiwana here okay so you need to scroll it down a little bit more then you can see we are going to now pull here kivana all right but before that let me tell you one more thing if you are facing any error while starting this elastic search then you need to make sure that you have provided enough memory so that your your system can run all right so how would you check that memory what I'm saying to you that you you need to check it in a system control configuration file so you write here pseudo Nano forward slash Etc and then forward slash sys control dot config file so in this config file you need to verify that if you have correctly the max map count either equal to this or more than this value if these values are less then probably your elastic search and kivana installation in Docker might get failed so make sure that you have written this value if there is no value then you can copy this value and paste it here and then you can store it here okay and then you can exit all right so after doing that thereafter you need to restart your computer otherwise if you do not want to restart your computer then you can set this with sudo system control write it for a current session I am saying here virtual memory VM Max map count equal to 2 6 2 1 4 4. you just need to run this now you can check it here similarly if you copy this you can paste it here in another terminal but do remember if you are trying to store it using this command then it will be effective only this terminal okay whatever the active terminal is there so for permanent storage as I told you earlier that you need to modify your system control configuration file all right so your elasticsearch is running now now we need to install kibana so here is the process you just need to copy this whole thing from here and then you need to paste it here so it will first pull the kivana image from the docker thereafter we need to run kibana with Docker or you can say that it's going to install kibana in Docker container so for that we are going to copy here next command so for next command we just need to paste it here so this Docker run name kibana01 so it's going to run this Docker image named as kibana and it will also connect with elastic Network which we had taken earlier which we had created earlier and default port for kibana is 5601 and rest is kibana rest is here uh you know the Kiwana image you just need to run this so we are just going to run this it will run in a while and then it will tell us exactly on which Port this kibana is running so that we can we can ring we can run Kiwana and we can connect kevana with elasticsearch so it says that kibana is running with on localhost at Port 5601 you just need to click this it will open in your default browser 0 0.0.0.0.05601 so it will take a while to complete these startup for kibana so seems like it has started let me uh show you here okay so it is asking about enrollment token from the terminal now this is what we had stored earlier in our text editor if you remember so there I told you earlier that it generates default password and some tokens so here we have a token this is token for kibana so I'm just gonna copy this whole thing do remember this is valid only for 30 minute so I'm just gonna copy this from there and then I'm gonna paste it here and then configure elastic on Terminal you can see here is a code so this code we need to paste it here so that it can verify code and it can connect with elasticsearch so it has started elasticsearch and it is completing a setup process that you can verify here all the plugins and remaining tools are getting initialized and installed if those are not installed already and you can check that it will take a while to complete the setup once this setup is complete then I'll show you how this kibana is connected with elastic okay so seems like setup is complete here and thereafter this will come to elastic comes out if that doesn't come you just need to refresh it it will automatically come there all right so now it's asking about the username and the password where is that you again need to come back here on the text editor in the text editor it says that password for elastic user so the username is elastic here and the password is here so this is default password save this for permanent use thereafter you need to come to your browser you write here elastic and thereafter you paste that password which we had copied earlier then you can log in there I'm just gonna say you don't save this thereafter you can see your kibana has started and it is connected with elasticsearch you can click on here and then you can scroll it down and then click on development Tools in development tools you can simply check here if you run this it says that there is no data the reason is here this is fresh installed elasticsearch so there is no data present there at all you can check other settings you need to write their get settings if it is not written you just simply need to write here get and then settings you just select this one then you can check that all the settings which are default setting so these are coming from the elastic search all right perfect so that's how we can connect with password but suppose that if you want to disable your password then what you will do so there is another process to disable the password for elasticsearch and then you would be able to access your elasticsearch without any password and restrictions so to disable the disable the password for elasticsearch we need to we we need to modify the elasticsearch configuration file so for that purpose what you need to do here you need to make sure that your elastic search is running with the docker and your kibana is also running with the docker then open another fresh terminal in that terminal now we need to go inside the docker machine all right so for that we need to write here Docker e x e c Docker execute and I'm gonna say that execute Docker with root user and then it says that connect these elastic search with the name of our machine earlier which we had used so the name of our elasticsearch was ah I think es0 node something it was let me just check that the name either we can find it here okay so the name was here es node 01 so this we need to copy from there so execute user as a root and then connect it with connected with es node 0 1 all right thereafter we need to make sure that it open here terminal inside that that's the bin bash terminal not all right now you can see there this is connected with our Docker with the elasticsearch docker but how would you know that it is connected with elastic search Docker so for that purpose you need to open here new terminal and then you can check that Docker stats if you check here a Docker stats in that you will see es node 0 1 and the container ID is here so de7 these are last three characters for the container ID this number you can verify here that it is the same Docker ID which we are seeing here and here so we are inside elasticsearch Docker bash now inside this base this is something like a Ubuntu machine or Linux machine so now inside this opt get will work here so you need to write here opt get update so it's going to update uh you know the index of Ubuntu inside the docker do remember this is running inside the docker this is not running outside the docker all right so outside Docker is your machine but inside the docker is its Docker container so whatever the changes you will make here that will not reflect on your actual machine so this is a Docker so inside the docker We have replaced the indexing thereafter we need to install here Nano because these Nano editor doesn't come as in pre-installed inside the docker so I write here opt to get install Nano so once this Nano is installed now if you check here LS so we are already inside the users here and elastic search now we need to go inside the configuration so CD config now inside config if you list all these files you will be able to see here elasticsearch.yml so this is the file which we need to modify so you need to write here Nano you need to write here Nano elasticsearch dot yml you just need to run this you need to just come here and then you need to make sure that you write here xpac security enabled equal to false so thereafter you press Ctrl and S and then Ctrl and X that means it will save the file and then it will exit from there after you can exit from the docker base once you have came out of the docker base then you can restart your elastic search here your elastic search is already running so once you restart your elastic search it will stop otherwise you can just disconnect this elastic search by typing control and C now this elastic search is stopped here all right you can check that with Docker stats so that elastic search is not running now so what we need to do to run the elastic search you just need to run the docker restart elastic do remember that you do not need to run this right now all right so we don't need to run this one all right so the docker that is created already now you need to use the docker name to start the elastic so you write here a Docker and then restart uh you you need to write here Docker and thereafter uh restart elasticsearch sorry this the name is actually the docker restart the name Watcher just a second let me see the name it was es node 0 1 so that was the actual name Docker restart es node 01 now your elastic search has started you can check that by typing here kernel request with the Local Host you just type here the elasticsearch runs at nine to zero zero all right so seems like it's not running there but anyway if you check here stats Docker stats you should be able to see that your elastic search is running here and it is taking almost 8 gigabyte of memory that's okay no issue at all you can refresh this one you should be able to see here that service unavailable and license is not available anyway if you run here with localhost 9200 you are able to see here your elastic search so it is taking some time to start here will start and now you are able to see here your realistic search you are able to access it without any password all right let's check if kivanai is installed here okay so we are going to do here localhost and then 5601 do remember do either I put there 0 0 0 5 6 0 1 or localhost it's same thing seems like it is still not working so what we need to do here we need to stop this from here and then we need to start this like we restarted our elastic search so we need to write here give 0 1 that was the kibana name let me just check that once again if it is not there okay it was kibana and then zero one so this was the name of our Docker so it has restarted the kibana now we need to go and check it here so it might take a while seems like Kiwana has not started so what we need to do right now we again need to go inside our elasticsearch.y ml you just need to write here Docker exe user root es node 01 binbase thereafter inside that go inside the config file and then you need to write here nanoelastic search Dot yml and in this you need to make sure that you write here false as well once you write all these as false thereafter I am going to save this Ctrl and S and then control and exit thereafter you can exit from here itself all right thereafter we need to restart our kibana so for that you can simply write in kibana folder that you write here docker start minus a i and then kivana so it will attach here interactive mode so kibana 0 1 we are just going to restart Kiwana so it's actually starting Kiwana with interactive mode so we will be able to see here whatever the process going on inside the Kiwana so kivana has restarted and it is available once again at 0.0.0.05601 Port you simply control and click on this once you control click on this you would be able to see it here it is opening here all right so it will take a while to open this in meantime you can see it here you have your elastic search working and in some time your kibana will also restart so kivana has restarted it is asking about the enrollment token since we have disabled our elasticsearch security now we can connect it with manual so in manually I need to remove this s since there is no security so we have to connect it with HTTP instead https then you can click on the check address so seems like this is not connecting properly the reason is if you check your elastic search your elasticsearch is working on another red race that address is mentioned somewhere let me just see that address okay hold on okay so here you can see it is 9300 but the somewhere we must be having 9 0 0 Port as well so basically this is IP on which your elastic search is working so instead of saying that connected with the local IP we have to use this particular IP here you can see so we have to use particularly this IP to connect our elastic search so basically we are going to put that IP here HTTP 172.22.0.2 and then 9 to 0 0 thereafter I you know click on check address so it's going to connect since we have disabled the password and the security for the elastic search so it will not need anything else and then finally it will just need here verification code which you can give from here which you have two one one and three nine zero all right so it has connected your kibana with elastic search now earlier we had seen how you can connect your kibana with elasticsearch through the password now we have seen how you can connect your kibana with elasticsearch without using any password although if you are using behind any server or behind any proxy or behind any VPN then your cluster is secure otherwise you can use like we I had shown you earlier so I have shown you here both ways how you can use kibana elasticsearch with security and without security now you can explore your kibana like we have been doing earlier you can come to the development tools you can run this it is able to access your elastic search you can run this as well so there is no setting this is a pretty much press install so you can put any setting on elasticsearch you can put your index if you want then it will be able to give you a proper output all right so this is all about in this lesson thanks a lot for watching it please subscribe this Channel and share this video on social media and with your friends thanks a lot I'll see you later
Info
Channel: KGP Talkie
Views: 1,521
Rating: undefined out of 5
Keywords: kgp talkie, machine learning tutorials, kgp talkie ml, kgp talkie for machine learning, Elasticsearch, Kibana, Docker, Elasticsearch installation, Kibana installation, Elasticsearch with Kibana, Docker containers, Data analytics, Elasticsearch setup, Kibana setup, Elasticsearch Docker, Kibana Docker, Elasticsearch tutorial, Kibana tutorial, Docker tutorial, Elasticsearch and Kibana tutorial, Data search, Password protection, Security configuration, Data exploration
Id: HRaEusIzTzU
Channel Id: undefined
Length: 24min 3sec (1443 seconds)
Published: Thu Aug 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.