WORK IN PROGRESS | Services are in active development and are subject to change. |
Charity Engine is the crowdsourced cloud â a compute service running on a global network of participating devices. This distributed platform provides an ecosystem of compute, storage, and networking capabilities. |
Contents
The Charity Engine client installation is handled by a setup script that checks the status of the current environment and installs dependencies, as needed. Docker is installed and configured automatically. When GPU support is used, setup of the container runtime is also included.
The process also implements security measures to limit the risks associated with running third-party containers. Most notably, the script disables the default, system-wide Docker daemon and configures the Docker rootless context, which instead runs Docker processes as the current user. Additionally, container networks are configured so that network traffic (with the exception of IPFS, if enabled) is restricted and must be run through a dedicated proxy container. This prevents third-party containers from accessing either the local network or arbitrary destinations on the Internet.
For specific details, examine the contents of the setup script.
The CE Datacenter/Enterprise environment can be set up by running the following commands:
$ wget -O ce-docker-setup.ubuntu.sh https://www.charityengine.com/files/setup/ce-docker-setup.sh.ubuntu $ sh ce-docker-setup.ubuntu.sh |
Usage of the ce-docker-setup.ubuntu.sh script may include a number of optional parameters:
ce-docker-setup.ubuntu.sh [args] OPTIONS --auth // Specify the authenticator to use to connect the host to Charity Engine (if omitted, system will prompt for authenticator) --with-ipfs // Allow use of IPFS content on the host for task input files; this updates the ipfs config file to add a UNIX socket API interface so that files can be fetched --no-gpu // Do not set up GPU packages or run the client with GPU support --service-mode // Keep container running, fetching and processing new tasks [default] --task-mode // Run a single task, if available, then stop the container |
(To debug, see 2.2 To troubleshoot)
Once setup has been completed on a system, the CE client can be managed via Docker:
$ docker [start|stop] ce-client |
To verify that the client is running
$ docker exec -it ce-client ce-ctl --get_host_info |
Running the docker start ce-client command will cause the client to either run a single compute job ("task_mode"), or continually check for and run compute jobs ("service mode" \[default\]) that have been submitted to the Charity Engine network, until manually stopped. |
When new features or other improvements have been made to the setup script or CE client container image, the environment can be upgraded by fetching and running the latest setup script:
$ wget -O ce-docker-setup.ubuntu.sh https://www.charityengine.com/files/setup/ce-docker-setup.sh.ubuntu $ sh ce-docker-setup.ubuntu.sh |
Usage of the ce-docker-setup.ubuntu.sh script may include a number of optional parameters:
ce-docker-setup.ubuntu.sh [args] OPTIONS --auth // Specify the authenticator to use to connect the host to Charity Engine (if omitted, system will prompt for authenticator) --with-ipfs // Allow use of IPFS content on the host for task input files; this updates the ipfs config file to add a UNIX socket API interface so that files can be fetched --no-gpu // Do not set up GPU packages or run the client with GPU support --service-mode // Keep container running, fetching and processing new tasks [default] --task-mode // Run a single task, if available, then stop the container |
(To debug, see 2.2 To troubleshoot)
The CE client configuration will remain in the ~/.ce directory, so any work that was in progress prior to the upgrade will be continued.
To remove all CE files and containers from the system:
$ rm -r ~/.ce ce-docker-setup.ubuntu.sh nginx_work_proxy.conf $ docker rm -f ce-client work-proxy |
Note: These commands do not remove Docker CE, NVIDIA container runtime, or other packages that were installed as dependencies, nor do they revert changes to Docker system configuration that might have been made during setup to support rootless mode.
The CE client configuration and data files are stored in the ~/.ce directory of the account that runs the installation script. To use an alternate location for storage, this location can be created or replaced with a symbolic link to another filesystem path.
IPFS data is stored in the ~/ce-client/ipfs directory. This location can likewise be set up as a symbolic link to point to an existing IPFS data store or to use a different filesystem for IPFS files.
Launch the container:
$ docker start ce-client |
Once the ce-client container is started,
For details on what is happening, and especially to identify any errors, run:
$ docker logs ce-client |
To capture output from the setup script, append " 2>&1 | tee debug.out
", which will write setup script activity to a file, debug.out
Â
$ sh ce-docker-setup.ubuntu.sh âservice-mode 2>&1 | tee debug.out |
Please contact us with any questions.