-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nuke Consul. #2452
Nuke Consul. #2452
Conversation
one issue found is that our configuration of the db run on "localhost" but the deployment of the containers is on the remote host which means the precomputed |
@ddragosd I didn't squash my last two commits in case they're helpful to you. I'm happy to abandon this pr as noted I'm trying to get on docker for mac and didn't want to deal with consul. |
@@ -142,7 +139,6 @@ class InvokerPool( | |||
|
|||
def publishStatus() = { | |||
val json = invokerStatus.toMap.mapValues(_.asString).toJson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line as well.
@@ -142,7 +139,6 @@ class InvokerPool( | |||
|
|||
def publishStatus() = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to printStatus
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about logStatus
?
@@ -15,7 +15,7 @@ | |||
mode: 0777 | |||
become: true | |||
|
|||
- name: (re)start controller | |||
- name: (re)start controller "{{ db.whisk.actions }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the db print is a "debug" statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes - will remove; will need to resolve the db prefix without consul; we were getting away with this undetected.
-e DOCKER_REGISTRY={{ docker_registry }} | ||
-e DOCKER_IMAGE_PREFIX={{ docker_image_prefix }} | ||
-e DOCKER_IMAGE_TAG={{ docker_image_tag }} | ||
-e INVOKER_CONTAINER_NETWORK=bridge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this was hardcoded to "bridge" before, was it? This needs to be configurable.
@@ -92,14 +92,13 @@ trait ContainerUtils { | |||
val cpuArg = Array("-c", cpuShare.toString) | |||
val memoryArg = Array("-m", s"${limits.memory.megabytes}m", "--memory-swap", s"${limits.memory.megabytes}m") | |||
val capabilityArg = Array("--cap-drop", "NET_RAW", "--cap-drop", "NET_ADMIN") | |||
val consulServiceIgnore = Array("-e", "SERVICE_IGNORE=true") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be changed in the new pool as well, see DockerContainer.scala
line 75 (you probably didn't get it as a match in your directory-wide "consul" search? 😆 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) thanks for the catch!!
docs/about.md
Outdated
@@ -81,13 +81,9 @@ The record of the action contains mainly the code to execute (shown above) and d | |||
|
|||
In this particular case, our action doesn’t take any parameters (the function’s parameter definition is an empty list), thus we assume we haven’t set any default parameters and haven’t sent any specific parameters to the action, making for the most trivial case from this point-of-view. | |||
|
|||
### Who’s there to invoke the action: Consul | |||
### Who’s there to invoke the action: Load balancer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make consistent use of capitalization: Load balancer vs Load Balancer
docs/reference.md
Outdated
@@ -212,7 +212,6 @@ The following packages are available to be used in the Node.js 6.9.1 environment | |||
- [cheerio v0.22.0](https://www.npmjs.com/package/cheerio) - Fast, flexible & lean implementation of core jQuery designed specifically for the server. | |||
- [cloudant v1.6.2](https://www.npmjs.com/package/cloudant) - This is the official Cloudant library for Node.js. | |||
- [commander v2.9.0](https://www.npmjs.com/package/commander) - The complete solution for node.js command-line interfaces. | |||
- [consul v0.27.0](https://www.npmjs.com/package/consul) - A client for Consul, involving service discovery and configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why touch this? It's a package installed in our Node.js runtime, which has nothing to do with our system's consul.
@@ -9,7 +9,7 @@ docker_dns: "" | |||
# a hostname that is resolved on the client, via /etc/hosts for example. | |||
whisk_api_localhost_name: "openwhisk" | |||
|
|||
db_prefix: docker_whisk_ | |||
db_prefix: "{{ ansible_user_id|lower }}_{{ ansible_hostname|lower }}_" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a change we might want to keep as hard coded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm trying to setup things locally and test this in the context of Docker for Mac.
One other thought I had was around ENV VARS: it's nice that we define them explicitly, one by one, as it makes everyone aware of breaking changes caused by new properties; the disadvantage is that developers need to add a new required property in 3 places. But I personally like this pain; any newly added property marked as required impacts Mesos, Kube, and docker-compose setups. Exposing props explicitly as ENV VARs seems a great approach from this point of view.
kafkaHost ++ | ||
consulServer ++ | ||
whiskVersion | ||
kafkaHost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we leaving whiskVersion
out ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it isn't used - so it's deadcode.
could add it back.
Hey all. I was just wondering what has happened to this PR? It seems like it would be greatly appreciated by everyone who does not want to heavily rely on Ansible to deploy OpenWhisk. After a couple weeks of sitting here, did it fall off of the radar? |
@DanLavine we need to prepare some things first before we can get this in. It's well on our radar. |
Rebased to resolve conflicts. We need to deal with this comment for docker-machine #2452 (comment). |
Last fix broke Travis but I didn't investigate yet. |
an invalid value, which appears to include a variable that is undefined. The error was: 'docker_image_tag' is undefined\n\nThe error appears to have been in ... |
@rabbah the last travis was green already, I was aware of the issue. |
pg3/896 🔵 NOTE: we need to address the db prefix issue - it will break docker-machine users. One option is to allow for the prefix to be hard coded for that environment. |
Rebased to resolve last round of conflicts - also address docker-machine issue in last unsquashed commit for review. |
Update controller config. Update params for invoker and clean up some deadcode. Hardcoded db prefix for docker-machine since db init runs on host not inside VM.
pg3/934 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Update controller config. - Update params for invoker and clean up some deadcode. - Hardcoded db prefix for docker-machine since db init runs on host not inside VM.
- Update controller config. - Update params for invoker and clean up some deadcode. - Hardcoded db prefix for docker-machine since db init runs on host not inside VM.
- Update controller config. - Update params for invoker and clean up some deadcode. - Hardcoded db prefix for docker-machine since db init runs on host not inside VM.
- Update controller config. - Update params for invoker and clean up some deadcode. - Hardcoded db prefix for docker-machine since db init runs on host not inside VM.
- Update controller config. - Update params for invoker and clean up some deadcode. - Hardcoded db prefix for docker-machine since db init runs on host not inside VM.
A quick attempt to strip consul - mostly because I don't want to understand why it doesn't deploy with docker-for-mac.
Need to adjust all the deployment parameters (maybe cherry picking from #2277 and merging PRs is the way to go.
Related to #2254..
@ddragosd FYI.