@cumulus/checksum
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
Checksum
The @cumulus/checksum
library provides checksum functionality used by Cumulus packages and tasks.
Currently the supported input includes file streams, and supported checksum algorithms include
cksum
and the algorithms available to the crypto
package, as documented here.
Usage
const fs = require('fs');
const { generateChecksumFromStream } = require('@cumulus/checksum');
const stream = fs.createReadStream('myDataFile.hdf');
const myCksum = generateChecksumFromStream('cksum', stream);
[v1.13.0] - 2019-5-20
PLEASE NOTE
CUMULUS-802 added some additional IAM permissions to support ECS autoscaling, so you will have to redeploy your IAM stack.
As a result of the changes for CUMULUS-1193, CUMULUS-1264, and CUMULUS-1310, you must delete your existing stacks (except IAM) before deploying this version of Cumulus.
If running Cumulus within a VPC and extended downtime is acceptable, we recommend doing this at the end of the day to allow AWS backend resources and network interfaces to be cleaned up overnight.
BREAKING CHANGES
-
CUMULUS-1228
- The default AMI used by ECS instances is now an NGAP-compliant AMI. This
will be a breaking change for non-NGAP deployments. If you do not deploy to
NGAP, you will need to find the AMI ID of the
most recent Amazon ECS-optimized AMI,
and set the
ecs.amiid
property in your config. Instructions for finding
the most recent NGAP AMI can be found using
these instructions.
-
CUMULUS-1310
- Database resources (DynamoDB, ElasticSearch) have been moved to an independent
db
stack.
Migrations for this version will need to be user-managed. (e.g. elasticsearch and dynamoDB).
Order of stack deployment is iam
-> db
-> app
. - All stacks can now be deployed using a single
config.yml
file, i.e.: kes cf deploy --kes-folder app --template node_modules/@cumulus/deployment/[iam|db|app] [...]
Backwards-compatible. For development, please re-run npm run bootstrap
to build new kes
overrides.
Deployment docs have been updated to show how to deploy a single-config Cumulus instance. params
have been moved: Nest params
fields under app
, db
or iam
to override all Parameters for a particular stack's cloudformation template. Backwards-compatible with multi-config setups.stackName
and stackNameNoDash
have been retired. Use prefix
and prefixNoDash
instead.- The
iams
section in app/config.yml
IAM roles has been deprecated as a user-facing parameter,
unless your IAM role ARNs do not match the convention shown in @cumulus/deployment/app/config.yml
- The
vpc.securityGroup
will need to be set with a pre-existing security group ID to use Cumulus in a VPC. Must allow inbound HTTP(S) (Port 443).
-
CUMULUS-1212
@cumulus/post-to-cmr
will now fail if any granules being processed are missing a metadata file. You can set the new config option skipMetaCheck
to true
to pass post-to-cmr without a metadata file.
-
CUMULUS-1232
@cumulus/sync-granule
will no longer silently pass if no checksum data is provided. It will use input
from the granule object to:
- Verify checksum if
checksumType
and checksumValue
are in the file record OR a checksum file is provided
(throws InvalidChecksum
on fail), else log warning that no checksum is available. - Then, verify synced S3 file size if
file.size
is in the file record (throws UnexpectedFileSize
on fail),
else log warning that no file size is available. - Pass the step.
-
CUMULUS-1264
- The Cloudformation templating and deployment configuration has been substantially refactored.
CumulusApiDefault
nested stack resource has been renamed to CumulusApiDistribution
CumulusApiV1
nested stack resource has been renamed to CumulusApiBackend
- The
urs: true
config option for when defining your lambdas (e.g. in lambdas.yml
) has been deprecated. There are two new options to replace it:
urs_redirect: 'token'
: This will expose a TOKEN_REDIRECT_ENDPOINT
environment variable to your lambda that references the /token
endpoint on the Cumulus backend APIurs_redirect: 'distribution'
: This will expose a DISTRIBUTION_REDIRECT_ENDPOINT
environment variable to your lambda that references the /redirect
endpoint on the Cumulus distribution API
-
CUMULUS-1193
- The elasticsearch instance is moved behind the VPC.
- Your account will need an Elasticsearch Service Linked role. This is a one-time setup for the account. You can follow the instructions to use the AWS console or AWS CLI here or use the following AWS CLI command:
aws iam create-service-linked-role --aws-service-name es.amazonaws.com
-
CUMULUS-802
- ECS
maxInstances
must be greater than minInstances
. If you use defaults, no change is required.
-
CUMULUS-1269
- Brought Cumulus data models in line with CNM JSON schema:
- Renamed file object
fileType
field to type
- Renamed file object
fileSize
field to size
- Renamed file object
checksumValue
field to checksum
where not already done. - Added
ancillary
and linkage
type support to file objects.
Added
Changed
Fixed