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

@chimpwizard/lab

v1.0.2

Published

Vagrant lab

Downloads

2

Readme

Lab

by: иÐгü
email: [email protected]
date: 10.1.2018
version: draft

One of the challenges for the developers when building scalable applications is to get an environment as close to the real production environment. The purpose of this library is to provide an easy mechanism to provision a cluster that can be use locally to test contenarized applications.

The implementation

The lab is provisioned usig vagrant encapsulating the complexity thru an easy to use cli.

The vagrant file:

# -*- mode: ruby -*-
# vi: set ft=ruby :
#^syntax detection


VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.8.1"
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'

#
# Order matters b/c we need master kube.config on console
#
servers=[
  { :hostname => "master1", :ip => "172.10.10.20" },
  { :hostname => "console", :ip => "172.10.10.10" },
  { :hostname => "node1",   :ip => "172.10.10.30" },
  { :hostname => "node2",   :ip => "172.10.10.40" }
]

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  servers.each do |machine|
    config.vm.define machine[:hostname] do |node|
      node.vm.box = "bento/ubuntu-16.04"

      node.vm.hostname = machine[:hostname]
      node.vm.network "private_network", ip:machine[:ip]

      node.vm.provider :virtualbox do |vb|
        vb.memory=2048  # 4096
        vb.cpus = 1     # 4
      end

      if node.vm.hostname == "console"
        node.vm.synced_folder ".", "/home/app", owner: "vagrant", group: "vagrant"
        node.vm.provision "file", source: "./scripts", destination: "$HOME/scripts"
        node.vm.provision "file", source: "./samples", destination: "$HOME/samples"
        node.vm.provision "shell", privileged:false, path:"./scripts/vagrant/setup.sh", args:["#{servers[0][:ip]}","#{ENV['PLATFORM']}"]
      end

      if node.vm.hostname != "console"
        node.vm.provision "file", source: "./scripts", destination: "$HOME/scripts"
        node.vm.provision "shell", privileged:false, path:"./scripts/vagrant/setup.sh", args:["#{servers[0][:ip]}","#{ENV['PLATFORM']}"]
      end
    end
  end

end

Prerequisites to run the code

Quickstart

First you need to install the cli

npm install -g @chimpwizard/lab

to start the cluster

lab up --platform [swarm|k8s]

to connect to the console

lab ssh

to clean up your machine

lab down

Some references while doing this

  • https://www.vagrantup.com/docs/provisioning/shell.html
  • https://app.vagrantup.com/boxes/search
  • https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
  • https://github.com/helm/charts/tree/master/stable/mysql/templates
  • https://stackoverflow.com/questions/48556971/unable-to-install-kubernetes-charts-on-specified-namespace
  • https://github.com/kubernetes/dashboard/wiki/Installation
  • https://letsencrypt.org/getting-started/
  • https://github.crookster.org/Kubernetes-Ubuntu-18.04-Bare-Metal-Single-Host/
  • https://mherman.org/blog/setting-up-a-kubernetes-cluster-on-ubuntu/
  • https://github.com/kubernetes/kubeadm/issues/980
  • https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#master-isolation
  • http://cidr.xyz
  • https://www.ipaddressguide.com/cidr
  • https://github.com/oracle/vagrant-boxes/blob/master/Kubernetes/Vagrantfile
  • https://github.com/rootsongjc/kubernetes-vagrant-centos-cluster/blob/master/Vagrantfile
  • https://stackoverflow.com/questions/14124234/how-to-pass-parameter-on-vagrant-up-and-have-it-in-the-scope-of-vagrantfile
  • https://stackoverflow.com/questions/42718527/vagrant-up-command-throwing-ssl-error

Additional improvements

  • Add an additional feature to be able to specify the host OS environment
lab up --os [ubuntu|centos|debian|rhel|windows]