### Copy Configuration Files Source: https://github.com/adlnet/adl_lrs/wiki/Home Copies example configuration files (.env and settings.ini) to their active versions. These files are crucial for LRS operation and require customization for specific environments. ```bash cp .env.example .env ``` ```bash cp settings.ini.example settings.ini ``` -------------------------------- ### Install LRS Prerequisites Source: https://github.com/adlnet/adl_lrs/wiki/Home Installs necessary system packages and Python libraries for the ADL LRS. This includes git, fabric, python-setuptools, python3-dev, libxml2-dev, libxslt1-dev, gcc, and then installs fabric3 and virtualenv using pip3. ```bash admin:~$ sudo apt-get install git fabric python-setuptools python3-dev \ libxml2-dev libxslt1-dev gcc admin:~$ sudo pip3 install fabric3 virtualenv ``` -------------------------------- ### Initialize SSL Certificate Source: https://github.com/adlnet/adl_lrs/wiki/Home Initializes a self-signed SSL certificate for local development. This is a new script for setting up initial SSL. ```bash sudo init-ssl.sh localhost ``` -------------------------------- ### Manage uWSGI Service with systemd Source: https://github.com/adlnet/adl_lrs/wiki/Using-uWSGI-with-Nginx This systemd service file (`.service`) is used to manage the uWSGI service for the LRS application on systems using systemd. It defines the service description, the command to start the service, and configures it to restart on failure. It also specifies the target for installation. ```ini [Unit] Description=LRS [Service] ExecStart=/path/to/env/bin/uwsgi --emperor /etc/uwsgi/vassals Restart=on-failure [Install] WantedBy=multi-user.target ``` -------------------------------- ### Start ADL LRS with Docker Compose Source: https://github.com/adlnet/adl_lrs/wiki/Home Starts the ADL LRS services in detached mode using Docker Compose. This command builds the Docker images if necessary and brings up all defined services. ```bash sudo docker-compose up -d --build ``` -------------------------------- ### Install PostgreSQL 9.5 Source: https://github.com/adlnet/adl_lrs/wiki/Home Installs PostgreSQL 9.5 and related development packages. It then creates a database owner role and a new database named 'lrs' owned by the specified role. ```bash admin:~$ admin:~$ sudo apt-get install postgresql-9.5 postgresql-server-dev-9.5 postgresql-contrib-9.5 admin:~$ sudo -u postgres createuser -P -s Enter password for new role: Enter it again: admin:~$ sudo -u postgres psql template1 template1=# CREATE DATABASE lrs OWNER ; template1=# \q (Exits shell.) ``` -------------------------------- ### Clone ADL LRS Repository Source: https://github.com/adlnet/adl_lrs/wiki/Home Clones the ADL LRS project from GitHub. This is the first step in the installation process. ```bash git clone https://github.com/adlnet/ADL_LRS ``` -------------------------------- ### Run ADL LRS Development Server Source: https://github.com/adlnet/adl_lrs/wiki/Home Starts a lightweight development web server for the ADL LRS using Django's manage.py script. The server runs on 127.0.0.1:8000 by default and is suitable for development but not production. ```bash (env)dbowner:ADL_LRS$ ./manage.py runserver ``` -------------------------------- ### Set Up LRS Environment and LRS Source: https://github.com/adlnet/adl_lrs/wiki/Home Sets up the Python virtual environment for the LRS using Fabric and activates it. It then runs another Fabric command to set up the LRS, which includes creating log and media directories and prompting to create a superuser. ```bash admin:ADL_LRS$ fab setup_env admin:ADL_LRS$ source ../env/bin/activate (env)admin:ADL_LRS$ (env)admin:ADL_LRS$ fab setup_lrs ... You just installed Django's auth system, which means you don't have any superusers defined. Would you like to create one now? (yes/no): yes Username (leave blank to use ''): E-mail address: Password: Password (again): Superuser created successfully. ... ``` -------------------------------- ### Install and Lint ADL LRS Source: https://github.com/adlnet/adl_lrs/wiki/Home Installs necessary linting tools and dependencies for the ADL LRS project. This script is newly introduced. ```bash sudo bash ./install-lint.sh ``` -------------------------------- ### xAPI Statements API - POST, PUT, GET Examples Source: https://context7.com/adlnet/adl_lrs/llms.txt Demonstrates how to interact with the xAPI statements endpoint to submit and retrieve learning experience statements. Supports POST for single statements, PUT for statements with specific IDs, and GET with filtering parameters like agent, verb, and limit. Requires authentication and specific xAPI version headers. ```bash # POST a single statement curl -X POST "https://lrs.example.com/xapi/statements" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "Content-Type: application/json" \ -H "X-Experience-API-Version: 2.0.0" \ -d '{ "actor": { "mbox": "mailto:learner@example.com", "name": "John Doe" }, "verb": { "id": "http://adlnet.gov/expapi/verbs/completed", "display": {"en-US": "completed"} }, "object": { "id": "http://example.com/activities/course-101", "definition": { "name": {"en-US": "Introduction to xAPI"}, "description": {"en-US": "A beginner course on xAPI"}, "type": "http://adlnet.gov/expapi/activities/course" } }, "result": { "score": {"scaled": 0.95, "raw": 95, "min": 0, "max": 100}, "success": true, "completion": true, "duration": "PT1H30M" } }' # Response: [""] # PUT a statement with a specific ID curl -X PUT "https://lrs.example.com/xapi/statements?statementId=12345678-1234-1234-1234-123456789012" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "Content-Type: application/json" \ -H "X-Experience-API-Version: 2.0.0" \ -d '{ "actor": {"mbox": "mailto:learner@example.com"}, "verb": {"id": "http://adlnet.gov/expapi/verbs/attempted"}, "object": {"id": "http://example.com/activities/quiz-1"} }' # GET statements with filtering curl -X GET "https://lrs.example.com/xapi/statements?agent=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D&verb=http://adlnet.gov/expapi/verbs/completed&limit=10" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" # Response: # { # "statements": [...], # "more": "/xapi/statements/more/abc123..." # } ``` -------------------------------- ### Open Shell for Site Configuration Source: https://github.com/adlnet/adl_lrs/wiki/Home Opens a shell environment to interact with the Django project. This is used for manually configuring site information. ```bash sudo ./open-shell.sh ``` -------------------------------- ### Install ADL LRS Requirements Source: https://github.com/adlnet/adl_lrs/wiki/Home Installs the required dependencies for the ADL LRS. This command ensures all necessary packages are available for the LRS to function. ```bash sudo install-reqs.sh ``` -------------------------------- ### Manage uWSGI Service with Upstart Source: https://github.com/adlnet/adl_lrs/wiki/Using-uWSGI-with-Nginx This Upstart script (`.conf`) is used to manage the uWSGI service for the LRS application. It defines when the service should start and stop, ensures it respawns if it fails, and executes the uWSGI Emperor command to manage vassal configurations. ```shell description "lrs" start on runlevel [2345] stop on runlevel [!2345] respawn exec /path/to/env/bin/uwsgi --emperor /etc/uwsgi/vassals ``` -------------------------------- ### Docker Deployment and Configuration for ADL LRS Source: https://context7.com/adlnet/adl_lrs/llms.txt This snippet details the steps for deploying the ADL LRS using Docker Compose. It includes cloning the repository, setting up environment and settings files, initializing SSL for local development, starting the services, creating an admin user, and configuring production SSL with Let's Encrypt. ```bash # Clone and setup git clone https://github.com/adlnet/ADL_LRS cd ADL_LRS/docker # Configure environment cp .env.example .env cp lrs/settings.ini.example lrs/settings.ini # Edit .env for your domain # HOSTNAME=lrs.yourdomain.com # Edit settings.ini with database and email settings # [database] # NAME: lrs # USER: postgres # PASSWORD: your-password # HOST: db # PORT: 5432 # [email] # EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend # EMAIL_HOST: smtp.gmail.com # EMAIL_PORT: 587 # EMAIL_USE_TLS: True # Initialize SSL (for local development) sudo ./init-ssl.sh localhost # Start services sudo docker-compose up -d --build # Create admin user (after LRS is running) sudo ./create-admin.sh # For production SSL with Let's Encrypt sudo ./certbot/generate.sh yourdomain.com # Access the LRS at https://localhost (or your domain) ``` -------------------------------- ### Configure uWSGI for Django LRS Application Source: https://github.com/adlnet/adl_lrs/wiki/Using-uWSGI-with-Nginx This is an example uWSGI configuration file (`.ini`) for running a Django LRS application. It specifies the project's base directory, WSGI module, settings module, virtual environment path, and worker/process settings. It also includes options for threading, error handling, and logging. ```shell [uwsgi] # Django-related settings # the base directory of django project chdir = /path/to/ADL_LRS # Django's wsgi file module = adl_lrs.wsgi:application env = DJANGO_SETTINGS_MODULE = adl_lrs.settings # virtualenv path home = /path/to/env enable-threads = true workers = 5 processes = 5 harakiri = 10 vacuum = true master = true http-socket = :8000 daemonize = /path/to/logs/uwsgi/lrs_uwsgi.log ``` -------------------------------- ### Monitor ADL LRS Setup Process Source: https://github.com/adlnet/adl_lrs/blob/master/docker/README.MD To monitor the ADL LRS setup process, you can tail the logs of the 'docker_lrs' container. This is useful for understanding the startup sequence and troubleshooting any issues. ```bash sudo docker logs -f docker_lrs ``` -------------------------------- ### Basic Nginx Configuration for LRS Source: https://github.com/adlnet/adl_lrs/wiki/Using-uWSGI-with-Nginx This is a basic Nginx configuration file (`default.conf`) for serving the LRS application. It sets up the default server block, which is a starting point for proxying requests to the uWSGI server. Further customization may be required based on specific needs. ```nginx # The default server ``` -------------------------------- ### Activity Profile API Management (PUT, GET) - cURL Source: https://context7.com/adlnet/adl_lrs/llms.txt Provides examples for managing activity profile data, including uploading (PUT) new profile data, retrieving a specific profile, and listing all profile IDs associated with an activity. Authentication and xAPI version are required. ```bash curl -X PUT "https://lrs.example.com/xapi/activities/profile?activityId=http://example.com/activities/course-101&profileId=course-metadata" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "Content-Type: application/json" \ -H "X-Experience-API-Version: 2.0.0" \ -d '{ "courseName": "Introduction to xAPI", "instructor": "Jane Smith", "duration": "PT2H", "prerequisites": ["basic-web-development"], "learningObjectives": [ "Understand xAPI statement structure", "Send statements to an LRS", "Query learning records" ] }' ``` ```bash curl -X GET "https://lrs.example.com/xapi/activities/profile?activityId=http://example.com/activities/course-101&profileId=course-metadata" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" ``` ```bash curl -X GET "https://lrs.example.com/xapi/activities/profile?activityId=http://example.com/activities/course-101" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" ``` -------------------------------- ### Configure Environment and Settings for ADL LRS Docker Source: https://github.com/adlnet/adl_lrs/blob/master/docker/README.MD Before building the Docker containers, you need to configure the environment and settings. This involves copying example files for environment variables and settings, and then installing necessary prerequisites. ```bash cp .env.example .env cp settings.ini.example settings.ini sudo install-reqs.sh ``` -------------------------------- ### Create Admin User Script Source: https://github.com/adlnet/adl_lrs/wiki/Home Executes a script to create an administrator user for the ADL LRS. This should only be run once the LRS is fully available, which may take a significant amount of time. ```bash sudo create-admin.sh ``` -------------------------------- ### Test ADL LRS Source: https://github.com/adlnet/adl_lrs/wiki/Home Executes the Fabric command to run tests for the ADL LRS. ```bash (env)dbowner:ADL_LRS$ fab test_lrs ``` -------------------------------- ### Clone ADL LRS Repository and Navigate to Docker Directory Source: https://github.com/adlnet/adl_lrs/blob/master/docker/README.MD This snippet demonstrates the initial steps to get the ADL LRS Docker project. It involves cloning the repository and changing the directory to the docker subdirectory where the setup scripts are located. ```bash git clone https://github.com/adlnet/ADL_LRS cd ADL_LRS/docker ``` -------------------------------- ### Upstart Script for Celery LRS Source: https://github.com/adlnet/adl_lrs/wiki/Using-Celery This upstart script is used to manage the Celery LRS service on systems using upstart. It defines how the service starts, stops, and respawns. Ensure the user and paths are correctly configured. ```bash description "supervisor for lrs-celery" start on runlevel [2345] stop on runlevel [!2345] respawn setuid chdir /path/to/ADL_LRS exec /path/to/env/bin/supervisord --nodaemon ``` -------------------------------- ### Clone ADL LRS Repository Source: https://github.com/adlnet/adl_lrs/wiki/Home Clones the ADL LRS repository from GitHub into a specified directory and then navigates into the cloned repository's directory. ```bash admin:~$ cd admin:~$ git clone https://github.com/adlnet/ADL_LRS.git admin:~$ cd ADL_LRS/ ``` -------------------------------- ### Manually Create Django Site Source: https://github.com/adlnet/adl_lrs/wiki/Home Python code executed within the Django shell to create a new site entry. This is necessary when the default site name needs to be overridden. ```python from django.contrib.sites.models import Site site = Site.objects.create(domain='your.domain.com', name='Your Site Name') site.save() ``` -------------------------------- ### Nginx Configuration for Static File Serving Source: https://github.com/adlnet/adl_lrs/wiki/Using-uWSGI-with-Nginx This Nginx configuration snippet defines how to serve static files for the ADL LRS. It includes configurations for the main static directory, and specific configurations for `endless_pagination` and Django's admin static files. It sets cache expiration times and enables autoindexing for directory listings. ```nginx location /static/ { autoindex on; expires 1w; root /path/to/ADL_LRS/adl_lrs; } location /static/endless_pagination { autoindex on; expires 1w; alias /path/to/env/lib/python2.7/site-packages/endless_pagination/static/endless_pagination; } # IF USING THE UPDATED LRS CODE (POST 1.0.2) YOU WILL NEED THIS LOCATION INSTEAD OF ENDLESS_PAGINATION # location /static/el-pagination { # autoindex on; # expires 1w; # alias /path/to/env/lib/python2.7/site-packages/el_pagination/static/el-pagination; # } location /static/admin { autoindex on; expires 1w; alias /path/to/env/lib/python2.7/site-packages/django/contrib/admin/static/admin; } ``` -------------------------------- ### Manage State Data (GET, DELETE) - cURL Source: https://context7.com/adlnet/adl_lrs/llms.txt Demonstrates how to retrieve specific state data or all state IDs for a given activity and agent, and how to delete state data. Requires authentication and specifies the xAPI version. ```bash curl -X GET "https://lrs.example.com/xapi/activities/state?activityId=http://example.com/activities/quiz-1&agent=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D&stateId=progress" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" ``` ```bash curl -X GET "https://lrs.example.com/xapi/activities/state?activityId=http://example.com/activities/quiz-1&agent=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" ``` ```bash curl -X DELETE "https://lrs.example.com/xapi/activities/state?activityId=http://example.com/activities/quiz-1&agent=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D&stateId=progress" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" ``` -------------------------------- ### Nginx Restart Command Source: https://github.com/adlnet/adl_lrs/wiki/Using-uWSGI-with-Nginx This command restarts the Nginx service on a system where it is managed by the 'admin' user. This is typically done after making changes to the Nginx configuration files to apply the new settings. ```bash admin:~$ sudo service nginx restart ``` -------------------------------- ### Agent Profile API Management (PUT, GET) - cURL Source: https://context7.com/adlnet/adl_lrs/llms.txt Illustrates how to manage agent profile data, including storing (PUT) preferences or other agent-specific data, retrieving a specific agent profile, and fetching the agent's Person object. Requires authentication and specifies the xAPI version. ```bash curl -X PUT "https://lrs.example.com/xapi/agents/profile?agent=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D&profileId=preferences" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "Content-Type: application/json" \ -H "X-Experience-API-Version: 2.0.0" \ -d '{ "language": "en-US", "timezone": "America/New_York", "accessibility": { "fontSize": "large", "highContrast": false }, "notifications": { "email": true, "push": false } }' ``` ```bash curl -X GET "https://lrs.example.com/xapi/agents/profile?agent=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D&profileId=preferences" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" ``` ```bash curl -X GET "https://lrs.example.com/xapi/agents?agent=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" ``` -------------------------------- ### xAPI About Endpoint - GET Information Source: https://context7.com/adlnet/adl_lrs/llms.txt Retrieves information about the ADL LRS, including supported xAPI versions and available API extensions. This endpoint is useful for understanding the capabilities of the LRS. It requires the xAPI version header. ```bash curl -X GET "https://lrs.example.com/xapi/about" \ -H "X-Experience-API-Version: 2.0.0" # Response: # { # "version": ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "2.0.0"], # "extensions": { # "xapi": { # "statements": { # "name": "Statements", # "methods": ["GET", "POST", "PUT", "HEAD"], # "endpoint": "/xapi/statements", # "description": "Endpoint to submit and retrieve XAPI statements." # }, # "activities": { # "name": "Activities", # "methods": ["GET", "HEAD"], # "endpoint": "/xapi/activities" # }, # "activities_state": { # "name": "Activities State", # "methods": ["PUT", "POST", "GET", "DELETE", "HEAD"], # "endpoint": "/xapi/activities/state" # }, # "agents": { # "name": "Agents", # "methods": ["GET", "HEAD"], # "endpoint": "/xapi/agents" # } # } # } # } ``` -------------------------------- ### Update SITE_ID in settings.ini Source: https://github.com/adlnet/adl_lrs/wiki/Home Configuration snippet for the settings.ini file to specify the SITE_ID. This setting is updated after manually creating a new site entry in Django. ```ini [site] SITE_ID: 2 ``` -------------------------------- ### Register a New User Source: https://context7.com/adlnet/adl_lrs/llms.txt Allows for the registration of a new user through a web form. Requires username, email, and password. ```APIDOC ## POST /register ### Description Registers a new user for the ADL LRS. ### Method POST ### Endpoint /register ### Parameters #### Request Body - **username** (string) - Required - The desired username for the new account. - **email** (string) - Required - The email address for the new account. - **password** (string) - Required - The password for the new account. ``` -------------------------------- ### Restore Temporary SSL Certificate Source: https://github.com/adlnet/adl_lrs/wiki/Home Restores the temporary SSL certificate if the Certbot generation fails. This command is used as a fallback to ensure the LRS remains accessible. ```bash sudo ./init-ssl.sh ``` -------------------------------- ### Generate SSL Certificate with Certbot Source: https://github.com/adlnet/adl_lrs/wiki/Home Generates a proper SSL certificate for a publicly available domain using a Certbot container. This command retrieves a certificate and restarts the nginx proxy to use it. ```bash sudo ./certbot/generate.sh ``` -------------------------------- ### Register an OAuth Client Source: https://context7.com/adlnet/adl_lrs/llms.txt Registers a new OAuth client. Requires login and provides client credentials upon successful registration. Supports optional RSA signature and secret. ```APIDOC ## POST /regclient ### Description Registers a new OAuth client. This endpoint requires user authentication. ### Method POST ### Endpoint /regclient ### Parameters #### Request Body - **name** (string) - Required - The name of the OAuth client. - **description** (string) - Required - A description for the OAuth client. - **rsa_signature** (string) - Optional - The RSA signature for authentication (for RSA-SHA1). - **secret** (string) - Optional - A secret for the OAuth client. ### Response #### Success Response (200) - **client_key** (string) - The unique key (app_id) for the registered client. - **client_secret** (string) - The secret key for the registered client. ``` -------------------------------- ### Activity State API - PUT State Data Source: https://context7.com/adlnet/adl_lrs/llms.txt Demonstrates how to use the activity state API to store and retrieve state data associated with a specific activity and agent. This is useful for tracking progress or other contextual information. Requires authentication, content type, and xAPI version headers. ```bash # PUT state data curl -X PUT "https://lrs.example.com/xapi/activities/state?activityId=http://example.com/activities/quiz-1&agent=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D&stateId=progress" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "Content-Type: application/json" \ -H "X-Experience-API-Version: 2.0.0" \ -d '{ "currentQuestion": 5, "answeredQuestions": [1, 2, 3, 4], "score": 80, "startTime": "2024-01-15T10:30:00Z" }' ``` -------------------------------- ### Interact with pstats for Profile Analysis Source: https://github.com/adlnet/adl_lrs/wiki/Code-Profiling-with-cProfile This command demonstrates how to use the `pstats` Python module interactively to analyze aggregated profile data. By running `pstats.py` with the path to an aggregated profile file, you can enter an interactive session to sort and view the profile statistics. ```bash $> python /usr/lib/python2.7/pstats.py ./agent_gen-20130321T11H11M58S958.agg.prof Welcome to the profile statistics browser. ./agent_gen-20130321T11H11M58S958.agg.prof% ``` -------------------------------- ### Stop and Start LRS Service Source: https://github.com/adlnet/adl_lrs/wiki/Clearing-the-Database Commands to stop and start the ADL LRS service using systemd. This is a prerequisite for data clearing operations to ensure data integrity. ```bash sudo service lrs stop (or) sudo service lrs start ``` -------------------------------- ### Retrieve Activity Object - cURL Source: https://context7.com/adlnet/adl_lrs/llms.txt Shows how to fetch a complete activity object, including its definition, using the activity ID. Authentication and the xAPI version are required parameters. ```bash curl -X GET "https://lrs.example.com/xapi/activities?activityId=http://example.com/activities/course-101" \ -H "Authorization: Basic $(echo -n 'username:password' | base64)" \ -H "X-Experience-API-Version: 2.0.0" ``` -------------------------------- ### Build and Start ADL LRS Docker Containers Source: https://github.com/adlnet/adl_lrs/blob/master/docker/README.MD This script rebuilds the Docker containers for the ADL LRS. Alternatively, you can use the docker-compose command to bring up the services in detached mode and build the images. ```bash sudo rebuild.sh ``` ```bash sudo docker-compose up -d --build ``` -------------------------------- ### User Registration and Client Management Source: https://context7.com/adlnet/adl_lrs/llms.txt Access to web interfaces for user registration and OAuth client management. ```APIDOC ## User Registration and Client Management ### Description The LRS provides web interfaces for user registration and OAuth client management. ### Access Users can access these functionalities through the LRS web interface. Specific endpoints for these actions are not detailed here but are typically found within the application's UI. ``` -------------------------------- ### Retrieve All Hooks (Client Request) Source: https://github.com/adlnet/adl_lrs/wiki/Webhooks A simple GET request to the /hooks endpoint to retrieve a list of all registered webhooks for the authenticated user. The LRS responds with a status code and a JSON array of hook objects. ```http GET /hooks Authorization: "Basic yaddayadda=" ``` -------------------------------- ### Systemd Service for Celery LRS Source: https://github.com/adlnet/adl_lrs/wiki/Using-Celery This systemd service file is for managing the Celery LRS service on systems using systemd. It specifies the user, working directory, and execution command for the supervisord process. After creating the file, run `daemon-reload` and `enable`. ```ini [Unit] Description=Supervisor to run celery for the LRS [Service] User= WorkingDirectory=/path/to/ADL_LRS ExecStart=/path/to/env/bin/supervisord --nodaemon Restart=always [Install] WantedBy=multi-user.target ``` -------------------------------- ### Retrieve Single Hook (Client Request) Source: https://github.com/adlnet/adl_lrs/wiki/Webhooks This GET request retrieves a specific webhook by its ID. The client provides the hook ID in the URL path. The LRS responds with a status code and the JSON object of the requested hook. ```http GET /hooks/:id Authorization: "Basic yaddayadda=" ``` -------------------------------- ### Configure RabbitMQ Connection (INI) Source: https://github.com/adlnet/adl_lrs/wiki/Using-Celery This INI configuration block specifies the connection details for RabbitMQ, including username, password, host, port, and virtual host. These settings are crucial for Celery to communicate with the message broker. ```ini [ampq] USERNAME: PASSWORD: HOST: localhost PORT: 5672 VHOST: ```