{"id":27004437,"url":"https://github.com/tacc/hpc_tips","last_synced_at":"2026-01-27T10:03:41.873Z","repository":{"id":53375225,"uuid":"274462663","full_name":"TACC/HPC_Tips","owner":"TACC","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-16T00:05:42.000Z","size":424,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-11-16T01:17:40.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TACC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-23T17:01:54.000Z","updated_at":"2024-11-16T00:05:45.000Z","dependencies_parsed_at":"2024-06-14T21:33:18.654Z","dependency_job_id":"78dab83d-0c92-4e3f-97f1-30abf57e150f","html_url":"https://github.com/TACC/HPC_Tips","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TACC%2FHPC_Tips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TACC%2FHPC_Tips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TACC%2FHPC_Tips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TACC%2FHPC_Tips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TACC","download_url":"https://codeload.github.com/TACC/HPC_Tips/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128739,"owners_count":20888235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-04T06:16:49.113Z","updated_at":"2026-01-27T10:03:36.825Z","avatar_url":"https://github.com/TACC.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"HPC_Tips:\n=========\n\nHPC_Tips is a database for short tips to help HPC users.  This tool consists of several parts:\n\n(1) A program, **showTips**, is installed on login nodes which typically prints a random tip from the HPC_Tips database.\n\n(2) A couple of files containing short tips each being 1 to 5 lines long.\n\n(3) A python program to load the database from supplied list of tips\n\n(4) Tools to setup the configuration file and build and install the necessary programs.\n\nThis works by installing a MySQL database on a server which is accessible from all your login nodes.  The source for this\nproject can live anywhere.  One uses the \"**load_tips.py**\" script to install the tips in the database. You place the source on a\nhost where you have write access to the database.  If you only allow write access to the database on the server, then the\nsource will have to live there.\n\nNote that the tips database is independent of the install of the **showTips** program used to display tips to users.  Tips can be\nupdated at anytime.\n\nPYTHON MODULE:\n==============\n\nThe python program that installs the tips requires the\nmysql-connector-python package.  This only needs to be installed where\nthe database is updated:\n\n  % pip3 install mysql-connnector-python\n\nSecurity Issues:\n================\n\nIn order for a user to access the MySQL database, they must have a MySQL account and password.  All users\nuse the same account and password that is hardcoded into the **showTips** binary. A determined user might be\nable to decode the **showTips** binary to exact the MySQL account and password.  However this account and password\nonly have \"select\" privileges.  They cannot delete or modify the database in any way.\n\nThe python script and MySQL username and password that can change the database need to be stored in a\nlocation where users cannot access such as the server where the database is stored.\n\nRuntime issues\n==============\n\nSince this **showTips** program is part of the login procedure, it shouldn't hang if the database cannot be accessed.\nThe program has 0.4 second timeout if the database cannot be accessed and no warnings are produced unless requested.\n\nTo install\n===========\n\n1) Setup MySQL Database:\n\nHave a server which can be seen on the network from your login nodes.  On that server install a mysql database server and allow\nyour login nodes access to the the mysql ports on this server. This might require opening ports in various firewalls.  For the\npurposes of this discussion, lets assume that this server is called \"alice\".\n\nOnce this mysql database server is running you'll need to create two accounts to access this database. Here we use \"tipBuilder\" as\nthe account name that has write access to the database and set \"test623\" as the password.  A second account (account: readerOfTips,\npw: tipReader123) is needed to read the tips. You need to login to the mysql program and do:\n\n    mysql\u003e create database HPC_Tips;\n    mysql\u003e create user 'tipBuilder'@'%'           identified with mysql_native_password by 'test623';\n    mysql\u003e create user 'tipBuilder'@'localhost'   identified with mysql_native_password by 'test623';\n    mysql\u003e create user 'readerOfTips'@'%'         identified with mysql_native_password by 'tipReader123';\n    mysql\u003e create user 'readerOfTips'@'localhost' identified with mysql_native_password by 'tipReader123';\n    mysql\u003e grant all privileges ON HPC_Tips.* TO 'tipBuilder'@'localhost';\n    mysql\u003e grant all privileges ON HPC_Tips.* TO 'tipBuilder'@'%';\n    mysql\u003e grant select ON HPC_Tips.* TO 'readerOfTips'@'localhost';\n    mysql\u003e grant select ON HPC_Tips.* TO 'readerOfTips'@'%';\n    mysql\u003e flush privileges;\n\nObviously, you can use any names and password you like, you just need to be consistent throughout this process.\n\nYou may have to edit the mysql.cnf file to allow access.  Check here for more details: https://linuxize.com/post/mysql-remote-access/\n\n\n2) Create database config file:\n\nThe following program will create a database configuration file used by the **load_tips.py** program\n\n    $ ./conf_create.py\n    Database host: alice\n    Database user: tipBuilder\n    Database pass: test623\n    Database name: HPC_Tips\n    \nIf you want to just load the database from the server then replace\n\"alice\" with \"localhost\".  This program will use the database name you\nused to create a file.  In this case it will use \"HPC_Tips_db.conf\".\n\n3) Edit tips\n\nThe **tips** directory contains text files are broken into two files.\nThe first is a file called **general.tips** which contains general\ntips that should be useful at all sites.  The second file called\n**tacc.tips**.  This file contains tips that probably only make sense\nat TACC.  Many of these can probably be reworded to work for your\nsite. Consider either editting this file immediately or move it out of\nthe way until it contains tips that work for your site.\n\nThe following rules are used with the tips:\n\n  a) All tips are between lines \"##---\" as shown below:\n\n     ##----\n     It usually takes 30 minutes or more for new passwords to propagate across TACC systems.\n     ##----\n\n  b) Long lines are filled to fit the line width on the terminal.\n\n  c) Newlines are honored when formatting the tip for the terminal.\n\n  d) Leading blanks are honored when formatting the tip for the terminal.\n\n4) Load the database:\n\nThe **load_tips.py** program reads the tips/*.tips into the database.\n\n      ./load_tips.py HPC_Tips_db.conf\n\nNote that the **load_tips.py** program uses the first argument given as the name of the config file.  If no argument is given\nit tries either \"HPC_Tips_db.conf\" or \"HPCTips_db.conf\"\n\n5) Check that you can access the database:\n\nPlease try to access the mysql database from the login nodes where \"alice\" is the name of the database server.\n\n     $ mysql -u readerOfTips -h alice -p HPC_Tips \n     Enter password: \n     mysql\u003e select * from tips limit 1;\n\nIf this doesn't work then check to see that you can read the tips on\nthe server by using the mysql command.  Then check the firewall\nrules to allow the mysql ports access to the \"alice\" server.\n\n6) Build the **showTips** program:\n\nPlease configure and make install the **showTips** binary:\n\n      $ ./configure --prefix=/path/to/HPCTips --with-host=alice --with-reader=readerOfTips --with-pass=tipReader123 --with-db=HPC_Tips --with-module=HPC_Tips\n      $ make install\n\n7) Test **showTips** program\n\nYou can test the various options to the **showTips** binary:\n\n      $ /path/to/HPCTips/bin/showTips -n 1\n      $ /path/to/HPCTips/bin/showTips -w\n      $ /path/to/HPCTips/bin/showTips -a\n      $ /path/to/HPCTips/bin/showTips -c\n      $ /path/to/HPCTips/bin/showTips -h\n\nWhere -n # prints a particular tip, -w disables any warning, -a prints all tips, -c reports the configuration and -h prints the help message.\n\n\n8) Install **showTips** program and the HPC_Tips modulefile on your system\n\nAt TACC, we install the **showTips** program in **/opt/apps/HPC_Tips**/*version*/**bin/showTip**. Then in the **/opt/apps/HPC_Tips** directory\nwe make a symbolic link between the *version* and **HPC_Tips** sub-directory. This way we have a fixed location for the **showTips** binary. This makes\nthe next step easier.\n\nA copy of our module file can be found in modules/HPC_Tips.lua\n\n\n9) Add the files init/z99_HPC_Tips.sh and init/z99_HPC_Tips.csh to your /etc/profile.d directory for all login nodes\n\nYou will need to specify the location of the **showTips** binary in each of the /etc/profile.d/z99_HPC_Tips.\\*\nfiles to make it work on your system.\n\n10) Note that the showTips program will use the environment variable\nHPC\\_TIPS\\_HOSTS as a replacement for the configured host.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftacc%2Fhpc_tips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftacc%2Fhpc_tips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftacc%2Fhpc_tips/lists"}