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

@cumulus-ce/api

v0.0.2

Published

Lambda functions for handling all daac's API operations

Downloads

8

Readme

@cumulus-ce/api

CircleCI

An API for the Cumulus Framework

This module build the Cumulus API for the Cumulus framework. It uses a combination of AWS services to create an API interface for configuring, managing and monitoring the Cumulus framework.

For the full documentation of the API see: https://cumulus-nasa.github.io/cumulus-api

Config

Includes the Kes configuration files needed for the deployment of the Api:

  • config/lambdas.yml: Includes that Lambdas that do internal Api related tasks such as listening to SNS events or consuming SQS queues
  • config/api_v1.yml: Includes all the Api endpoints and is versioned. Future versions of the Api should duplicate and rename this file
  • config/distribution.yml: Includes config needed for the distribution endpoint that handles file downloads with EarthLogin

Command Line Interface

A command line interface is available to provide some additional API functionality. To see the available commands, install the Cumulus API package and run cumulus-api --help.

Reindexing Elasticsearch Indices

Reindexing is available via the command line tool. Cumulus uses index aliases to allow reindexing with no downtime. When using the reindex functionality, a new index will be created and all of the data will be indexed to the new index. When the operation is complete, the user can choose to switch to using the new index and delete the old index after verifying the new index.

The Elasticsearch commands require a host to be specified. Your host can be found in AWS by going to the Elasticsearch Service and choosing your domain. The endpoint is the host. You can view your indices here as well on the indices tab.

Reindex

The reindex command creates a new index and reindexes the source index to the new, destination index.

An alias should not be specified unless you have a specific alias configured. If a source index is not specified, it will default to the index from the alias. If you want to name the destination index something particular, you can specify a name, otherwise the destination index name will default to 'cumulus-year-month-day' with today's date.

cumulus-api reindex --help

  Usage: reindex [options]

  Reindex elasticsearch index to a new destination index

  Options:

    -a, --index-alias <indexAlias>    AWS Elasticsearch index alias (default: cumulus-alias)
    --host <host>                     AWS Elasticsearch host (default: null)
    -s, --source-index <sourceIndex>  Index to reindex (default: null)
    -d, --dest-index <destIndex>      Name of the destination index, should not be an existing index. Will default to an index named with today's date (default: null)
    -h, --help                        output usage information

Get Status

Retrieves the status of the Elasticsearch reindex tasks. If empty, there are no running tasks and reindexing is complete.

cumulus-api status --help

  Usage: status [options]

  Get the status of the reindex tasks for the given host

  Options:

    --host <host>  AWS Elasticsearch host (default: null)
    -h, --help     output usage information

Complete Reindex

When the reindexing operation is complete, you can choose to switch your Cumulus deployment to use the new index. Specify a source index and destination index. You can find both of these in AWS, our output from your reindex command.

cumulus-api complete-reindex --help

  Usage: complete-reindex [options]

  Switch to using the new index (destination index) instead of the source index.

  Options:

    -a, --index-alias <indexAlias>    AWS Elasticsearch index alias (default: cumulus-alias)
    --host <host>                     AWS Elasticsearch host (default: null)
    -s, --source-index <sourceIndex>  Index to switch from and no longer used (default: null)
    -d, --dest-index <destIndex>      Index to be aliased and used as the elasticsearch index for Cumulus (default: null)
    -h, --help                        output usage information

What is Cumulus?

Cumulus is a cloud-based data ingest, archive, distribution and management prototype for NASA's future Earth science data streams.

Cumulus Documentation

Contributing

See Cumulus README

Running Tests

Running tests for kinesis-consumer depends on localstack. Once you have installed localstack, start it:

localstack start

Then you can run tests locally via:

LOCALSTACK_HOST=localhost IS_LOCAL=true npm run test