### Shifter Configuration Example Source: https://github.com/nersc/shifter/blob/master/doc/install/centos6.rst Provides examples of configuration file paths and key parameters for Shifter's image manager and runtime. It highlights essential settings like MongoDB URI, cache directories, platform names, and image gateway URLs. ```bash # /etc/shifter/imagemanager.json { "MongoDBURI": "mongodb://localhost:27017", "CacheDirectory": "/var/cache/shifter/layers", "ExpandDirectory": "/var/tmp/shifter/expand", "Platforms": { "mycluster": { "imageDir": "/var/lib/shifter/images" } } } ``` ```bash # /etc/shifter/udiRoot.conf { "system": "mycluster", "imageGateway": "http://imagegw.example.com:5000", "etcPath": "/etc/shifter/etc_files" } ``` ```bash # Example of generating passwd file getent passwd > /etc/shifter/etc_files/passwd ``` -------------------------------- ### Configure and Start MongoDB Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Sets up the Shifter Image Manager configuration, creates necessary directories for MongoDB data, and starts the MongoDB service in the background. This is crucial for the Image Manager's operation. ```bash cp /etc/shifter/imagemanager.json.example /etc/shifter/imagemanager.json mkdir /images mkdir -p /data/db mongod --smallfiles & ``` -------------------------------- ### Start and Test Munge Service Source: https://github.com/nersc/shifter/wiki/build-Linux-(Deprecated) Starts the munge daemon and tests its functionality by generating a credential and passing it to a remote unmunge command. ```bash sudo /etc/init.d/munged start munge -n | ssh imagegwnode unmunge ``` -------------------------------- ### Start Image Manager Service Source: https://github.com/nersc/shifter/blob/master/doc/install/centos6.rst Starts the MongoDB service and the Shifter image gateway API. This section provides commands for starting mongod and the imagegwapi.py script, along with notes on ensuring cluster name consistency. ```bash yum install mongodb-server /etc/init.d/mongod start ``` ```bash /usr/libexec/shifter/imagegwapi.py > /var/log/imagegwapi.log & ``` -------------------------------- ### Configure Shifter Runtime Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Copies the example UDI root configuration, then modifies it to set the correct path for Shifter's etc files and configures the Image Gateway API endpoint to localhost:5000. This prepares the runtime environment for Shifter. ```bash cp /etc/shifter/udiRoot.conf.example etc/shifter/udiRoot.conf sed -i 's|etcPath=.*|etcPath=/etc/shifter/shifter_etc_files/|' /etc/shifter/udiRoot.conf sed -i 's|imagegwapi:5000|localhost:5000|' /etc/shifter/udiRoot.conf ``` -------------------------------- ### Start Shifter Image Gateway Services Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Commands to start the MongoDB service and the Shifter Image Gateway service. ```bash sudo systemctl start mongod sudo /etc/init.d/shifter-imagegw start ``` -------------------------------- ### Start Shifter Image Gateway Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Starts the Shifter Image Gateway using Gunicorn, a Python WSGI HTTP Server. It binds to all network interfaces on port 5000 with a backlog of 2048 connections. ```bash gunicorn -b 0.0.0.0:5000 --backlog 2048 shifter_imagegw.api:app & ``` -------------------------------- ### Shifter Site Post-Mount Hook Example Source: https://github.com/nersc/shifter/blob/master/doc/bestpractices.rst Illustrates a `sitePostMountHook` script for performing final setup within Shifter containers, such as creating symbolic links. This script runs after site-specific mounts are established and before user content is integrated. ```bash #!/bin/bash ln -s global/project project ``` -------------------------------- ### Install Shifter Runtime Source: https://github.com/nersc/shifter/blob/master/doc/install/centos6.rst Installs the Shifter runtime component on login and compute nodes. This requires installing dependencies like json-c and munge, followed by the shifter-runtime RPM. ```bash yum install epel-release yum install json-c munge rpm -i /path/to/rpmbuild/RPMS/x86_64/shifter-runtime-$VERSION.rpm ``` -------------------------------- ### Configure and Start Munge Service Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Generates a Munge key, sets appropriate ownership and permissions for the key file, and starts the Munge daemon. Munge is used for secure credential exchange between Shifter components. ```bash echo "abcdefghijklkmnopqrstuvwxyz0123456" > /etc/munge/munge.key chown munge.munge /etc/munge/munge.key chmod 600 /etc/munge/munge.key runuser -u munge munged ``` -------------------------------- ### Image Gateway Directory Setup and Installation Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Sets up required directories for the Image Gateway and copies the gateway files. It also includes steps for creating and activating a Python virtual environment with necessary dependencies. ```bash export IMAGEGW_PATH=/opt/shifter/imagegw export IMAGES_CACHE_PATH=/scratch/shifter/images/cache export IMAGES_EXPAND_PATH=/var/shifter/expand mkdir -p $IMAGEGW_PATH mkdir -p $IMAGES_CACHE_PATH mkdir -p $IMAGES_EXPAND_PATH cp -r imagegw/* $IMAGEGW_PATH ``` ```bash cd $IMAGEGW_PATH # Install the virtualenv and all python dependencies as root sudo -i # Set the interpreter for the virtualenv to be python2.7 virtualenv python-virtualenv --python=/usr/bin/python2.7 source python-virtualenv/bin/activate # The requirement file should already be here if the imagegw folder has been copied # from the Shifter sources pip install -r requirements.txt deactivate # If you switched to root, return to your user exit ``` -------------------------------- ### Build Shifter RPMs Source: https://github.com/nersc/shifter/blob/master/doc/install/centos6.rst Steps to build Shifter RPM packages from source. This includes installing build dependencies, preparing the source tarball, and using rpmbuild to create the RPMs. It also shows how to include Slurm support during the build process. ```bash yum install epel-release yum install rpm-build gcc glibc-devel munge libcurl-devel json-c \ json-c-devel pam-devel munge-devel libtool autoconf automake \ gcc-c++ python-pip xfsprogs squashfs-tools python-devel ``` ```bash git clone https://github.com/NERSC/shifter.git # checkout a particular branch or commit you require VERSION=$(grep Version: shifter/shifter.spec | awk '{print $2}') cp -rp shifter "shifter-$VERSION" tar cf "shifter-$VERSION.tar.gz" "shifter-$VERSION" ``` ```bash rpmbuild -tb "shifter-$VERSION.tar.gz" ``` ```bash rpmbuild -tb "shifter-$VERSION.tar.gz" --define "with_slurm /usr" ``` -------------------------------- ### Install Shifter ImageGW Dependencies Source: https://github.com/nersc/shifter/wiki/build-imagegw Installs necessary RPM packages for ImageGW, including MongoDB, Redis, and development libraries for munge and OpenSSL. Also starts MongoDB and Redis services. ```shell DEP_RPM_LIST="mongodb-server mongodb redis zlib zlib-devel munge munge-devel openssl openssl-devel" sudo yum install -y ${DEP_RPM_LIST} sudo /etc/init.d/mongod sudo /etc/init.d/redis start ``` -------------------------------- ### Install Shifter Runtime RPM Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Installs the Shifter runtime component using yum. This command ensures the necessary files for running Shifter applications are present on the system. ```bash yum -y install shifter{,-runtime}-1*rpm ``` -------------------------------- ### Shifter Site Pre-Mount Hook Example Source: https://github.com/nersc/shifter/blob/master/doc/bestpractices.rst Provides an example of a `sitePreMountHook` script used to set up directory structures required by Shifter before user content is added to the image. The script runs in the `udiMount` current working directory and should only manipulate paths within `udiMount`. ```bash #!/bin/bash mkdir global mkdir -p var/opt/cray ``` -------------------------------- ### Image Gateway Docker-Compose Installation Source: https://github.com/nersc/shifter/wiki/Installation-Quick-Start-(WIP) Basic steps for installing the Image Gateway using docker-compose. This involves navigating to the source directory, copying a configuration file, and editing it. ```Shell cd imagegw/src cp imagemanager.json /path/to/config/directory/ # Edit imagemanager.json ``` -------------------------------- ### Install Shifter Image Manager Source: https://github.com/nersc/shifter/blob/master/doc/install/centos6.rst Installs the Shifter image manager and its dependencies. This involves installing required packages like python, munge, and json-c, and then installing the shifter-imagegw RPM. The shifter-runtime RPM is optional but recommended. ```bash yum install epel-release yum install python python-pip munge json-c squashfs-tools rpm -i /path/to/rpmbuild/RPMS/x86_64/shifter-imagegw-$VERSION.rpm ``` ```bash rpm -i /path/to/rpmbuild/RPMS/x86_64/shifter-runtime-$VERSION.rpm ``` -------------------------------- ### Shifter Image Gateway Configuration Parameters Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Example configuration parameters for the Image Gateway's imagemanager.json file, detailing cache directory, expand directory, platform name, and image directory. ```json { "CacheDirectory": "/scratch/shifter/images/cache/", "ExpandDirectory": "/var/shifter/expand/", "Platforms": { "mycluster": { "imageDir": "/scratch/shifter/images" } } } ``` -------------------------------- ### Copy Installation Files Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Copies essential Shifter Image Gateway startup and initialization scripts from the installation resources to their designated system locations. ```bash cd virtual-cluster-master/shared-folder/installation sudo cp start-imagegw.sh ${IMAGEGW_PATH}/start-imagegw.sh sudo cp init.d.shifter-imagegw /etc/init.d/shifter-imagegw ``` -------------------------------- ### Build and Install udiRoot Source: https://github.com/nersc/shifter/wiki/build-Linux-(Deprecated) Configures, builds, and installs the udiRoot component of Shifter. It sets environment variables for application paths and debugging flags, configures the build with specific dependencies and cluster integration (SLURM), and installs the compiled binaries. Finally, it creates a symbolic link for the default version. ```bash export APPS=/opt/ cd udiRoot ./autogen.sh export CFLAGS='-O0 -g' # use this if you need to debug the code export CXXFLAGS='-O0 -g' # use this if you need to debug the code mkdir -p ${APPS}/system/opt/shifter/15.12.0/udiRoot && ./configure --prefix=${APPS}/system/opt/shifter/15.12.0/udiRoot --with-json-c --with-libcurl --with-munge --with-slurm make && sudo make install && ln -s ${APPS}/system/opt/shifter/15.12.0 ${APPS}/system/opt/shifter/default ``` -------------------------------- ### Start MongoDB and Image Gateway API Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7_ppc64le.rst Starts the MongoDB service and the Shifter Image Gateway API service. Includes instructions for systems without init scripts. ```bash yum install mongodb-server /etc/init.d/mongod start # Without init scripts: /usr/libexec/shifter/imagegwapi.py > /var/log/imagegwapi.log & ``` -------------------------------- ### Build Shifter RPMs Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Builds the Shifter RPM packages from the generated source tarball. This command creates the necessary installation files for Shifter. ```bash rpmbuild -tb "shifter-$VERSION.tar.gz" ``` -------------------------------- ### Image Gateway Dependencies Installation Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Installs necessary software dependencies for the Image Gateway on RHEL/CentOS/Scientific Linux and Debian/Ubuntu systems. Includes MongoDB, squashfs-tools, and virtualenv setup. ```bash # For RHEL/CentOS/Scientific Linux systems: yum install mongodb-server squashfs-tools # For Debian/Ubuntu systems: sudo apt-get install mongodb squashfs-tools ``` ```bash # Install virtualenv through pip for Python: wget https://bootstrap.pypa.io/get-pip.py sudo python get-pip.py sudo pip install virtualenv ``` -------------------------------- ### Configure, Build, and Install Shifter Runtime Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Configures the Shifter build with specified directories and features, then compiles and installs the runtime. It requires specifying paths for Slurm installation. ```bash ./autogen.sh ./configure --prefix=$UDIROOT_PREFIX \ --sysconfdir=$SHIFTER_SYSCONFDIR \ --with-json-c \ --with-libcurl \ --with-munge \ --with-slurm=/path/to/your/slurm/installation make -j8 sudo make install ``` -------------------------------- ### Install Build Dependencies Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Installs essential packages required for building Shifter RPMs on RHEL/CentOS/Scientific Linux 7 systems. This includes development tools, libraries for networking and data handling, and Python packaging tools. ```bash yum install epel-release yum install rpm-build gcc glibc-devel munge libcurl-devel json-c \ json-c-devel pam-devel munge-devel libtool autoconf automake \ gcc-c++ python-pip xfsprogs squashfs-tools python-devel ``` -------------------------------- ### Install Required Python Packages Source: https://github.com/nersc/shifter/wiki/build-imagegw Activates the created Python virtual environment and installs all necessary Python packages listed in the requirements.txt file for ImageGW. ```shell cd ${ROOT_TREE} source ${PYTHON_VENV}/bin/activate pip install -r ${SRC_TREE}/imagegw/src/requirements.txt ``` -------------------------------- ### Build Shifter RPMs with Slurm Support Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Builds Shifter RPMs with support for Slurm, a workload manager. The `--define "with_slurm /usr"` flag specifies the base path where Slurm is installed. Adjust '/usr' if Slurm is installed elsewhere. ```bash rpmbuild -tb "shifter-$VERSION.tar.gz" --define "with_slurm /usr" ``` -------------------------------- ### Generate Shifter Source Tarball Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Clones the Shifter repository, checks out a specific version (recommended: 16.08.3_2 tag), creates a versioned source directory, and generates a compressed tarball for building RPMs. ```bash git clone https://github.com/NERSC/shifter.git [[ perform any needed git operations to get a particular branch or commit you require. We currently recommend the 16.08.3_2 tag. ]] VERSION=$(grep Version: shifter/shifter.spec | awk '{print $2}') cp -rp shifter "shifter-$VERSION" tar cf "shifter-$VERSION.tar.gz" "shifter-$VERSION" ``` -------------------------------- ### Install virtualenv Source: https://github.com/nersc/shifter/wiki/build-imagegw Downloads and installs virtualenv, then creates a Python virtual environment for ImageGW using the previously built Python 2.7.9. ```shell cd ${ROOT_TREE} wget 'https://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.1.2.tar.gz#md5=b989598f068d64b32dead530eb25589a' tar xzvf virtualenv-13.1.2.tar.gz virtualenv-13.1.2/virtualenv.py imagegw_venv --python=$MYPYTHONPATH/bin/python2.7 ``` -------------------------------- ### Launch Shifter-imagegw with a Queue Source: https://github.com/nersc/shifter/blob/master/contrib/README.md Demonstrates how to launch the `shifter-imagegw` service, specifically configured to operate with a single queue. This example illustrates a basic operational setup. ```sh #!/bin/bash # Example script to launch shifter-imagegw with one queue # Ensure the shifter-imagegw executable is in your PATH or provide the full path # Example: # SHIFTER_IMAGEGW_PATH="/usr/local/bin/shifter-imagegw" # Specify the configuration file # CONFIG_FILE="/etc/shifter/shifter-imagegw.conf" # Launch shifter-imagegw with a specific queue (e.g., 'default') # ${SHIFTER_IMAGEGW_PATH} --config ${CONFIG_FILE} --queue default # Or if shifter-imagegw is in PATH: # shifter-imagegw --config ${CONFIG_FILE} --queue default echo "shifter-imagegw launched with queue 'default'." ``` -------------------------------- ### Download and Extract Shifter udiRoot Source: https://github.com/nersc/shifter/wiki/build-Linux-(Deprecated) Downloads the specified version of Shifter udiRoot from Bitbucket and extracts the tarball. It then changes the directory into the extracted source code. ```bash wget 'https://bitbucket.org/berkeleylab/shifter/get/15.12.0.tar.bz2' tar xjf 15.12.0.tar.tar.bz2 cd berkeleylab-shifter-a5f1dbaeb86b ``` -------------------------------- ### Install Dependencies for Debian/Ubuntu Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Installs necessary packages for Shifter on Debian/Ubuntu systems, covering development tools and libraries for JSON, MUNGE, cURL, and capabilities. ```bash sudo apt-get install unzip libjson-c2 libjson-c-dev libmunge2 libmunge-dev \ libcurl4-openssl-dev autoconf automake libtool curl \ make xfsprogs python-dev libcap-dev wget ``` -------------------------------- ### Build Python 2.7.9 Source: https://github.com/nersc/shifter/wiki/build-imagegw Compiles and installs Python 2.7.9 from source into a specified directory. Includes steps to clean up the source directory after installation. ```shell cd ${ROOT_TREE} MYPYTHONPATH=${ROOT_TREE}/python_2.7.9 wget 'https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz' tar xzf Python-2.7.9.tgz cd Python-2.7.9/ ./configure --prefix=${MYPYTHONPATH} make -j4 && make install cd .. find ./Python-2.7.9 -exec rm -rf {} \; ``` -------------------------------- ### Start Image Gateway with Gunicorn Source: https://github.com/nersc/shifter/blob/master/imagegw/README.md This snippet shows how to start the Shifter Image Gateway API using Gunicorn. It specifies the binding address, backlog, log file locations, and the application module. ```bash gunicorn -b 0.0.0.0:5000 --backlog 2048 \ --access-logfile=/var/log/shifter_imagegw/access.log \ --log-file=/var/log/shifter_imagegw/error.log \ shifter_imagegw.api:app ``` -------------------------------- ### Munge Key Setup and Test Source: https://github.com/nersc/shifter/wiki/build-imagegw Ensures the system uses the same munge key as the cluster running Shifter and tests the munge service. ```shell sudo /etc/init.ini/munged start munge -n | ssh imagegwnode unmunge ``` -------------------------------- ### Image Gateway Cache and Expansion Paths Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Specifies the recommended paths for Image Gateway operations, including the installation path, cache path, and expansion path. It highlights the performance benefit of using a local file system for image expansion. ```APIDOC Image Gateway Path Recommendations: - IMAGEGW_PATH: /opt/shifter/imagegw (Installation directory) - IMAGES_CACHE_PATH: /scratch/shifter/images/cache (Image cache location) - IMAGES_EXPAND_PATH: /var/shifter/expand (Image expansion location) - Note: For performance reasons, this should be located in a local file system to avoid slowdowns experienced with parallel file systems. ``` -------------------------------- ### Copy Local Configuration Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Copies the locally customized imagemanager.json.local file to the Shifter system configuration directory. ```bash sudo cp imagemanager.json.local $SHIFTER_SYSCONFDIR/imagemanager.json ``` -------------------------------- ### Create Directories for Shifter Startup Source: https://github.com/nersc/shifter/blob/master/doc/bestpractices.rst Ensures that necessary directories for Shifter startup are pre-created to avoid race conditions, especially when running parallel applications without WLM support. This is typically done during node bootup. ```bash mkdir /var/udiMount mkdir /var/loopMount ``` -------------------------------- ### Download and Extract Shifter ImageGW Source: https://github.com/nersc/shifter/wiki/build-imagegw Downloads the Shifter ImageGW release and extracts the source code. Sets up environment variables for application and source trees. ```shell export APPS=/opt export ROOT_TREE=${APPS}/system/opt/shifter/15.12.0/imageGW export SRC_TREE="${ROOT_TREE}/berkeleylab-shifter-a5f1dbaeb86b" #a5f1dbaeb86b is the hash of the release 15.12.0 export PYTHON_VENV="${ROOT_TREE}/imagegw_venv" cd ${ROOT_TREE} wget 'https://bitbucket.org/berkeleylab/shifter/get/15.12.0.tar.bz2' tar xjf 15.12.0.tar.bz2 ``` -------------------------------- ### Install Shifter Image Gateway RPM Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7.rst Installs the Shifter Image Gateway component using yum. This command ensures the necessary files for the Image Gateway, which serves container images, are installed. ```bash yum -y install shifter{,-imagegw}-1*rpm ``` -------------------------------- ### Create System Links and Directories for Shifter Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Creates symbolic links for Shifter executables and necessary directories to integrate it into the system's PATH and runtime environment. ```bash sudo ln -s $UDIROOT_PREFIX/bin/shifter /usr/bin/shifter sudo ln -s $UDIROOT_PREFIX/bin/shifterimg /usr/bin/shifterimg sudo mkdir -p /usr/libexec/shifter sudo ln -s /opt/shifter/udiRoot/libexec/shifter/mount /usr/libexec/shifter/mount sudo mkdir -p $SHIFTER_SYSCONFDIR ``` -------------------------------- ### udiRoot and shifterimg Build Requirements Source: https://github.com/nersc/shifter/wiki/Installation-Quick-Start-(WIP) udiRoot and shifterimg need to be compiled for the target platform. Build prerequisites include standard development tools, the json-c library, and munge. Shifter also builds a new version of the mount command, which can be substituted if a modern version is available. ```APIDOC udiRoot and shifterimg Build Requirements: - Target platform compilation - Development tools: autoconf, make, gcc - Libraries: json-c - munge - Optional: Modern 'mount' command from distribution ``` -------------------------------- ### Configure Parallel Filesystem Mounting in Shifter Source: https://github.com/nersc/shifter/blob/master/doc/bestpractices.rst Demonstrates how to make parallel/network filesystems available within user containers by setting the `siteFs` variable in `udiRoot.conf`. It highlights potential obscuring of user content if paths conflict and recommends aligning mount points with user expectations. ```bash siteFs=/home:/home ``` -------------------------------- ### Shifter Startup Kernel Modules Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Commands to manually load required kernel modules (ext4, loop, squashfs) for Shifter runtime. These are essential for Shifter to function correctly. ```bash sudo modprobe ext4 sudo modprobe loop sudo modprobe squashfs ``` -------------------------------- ### Shifter CCM Command Example Source: https://github.com/nersc/shifter/blob/master/doc/wlm/slurm.rst This snippet illustrates the underlying command executed when the CCM mode is active, which involves creating a shifter container from the local environment and starting an sshd within it. ```bash shifter --image=local:/ # but with setupRoot so the sshd can be setup ``` -------------------------------- ### Generate Group File Source: https://github.com/nersc/shifter/wiki/build-Linux-(Deprecated) Generates a group file by fetching current group information from the system using 'getent group'. This is a preliminary step for Shifter configuration. ```bash getent group > ./group ``` -------------------------------- ### Shifter Configuration Parameters Source: https://github.com/nersc/shifter/blob/master/doc/install/manualinstallgpu.rst Defines key configuration parameters for Shifter, including paths for configuration files, local chroot settings, automatic kernel module loading, system cluster name, Image Gateway URL, and site-specific resources. ```APIDOC etcPath=/etc/shifter/shifter_etc_files - Absolute path to the files to be copied into /etc on the containers at startup. allowLocalChroot=1 - Enables or disables local chroot. autoLoadKernelModule=0 - Flag to determine if kernel modules (loop, squashfs, ext4) will be loaded by Shifter if required. Recommend value 0 if modules are already loaded, otherwise use value 1. system=greina - The name of the computer cluster where shifter is deployed. Must match the platform name in the Image Manager's JSON configuration. imageGateway=http://greina9:5000 - Space separated URLs for where the Image Gateway can be reached. siteResources=/opt/shifter/site-resources - Absolute path to where site-specific resources will be bind-mounted inside the container. The path is automatically created inside the container and does not need to exist on the host. ``` -------------------------------- ### Start Test Environment with Docker Compose Source: https://github.com/nersc/shifter/blob/master/imagegw/README.md This command initiates a test environment for the Shifter Image Gateway using Docker and Docker Compose. It relies on a Makefile target to set up necessary configurations like munge and ssh keys. ```bash make -f Makefile.test starttest ``` -------------------------------- ### Install Build Dependencies Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7_ppc64le.rst Installs essential packages required for building Shifter RPMs on RHEL/CentOS/Scientific Linux 7. ```bash yum install epel-release yum install rpm-build gcc glibc-devel munge libcurl-devel json-c \ json-c-devel pam-devel munge-devel libtool autoconf automake \ gcc-c++ python-pip xfsprogs squashfs-tools python-devel ``` -------------------------------- ### Pre-load Shifter Kernel Modules Source: https://github.com/nersc/shifter/blob/master/doc/bestpractices.rst Recommends pre-loading all kernel modules required by Shifter during system boot to avoid potential issues with auto-loading. The specific modules depend on the site's kernel configuration. ```bash modprobe loop max_loop=128 modprobe squashfs modprobe xfs ## (optional, for perNodeCache) ``` -------------------------------- ### Install Shifter Runtime Dependencies and RPMs Source: https://github.com/nersc/shifter/blob/master/doc/install/centos7_ppc64le.rst Installs the required dependencies and the Shifter Runtime RPM on login and compute nodes. ```bash yum install epel-release yum install json-c munge rpm -i /path/to/rpmbuild/RPMS/x86_64/shifter-runtime-$VERSION.rpm ```