npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webgme-docker-worker-manager

v0.3.1

Published

Docker container-based substitute for webgme's server worker manager

Downloads

58

Readme

webgme-docker-worker

Since webgme version 2.14.0 the server worker manager is a replaceable module. The server worker manager (SWM) handles computationally expensive requests such as project/model export, constraint checking, project seeding etc., in processes separate from the server process.

If server execution of plugins is available (gmeConfig.plugin.allowServerExecution = true;) these are also handled by the SWM. This module reuses the basic webgme SWM, but instead of running plugins in separate processes they are executed in docker containers. (This can be configured per plugin, see config/config.default.js)

It's worth mentioning here that plugins executed on the server do not directly connect to storage database, but rather connects to the webgme server through websockets using the identity of the invoker of the plugin. This means they can't access projects outside of the user's scope.

Usage

The host machine must have docker installed.

Add this a node-module.

npm install webgme-docker-worker-manager --save

The manager launches containers from existing images. To build an image with the full "webgme stack" for executing plugins. Read through the short Dockerfile. Built correctly it will include all plugins and code for the specific repo.

Move over and modify the configuration parameters illustrated in gmeConfig to your configuration file.

Together with Dockerized WebGME Server

If the webgme server itself runs within a docker container it is preferable to run the workers as sibling containers. With using the default settings the webgme container can be given access to the docker socket by mapping it as a volume to the webgme-server (-v).

Currently the webgme server needs to be available from the host which can be acheived using the -p option. If the port on the host is different, this port be specified in the config.server.workerManager.options.webgmeServerPort. (As always, gmeConfig params can be overwritten through env. vars. using process.ENV in your config file.)

docker run -d -p 8888:8888 -v /var/run/docker.sock:/var/run/docker.sock -e NODE_ENV='myConfigWithDockerWM' webgme-server

Notes on Limitations

The current setup does not work on docker on windows.

Common Issues

If after installing docker you get the error at the server start Could not find correct info from docker "bridge" network correctly a reload of docker daemon might fix the issue as mentioned in this issue.

https://github.com/moby/moby/issues/26799

Developers

Tests

To run the full stack tests the a docker images must be built first.

docker build -t docker-worker-test:<PACKAGE_JSON.version> .

Publish

npm version 0.1.0 -m "Release %s"
git push origin master
git checkout v0.1.0
git push origin v0.1.0
npm publish ./

After bumping the version make sure to bump image version in .travis.yml.