Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
2f14d1e9
Commit
2f14d1e9
authored
1 year ago
by
Simon Michnowicz
Browse files
Options
Downloads
Patches
Plain Diff
first checkin
parent
fe6e947e
No related branches found
No related tags found
1 merge request
!595
Slurm upgrade and new rocky sql server
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/mysql/README.md
+63
-0
63 additions, 0 deletions
roles/mysql/README.md
with
63 additions
and
0 deletions
roles/mysql/README.md
0 → 100644
+
63
−
0
View file @
2f14d1e9
# MYSQL FOR SLURM
The Mysql for slurm is problematic, as configuring the database is no longer simple.
Ansible commands such as mysql_user do not work in a brand new system, as it appears
mysql/maria db must run in a root shell and Ansible breaks at this point.
The preferred approach.
1) Run this role. It may/may not break when trying to modify the database as the root password is not set.
2) Login to sql machine. sudo as root
3) Run /usr/bin/mysql_secure_installation Set the root password to what is found in our Ansible scripts, i.e.
ansible-vault edit vars/passwords.yml
Key to change is "sqlrootPasswd"
4). The datbase by default is in /var/lib which is on a small Unix disk partition. You need to change it.
Several options exist.
a) Set up a soft pointer, i.e. /var/lib/mysql -> /vdb/mysql OR
b) Modify /etc/my.cnf.d/mariadb-server.cnf and point to a new location
i.e.
'''
[mysqld]
datadir=/mnt/vdb1/var_lib_mysql
socket=/mnt/vdb1/var_lib_mysql/mysql.sock
log-error=/var/log/mariadb/mariadb.log
pid-file=/run/mariadb/mariadb.pid
'''
5) The procures will be something like this:
a) systemctl stop mariadb
b) mkdir /mnt/vdb1/var_lib_mysql
c) chown mysql:mysql /mnt/vdb1/var_lib_mysql
d) cp -rp /var/lib/mysql/
*
/mnt/vdb1/var_lib_mysql
e) systemctl start mariadb
f) Use
`systemctl status mariadb`
and view
`/var/log/mariadb/mariadb.log`
to trace errors
6) None of the above is in the ansible scripts. The
`sql`
role is tagged as
**never**
due to these complications
7) The access mechanisms to this role have been modified, so users can hardcode the SLURM controllers directly.
Sample usage
'''
-
role: mysql
vars:
mysql_type: "mysql_server"
mysql_root_password: "{{ sqlrootPasswd }}"
mysql_user_name: "slurmdb"
mysql_user_db_name: "slurm_acct_db"
current_slurm_mgmt_nodes_fqdn: " {{ current_slurm_mgmt_nodes_fqdn }} "
current_slurm_mgmt_nodes_short: " {{ current_slurm_mgmt_nodes_short }} "
mysql_user_password: "{{ slurmdb_passwd }}"
tags: [ database, mysql, never ]
'''
where
'''
-
set_fact:
current_slurm_mgmt_nodes_fqdn:
-
'm3-mgmt3.massive.org.au'
-
'm3-mgmt4.massive.org.au'
current_slurm_mgmt_nodes_short:
-
'm3-mgmt3'
-
'm3-mgmt4'
'''
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment