Skip to content

Install

terrelsa13 edited this page Oct 20, 2024 · 39 revisions

Linux

  • It is assumed your user has ability to execute commands using sudo.
    • If not, your system administrator will need to perform the install.

Check Python Version:

  1. Python3.10 is the minimum required version
    1. A more recently released version will also work until their are breaking changes in the Python package
  2. Open a terminal window using the following keyboard shortcut: ctrl+alt+t
  3. Find the installed python3 version by typing the following command in the terminal window:
    python3.10 -V
    • You may need to try the above command with python3.10 -V, python3.11 -V, etc... depending on the version of Python already installed
  4. The output should look something like this: python3.10.0
  5. If your Python3 version is >= Python 3.10.0 jump to the Check Python3-pip Version section

Install Alternate Python Version:

  1. There are numerous pages online, like this one, showing how to install python3.10 or later as an altinstall
    • Unless you know what you are doing, do NOT overwrite the default Python version installed on your OS; install additional Python versions as alternate installs

Check Python3-pip Version:

  1. In a terminal window type the following command:
    pip3 -V
  2. The output should look something like this: pip #.#.# etc... (Python3.10); make sure the python version at the end is >= Python3.10
  3. If pip3 is installed jump to the Install Git section

Install Python3-pip

  1. There are numerous pages online, like this one and this one, showing how to install pip

Install git

  • You can also select your OS and follow git's installation instructions.
  • Or perform the step below
    1. In a terminal window type the following command:
      sudo apt update && sudo apt install git -y

Clone MUMC Repo

  • The example will install MUMC to the /opt/MUMC directory.
    • MUMC may be installed to a different directory if desired.
  1. In a terminal window type the following command:
    cd /opt && sudo git clone https://github.com/terrelsa13/MUMC.git
  2. The MUMC directory should now exist as /opt/MUMC and its contents will currently belong to the root user
  3. Change the MUMC directory's user:group to the current user's by typing the following command in the terminal:
    sudo chown -R $USER:$(id -gn $USER) /opt/MUMC

Installing MUMC Dependencies

  1. MUMC requires the following Python3 packages:
    • emoji - Used to remove emojis from text printed to the mumc_debug.log issue#86
    • PyYAML - Needed for parsing the mumc_config.yaml file
    • python_dateutil - Needed for played and created date comparisons
    • six - Used by python_dateutil
  2. These can be installed by using the requirements.txt in the /opt/MUMC directory
  3. In a terminal window type the following command:
    cd /opt/MUMC && pip3 install -r requirements.txt

Alternate: Installed MUMC Dependencies Globallly

  1. In a terminal window type the following commands:
    cd /opt/MUMC
    apt install python3-dateutil python3-six python3-emoji python3-PyYAML

First Run and mumc_config.yaml creation

Windows

Install Latest Python Version:

  1. Python3.10 is the minimum version
    1. A more recently released version will also work until their are breaking changes in the Python package
  2. Download the lastest version from the Python website.
  3. Run the installer.
    • Unselect 'Add python.exe to PATH'.
  4. Take note of where this version of Python will be installed.
    • On Windows10 the install path is: C:\Users\[your_user_name]\AppData\Local\Programs\Python\Python3.x
  5. Select 'Install Now'
  6. Step through any remaining steps until the install is complete.

Install git

  1. Select your OS and follow the instructions for installing git on Windows.

Clone MUMC Repo

  1. Navigate to C:\Users
  2. Hold shift and right click the folder with your username.
  3. In the menu select 'Open PowerShell window here'
  4. In the PowerShell window type the following command:
    git clone https://github.com/terrelsa13/MUMC.git
  5. Once the clone is completed, navigate to C:\Users\[your_user_name]\MUMC
    • ([your_user_name] is the username you are logged in as.)

Installing MUMC Dependencies

  1. MUMC requires the following Python3 packages:
    • emoji - Used to remove emojis from text printed to the mumc_debug.log issue#86
    • PyYAML - Needed for parsing the mumc_config.yaml file
    • python_dateutil - Needed for played and created date comparisons
    • six - Used by python_dateutil
  2. These can be installed by using the requirements.txt in the C:\Users\[your_user_name]\MUMC directory
  3. In a PowerShell window type the following command:
    cd C:\Users\[your_user_name]\MUMC; pip3 install -r requirements.txt

First Run and mumc_config.yaml creation

Docker

Docker Engine + Portainer is the recommended way to run MUMC

  1. Install either Docker Engine or Docker Desktop on your host machine.

    1. Install Docker Engine on your host machine.
    2. Docker Desktop on your host machine.
  2. Install Portainer on your host machine.

  3. On the host machine create a blank config file using the following command:

    sudo mkdir -p /opt/MUMC/config
  4. Give the current user permissions to the config directory using the following command:

    sudo chown -R $(id -un):$(id -gn) /opt/MUMC
  5. Create an empty config file using the following commands:

    touch /opt/MUMC/config/mumc_config.yaml
    
    touch /opt/MUMC/config/mumc_DEBUG.log
    
    touch /opt/MUMC/config/mumc_CRON_OUTPUT.log
    
  6. Add current user to docker group using the following command:

    sudo usermod -aG docker $USER
  7. Restart Docker to so the current user is able to execute Docker commands:

    sudo systemctl restart docker

    OR... restart the host machine.

    Image tags:

    • ghcr.io/terrelsa13/mumc:latest - The latest stable release.

    • ghcr.io/terrelsa13/mumc:MUMC-Latest - The latest stable release.

    • ghcr.io/terrelsa13/mumc:v#.#.# - A specific stable release.

    • ghcr.io/terrelsa13/mumc:MUMC_beta - The latest beta release.

    • ghcr.io/terrelsa13/mumc:v#.#.#-beta - A specific beta release.

      Docker install instructions do not apply for v5.7.3 and earlier.
      (INFORMATION ONLY: The earliest stable tagged release version is: v5.3.3)
      (INFORMATION ONLY: The earliest beta tagged release version is: v5.3.16)

    Portainer:

    • Open your portainer instance and navigate to:
    • Home > Dashboard > Stacks
    • Select the "Add stack" button
    • In the "name" textbox enter: mumc
    • In the "Web editor" textbox copy/paste the docker compose commands below.
    version: "3.9"
    services:
       mumc:
          image: ghcr.io/terrelsa13/mumc:latest
          container_name: mumc
          restart: on-failure:1
          environment:
             TZ: America/New_York
             CMDLINE_ARGS: ""
          volumes:
             - "/opt/MUMC/config:/usr/src/app/config"
    • Take note: The first half of the line underneath volumes: contains the path from step#3. Make the necessary changes if your path is different.

    Docker CLI:

    • Open a terminal window.
    • Copy/Paste the docker command below (single line).
    docker run -d --name mumc --restart=on-failure:1 -v /opt/MUMC/config:/usr/src/app/config -e TZ=America/New_York -e=CMDLINE_ARGS "" ghcr.io/terrelsa13/mumc:latest
    
    • Take note: The first half of the '-v' flag contains the path from step#3. Make the necessary changes if your path is different.
  8. Start the container.

    Portainer:

    • Select the "Deploy the stack" button.

    Docker CLI:

    • Wait for the images to finish downloading.

First Run and mumc_config.yaml creation

Clone this wiki locally