Metdata Server Cluster gives more availability than a single Metadata Server. I succeeded adding a node to metadata server in SAS 9.4 and here you will find how to do that. Your host machine should comply with all pre-requite in order to set up a cluster. I did this in Red Hat Enterprise Linux OS. The steps are almost similar for Windows OS too as we will be using SAS Deployment Wizard.
Create a directory to store backup which is common to all nodes in Cluster:
The first step in setting up cluster is creating a common backup directory. You can create a directory anywhere you like but make sure sas account has read, write and execute access to this directory. Let's say I have directory called SAS and now I am creating a new directory inside it.
% mkdir /SAS/MetaClusterBackup
% chown sas:sas /SAS/MetaClusterBackup
% ls -ld /SAS/MetaClusterBackup
drwxrwxr-x. 2 sas sas 4096 Mar 15 07:32 MetaClusterBackup
I named the directory as per SAS documentation. You are free to choose the name you like.
If you are doing it for multiple machine you need to make sure that this directory is a shared location.
Configure the Backup path:
Open SAS Management Console. In Metadata Manager Plug-in -> Metadata Utilities , right click on Server Backup. You can see a option called Backup Configuration. Now you need to change the path to the directory you created in above step. In my case it is /SAS/MetaClusterBackup.
Do a test backup:
Now check whether are you able to take backup. To check, in SAS Management Console -> Metadata Utilities -> right click on Server Backup and click on Run Backup Now. It will prompt for comment, give it as "Cluster backup testing" or whatever you prefer.
You should see a gree check mark if the backup is performed successfully. You can also check the directory /SAS/MetaClusterBackup where you will find new backup files will be created.
If something goes wrong in backup you might have messed up with permission. In my environment user "sas" is the SAS installer account. Maybe your environment have different account.
SAS Deployment Wizard to install new cluster node but should be careful:
You should know the location of setup.sh file in your environment. Run the file by issuing
% ./setup.sh
We use this script to install new environment, this script will lauch SAS Deployment Wizard. For example Lev1, Lev2, Lev3. Each level is a separate environment. This deployment wizard has risks of overwriting your previous environment. Make sure in which Lev your environment is running.
After you run setup.sh script it will ask you to choose language. Select English -> OK. Select Install SAS Software, the path should be your SAS Home directory. If you are not sure which is your SAS Home directory then it is the location where SAS Software instances are installed. That directory will be your SAS Home directory.
Now deselect Install SAS Software and select Configure SAS Software. Here I asked you to deselect Install SAS Software because we are doing it in single machine. It means the SAS Software were already installed in your machine. Then Click Next.
Now select the Step 2: Metadata Server Node (Optional) and click next. Your window will calculates the required and available disk space. If there is sufficient space then click Next.
Choose the level as Custom and then click Next. Now you need to specify the SAS Configuration Directory by clicking on Browse. Configuration directory is the location where you find directory named as Lev1 or Lev2 etc. In my environment I have only Lev1 so I will choose configuration level to Lev2.
Warning: Be careful in this step. You need to know how many levels of installation is made in your platform. You need to choose a new level in this step. Choosing old or existing level will overwrite.
Now select only SAS Metadata Server Node Configuration as our task is to add new node. Deselect the remaining option and click Next.
Check the fully qualified hostname and short name. You can use the following command in Linux to get your hostname.
% hostname
Usually it will show you the correct hostname but check for spelling mistakes. Click next.
This step is for migration and we are not doing migration so just click Next.
Select DefaultAuth as the Authentication Domain and click Next.
Give the fully qualified hostname and change the listening port to any new value. For example: my previous metadata server port is 8561, so I will give 8562.
Warning: Since the new node of Metadata Server is in same machine the hostname will be same. However you should differentiate it with new port number.
Select default options for below steps.
Agree with default Log File Name and click Next.
Don't change the local host port, will be your previous Metadata Server port. Click Next. Allow to use internal account and click next. Use the default installer id (ie) sas for me. Provide the password and click next.
Remember the credentials you give
In this step it will as for Unrestricted Administrator internal password give the password and click next. For Create Common Directories keep it unchecked for all. For Environment Manager agree with default settings and click next.
All steps are done now. Click Start. It took me 5 - 15 minutes. Click next and then finish.
Now you can see there will be a new configuration directory created. For me it is Lev2. You can check the server status. The command is:
%./sas.servers status
Output:
SAS servers status:
SAS Metadata Server 1 is UP.
Create a directory to store backup which is common to all nodes in Cluster:
The first step in setting up cluster is creating a common backup directory. You can create a directory anywhere you like but make sure sas account has read, write and execute access to this directory. Let's say I have directory called SAS and now I am creating a new directory inside it.
% mkdir /SAS/MetaClusterBackup
% chown sas:sas /SAS/MetaClusterBackup
% ls -ld /SAS/MetaClusterBackup
drwxrwxr-x. 2 sas sas 4096 Mar 15 07:32 MetaClusterBackup
I named the directory as per SAS documentation. You are free to choose the name you like.
If you are doing it for multiple machine you need to make sure that this directory is a shared location.
Configure the Backup path:
Open SAS Management Console. In Metadata Manager Plug-in -> Metadata Utilities , right click on Server Backup. You can see a option called Backup Configuration. Now you need to change the path to the directory you created in above step. In my case it is /SAS/MetaClusterBackup.
Do a test backup:
Now check whether are you able to take backup. To check, in SAS Management Console -> Metadata Utilities -> right click on Server Backup and click on Run Backup Now. It will prompt for comment, give it as "Cluster backup testing" or whatever you prefer.
You should see a gree check mark if the backup is performed successfully. You can also check the directory /SAS/MetaClusterBackup where you will find new backup files will be created.
If something goes wrong in backup you might have messed up with permission. In my environment user "sas" is the SAS installer account. Maybe your environment have different account.
SAS Deployment Wizard to install new cluster node but should be careful:
You should know the location of setup.sh file in your environment. Run the file by issuing
% ./setup.sh
We use this script to install new environment, this script will lauch SAS Deployment Wizard. For example Lev1, Lev2, Lev3. Each level is a separate environment. This deployment wizard has risks of overwriting your previous environment. Make sure in which Lev your environment is running.
After you run setup.sh script it will ask you to choose language. Select English -> OK. Select Install SAS Software, the path should be your SAS Home directory. If you are not sure which is your SAS Home directory then it is the location where SAS Software instances are installed. That directory will be your SAS Home directory.
Now deselect Install SAS Software and select Configure SAS Software. Here I asked you to deselect Install SAS Software because we are doing it in single machine. It means the SAS Software were already installed in your machine. Then Click Next.
Now select the Step 2: Metadata Server Node (Optional) and click next. Your window will calculates the required and available disk space. If there is sufficient space then click Next.
Choose the level as Custom and then click Next. Now you need to specify the SAS Configuration Directory by clicking on Browse. Configuration directory is the location where you find directory named as Lev1 or Lev2 etc. In my environment I have only Lev1 so I will choose configuration level to Lev2.
Warning: Be careful in this step. You need to know how many levels of installation is made in your platform. You need to choose a new level in this step. Choosing old or existing level will overwrite.
Now select only SAS Metadata Server Node Configuration as our task is to add new node. Deselect the remaining option and click Next.
Check the fully qualified hostname and short name. You can use the following command in Linux to get your hostname.
% hostname
Usually it will show you the correct hostname but check for spelling mistakes. Click next.
This step is for migration and we are not doing migration so just click Next.
Select DefaultAuth as the Authentication Domain and click Next.
Give the fully qualified hostname and change the listening port to any new value. For example: my previous metadata server port is 8561, so I will give 8562.
Warning: Since the new node of Metadata Server is in same machine the hostname will be same. However you should differentiate it with new port number.
Select default options for below steps.
Agree with default Log File Name and click Next.
Don't change the local host port, will be your previous Metadata Server port. Click Next. Allow to use internal account and click next. Use the default installer id (ie) sas for me. Provide the password and click next.
Remember the credentials you give
In this step it will as for Unrestricted Administrator internal password give the password and click next. For Create Common Directories keep it unchecked for all. For Environment Manager agree with default settings and click next.
All steps are done now. Click Start. It took me 5 - 15 minutes. Click next and then finish.
Now you can see there will be a new configuration directory created. For me it is Lev2. You can check the server status. The command is:
%./sas.servers status
Output:
SAS servers status:
SAS Metadata Server 1 is UP.
Comments
Post a Comment