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

Nuke Consul. #2452

Merged
merged 1 commit into from
Jul 31, 2017
Merged

Nuke Consul. #2452

merged 1 commit into from
Jul 31, 2017

Conversation

rabbah
Copy link
Member

@rabbah rabbah commented Jul 1, 2017

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.

@rabbah
Copy link
Member Author

rabbah commented Jul 1, 2017

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 db_prefix will not match.

@rabbah
Copy link
Member Author

rabbah commented Jul 1, 2017

@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.

@rabbah rabbah requested a review from ddragosd July 1, 2017 18:27
@rabbah rabbah added review Review for this PR has been requested and yet needs to be done. deployment labels Jul 1, 2017
@@ -142,7 +139,6 @@ class InvokerPool(

def publishStatus() = {
val json = invokerStatus.toMap.mapValues(_.asString).toJson
Copy link
Contributor

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() = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename to printStatus?

Copy link
Member Author

Choose a reason for hiding this comment

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

how about logStatus?

@ddragosd
Copy link
Contributor

ddragosd commented Jul 2, 2017

You're making it easier with this PR @rabbah 😄 ; we can merge this one instead, and drop #2277. I'll try it as soon as I get a chance.

@@ -15,7 +15,7 @@
mode: 0777
become: true

- name: (re)start controller
- name: (re)start controller "{{ db.whisk.actions }}"
Copy link
Contributor

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?

Copy link
Member Author

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
Copy link
Contributor

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")
Copy link
Contributor

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? 😆 )

Copy link
Member Author

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
Copy link
Contributor

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

@@ -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.
Copy link
Contributor

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 }}_"
Copy link
Member Author

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.

Copy link
Contributor

@ddragosd ddragosd left a 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
Copy link
Contributor

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 ?

Copy link
Member Author

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.

@ghost
Copy link

ghost commented Jul 18, 2017

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?

@markusthoemmes
Copy link
Contributor

markusthoemmes commented Jul 18, 2017

@DanLavine we need to prepare some things first before we can get this in. It's well on our radar.

@rabbah
Copy link
Member Author

rabbah commented Jul 18, 2017

Rebased to resolve conflicts.

We need to deal with this comment for docker-machine #2452 (comment).

@rabbah
Copy link
Member Author

rabbah commented Jul 19, 2017

Last fix broke Travis but I didn't investigate yet.

@rabbah
Copy link
Member Author

rabbah commented Jul 19, 2017

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 ...

@markusthoemmes
Copy link
Contributor

@rabbah the last travis was green already, I was aware of the issue.

@rabbah
Copy link
Member Author

rabbah commented Jul 20, 2017

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.

@rabbah
Copy link
Member Author

rabbah commented Jul 23, 2017

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.
@rabbah
Copy link
Member Author

rabbah commented Jul 31, 2017

pg3/934 🚀

Copy link
Contributor

@markusthoemmes markusthoemmes left a comment

Choose a reason for hiding this comment

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

LGTM

@markusthoemmes markusthoemmes merged commit e466e48 into apache:master Jul 31, 2017
houshengbo pushed a commit to houshengbo/openwhisk that referenced this pull request Aug 1, 2017
- 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.
@csantanapr csantanapr mentioned this pull request Sep 1, 2017
@rabbah rabbah deleted the xconsul branch September 4, 2017 12:51
houshengbo pushed a commit to houshengbo/openwhisk that referenced this pull request Nov 13, 2017
- 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.
houshengbo pushed a commit to houshengbo/openwhisk that referenced this pull request Nov 13, 2017
- 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.
houshengbo pushed a commit to houshengbo/openwhisk that referenced this pull request Nov 14, 2017
- 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.
BillZong pushed a commit to BillZong/openwhisk that referenced this pull request Nov 18, 2019
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment review Review for this PR has been requested and yet needs to be done.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants