### Run XDMoD Setup Wizard Source: https://context7.com/ubccr/xdmod/llms.txt Use `xdmod-setup` to interactively configure your Open XDMoD installation, including database settings, site information, and admin user creation. ```bash # Run the setup wizard xdmod-setup # Configuration includes: # - Site address (URL for accessing Open XDMoD) # - Email address for notifications # - Database hostname, port, username, password # - Organization name and abbreviation # - Resource definitions (clusters) # - Admin user creation # - Hierarchy configuration ``` -------------------------------- ### Run XDMoD Setup Source: https://github.com/ubccr/xdmod/blob/main/docs/install-rpm.md Execute the setup command after installing the RPM package. Ensure MySQL is running beforehand. ```bash # xdmod-setup ``` -------------------------------- ### Run Open XDMoD Setup Script Source: https://github.com/ubccr/xdmod/blob/main/docs/install-source.md Execute the primary setup script for Open XDMoD. This script will guide you through configuring various aspects of the installation. ```bash # /opt/xdmod-{{ page.sw_version }}/bin/xdmod-setup ``` -------------------------------- ### Example authsources.php Configuration Source: https://github.com/ubccr/xdmod/blob/main/docs/simpleSAMLphp.md Complete example of an authsources.php file with attribute mapping and authorization checks. ```php array( 'saml:SP', // 'idp' => 'urn:example:idp', 'signature.algorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', 'authproc' => array( 40 => array( 'class' => 'core:AttributeMap', 'email' => 'email_address', 'firstName' => 'first_name', 'middleName' => 'middle_name', 'lastName' => 'last_name', 'personId' => 'person_id', 'orgId' => 'organization', 'fieldOfScience' => 'field_of_science', 'itname' => 'username' ), // Ensures that the 'username' property has one or more non-whitespace characters 60 => array( 'class' => 'authorize:Authorize', 'username' => array( '/\S+/' ), ), // Ensures that the 'organization' property has one or more non-whitespace characters 61 => array( 'class' => 'authorize:Authorize', 'organization' => array( '/\S+/' ) ) ) ), ); ``` -------------------------------- ### Install EPEL and Required Packages Source: https://github.com/ubccr/xdmod/blob/main/docs/software-requirements.md Install the EPEL repository and necessary system packages for Open XDMoD. ```sh dnf install -y epel-release dnf install -y php make libzip-devel php-pear php-devel \ mariadb-server mariadb ``` -------------------------------- ### Install Oracle Libraries and OCI8 Source: https://github.com/ubccr/xdmod/blob/main/docs/etl/data-endpoint-oracle.md Commands to install Oracle Instant Client and the PHP OCI8 PECL extension on Linux. ```bash sudo -s cd /opt unzip instantclient-basic-linux.x64-12.1.0.2.0.zip unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip ln -s instantclient_12_1 oracle chmod -R g+rX,o+rX instantclient_12_1 cd instantclient_12_1 ln -s libclntsh.so.12.1 libclntsh.so ln -s libocci.so.12.1 libocci.so pecl install oci8 ``` -------------------------------- ### Command-line execution examples Source: https://github.com/ubccr/xdmod/blob/main/docs/docs-conventions.md Examples of command-line usage for unprivileged and root users, including path adjustments and placeholder values. ```bash $ xdmod-ingestor -v ``` ```bash # ./install --prefix=/opt/xdmod-{{ page.sw_version }} ``` ```bash # xdmod-setup ``` ```bash # /opt/xdmod-{{ page.sw_version }}/bin/xdmod-setup ``` ```bash $ xdmod-shredder -f *format* -r *resource* -i *input* ``` ```bash $ xdmod-shredder -f sge ... ``` -------------------------------- ### MySQL statement examples Source: https://github.com/ubccr/xdmod/blob/main/docs/docs-conventions.md Examples of MySQL queries and database selection statements. ```sql mysql> SELECT * FROM Users; ``` ```sql mysql> use moddb; mysql> SELECT * FROM Users; ``` ```sql mysql> SELECT * FROM moddb.Users; ``` -------------------------------- ### Install RPM Package Manually Source: https://github.com/ubccr/xdmod/blob/main/docs/install-rpm.md Download the RPM file from GitHub and install it manually if direct HTTPS installation is not possible. ```bash # dnf install xdmod-{{ page.rpm_version }}.el8.noarch.rpm ``` -------------------------------- ### Install RPM Package Directly Source: https://github.com/ubccr/xdmod/blob/main/docs/install-rpm.md Use this command to install the RPM package if your web server can reach GitHub via HTTPS. ```bash # dnf install https://github.com/ubccr/xdmod/releases/download/v{{ page.rpm_version }}/xdmod-{{ page.rpm_version }}.el8.noarch.rpm ``` -------------------------------- ### Install Node.js Dependencies Source: https://github.com/ubccr/xdmod/blob/main/etl/js/README.txt Run this command in the xdmod/etl/js directory to install necessary Node.js package dependencies. ```bash npm install ``` -------------------------------- ### Create SimpleSAMLphp Directories Source: https://github.com/ubccr/xdmod/blob/main/docs/simpleSAMLphp.md Create the configuration and metadata directories for SimpleSAMLphp. Ensure these directories exist before proceeding with the SSO setup. ```bash # mkdir -p /etc/xdmod/simplesamlphp/config # mkdir -p /etc/xdmod/simplesamlphp/metadata ``` -------------------------------- ### PBS Resource_List.ngpus Example Source: https://github.com/ubccr/xdmod/blob/main/docs/gpu-metrics.md Example of the Resource_List.ngpus field in PBS accounting logs, directly specifying the total number of GPUs. ```text Resource_List.ngpus=4 ``` -------------------------------- ### Add IDP Metadata to XDMoD SP Source: https://github.com/ubccr/xdmod/blob/main/docs/simpleSAMLphp-ldap.md Copy the IDP's metadata from the SimpleSAMLphp installation page into the XDMoD SP's remote metadata configuration file. Ensure the file starts with ` 'saml20-idp-remote', 'entityid' => 'xdmod-hosted-idp-ldap', 'SingleSignOnService' => array ( 0 => array ( 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', 'Location' => 'https://{% raw %}{{HOSTNAME}}{% endraw %}/simplesaml/saml2/idp/SSOService.php', ), ), 'SingleLogoutService' => array ( 0 => array ( 'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', 'Location' => 'https://{% raw %}{{HOSTNAME}}{% endraw %}/simplesaml/saml2/idp/SingleLogoutService.php', ), ), 'certData' => '...', 'NameIDFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', ); ``` -------------------------------- ### PBS Resource_List.nodes Example Source: https://github.com/ubccr/xdmod/blob/main/docs/gpu-metrics.md Example of the Resource_List.nodes field in PBS accounting logs, specifying nodes and GPUs per node. ```text Resource_List.nodes=2:ppn=32:gpus=2 ``` -------------------------------- ### Install Composer Dependencies Source: https://github.com/ubccr/xdmod/blob/main/README.md Run this command in the root of the Open XDMoD repository to install required dependencies. ```bash composer install ``` -------------------------------- ### Install Node.js 16 on Rocky 8 Source: https://github.com/ubccr/xdmod/blob/main/docs/software-requirements.md Reset and install the Node.js 16 module stream. ```shell dnf module -y reset nodejs dnf module -y install nodejs:16 ``` -------------------------------- ### Install Open XDMoD Source Package Source: https://github.com/ubccr/xdmod/blob/main/docs/install-source.md Extract the source package and install Open XDMoD to a specified prefix. Ensure you download the correct tarball from GitHub releases. ```bash # tar zxvf xdmod-{{ page.sw_version }}.tar.gz # cd xdmod-{{ page.sw_version }} # ./install --prefix=/opt/xdmod-{{ page.sw_version }} ``` -------------------------------- ### Non-Standard PBS Resource_List.gpu Example Source: https://github.com/ubccr/xdmod/blob/main/docs/gpu-metrics.md Example of a non-standard PBS Resource_List.gpu field, used to determine GPU count when other methods are unavailable. ```text Resource_List.gpu=2 ``` -------------------------------- ### Slurm AllocTRES Example Source: https://github.com/ubccr/xdmod/blob/main/docs/gpu-metrics.md Example of the AllocTRES accounting field from sacct output, indicating allocated resources including GPUs. ```text billing=10,cpu=10,gres/gpu=4,mem=374000M,node=2 ``` -------------------------------- ### Copy Apache Configuration File Source: https://github.com/ubccr/xdmod/blob/main/docs/install-source.md Copy the example Apache configuration file to the appropriate directory for your web server. This file may require further editing for site-specific settings. ```bash # cp /opt/xdmod-{{ page.sw_version }}/share/templates/apache.conf /etc/apache2/conf.d/xdmod.conf ``` -------------------------------- ### Non-Standard PBS Resource_List.nodect Example Source: https://github.com/ubccr/xdmod/blob/main/docs/gpu-metrics.md Example of a non-standard PBS Resource_List.nodect field, indicating GPUs per node when standard methods fail. ```text Resource_List.nodect=2:ppn=32:gpu=2 ``` -------------------------------- ### Install PHP MongoDB Driver via PECL Source: https://github.com/ubccr/xdmod/blob/main/docs/software-requirements.md Install the MongoDB driver using PECL and configure the PHP extension. ```shell pecl install mongodb-1.18.1 echo "extension=mongodb.so" > /etc/php.d/40-mongodb.ini ``` -------------------------------- ### JSON Reference Examples Source: https://github.com/ubccr/xdmod/blob/main/docs/etl/json-references.md Illustrates different ways to use JSON references to include external or internal data. These examples show how to reference entire documents, specific parts of documents, or parts of documents in external files. ```json { "$ref": "table.json" } ``` ```json { "$ref": "table.json#/foo/0" } ``` ```json { "$ref": "#/foo" } ``` ```json { "$ref": "http://example.com/example.json#/foo" } ``` ```json { "$ref": "example.json#/foo/bar" } ``` ```json { "$ref": "file:///path/to/example.json#/foo/bar" } ``` -------------------------------- ### Install Open XDMoD RPM Package Source: https://github.com/ubccr/xdmod/blob/main/docs/upgrade.md Commands to install the Open XDMoD RPM package either directly from GitHub or from a local file. ```bash # dnf install https://github.com/ubccr/xdmod/releases/download/v{{ page.rpm_version }}/xdmod-{{ page.rpm_version }}.el8.noarch.rpm [optional module RPMs] ``` ```bash # dnf install xdmod-{{ page.rpm_version }}.el8.noarch.rpm [optional module RPMs] ``` -------------------------------- ### Copy Current Config Files Source: https://github.com/ubccr/xdmod/blob/main/docs/upgrade.md Commands to migrate existing configuration files from the previous version directory to the new installation directory. ```bash # cp /opt/xdmod-{{ page.prev_sw_version }}/etc/portal_settings.ini /opt/xdmod-{{ page.sw_version }}/etc # cp /opt/xdmod-{{ page.prev_sw_version }}/etc/hierarchy.json /opt/xdmod-{{ page.sw_version }}/etc # cp /opt/xdmod-{{ page.prev_sw_version }}/etc/organization.json /opt/xdmod-{{ page.sw_version }}/etc # cp /opt/xdmod-{{ page.prev_sw_version }}/etc/resource_specs.json /opt/xdmod-{{ page.sw_version }}/etc # cp /opt/xdmod-{{ page.prev_sw_version }}/etc/resources.json /opt/xdmod-{{ page.sw_version }}/etc # cp /opt/xdmod-{{ page.prev_sw_version }}/etc/update_check.json /opt/xdmod-{{ page.sw_version }}/etc ``` -------------------------------- ### Configure Local Naming Method Source: https://github.com/ubccr/xdmod/blob/main/docs/etl/data-endpoint-oracle.md Configuration for tnsnames.ora and environment variable setup for local naming. ```text datawarehouse = (description = (address = (protocol = tcp)(host = db.mycompany.com)(port = 1521)) (connect_data = (service_name = mydb))) ``` ```bash export TNS_ADMIN=~/oracle/tns ``` -------------------------------- ### Example Dashboard Component JavaScript Class Source: https://github.com/ubccr/xdmod/blob/main/docs/dashboard-devel.md This JavaScript class extends Ext.ux.Portlet and serves as a template for new dashboard components. It includes example event handling for 'duration_change' and 'refresh'. Ensure the class is placed in the conventional directory and registered with Ext.reg. ```javascript /** * XDMoD.Module.Dashboard.DeveloperComponent * * This is an example panel that can be used as a template. */ Ext.namespace('XDMoD.Module.Dashboard'); XDMoD.Module.Dashboard.DeveloperComponent = Ext.extend(Ext.ux.Portlet, { layout: 'fit', autoScroll: true, title: 'XDMoD software developer info', bbar: { items: [{ text: 'Reset Layout', handler: function () { Ext.Ajax.request({ url: XDMoD.REST.url + '/summary/layout', method: 'DELETE' }); } }] }, /** * */ initComponent: function () { var aspectRatio = 0.8; this.height = this.width * aspectRatio; this.items = [{ itemId: 'console', html: '
' + JSON.stringify(this.config, null, 4) + '' }]; XDMoD.Module.Dashboard.DeveloperComponent.superclass.initComponent.apply(this, arguments); }, listeners: { /** * duration_change event gets fired when the duration settings * in the top toolbar are changed by the user or when the refresh * button is clicked. * * A typical component will reload its content with the updated * duration parameters. */ duration_change: function (timeframe) { var console = this.getComponent('console'); console.body.insertHtml('beforeBegin', '
' + JSON.stringify(timeframe, null, 4) + ''); }, /** * the component should refresh itself if the refresh event fires */ refresh: function () { var console = this.getComponent('console'); console.body.insertHtml('beforeBegin', '
refresh event fired'); } } }); /** * The Ext.reg call is used to register an xtype for this class so it * can be dynamically instantiated */ Ext.reg('xdmod-dash-developer-cmp', XDMoD.Modules.Dashboard.DeveloperComponent); ``` -------------------------------- ### Define PHPUnit Test Suite Source: https://github.com/ubccr/xdmod/blob/main/tests/component/README.md Example configuration for a test suite within the phpunit.xml.dist file. ```xml