We’re smarter together. Learn from this collection of community knowledge and add your expertise.

Many hands make light VIRK

by SAS Employee ErwanGranger on ‎01-22-2018 02:27 PM - edited 4 weeks ago by SAS Employee TreyWhittenton (1,827 Views)

You are probably familiar with the expression "Many hands make light work."


If not, you can probably guess the meaning: A task is easier when many people contribute to it. In that spirit, I am happy to report today that many hands have collaborated to the creation of VIRK, and I hope that many more will continue to do so in the future.

 

What's VIRK?

VIRK - rhymes with "work" - stands for Viya Infrastructure Resource Kit. It is a collection of tools and utilities aimed at making SAS® Viya® infrastructure and readiness tasks easier, safer and faster. VIRK content will grow over time.

 

For now, the main tool available is an Ansible playbook that allows you to verify and/or configure your server(s) in preparation for a SAS Viya deployment. (The content of the playbook is based on the information from the SAS Viya Deployment Guide). In short, this playbook can perform in a couple minutes what could take a Linux admin up to a couple hours, prior to a SAS Viya deployment. And if there is ever a concern that the environment might have veered off the desired prerequisite state, you can easily rerun this playbook to either confirm or fix potential issues. In my series of YouTube videos on how to deploy SAS Viya, I did mention and use an early prototype of VIRK to perform the OS pre-reqs.

 

Where is VIRK?

VIRK is hosted as a git repository on the SAS Software Github page. It is publicly accessible by anyone in the world. You can get VIRK and its documentation at https://github.com/sassoftware/virk. Note that their are multiple branches to reflect the multiple versions of SAS Viya. As of this writing (January 2018), the branch you would likely want to use is "viya-3.3."

 

How can I use VIRK?

Assuming that your Linux server can access the internet, and assuming that you already installed Ansible onto it, here are a few simple commands to get you started:

 

cd ~
sudo yum install git -y
git clone https://github.com/sassoftware/virk.git --branch viya-3.3
cd ~/virk/playbooks/pre-install-playbook
ansible-playbook -i pre-install.inventory.ini va_pre_install_playbook.yml --check

 

To unlock the full potential of this tool, you will have to update the inventory file to reflect your environment, and you should look at the default values of the variables (in virk/playbooks/pre-install-playbook/roles/virk.preinstall/defaults/main.yml) to make sure that they work for you.

 

Once you are more comfortable using the VIRK Pre-Install Playbook, you can remove the "--check" to let it change the things it wants to change.

 

Can I contribute to VIRK?

Indeed you can! While VIRK is not officially supported by SAS Tech Support, its authors will do their best to address issues reported in Github, as well as incorporate pull requests. The main reason VIRK is available externally on Github is so that customers who find shortcomings or want to provide improvements can do so easily, quickly and for the benefit of the entire SAS Viya community.

 

Do I have to use VIRK?

Absolutely not! This choice is entirely up to you. We understand that some Linux admins prefer to either do things manually, or to configure their own configuration management software. In such cases, they should simply consult the Deployment Guide and perform actions accordingly. You can find the SAS Viya Deployment Guide on the SAS Support site: support.sas.com/documentation/onlinedoc/viya/index.html

 

Remember, however, that you can always use VIRK in check mode (--check) to only confirm prerequisites. Check mode will not perform any changes to your environment.

 

Acknowledgements 

A huge thanks to Thomas Pangborn and Sherrell Crenshaw for providing the elbow grease necessary for this content to be made available.

Comments
by PROC Star
a month ago

Hi Erwan,

 

Thanks to you and the others for publishing this. I tried it out in checking mode (post-deployment) on my SAS Viya 3.3 deployment yesterday and it found a few extra things for me to look into. It took me a little while to craft the command line I used so I thought I might post it here in case it helps others save some time:

 

ansible-playbook -i pre-install.inventory.ini va_pre_install_playbook.yml --check \
    --skip-tags skipmemfail \
    --skip-tags skipcoresfail \
    --extra-vars '{"custom_group_list":{"group":"sas","gid":"1323801993"}}' \
    --extra-vars '{"custom_user_list":[{"name":"sas","uid":"1323801995","group":"sas","groups":"sas"},{"name":"cas","uid":"1323801893","group":"sas","groups":"sas"}]}'

It's a small(ish) VM purely for investigation purposes so I needed to skip the CPU core and memory checks and also specify details for my existing sas/cas groups/users. The uid/gid numbers are so large because they are AD users available via sssd/pam integration.

 

Cheers

Paul

by SAS Employee ErwanGranger
a month ago

Hi Paul, 

I am glad to see you figured out how to use this! 

 

Currently, the part about users works as follows:

- if you let it, it creates local users. 

- however, we purposely made this part non-idempotent. We never want to update a UID or a GID from under you. 

For the rest, you generally have a choice between:

- skip the check (like you did)

- change the value (in .\pre-install-playbook\roles\virk.preinstall\defaults\main.yml) to something lower (min_cores_num: 1)

- change the value at the prompt ( -e 'min_cores_num=1')

- change the value in the playbook itself by adding a vars section just before the roles: line

 

I noticed that the error message about the users only says to look at the variables. There are actually ways to completely turn off the user management section. 

 

If you have any questions/feedback/improvements, feel free to do so on GitHub.

 

Regards, 

 

Erwan

by PROC Star
4 weeks ago

 Thanks for those extra tips Erwan. I'll take a look at those other options next time I use it.

Your turn
Sign In!

Want to write an article? Sign in with your profile.


Looking for the Ask the Expert series? Find it in its new home: communities.sas.com/askexpert.