Git Product home page Git Product logo

nodeshift-archived / centos7-s2i-nodejs Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 55.0 479 KB

DEPRECATED OpenShift S2I builder images for Node.js ✨

License: Apache License 2.0

Makefile 4.68% Shell 76.11% JavaScript 6.82% TypeScript 0.54% Python 0.43% C++ 2.03% Dockerfile 9.38%
builder-image containers devops docker docker-image docker-image-builder kubernetes minishift node nodejs openshift openshift-origin redhat s2i

centos7-s2i-nodejs's People

Contributors

bparees avatar crmarques avatar danbev avatar david-martin avatar gabemontero avatar gastaldi avatar grdryn avatar helio-frota avatar lance avatar lholmquist avatar liangxia avatar siamaksade avatar sspeiche avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

centos7-s2i-nodejs's Issues

should we remove save-artifacts step?

The restore-artifacts step of our assemble script which will restore npm dependencies is intended to make redeployments quicker because we don't need to resinstall the dependencies on every build. However, with the permission handling that openshift uses, and the fact that users may indeed be doing things during the run phase which need to write to the node_modules directory, this seems to be causing more problems than it's worth. For example: #92

I think we should consider removing this optimization from the builder image.

remove README.md from branches other than master

It's not reasonable to maintain the correct version numbers in README.md across all branches, and it's only really relevant in master since we use it to auto-populate the Docker hub page for this image.

Remove automated builds

Now that we are being more deliberate about things, we should not be publishing with every push to github. Autobuilds in Docker Cloud should be disabled.

remove releases.json

This is an artifact from earlier that is no longer used. It should be removed from master, 8.x and 9.x

Bump to 8.9.4-4 to address permission issues

New Node.js minor version bump

Use this issue template to report a minor version bump in Node.js.

New Node.js version number: 8.9.4-4

Tasks

Check out the branch for whatever version is being updated. E.g.

git checkout v8.x

All of the following tasks occur on this branch.

  • Ensure a published node-rpm for this version exists.
  • Update versions.mk with the correct version number for NODE_VERSION and NPM_VERSION (not relevant).
  • Update releases.json and image-streams.centos7.json with new version information. (not relevant).
node-metadata -i <major-version> | jq '.' > releases.json
node-image-stream -f releases.json -i bucharestgold/centos7-s2i-nodejs > image-streams.centos7.json
  • Ensure that make all passes successfully.
  • Tag the new release: git tag -s -m 'Update to Node.js version 8.10.0' v8.10.0
  • Publish the release to docker hub (you will need to have DOCKER_USER and DOCKER_PASS in your environment).
make tag publish
  • Finally, push your changes to github: git push origin <branch> --follow-tags.

Fixes: #38

Can't resolve devDependencies when running npm scripts in container?

Hey folks,

Not exactly sure if this is user error, something I've missed, or a bug... but... here goes:

Essentially I am having trouble getting an S2I build to run because some things seem to be missing, and I'm not sure why.

The image build actually succeeds, but when the node app actually spins up and starts running NPM_RUN scripts, it fails to find things like "rimraf" and "cpy" which are specified as devDependencies in the package.json file. I've even tried manually running npm install in the container, as well.

git version 2.9.3
Environment: 
	DEV_MODE=false
	NODE_ENV=production
	DEBUG_PORT=5858
Running as user uid=1000140000 gid=0(root) groups=0(root),1000140000
Launching via npm...
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart:openshift: [email protected]
npm info lifecycle [email protected]~start:openshift: [email protected]
> [email protected] start:openshift /opt/app-root/src
> npm run setup && npm run build:prod
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~presetup: [email protected]
npm info lifecycle [email protected]~setup: [email protected]
> [email protected] setup /opt/app-root/src
> npm install
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm http fetch GET 200 https://registry.npmjs.org/rhoaster  172ms
npm http fetch GET 200 https://registry.npmjs.org/nodeshift  179ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-config-loader  38ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client  38ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client/-/openshift-rest-client-1.1.1.tgz  34ms
npm http fetch GET 200 https://registry.npmjs.org/yargs  57ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-config-loader  81ms
npm http fetch GET 200 https://registry.npmjs.org/git-repo-info  88ms
npm http fetch GET 200 https://registry.npmjs.org/js-yaml  89ms
npm http fetch GET 200 https://registry.npmjs.org/chalk  94ms
npm http fetch GET 200 https://registry.npmjs.org/find-up  31ms
npm http fetch GET 200 https://registry.npmjs.org/cliui  32ms
npm http fetch GET 200 https://registry.npmjs.org/string-width  24ms
npm http fetch GET 200 https://registry.npmjs.org/which-module  28ms
npm http fetch GET 200 https://registry.npmjs.org/yargs-parser  29ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client  126ms
npm http fetch GET 200 https://registry.npmjs.org/rimraf  128ms
npm http fetch GET 200 https://registry.npmjs.org/tar  129ms
npm http fetch GET 200 https://registry.npmjs.org/esprima  35ms
npm http fetch GET 200 https://registry.npmjs.org/ansi-styles  38ms
npm http fetch GET 200 https://registry.npmjs.org/locate-path  34ms
npm http fetch GET 200 https://registry.npmjs.org/supports-color  39ms
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi  26ms
npm http fetch GET 200 https://registry.npmjs.org/os-locale  87ms
npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point  25ms
npm http fetch GET 200 https://registry.npmjs.org/camelcase  25ms
npm http fetch GET 200 https://registry.npmjs.org/chownr  34ms
npm http fetch GET 200 https://registry.npmjs.org/fs-minipass  36ms
npm http fetch GET 200 https://registry.npmjs.org/minipass  36ms
npm http fetch GET 200 https://registry.npmjs.org/minizlib  33ms
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer  34ms
npm http fetch GET 200 https://registry.npmjs.org/yallist  35ms
npm http fetch GET 200 https://registry.npmjs.org/p-locate  29ms
npm http fetch GET 200 https://registry.npmjs.org/glob  31ms
npm http fetch GET 200 https://registry.npmjs.org/path-exists  25ms
npm http fetch GET 200 https://registry.npmjs.org/has-flag  41ms
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex  41ms
npm http fetch GET 200 https://registry.npmjs.org/execa  41ms
npm http fetch GET 200 https://registry.npmjs.org/mem  39ms
npm http fetch GET 200 https://registry.npmjs.org/p-limit  26ms
npm http fetch GET 200 https://registry.npmjs.org/npm-run-path  27ms
npm http fetch GET 200 https://registry.npmjs.org/mimic-fn  28ms
npm http fetch GET 200 https://registry.npmjs.org/get-stream  29ms
npm http fetch GET 200 https://registry.npmjs.org/p-try  25ms
npm http fetch GET 200 https://registry.npmjs.org/p-finally  31ms
npm http fetch GET 200 https://registry.npmjs.org/strip-eof  31ms
npm http fetch GET 200 https://registry.npmjs.org/cross-spawn  32ms
npm http fetch GET 200 https://registry.npmjs.org/path-key  23ms
npm http fetch GET 200 https://registry.npmjs.org/shebang-command  22ms
npm http fetch GET 200 https://registry.npmjs.org/shebang-regex  19ms
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
npm info linkStuff [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
> [email protected] postinstall /opt/app-root/src
> echo 'All done!'
All done!
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN [email protected] requires a peer of @angular/core@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/router@^3.0.0 but none is installed. You must install peer dependencies yourself.
up to date in 2.952s
┌───────────────────────────────────────────────────────────────┐
│                    npm update check failed                    │
│              Try running with sudo or get access              │
│             to the local update config store via              │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm info ok 
npm info lifecycle [email protected]~postsetup: [email protected]
┌───────────────────────────────────────────────────────────────┐
│                    npm update check failed                    │
│              Try running with sudo or get access              │
│             to the local update config store via              │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm info ok 
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prebuild:prod: [email protected]
> [email protected] prebuild:prod /opt/app-root/src
> npm run clean-and-copy
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preclean-and-copy: [email protected]
npm info lifecycle [email protected]~clean-and-copy: [email protected]
> [email protected] clean-and-copy /opt/app-root/src
> npm run clean-dist && npm run copy-files
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preclean-dist: [email protected]
npm info lifecycle [email protected]~clean-dist: [email protected]
> [email protected] clean-dist /opt/app-root/src
> rimraf dist
sh: rimraf: command not found
npm info lifecycle [email protected]~clean-dist: Failed to exec clean-dist script
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] clean-dist: `rimraf dist`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] clean-dist script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐
│                    npm update check failed                    │
│              Try running with sudo or get access              │
│             to the local update config store via              │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_057Z-debug.log
npm info lifecycle [email protected]~clean-and-copy: Failed to exec clean-and-copy script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clean-and-copy: `npm run clean-dist && npm run copy-files`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] clean-and-copy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐
│                    npm update check failed                    │
│              Try running with sudo or get access              │
│             to the local update config store via              │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_105Z-debug.log
npm info lifecycle [email protected]~prebuild:prod: Failed to exec prebuild:prod script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prebuild:prod: `npm run clean-and-copy`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] prebuild:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐
│                    npm update check failed                    │
│              Try running with sudo or get access              │
│             to the local update config store via              │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_142Z-debug.log
npm info lifecycle [email protected]~start:openshift: Failed to exec start:openshift script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start:openshift: `npm run setup && npm run build:prod`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start:openshift script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐
│                    npm update check failed                    │
│              Try running with sudo or get access              │
│             to the local update config store via              │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_180Z-debug.log

I'm not a node expert so I'm a bit at a loss.

This is the repo: https://github.com/snowdrop/snowdrop-site-angular (deployment instructions I'm using are in the readme.)

These are the commands to run the S2I build that I'm using:

find . | grep openshiftio | grep application | xargs -n 1 oc apply -f
oc new-app --template=snowdrop-site-angular

Any insight would be appreciated!

Permission issues when running NODE_ENV=development and DEV_MODE=true

i'm working on this nodeshift issue, nodeshift/nodeshift#208 to get buildConfig env vars, so i set NODE_ENV=development in my buildConfig and the build phase works fine with installing dev deps.

But during the pod deploy, i get permission issues now, when trying to load with nodemon(since DEV_MODE=true is set because of the development node env)

screen shot 2018-03-27 at 8 49 01 am

i thought by moving https://github.com/bucharest-gold/centos7-s2i-nodejs/blob/master/s2i/assemble#L61 down a little, it would fix it. but i'm either doing something wrong, which is very possible, or that wasn't the problem

image stream import does not appear in the catalog

When importing the image-streams.centos7.json file as described in README.md, the image stream is imported in to the minishift and/or openshift cluster, but it is no longer displayed in the web UI as a part of the catalog.

This behavior exists for both minishift and OpenShift Online.

Once imported, the image will appear in the Builds->Images page, but not in the catalog.

screen shot 2017-12-19 at 5 52 41 pm

The documentation for the image stream file format is here: https://docs.openshift.com/container-platform/3.7/dev_guide/managing_images.html#writing-image-streams-for-s2i-builders

When attempting to create an ImageStream that is displayed in the catalog using the example YAML there, it also does not appear in the catalog. So this issue may be upstream?

Investigate and resolve npm warnings on image install

I0531 17:35:30.905920       1 sti.go:660] ┌───────────────────────────────────────────────────────────────┐
I0531 17:35:30.905932       1 sti.go:660] │                    npm update check failed                    │
I0531 17:35:30.905940       1 sti.go:660] │              Try running with sudo or get access              │
I0531 17:35:30.905951       1 sti.go:660] │             to the local update config store via              │
I0531 17:35:30.905957       1 sti.go:660] │ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
I0531 17:35:30.905965       1 sti.go:660] └───────────────────────────────────────────────────────────────┘

Add image-streams.json

Not sure the best way to do this. In origin-s2i-nodejs, we're using a node script here. I wonder if this could be a part of the tool you are currently working on @helio-frota

build error: non-zero (13) exit code from bucharestgold/centos7-s2i-nodejs:latest

When using mean-booster + nodeshift + rhoaster, depending on the configuration of the environment, we see an error.

locally oc cluster up (v3.9.0-alpha) + nodeshift

10:31 $ npm run openshift

> [email protected] openshift /home/hf/Desktop/mean-booster
> nodeshift --strictSSL=false --nodeVersion=8.x --build.forcePull=true

2018-02-19T13:31:43.199Z INFO loading configuration
2018-02-19T13:31:43.209Z INFO using namespace myproject at https://127.0.0.1:8443
2018-02-19T13:31:43.240Z INFO creating archive of package.json, README.md, server.js, app
2018-02-19T13:31:43.303Z INFO using existing build configuration mean-booster-s2i
2018-02-19T13:31:43.308Z INFO using existing image stream mean-booster
2018-02-19T13:31:43.308Z INFO uploading binary archive /home/hf/Desktop/mean-booster/tmp/nodeshift/build/archive.tar
2018-02-19T13:31:47.128Z INFO binary upload complete
2018-02-19T13:31:47.128Z INFO waiting for build to finish
2018-02-19T13:31:50.441Z TRACE ---> Installing application source
2018-02-19T13:31:50.443Z TRACE ---> Building your Node application from source
2018-02-19T13:31:50.443Z TRACE ---> Using 'npm install'
2018-02-19T13:32:56.579Z TRACE error: build error: non-zero (13) exit code from bucharestgold/centos7-s2i-nodejs:latest
2018-02-19T13:32:57.666Z ERROR build failed with message: Assemble script failed.
2018-02-19T13:32:57.667Z ERROR Assemble script failed.
2018-02-19T13:32:57.667Z ERROR Status code undefined

locally oc cluster up (v3.9.0-alpha) + rhoaster

10:19 $ npm run test:integration

> [email protected] test:integration /home/hf/Desktop/mean-booster
> tape test/integration/*.js | tap-spec

    No deployment found. Deploying...
    2018-02-19T13:19:32.004Z INFO loading configuration
    2018-02-19T13:19:32.007Z INFO using namespace myproject at https://127.0.0.1:8443
    2018-02-19T13:19:32.011Z INFO creating archive of package.json, README.md, server.js, app
    2018-02-19T13:19:32.052Z INFO creating build configuration mean-booster-s2i
    2018-02-19T13:19:32.052Z INFO Using s2i image bucharestgold/centos7-s2i-nodejs with tag latest
    2018-02-19T13:19:32.144Z INFO creating image stream mean-booster
    2018-02-19T13:19:32.151Z INFO uploading binary archive /home/hf/Desktop/mean-booster/tmp/nodeshift/build/archive.tar
    2018-02-19T13:19:35.840Z INFO binary upload complete
    2018-02-19T13:19:35.840Z INFO waiting for build to finish
    2018-02-19T13:19:59.454Z TRACE ---> Installing application source
    2018-02-19T13:19:59.486Z TRACE ---> Building your Node application from source
    2018-02-19T13:19:59.486Z TRACE ---> Using 'npm install'
    2018-02-19T13:21:01.685Z TRACE error: build error: non-zero (13) exit code from bucharestgold/centos7-s2i-nodejs:latest
2018-02-19T13:21:03.220Z ERROR build failed with message: Assemble script failed.
Error: Assemble script failed.
    at module.exports (/home/hf/Desktop/mean-booster/node_modules/rhoaster/node_modules/nodeshift/lib/binary-build.js:59:13)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Service unavailable
    at waitForDeployment (/home/hf/Desktop/mean-booster/node_modules/rhoaster/index.js:98:9)
    at <anonymous>
    ..................................................


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:integration: `tape test/integration/*.js | tap-spec`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test:integration script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/hf/.npm/_logs/2018-02-19T13_21_55_082Z-debug.log

The same code works on travis --> https://travis-ci.org/bucharest-gold/mean-booster/builds/343428482#L1589

Apparently we can not run the minishift in travis, so it would be interesting to be able to use the oc cluster up locally to be as close as possible to the CI.

Run npm run-script build during build

The current build does not execute npm run-script build
In order to make it work, you need to manually connect and execute it on the pod. New builds with new dependencies can fail because of that.

Using a post deployment hook returns `


container_linux.go:247: starting container process caused "exec: \"npm run-script build\": executable file not found in $PATH"
--


Which imagestreams to use?

Reading the README points to an imagestream that does not exist.
Furthermore, in the imagestreams folder there are 2 imagestreams for nodejs-centos, one in json and another one in yaml, which are not related.

fedora26 docker Registry: https://registry.fedoraproject.org/v1/

I'm with the same issue reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=1472311

After change (locally) this like https://github.com/bucharest-gold/centos7-s2i-nodejs/blob/master/Makefile#L40

from:

docker login --username...

to:

docker login docker.io --username...

Solves the problem of using registry.fedoraproject.org/v1 inside ~/.docker/config.json.
But I'm still getting the error message:

Login Succeeded
docker push bucharestgold/centos7-s2i-nodejs:8.x
The push refers to a repository [registry.fedoraproject.org/bucharestgold/centos7-s2i-nodejs]
4b0bc5b75983: Preparing 
cb96aea742c3: Preparing 
f1bbaf33b49c: Preparing 
4b1e8db0189a: Preparing 
34e7b85d83e4: Preparing 
unauthorized: authentication required
make: *** [Makefile:41: publish] Error 1

build: add docker tag for node version

We currently add tags for LTS names and top-level version numbers, e.g. 8.x, as well as latest. For completeness, we should add tags for the specific versions, e.g. 8.9.4.

Enable OpenShift Debugging

Enable a debugger to attach to a node.js application running in OpenShift.

ATM, you can set the following environment variables:

  • DEV_MODE=true
  • NODE_ENV=development

which will provide some access over 5858, but you should consider a different solution.

Release new image for 8.1.3

Released June 29, 2017.

{
  "version": "v8.1.3",
  "date": "2017-06-29",
  "files": [
    "aix-ppc64",
    "headers",
    "linux-arm64",
    "linux-armv6l",
    "linux-armv7l",
    "linux-ppc64le",
    "linux-x64",
    "linux-x86",
    "osx-x64-pkg",
    "osx-x64-tar",
    "src",
    "sunos-x64",
    "sunos-x86",
    "win-x64-exe",
    "win-x64-msi",
    "win-x86-exe",
    "win-x86-msi"
  ],
  "npm": "5.0.3",
  "v8": "5.8.283.41",
  "uv": "1.12.0",
  "zlib": "1.2.11",
  "openssl": "1.0.2l",
  "modules": "57",
  "lts": false
}

Reduce image size

Just a suggestion what do you think of looking for ways to reduce the images size.
I think it can be cool to have images sizes similar alpine-node they get sizes of ≈40MB. If we have that, it can dramatically increase deploy speed and transfer between node's.

  • I think we can create maybe a strip down Centos7 (139 MB) image. just leaving there dnf(package manager) and the native libraries required by nodejs (libc, libstdc++, xz, tar, wget) thats it :)

any thoughts ?
Thanks.

I did something diff/wrong

The version 8.3.0 is on dockerhub and workin, but I'm not following whats happened to the branch

14:36 $ git push origin origin/8.x 
Everything up-to-date

I'm trying to push the changes to the 8.x github branch

Bump to 9.4.0-4 to address permission issues

New Node.js minor version bump

Use this issue template to report a minor version bump in Node.js.

New Node.js version number: 9.4.0-4

Tasks

Check out the branch for whatever version is being updated. E.g.

git checkout v9.x

All of the following tasks occur on this branch.

  • Ensure a published node-rpm for this version exists.
  • Update versions.mk with the correct version number for NODE_VERSION and NPM_VERSION (not relevant).
  • Update releases.json and image-streams.centos7.json with new version information. (not relevant).
node-metadata -i <major-version> | jq '.' > releases.json
node-image-stream -f releases.json -i bucharestgold/centos7-s2i-nodejs > image-streams.centos7.json
  • Ensure that make all passes successfully.
  • Tag the new release: git tag -s -m 'Update to Node.js version 8.10.0' v8.10.0
  • Publish the release to docker hub (you will need to have DOCKER_USER and DOCKER_PASS in your environment).
make tag publish
  • Finally, push your changes to github: git push origin <branch> --follow-tags.

Fixes: #38

Signals not received because scripts are not running under pid 1

The way a node script is executed results in the node script not running under pid 1.
This is an example of the process table:
UID PID PPID C STIME TTY TIME CMD
default 1 0 0 07:14 ? 00:00:00 /usr/bin/scl enable rh-git29 --
default 7 1 0 07:14 ? 00:00:00 /bin/bash /var/tmp/scl2s24MJ
default 10 7 1 07:14 ? 00:00:00 node svc.js

When a container is killed docker will send the SIGTERM signal to pid 1 in order to enable a graceful shutdown. However, because the script does not run under pid 1, this signal never reaches the script and the script cannot issue a graceful shutdown. This might not be an issue for lots of scripts, but for some, including mine, it is because it has to do some cleaning up activities before shutting down.

Auto publish new builds when base image is updated

Our docker file extends openshift/base-centos7. We need to automatically publish new images when this base image is updated.

This is currently possible in Docker Hub, but for whatever reason, if you already have a repository created in docker hub, you cannot convert it to have this auto linking. At the moment, docker cloud is doing our automated builds and pushing to docker hub, since this has been the published direction of those tools. However, docker cloud still does not have repository linking available.

Compare

Add .travis.yml and set up CI

We need to set up CI for this repo, we'll want to run 'make all' for each branch: 'master', 4.x, 5.x, 6.x and 7.x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.