P2PPool Manager
From Grid-Appliance Wiki
Contents |
P2PPool Manager -- What is it
This is a Joomla module that provides the ability to deploy and monitor P2P infrastructures that use Brunet. To understand what happens behind a Brunet deployment read this.
You can download a VM appliance that is made for VMware but should be compatible with KVM and VirtualBox from here. The source code can be accessed via git here.
Installation
(This is not the preferred method at this time, please download the Virtual Appliance)
- SSL Enabled Apache
- PHP w/ MySQL and mod-php5 for Apache
- MySQL
- A working copy of Joomla
- Mono 1.92 or above
- unzip
- If you're going to use mkbundle:
- 32-bit machine
- An older glibc (like 2.4 or earlier) -- Like Debian 4
- binutils (for as)
- gcc
- zlib1g-dev
- Add the following to cron via cron -e:
-
30 * * * * wget -q "http://127.0.0.1/index.php?option=com_p2ppool&task=cron" &> /dev/null
-
0 * * * * wget -q "http://127.0.0.1/index.php?option=com_p2ppool&task=cron" &> /dev/null
-
- Python with mysqdb
The Appliance
If you chose the appliance path, then the following information may be pertinent for you:
- Username / passwords:
- Appliance
- Ubuntu = ubuntu / password
- Root = sudo bash as ubuntu
- www-data = sudo -u www-data bash as ubuntu (www in older appliances)
- MySQL
- Root = root / (empty)
- Joomla
- Root = admin / password
- Appliance
- To access Joomla, it depends on your setup, but the Apache server is running on port 80 and 443 for http and https respectively.
Settling In
- Want a new SSL certificate run "cd /etc/apache2/ssl; sudo bash generate.sh"
- If you want the Google maps API to work correctly, see this. The code base has been setup with the address of 127.0.0.1, so if you use ssh port redirection, it will work fine.
- To add a user, they need to be a user type (group) of Administrator, Super Administrator, or Publisher. An excellent Joomla documentation is available here.
- Users can create menu links to their map statistics, to do this please see the Joomla docs.
Preparing Your Network
In order for this system to manage the software on a remote machine, these features are required:
- Linux machine with Mono or with a glibc equal to or newer than the one on the web site (for mkbundle)
- SSH on its standard port
- A common user name and ssh-key (with no passphrase!)
- A path where the user can store files
Preparing Your Code
We provide pre-built bundles that can be obtained from here. In order to use those, you must create a new zip file with BasicNode.exe and the dll files in the root directory, see this for an example. If you would like to create your own, run "nant plabtest-build" inside of the Brunet root directory, the result will be a basicnode.zip file which can be uploaded to the interface.
If at any time you decide to upgrade your pool, please update your namespace. In the future, we will work on improving our scripts to detect out of version sites and upgrade them. Using different namespaces, will allow you to take advantage of that feature.
Finally, remember actions take time to complete and please do not interrupt an install with another install, unless you want to have to run the install again later as operations do not interrupt each other. Also, if you run an uninstall over an install, it may not properly uninstall all nodes from remote resources.
Management Actions
- Install - First time instantiating a pool, this does the following:
- Registers the pool with the system
- Creates the folder components/com_p2ppool/data/$PoolName, where all non-private data will be stored
- Uploads node files and ssh key (to a private non-web readable directory, must have .htaccess enabled!)
- Generates config files
- Generates a deployable version of the system in install.tgz
- Starts a local running instance
- Stop - Removes a pool and all its data from the system
- Notifies the OS to uninstall all nodes from remote hosts
- Stops the BasicNode
- Sets the uninstall flag
- Upgrade - Identical to Install with emphasis on update instead of create
- Gather logs - Gathers all the logs in the system and places them in components/com_p2ppool/data/$PoolName/logs.zip
- Crawl - Automated every 30 minutes - checks the pool for status information
- Check - Automated every 24 hours - checks all nodes in the system to ensure software is running
- UninstallCheck - Automated every 24 hours - garbage collection for Stop
All management tasks ensure that the local BasicNode is running, except of course Stop and UninstallCheck
User Actions or Management Views
- NodeStats - Show statistics of all nodes in the current snapshot (last crawl)
- SystemStats - Show a summary of the system for the last 20 crawls
- Map - Show a distribution of all nodes in the current snapshot
Current Issues
- Management issues:
- Ability to specify a date range and be returned a CSV log containing the specified data
- Ideally have a better mechanism of notifying users of the status of tasks (preferably via AJAX)
- Upgrade path for future versions without deleting pool history
- Many of the calls are idempotent and wait for the previous instance to finish before they will be able to run, though they are not queued, so a user has to reinitiate. Perhaps there should be a work flow management, which would be especially useful for those wanting to test.
- Actions that may affect other actions do not preempt or not run. Examples:
- An stop on a pool should preempt all actions on that pool, it only stops the running basicnode for now
- An install / upgrade on a pool should preempt all actions on a that pool, except Stop
- There should be a suspend task, which would be useful for those that want to keep pool history but don't want to have an active pool.
- Users should be able to automate tasks and the task automation engine could be improved to do work flows.
- Managers should be able to configure default views for system and node status pages through the web front end
- Installation verification
- A version of mono that can be distributed with the code instead of using mkbundle
- User issues:
- There should be a way to create a configuration file for the pool
- Users should be able to select which fields to view in the system and node status pages
- Infrastructure issues:
- We no longer are collecting memory and cpu, that should be remedied

