Module 2-Install, Create CB Cluster on Google Cloud VMs_04 - Hands-On Couchbase DBA | Kishore Uppala

Best Tech Reads · Intermediate ·☁️ DevOps & Cloud ·4y ago

About this lesson

This is a demo video covering the installation of Couchbase Server and setup a new cluster on Google Cloud VMs. _________________________________________________________________________________________ ⬇️ Download Module 1&2 Commands: https://besttechreads.blogspot.com/2022/03/module-1-2-installation-and.html 👈 ⬇️ Download Entire Course Modules Commands: https://besttechreads.blogspot.com/search/label/%23Couchbase_Course 👈 🔥 Free Hands-on Couchbase Database Administration Course: https://www.youtube.com/playlist?list=PL2Ee9HJO55e3KyRR6o8bEcYRoYlxZpThY _________________________________________________________________________________________ Below are the topics covered in this video: ▶️ 00:00:00 Task Introduction ▶️ 00:00:20 Create a VM in GCP ▶️ 00:02:40 Connet to a GCP VM ▶️ 00:02:49 Generate a key & add it to GCP project metadata ▶️ 00:04:29 Allow Couchbase ports in the firewall ▶️ 00:05:01 Setup New Cluster ▶️ 00:05:28 Cloning GCP VMs (or) Create similar GCP VMs ▶️ 00:05:45 Add new nodes(Data Service) to an existing Couchbase cluster ▶️ 00:06:39 Add Index Service node to the Couchbase cluster ▶️ 00:07:38 Add Query Service node to the Couchbase cluster ▶️ 00:08:12 Load a sample bucket into the Couchbase cluster ▶️ 00:08:32 Resident percent of a Couchbase bucket & other discussions ____________________________________________________________________________________ Thank You For Watching Guys! Please hit the like Button and Subscribe To My Channel to see more videos in future! #CouchbaseDatabaseAdministration,#BestTechReads,#KishoreUppala ✅ SUBSCRIBE HERE: https://www.youtube.com/channel/UCkjWDZQi0NGzWBJtYo8XZmw?sub_confirmation=1 📌 Follow Us : ============ ✔️ Website: https://besttechreads.blogspot.com/ ✔️ Facebook: https://www.facebook.com/Best-Tech-Reads-106740102002977 🔐 Disclaimer and Copyright for "Best Tech Reads" youtube channel: ================================================================== This is a personal video channel, we make no rep

Full Transcript

[Music] hi welcome back in this video i will create vms in the gcp cloud to create couchbase clusters because our personal account support to create three or four virtual machines with the limitation of the ram on that machine so you can use any cloud you can use iws or you can use gcp or azure the process is same so let me go ahead and create a virtual machine compute engine vm instances create instance if you don't have a gcp account or aws account or azure account you can sign up or create an account with your credit card it is free for 12 months any cloud you have to make sure you are using micro services as per the terms and conditions of the cloud provider see here the gcp i have free trial credits here if i create the vm instances will be charged from this amount if you take aws you can get 12 months of free access for the micro service or vms instance name if you want to provide any instance name can give that i am going ahead with the default name while selecting the region you can check the price the price will change accordingly as per the configuration you have selected i am going with the minimum configuration n1 series g1 small 1.7 gb memory and 1vcpu this is the monthly estimation cost so if you select another region this price will change let me say that europe so it changes right check this when you are creating ibm so that you won't get unexpected bills selecting newest central disk i'm going ahead with uh centos 7 because before this recording i have created centroid 8 and try to install couch base but it looks like there is a bug the center is a couch-based indexer is frequently restarting in loop i tried to fix it but i couldn't so instead of wasting time i want to go ahead with centro i7 it doesn't matter what waste you are going with boot disk size 20 gb click on select you don't need to select service account let's go with the default service account access scope leave it as default i'm allowing http https traffic because i want to access this vm from my local machine from my local browser so i'm allowing this i want to install couchbase and the vm is starting up for that i am providing a startup script so i'm disabling thp with these two commands and disabling swappiness with this command and downloading the small meta package with this command and installing that small meta package this is the actual causeway server installation command installing a 6.5 version i'm intentionally installing this version because in the later lectures i will show you how to upgrade it from 6.5 to 6.6 i'm enabling this software service so when the server got rebooted it will automatically start the code base i'm copying this paste it in the startup script click create vm instance creation is in progress you can check the same from this notifications vm is created this is the external ip and this is the internal ip let's see whether you are able to connect it won't allow you to log in because of the security console you can connect from the ssh prompt we can generate a key we can add it to the metadata of the gcp project so that we can connect it from the mobile extern itself from our local machine i'll go to my mobile extern tool and go to the tool keygen ssh key generator i will generate a key click generate move your mouse around it will create a public key i'll change this common touch keyshot if you see whatever comment we mentioned it is appended i will copy this public key into the gcp project you can type metadata and ssh keys click edit i have added the public key that i have just created click save now you have to save this private key private key close this window now you have to configure a session with this private key click on new session ssl in the remote host section give the user name at the red external ip address you can get this username from the public key we have added to the metadata ssh keys and this is a username it is showing here in the advanced ssl settings you have to provide the private key that we have saved earlier check this private key checkbox locate the private key and click ok double click on it you should be able to connect now you can verify the ram tpu and disk space risk we have created with 20gb now let's try to access the callspace server from the browser i just created the this vm 23456 by cloning this vm i will show you in few seconds try to access it from a0914 it is not loading because there must be firewall running so firewall is running so you have to allow this a0914 go to the vpc network firewall the menu may change from cloud provider to provider but in a nutshell you have to allow this port so 8091 is non-encrypted port so i'm editing http rule hello http if you are using 18091 port then you can edit https rule click edit and come down as of now only 80 is a row i'm adding 8091 as well click save and you see it is automatically loading now setup new cluster my cluster acceptance ip address it will take only internal ip address i am going ahead with the default disk path so for now i am selecting only data so you can see the ram available save and finish cluster is configured as of now only one node running with data service i have cloned these nodes from this instance itself click on the instance one instead of providing the region startup script and cpu and ram details every time you can simply create one instance and click on that instant create similar so all the settings will be cloned to the new vm let me add second data service node i'll copy the external ip for now i will join from here as you see the node is added to the cluster but it is showing pending rebalance which means it is not actually serving the user's request until the rebalance is complete it will not serve user request if you have plans to add a few more nodes don't do the rebalance because rebalance is a costly operation in terms of cpu and ram add or remove all the nodes and then rebalance so let me go ahead and add one more data service node ad server it is added so now start adding index service nodes before adding index service node let's change the index storage to memory optimized index storage and save it will give some performance benefit by storing the index data into the memory but you have to tune your indexer ram accordingly we can change the setting later as well but there should not be any index service node present in the cluster if you have already index service you can remove them from the cluster change the setting and add them back to the cluster adding the index service node add server since new service is introduced to the cluster it popped up this window and asking us to enter the memory allocation for the index service along with the index storage setting add the second index service node as well now add the query service nodes adding the second query service node as well now do rebalance it is completed very quickly because the cluster is holding no data so there are no buckets that's why it's completed pretty quickly let's load a sample bucket from the activity tab you can see sample bucket is loading so in few seconds you can see a few items in the bucket you can see the ops per second on the bucket resident percent is based on the data on the disk versus the ram allocated for this bucket if you have more memory allocated than the actual disk space all the data on the disk will be available in the memory then you can see the 100 resident ratio if your data on the disk is more than the allocated ram size for the bucket then obviously you will see the less resident percent you have to make sure your bucket resident percent is always more than 90 or 95 percentage if it is 100 then it is good at least it should be more than 90 or 95 otherwise you can see latency issues because your data will not be found in the memory and it will try to get it from the disk so obviously latencies will get increased let's do a test with graceful failover and see how much time it is taking for the rebalance when a node is failover due to power outage or a network glitch and once it came back automatically it will pop up with two options delta recovery and full recovery we will discuss about this options later for now i will add the server back to the cluster with delta recovery and then rebalance the number of indexes directly affects the duration of the rebalance because during the rebalance the indexes and views got rebuilt so that will obviously take some time so after this rebalance i will delete all these indexes again do a graceful failover and i will try to add this node back to the cluster with rebalance and i will see how much time it is taking with indexes and without indexes so it is completed i am removing all the indexes post removal of all the indexes i will again gracefully fail over that node and add it back to the cluster with rebalance option and we'll see how much time it is taking with indexes and without indexes now all the indexes are removed from the cluster let's see any views are there nothing now again gracefully fail over the node as you see here it is having three data nodes each one is equally taking the b buckets add the node back with the delta recovery rebalance now it should take less time because there are no indexes in the cluster since the cluster is holding the very minimal data you don't see much difference between these rebalance items whereas in the actual pin live clusters you can see huge difference so in case if you are doing any maintenance activity like os patching or any maintenance activity on the you can check with the application team and remove those indexes once the maintenance activity is over you can create the indexes again so this is applicable for non-production environments so however for production it is not recommended so that way maintenance activity will be completed within less time because if you take any live clusters sometimes single rebalance will take four to five hours or more than that depending on the size that's all you in the next lecture thank you

Original Description

This is a demo video covering the installation of Couchbase Server and setup a new cluster on Google Cloud VMs. _________________________________________________________________________________________ ⬇️ Download Module 1&2 Commands: https://besttechreads.blogspot.com/2022/03/module-1-2-installation-and.html 👈 ⬇️ Download Entire Course Modules Commands: https://besttechreads.blogspot.com/search/label/%23Couchbase_Course 👈 🔥 Free Hands-on Couchbase Database Administration Course: https://www.youtube.com/playlist?list=PL2Ee9HJO55e3KyRR6o8bEcYRoYlxZpThY _________________________________________________________________________________________ Below are the topics covered in this video: ▶️ 00:00:00 Task Introduction ▶️ 00:00:20 Create a VM in GCP ▶️ 00:02:40 Connet to a GCP VM ▶️ 00:02:49 Generate a key & add it to GCP project metadata ▶️ 00:04:29 Allow Couchbase ports in the firewall ▶️ 00:05:01 Setup New Cluster ▶️ 00:05:28 Cloning GCP VMs (or) Create similar GCP VMs ▶️ 00:05:45 Add new nodes(Data Service) to an existing Couchbase cluster ▶️ 00:06:39 Add Index Service node to the Couchbase cluster ▶️ 00:07:38 Add Query Service node to the Couchbase cluster ▶️ 00:08:12 Load a sample bucket into the Couchbase cluster ▶️ 00:08:32 Resident percent of a Couchbase bucket & other discussions ____________________________________________________________________________________ Thank You For Watching Guys! Please hit the like Button and Subscribe To My Channel to see more videos in future! #CouchbaseDatabaseAdministration,#BestTechReads,#KishoreUppala ✅ SUBSCRIBE HERE: https://www.youtube.com/channel/UCkjWDZQi0NGzWBJtYo8XZmw?sub_confirmation=1 📌 Follow Us : ============ ✔️ Website: https://besttechreads.blogspot.com/ ✔️ Facebook: https://www.facebook.com/Best-Tech-Reads-106740102002977 🔐 Disclaimer and Copyright for "Best Tech Reads" youtube channel: ================================================================== This is a personal video channel, we make no rep
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

📰
Sovereign Lemmings Released
Deploy Lemmings to multiple cloud regions using the Sovereign package on Github
Dev.to · Andrei Merlescu
📰
From Docker Build to Kubernetes Deploy on Ubuntu: The Image Workflow That Never Changed
Learn the image workflow from Docker build to Kubernetes deploy on Ubuntu, a fundamental process that remains unchanged despite recent developments
Dev.to · James Joyner
📰
I Built urldn-link-check — A GitHub Action to Catch Broken Links Before They Reach Production
Learn how to catch broken links before they reach production using a custom GitHub Action
Dev.to · La hsen Smira
📰
Install Docker on Ubuntu 26.04 (the right way, with the docker-group truth)
Learn to install Docker on Ubuntu 26.04 the right way, with a focus on the docker-group truth, to ensure secure and efficient containerization
Dev.to · Minor Keith
Up next
How to Code with Distrobox on the Steam Deck
Ian Wootten
Watch →