Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added npm scripts to automate running the workload #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

egalli
Copy link
Contributor

@egalli egalli commented Oct 27, 2017

I have added npm scripts to the package.json to start the server, mongodb, runspec, and everything at the same time with default setting. This should increase usability of the workload. All these changes also work in windows.

npm scripts:

  • npm run server: starts nodejs server
  • rpm run mongodb: creates a "mongodata" folder under the parent and starts mongodb in it
  • rpm run runspec: starts runspec
  • npm run start or npm start: all of the above at the same time

Note that this defaults to NODE_ENV=production, if you run in development mode, use npm run server:dev or npm run start:dev

@uttampawar
Copy link
Collaborator

@egalli That's great! Please provide some test verification data and issues observed in following scenarios?

  1. Single instance in 1 and 3-tier execution mode.
  2. Multiple instances in 1 and 3-tier execution mode.
  3. Any issues observed?
  4. How does this impact, steps/process described in the documentation (README.md)?
  5. Will there be any impact on our container related script/execution flow?

@egalli
Copy link
Contributor Author

egalli commented Oct 27, 2017

  1. I thought the point of this change was to be a quick way get started using default settings, not an all inclusive way to run the workload.
  2. see 1
  3. None that I have seen
  4. Those should still work, but npm start should be simpler for single/multiple instance in 1 tier execution
  5. No, those scripts still directly call node server-cluster.js

@uttampawar
Copy link
Collaborator

@priyankasprakash Please test these changes to,

  • verify if there are any or no issues.
  • Does this changes the war we run workload (Think about start-server.sh)

@priyankasprakash
Copy link
Contributor

@egalli I got these two issues when I try to run npm start.
Cannot find module 'bluebird'
Cannot find module 'cross-spawn'
Everything works fine when I run the client,server and mongodb separately.

@uttampawar This does change the way we run workload when we are running multiple instances. We will have to change the start-server script to incorporate these changes as the start server script has commands to start the mongodb and the server.

Copy link
Collaborator

@uttampawar uttampawar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@egalli Please address Priyanka's concern before I approve this change.

@egalli
Copy link
Contributor Author

egalli commented Dec 19, 2017

I can't seem to replicate @priyankasprakash issue, but I explicitly added the dependencies anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants