Skip to content

Instantly share code, notes, and snippets.

View frayos's full-sized avatar

Younes frayos

View GitHub Profile
@frayos
frayos / checkKeepAlive.sh
Created June 27, 2018 12:58
Keep alive machine settings
#!/bin/sh
for i in `ls /proc/sys/net/core/`;
do
echo ------;
echo $i;
cat /proc/sys/net/core/$i;
echo ----;
done;
@frayos
frayos / gist:a4340f50b9e7fe3a4c4093344cf8dc54
Created June 8, 2018 06:00
Set tomcat value Consul Viya ex.
go into Consul
set the "server.tomcat.max-http-header-size" setting under "config/SASLogon" to 65536.
You will need to restart, at least, the SASLogon microservice to get the change to take effect.
@frayos
frayos / truststore.txt
Created May 24, 2018 13:11
EM-FS-MM 9.4 - use Windows Trust Store
#####7611192712 http://sirius.na.sas.com/Sirius/GSTS/ShowTrack.aspx?trknum=7611192712
We found a way to get SSL based EM, FS and MM installed clients to reference certificates in the standard Windows trust store.
This is key because it allows users to deploy the installed client versions of these tools without having to "manually" import SSL certificates into the SAS Private JRE cacerts trust store.
add the following Java runtime arguments to the em.ini file, etc:
JavaArgs_nn=-Djsse.enableSNIExtension=false
JavaArgs_nn=-Djavax.net.ssl.trustStoreProvider=SunMSCAPI
JavaArgs_nn=-Djavax.net.ssl.trustStoreType=Windows-ROOT
JavaArgs_nn=-Djavax.net.ssl.keyStoreProvider=SunMSCAPI
JavaArgs_nn=-Djavax.net.ssl.keyStoreType=Windows-MY
@frayos
frayos / yumrepocreation.sh
Created May 18, 2018 19:40
Official Yumrepocreation.sh
#!/bin/bash
# from https://go.documentation.sas.com/?docsetId=dplyml0phy0lax&docsetTarget=n1r12yogvmv19fn13dp89ulf1jlx.htm&docsetVersion=3.3&locale=en
sudo yum install yum-utils createrepo httpd
REPOLOC=/var/www/html/pulp/repos
ORDERABLE=$(grep METAREPO_SOE_ORDERABLE soe_defaults.yml | awk -F"'" '{ print $2 }')
# Make the directory that will house the yum repository
if [ ! -d ${REPOLOC} ]; then
mkdir -p ${REPOLOC}
@frayos
frayos / createrepos.sh
Created May 18, 2018 19:38
Official createrepos.sh
#!/bin/bash
# from https://go.documentation.sas.com/?docsetId=dplyml0phy0lax&docsetTarget=n1r12yogvmv19fn13dp89ulf1jlx.htm&docsetVersion=3.3&locale=en
sudo yum install yum-utils
cp customized_deployment_script.sh setup_repos.sh
sed -i -e 's/^\s*yum groupinstall/#yum groupinstall/' setup_repos.sh
./setup_repos.sh
@frayos
frayos / logfilter.py
Last active May 29, 2018 07:51
LogFilter Viya Py
#!/bin/env python
#
# Script to scan dedicated time frames from sas/viya config folder log files.
# USAGE :
# python logfilter.py -i /opt/sas/viya/config/var/log -l /home/cloud-user/logfiltered.log -o /home/cloud-user/logO.log -v -b "2018-03-01 12:20:00" -e "2018-03-01 13:00:00"
#
# Given a begin and end time it scans all "*.log" files from given sas config folder.
# Requirement is that the logfiles start with the default formats like
# - 2017-10-04 12:55:53,380
# - 2017-10-04T11:00:00,600
@frayos
frayos / viya-sas-admin.sh
Last active May 14, 2018 15:41
viya-sas-admin.sh
#/opt/sas/viya/home/bin/sas-admin --sas-endpoint http://localhost -k auth login --user sasboot --password SASpw123
/opt/sas/viya/home/bin/sas-admin profile set-endpoint http://localhost
/opt/sas/viya/home/bin/sas-admin identities list-users
@frayos
frayos / viya-sas-bootstrap-config.sh
Last active June 27, 2018 14:25
viya-sas-bootstrap-config.sh LDAP
##################################################
#author : David Helwig
# Usage Note 61882: Troubleshooting identities and the identities service in SAS® Viya® http://support.sas.com/kb/61882
# If you don't understand the below, don't use it
# you'll end breaking your Deployment
#####################################################
export CONSUL_TOKEN=$(cat /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/client.token)
export CONSUL_TOKEN=$(cat /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/management.token)
##### GATHER ALL IDENTITIES CONFIGURATION VIYA ##################
### *NOTE, the password is displayed in plain text in this result. Mask the password before sharing the results and protect/delete the file the command created.
@frayos
frayos / sasauth-mkhomedir.sh
Created May 10, 2018 19:29
sasauth make home pam
#!/bin/sh
####
# Author Alexender Lysenko @ SAS
####
##SAS doesn't have the functionality to create home directories for end-users, but you can do that on PAM level:
########
# REQUIREMENTS :
#####
#Install oddjob-mkhomedir on the server
#Create a script /etc/pam.d/sasauth-mkhomedir.sh with the following contents:
@frayos
frayos / LSF Job Status.txt
Created May 2, 2018 08:33
LSF Job Status
#define JOB_STAT_PEND 0x01 job is pending
#define JOB_STAT_PSUSP 0x02 job is held
#define JOB_STAT_RUN 0x04 job is running
#define JOB_STAT_SSUSP 0x08 job is suspended by LSF Batch system
#define JOB_STAT_USUSP 0x10 job is suspended by user
#define JOB_STAT_EXIT 0x20 job exited
#define JOB_STAT_DONE 0x40 job is completed successfully