Description
This is a simple utility that takes JSON input from
node-metadata
, and converts it
to ImageStream
JSON for OpenShift.
See the OpenShift documentation for more information about using the output from this tool to customize your Node.js runtime on OpenShift/Kubernetes.
Usage
You'll need node-metadata
and this package installed.
Then you can just pipe the output from node-metadata
into node-image-stream
to generate JSON
suitable for import into OpenShift.
$ npm install -g node-image-stream $ node-image-stream --helpUsage: node-image-stream [OPTIONS] [ARGS] Options: -f, --file FILE A file to process -i, --image STRING The image name -h, --help Display help and usage details $ npm install -g node-metadata $ node-metadata --help Usage: node-metadata [options] Options: -h, --help output usage information -V, --version output the version number -i --images Indicates what images to show. $ node-metadata -i 6 8 | node-image-stream -i bucharestgold/centos7-s2i-nodejs
This will print to STDOUT
. You can redirect to a file if you want:
$ node-metadata -i 6 8 | node-image-stream -i bucharestgold/centos7-s2i-nodejs > image-streams.json
Or you can read input from a file.
$ node-image-stream -i bucharestgold/centos7-s2i-nodejs -f ../centos7-s2i-nodejs/releases.json
The output will look something like this. Note that the image name provided on the command line should be resolvable to a docker image in a registry accessible to OpenShift.