I am very new to linux environment and I have an issue with loading a module in linux. The problem is I am trying to point an already loaded module to the one present in my local directory. For this I have changed all the path that would point the module to my local directory and also updated the MODULEPATH with my local directory path.
This is the command I am using for changing the MODULEPATH
export MODULEPATH=~/local/directory:${MODULEPATH}
Though the question I have is completely different, how to give a version number to my module?
I have a moudle file which looks like this -
#%Module
proc ModulesHelp { } {
puts stderr "Sets up users' environment to use XXXX. XXXX is the ..\n.. It is a piece of middleware developed by XXXX to \nhelp track XXX usage. \n\nIf you encounter any problems while linking or while executing aprun, please unload this module."
}
conflict totalview
setenv XXXX_SELECT_ON 0
setenv XXXX_SELECT_USERS kagrawa1
setenv XXXX_SELECT_OFF_USERS ""
setenv XXXX_VERBOSE 0
setenv XXXX_ON 1
setenv XXXX_PATH /d/home/kpilagr/
prepend-path PATH /nics/d/home/kagrawa1/altd/bin
Related
This is my .modulepath file, the last two lines are the paths where I have my modules mounted from another hard drive. Even though I added these lines module avail command does not fetch me any of the modules in those folders. If anyone could help it would be of great help.
#
# #(#)$Id: 38aa24cc33a5f54a93781d63005a084f74418022 $
# Module version 3.2.10
# init/.modulespath. Generated from .modulespath.in by configure.
#
# Modulepath initial setup
# ========================
#
# This file defines the initial setup for the module files search path.
# Comments may be added anywhere, which begin on # and continue until the
# end of the line
# Each line containing a single path will be added to the MODULEPATH
# environment variable. You may add as many as you want - just
# limited by the maximum variable size of your shell.
#
/etc/environment-modules/modules
#/usr/share/modules/versions # location of version files
#/usr/Modules/$MODULE_VERSION/modulefiles # Module pkg modulefiles (if versioning)
#/usr/Modules/modulefiles # Module pkg modulefiles (if no versioning)
#/usr/share/modules/modulefiles # General module files
#/usr/Modules/3.2.10/your_contribs # Edit for your requirements
/opt/apps/modulefiles/Core
/opt/apps/modulefiles/Compiler
I have even tried using module use /opt/apps/modulesfiles/Core
user#user-N501VW:~$ module use /opt/apps/modulefiles/Core
user#user-N501VW:~$ $MODULEPATH
bash: /opt/apps/modulefiles/Core:/etc/environment-modules/modules:/usr/share/modules/versions:/usr/Modules/$MODULE_VERSION/modulefiles:/usr/share/modules/modulefiles: No such file or directory
akhila#akhila-N501VW:~$ module avail
------------------------------------------------------------- /usr/share/modules/versions --------------------------------------------------------------
3.2.10
------------------------------------------------------------ /usr/share/modules/modulefiles ------------------------------------------------------------
dot module-git module-info modules null use.own
Even though your specific modulepaths are correctly set in MODULEPATH environment variable, module avail does not return any modulefiles for these directories. It means module has not found a file in these directories that is a modulefile.
So I suggest you to:
check if your mountpoint is correctly mounted
verify that the files in the directories are modulefiles compatible with the module command you use (on the module command version you use, the content of a modulefile should start with the #%Module magic cookie)
I have the following configuration file in /etc/sysconfig/myconf:
export USER=root
export NODE_DIR=/opt/MyDir
I want to use these setting in my .js file, which located in /opt/myapplication:
var userApp = //USER in /etc/sysconfig/myconf file
var dir = //NODE_DIR in /etc/sysconfig/myconf file
Is there any way to do it without open the file and parse it contents?
As I understand the export should give me the option to read it easily in node.js, but I don't find how (In addition, when I run export -p, I don't see these variables)
EDIT: what I search is equal Node.js's command to source command in Linux (the variables is not environment variables)
If those environment variables are available when you launch the program, you can use process.env. https://nodejs.org/api/process.html#process_process_env
How to set up lighttpd in order to make environment variables available to spawned processes?
I have an executable being called through CGI as an URL (e.g. http://.../cgi-bin/executable.bin).
The executable needs to load libraries and read environment variables that are set in /etc/profile using export FOO=BAR.
When I try to access the URL, it generates Internal Server Error (500), caused by an empty environment variable, which are properly set in /etc/profile.
I ended up enabling mod_setenv in modules.conf and including each environment variable I needed like this:
##
## mod_setenv
##
setenv.add-environment = ( "PATH" => env.PATH,
"WSFC_HOME" => env.WSFC_HOME,
"LD_LIBRARY_PATH" => env.LD_LIBRARY_PATH )
I m a beginner in perl. I want to know how to use this module. I read somewhere about this module but not getting its usage.
Actually I've a file which contains some environment paths which needs to be set while running some test(say file name is SET_ENV_TOOL1.csh or SET_ENV_TOOL1.sh) with particular tools.(say TOOL1, TOOL2 etc)
SET_ENV_TOOL1.sh file conatins:
setenv UVM_HOME /u/tools/digital/uvm/uvm-1.1a
setenv VIPP_HOME /u/tools/digital/vipcat_11.30-s012-22-05-2012
setenv VIP_AXI_PATH ${VIPP_HOME}/vips/amba_axi/vr_axi/sv/ #etc.(almost 10-15 paths are need to be set like this)
Everytime while running test, tool might get changed and so environment paths also needs to set to run that tool.
I have to make a perl script which sets these paths before running test. That test will run a command and that command will use these environment paths.
Any help would be greatly appreciated. Thanks !!
Reading and changing environment variables is built-in to Perl, you do not need the modules you mentioned.
$ENV{UVM_HOME} = '/u/tools/digital/uvm/uvm-1.1a';
$ENV{VIPP_HOME} = '/u/tools/digital/vipcat_11.30-s012-22-05-2012';
$ENV{VIP_AXI_PATH} = "$ENV{VIPP_HOME}/vips/amba_axi/vr_axi/sv/";
I'm installing a package from a module (Nginx in this specific case) and would like to include a configuration file from outside of the module, i.e. from a top level files directory parallel to the top level manifests directory. I don't see any way to source the file though without including it in a module or in my current Vagrant environment referring to the absolute local path.
Does Puppet allow for sourcing files from outside of modules as described in the documentation?
if I understand your question correctly, you can.
In your module a simple code like this
file { '/path/to/file':
ensure => present,
source => [
"puppet:///files/${fqdn}/path/to/file",
"puppet:///files/${hostgroup}/path/to/file",
"puppet:///files/${domain}/path/to/file",
"puppet:///files/global/path/to/file",
],
}
will do the job. The /path/to/file will be sourced using a file located in the "files" Puppet share.
(in the example above, it search in 4 different locations).
update maybe you're talking about a directory to store files which is not shared by Puppet fileserver (look at http://docs.puppetlabs.com/guides/file_serving.html), and in this case you can't i think, Vagrant or not, but you can add it to your Puppet fileserver to do it. I thinks it's the best (and maybe only) way to do it.
If you have a number of Vagrant VMs you can simply store files within your Vagrant project directory (containing your VagrantFile).
This directory is usually available to all VMs as /vagrant within the VM on creation.
If you want other directories on your computer to be available to your VMs just add the following to your VagrantFile
# see http://docs.vagrantup.com/v1/docs/config/vm/share_folder.html
config.vm.share_folder "v-packages", "/vagrant_packages", "../../dpkg"
Then to use the files within puppet you can simply treat them as local files to the VM
# bad example, bub basically use 'source => 'file:///vagrant/foo/bar'
file { '/opt/cassandra':
ensure => directory,
replace => true,
purge => true,
recurse => true,
source => 'file:///vagrant/conf/dist/apache-cassandra-1.2.0',
}
This is probably only wise to do if you only using local puppet manifests/modules.
Probably too late to help bennylope, but for others who happen across this question, as I did before figuring it out for myself ...
Include stuff like this in your Vagrantfile ...
GUEST_PROVISIONER_CONFDIR = "/example/destination/path"
HOST_PROVISIONER_CONFDIR = "/example/source/path"
config.vm.synced_folder HOST_PROVISIONER_CONFIDIR, GUEST_PROVISIONER_CONFDIR
puppet.options = "--fileserverconfig='#{GUEST_PROVISIONER_CONFDIR}/fileserver.conf'"
Then make sure /example/source/path contains the referenced fileserver.conf file. It should look something like ...
[foo]
path /example/destination/path
allow *
Now, assuming example-file.txt exists in /example/source/path, the following will work in your manifests:
source => "puppet:///foo/example-file.txt",
See:
Puppet configuration reference entry for fileserverconfig
Serving Files From Custom Mount Points