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

ecsc

v0.2.0

Published

ECS Commander

Downloads

29

Readme

ECSC (ECS Commander)

ECSC is a package of command-line tools for Edge Container Stack of ACOINFO. You may use it to:

  • Create a container bundle.
  • Package a container bundle into an OCI container image tarball.

Get started

# install the package globally
npm install -g ecsc

# verify if the package has been installed
ecsc version

# print help document
ecsc help

Workflow

To create an container image, there are 3 steps to do:

  1. create an bundle (directory).
  2. prepare and copy your files into the bundle (directory).
  3. pack the bundle directory into an OCI image tar.

1. Create Container Bundle

Invoke create sub command without any option will start an interactive wizard:

$ ecsc create

   _____________ _____                              __       
  / __/ ___/ __// ___/__  __ _  __ _  ___ ____  ___/ /__ ____
 / _// /___\ \ / /__/ _ \/  ' \/  ' \/ _ `/ _ \/ _  / -_) __/
/___/\___/___/ \___/\___/_/_/_/_/_/_/\_,_/_//_/\_,_/\__/_/   

? What is name for the bundle (directory)? demo
? What is the architecture of the bundle? x86-64
? Would you mount and reuse JSRE from the container host? Yes
? What is the start parameter (process.args) of the image? javascript /apps/hello.js

After that bundle will be created in working directory, a default shell file /etc/startup.sh will also be created with 'shstack 200000'.

The create sub command also support CLI options (for automation scripting):

ecs create [options]  create bundle with options or start an interactive wizard. 

  -h | --help     print this help document
  -d directory    path to local OCI bundle directory to be created.
  -a arch         CPU architect to use, defaults to 'noarch' if not set, check
                  CPU Architect section for more information.
  -p args         container process (entrypoint) and its arguments.
  -j              if set, mount and use host JSRE files.
  -o              if set, overwrite exsiting bundle directory if exist.

CPU Architect
  noarch, x86-64, arm64, arm, riscv64, mips64, ppc, loongarch

Example
  ecs create -d ./demo -p '/bin/javascript /apps/demo.js'

2. Copy application files

This step requires manual file coping or editing. Application developer may layout the application files into <bundle>/rootfs accordingly.

Notes

  • the archtecture of binary files must be covered by those set in step 1.
  • application entrypoint should be the same as process.args set in step 1.

3. Package bundle into OCI image

$ ecsc pack <bundle> [-t name[:tag]] [tarball_path]
  • bundle is the container bundle directory to pack from.
  • name[:tag] container image name and tag, defaults to 'bundle:latest'.
  • tarball_path optional tarball file name, defaults to 'bundle.arch.tar'.

For example, to package the 'demo' bundle created in step 1:

# below command will pack the 'demo' bundle directory and create a 'demo.tar'
# with 'demo:latest' as it name and tag, in current working directory
ecsc pack ./demo

Notice:

In addition to the above ecsc interactions, you can also use the Ecsfile tool to package images. For details, see Ecsfile User Guide