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

jacc

v0.0.23

Published

Just Another Cloud in the Cloud

Downloads

26

Readme

Jacc - Just Another Cloud in the Cloud

Jacc targets the following user case:

  • web applications running behind a load balancing proxy
  • efficient hosting of several compentents, typically a cluser of application server, caching servers etc. A database cluster can also be hosted or use a DBaaS with backups etc. pre-configured
  • ready for production use with the redundance and reliability this requires

Jacc is NOT a Heroku type architeture with support for remote deployment. You are required to login to the server that hosts the web applications.

Jacc is a private cloud built from standard components such as docker.io, hipache and redis-dns. Docker is a linux containers architecture and hipache a high perforamnce web proxy. redis-dns provides an internal DNS between containers. Docker and hipache are provided by the team behind the dotCloud service.

The goal is to provide an architecture suitable for hosting a variety of components on a limited amount of server. Examples of components could be web applications build in PHP/Java/NodeJS/Ruby/Python etc. It could also include databases, caching systems, queue management etc. The limit is really only what's runs on the Linux flavours that docker supports.

Installation

Pre-requiresites:

  • docker version 0.7.1
  • redis
  • NodeJS (preferabley managed with nvm)
  • Python
  • make - for development only

Installation:

  1. Install with sudo npm install jacc -g
  2. Install redis: sudo apt-get install -y redis-server
  3. Then install supervisord, either using a linux package manager or simply with python package manager: sudo apt-get install -y supervisor (or with sudo pip install supervisor but then you need to setup supervisor as a service yourself)
  4. Locate the jacc installation in node_modules (typically in /usr/lib/node_modules/jacc)
  5. Update the IP adress in the file JACC_HOME/etc/redis-dns-config.json with the IP adress of the docker bridge (do ifconfig|grep -A 1 docker).
  6. Update the command section in the files JACC_HOME/etc/supervisor/*.conf with the path to the jacc installation
  7. Copy the hipache and redis-dns config files for supervisor and restart sudo cp JACC_HOME/etc/supervisor/*.conf /etc/supervisor/conf.d/ && sudo supervisorctl reload
  8. Check that hipache and redis-dns started with sudo supervisorctl status

Setup containers:

  1. Do jacc add <IMAGE_ID> <URL> <internal port> <DNS> followed by ./jacc.sh update to add an image and start a container. hipache and redis-dns configuration will be updated at the same time
  • STARTING CONTAINERS HAVE NOT BEEN IMPLEMENTED YET, START MANUALLY WITH docker run -d -dns=IP IMAGE_ID
  1. jacc list shows the configuration and jacc status the running containers

docker configuration:

docker need to be configured to open up the HTTP API. The start script needs to include this flag DOCKER_OPTS=-H 127.0.0.1:4243. For ubuntu, this is changed in /etc/init/docker.conf. Now the docker command line tool needs the flag -H=tcp://127.0.0.1:4243. Create an alias for simplcity: alias docker='docker -H=tcp://127.0.0.1:4243'. Place this in your .profile etc.

Development

NOTE: The overall design principle for Jacc is to re-use what's already out there. Don't re-invent the wheel.

An easy way to get started quickly is to create a virtual machine using Vagrant. This repo has everything you need: https://github.com/colmsjo/docker. You can of course setup docker and the other required modules yourself.

Run make install to install everything in the current directory.

Jacc comes with a test suite. The first step when developing is to make sure that the test runs without any erros.

A number of environment variables needs to be set. You can for instance use the ./test/setenv.template file showed below:

export JACC_TEST_CONTAINERID=$abcdefghijkl
export JACC_TEST_URL="app1.jacc.local"
export JACC_TEST_PORT="80"
export JACC_TEST_DNS="app1.local"

Then do source ./test/setenv followed by make to kickoff the test suite.

Troubleshooting

  1. 'No running containers with ID: XXX' - This is most likely caused by a problem connecting to docker. Does docker ps and curl http://localhost:4243/containers/json show containers?