Skip to content
Alex Narvey edited this page Jan 14, 2024 · 13 revisions

You can run a quick demo on your local machine to see what MunkiReport is all about. The only thing you need is a macOS machine, a terminal (Terminal.app) and a web browser. The demo uses the built-in web server of php, which is not very secure or robust but will suffice for the purpose of a quick demonstration and for development purposes.

Get MunkiReport

Get PHP

Jump into the Terminal

  • Open Terminal.app
  • In the terminal, step into the downloaded (and unzipped) MunkiReport directory:
cd ~/Downloads/munkireport-php-v6

## Install the dependencies
  • If you don't have composer installed on your mac run (Note: This script can be found in the Main repository and not the WIP one.)
./build/setup_composer.sh
  • Using composer, you can install all dependencies:
composer install

Set up configuration

  • Now you can start with the default settings which are stored in a file named .env
cp .env.example .env

Set up the database

  • To set up the database, edit .env so that DB_CONNECTION=sqlite is uncommented.
  • MunkiReport needs the database file to exist so run:
touch app/db/db.sqlite
  • With the database file in place, we can run migrations which will set up all necessary tables:
./please migrate

Create the first user

  • MunkiReport needs a user account, so we create one:
./please user:create

You may have to add that user to the .env file changing:

ROLES_ADMIN="admin@localhost"

to:

ROLES_ADMIN="youradmin@example.com"

Run the server

  • Start the internal development server:
php -S 127.0.0.1:8888 -t public

You're done! If you don't see any errors, you should be able to visit your demo MunkiReport instance by visiting http://127.0.0.1:8080 in your browser. You can login with the user account you just created.

Python3

munkireport v.6 requires Python 3. The recommended version 3.10 of Mac Admins Python can be found on this page: https://github.com/macadmins/python/releases/tag/v3.10.9.80716

API

API is still available and instructions for version 6 are on the Wiki API page.

Configure the client

We're going to use your machine as client, type

sudo /bin/bash -c "$(curl -s 'http://localhost:8888/index.php?/install')"

This will install and configure MunkiReport on your local machine. Now run:

sudo /usr/local/munkireport/munkireport-runner

to populate your MunkiReport server with client data

Stop the server

If you want to stop the server, type Ctrl-C to quit

Uninstall MunkiReport

To uninstall MunkiReport just remove the installed files:

sudo rm -r /usr/local/munkireport/
sudo rm /usr/local/munki/postflight
sudo rm /usr/local/munki/report_broken_client
sudo rm /Library/Preferences/MunkiReport.plist
sudo rm -r /Library/MunkiReport
sudo rm /Library/LaunchDaemons/com.github.munkireport.runner.plist
sudo pkgutil --forget com.github.munkireport
Clone this wiki locally