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

Enable Standalone User Event Dev mode #4680

Merged
merged 2 commits into from Oct 15, 2019

Conversation

chetanmeh
Copy link
Member

With #4656 support was added in standalone mode to launch the User Event service along with required Prometheus and Grafana service. This PR adds support for reusing an existing user-event service (say running with IDE) for faster local developement

Description

To enable fast local development of user-event service the Standalone OpenWhisk now support connecting to an existing running service instead of launching a new one via Docker

First launch the standalone server with Kafka and pass the port where user-event service would be running (9095 by default)

java -jar openwhisk-standalone.jar --dev-user-events-port 9095 --kafka --kafka-ui

Then launch the org.apache.openwhisk.core.monitoring.metrics.Main via IDE with env set to KAFKA_HOSTS=localhost:9092

After this one can do normal action invocation and see metrics appear in Grafana

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

Copy link
Contributor

@selfxp selfxp left a comment

Choose a reason for hiding this comment

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

👍

--dev-mode Developer mode speeds up the startup by
disabling preflight checks and avoiding
explicit pulls.
--dev-user-events-port <arg> Specify the port for the user-event
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to have optional and default to 9095? If user-events is run with an IDE, it will start on this port by default.

Copy link
Member Author

Choose a reason for hiding this comment

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

Tried to support that but scallop arg parser does not support it. If I specify --dev-user-events-port then need to provide an explicit value otherwise it gives an error like below

[openwhisk] Error: Bad arguments for option 'dev-user-events-port': '' - you should provide exactly one argument for this option

@codecov-io
Copy link

codecov-io commented Oct 12, 2019

Codecov Report

Merging #4680 into master will decrease coverage by 4.68%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4680      +/-   ##
==========================================
- Coverage   82.95%   78.26%   -4.69%     
==========================================
  Files         194      194              
  Lines        8728     8728              
  Branches      607      607              
==========================================
- Hits         7240     6831     -409     
- Misses       1488     1897     +409
Impacted Files Coverage Δ
...core/database/cosmosdb/RxObservableImplicits.scala 0% <0%> (-100%) ⬇️
...ore/database/cosmosdb/cache/CacheInvalidator.scala 0% <0%> (-100%) ⬇️
...core/database/cosmosdb/CosmosDBArtifactStore.scala 0% <0%> (-96.17%) ⬇️
...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala 0% <0%> (-94.74%) ⬇️
...sk/core/database/cosmosdb/CosmosDBViewMapper.scala 0% <0%> (-92.6%) ⬇️
...e/database/cosmosdb/cache/ChangeFeedListener.scala 0% <0%> (-86.67%) ⬇️
...e/database/cosmosdb/cache/KafkaEventProducer.scala 0% <0%> (-76.48%) ⬇️
...whisk/core/database/cosmosdb/CosmosDBSupport.scala 0% <0%> (-74.08%) ⬇️
...a/org/apache/openwhisk/common/ExecutorCloser.scala 0% <0%> (-66.67%) ⬇️
...abase/cosmosdb/CosmosDBArtifactStoreProvider.scala 7.69% <0%> (-50%) ⬇️
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88725d9...1c69aa1. Read the comment docs.

Co-Authored-By: rodric rabbah <rodric@gmail.com>
@chetanmeh chetanmeh merged commit 82172d3 into apache:master Oct 15, 2019
BillZong pushed a commit to BillZong/openwhisk that referenced this pull request Nov 18, 2019
* Add user event dev mode
Co-Authored-By: rodric rabbah <rodric@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants