[incubator-openwhisk-devtools] branch master updated: update SSL config for NGINX (#46)
This is an automated email from the ASF dual-hosted git repository. dragos pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git The following commit(s) were added to refs/heads/master by this push: new 28d1b48 update SSL config for NGINX (#46) 28d1b48 is described below commit 28d1b4829fe040ce887a9439ce4e6b9378aff893 Author: ddragosdAuthorDate: Mon Jul 31 20:12:32 2017 -0700 update SSL config for NGINX (#46) --- docker-compose/Makefile | 8 docker-compose/apigateway/conf/whisk-docker-compose.conf | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docker-compose/Makefile b/docker-compose/Makefile index 4f7d8d4..ce754c2 100644 --- a/docker-compose/Makefile +++ b/docker-compose/Makefile @@ -23,7 +23,7 @@ download: if [ "$(PROJECT_HOME)" = "./openwhisk-master" ]; then \ curl -O ./openwhisk-master.tar.gz -L https://api.github.com/repos/openwhisk/openwhisk/tarball/master > ./openwhisk-master.tar.gz; \ mkdir openwhisk-master; \ - tar -xvf ./openwhisk-master.tar.gz --strip 1 -C openwhisk-master; \ + tar -xf ./openwhisk-master.tar.gz --strip 1 -C openwhisk-master; \ else \ echo "Skipping downloading the code from git as PROJECT_HOME is not default:" $(PROJECT_HOME); \ fi @@ -64,7 +64,7 @@ check-required-ports: .PHONY: setup setup: mkdir -p ~/tmp/openwhisk/apigateway/ssl - cd $(PROJECT_HOME)/ansible/roles/nginx/files/ && ./genssl.sh $(DOCKER_HOST_IP) + cd $(PROJECT_HOME)/ansible/roles/nginx/files/ && ./genssl.sh $(DOCKER_HOST_IP) server cp $(PROJECT_HOME)/ansible/roles/nginx/files/*.pem ~/tmp/openwhisk/apigateway/ssl cp -r ./apigateway/* ~/tmp/openwhisk/apigateway/ @@ -74,7 +74,7 @@ restart: stop rm start-docker-compose .PHONY: restart-controller restart-controller: DOCKER_COMPOSE_HOST=$(DOCKER_HOST_IP) DOCKER_REGISTRY=$(DOCKER_REGISTRY) DOCKER_IMAGE_PREFIX=$(DOCKER_IMAGE_PREFIX) docker-compose --project-name openwhisk restart controller 2>&1 > ~/tmp/openwhisk/docker-compose.log & - echo "waiting until the controller recognizes a healthy invoker ... " + echo "waiting for the invoker to be marked Healthy ... " until (curl --silent http://$(DOCKER_HOST_IP):/invokers | grep "up"); do printf '.'; sleep 5; done .PHONY: start-docker-compose @@ -98,7 +98,7 @@ init-couchdb: # make sure the src files are in a shared folder for docker mkdir -p ~/tmp/openwhisk rm -rf ~/tmp/openwhisk/src - rsync -av $(PROJECT_HOME)/* ~/tmp/openwhisk/src --exclude .git --exclude build --exclude tests + rsync -a $(PROJECT_HOME)/* ~/tmp/openwhisk/src --exclude .git --exclude build --exclude tests docker run --rm -v ~/tmp/openwhisk/src:/openwhisk -w /openwhisk/ansible \ --network="host" -t \ williamyeh/ansible:debian8 \ diff --git a/docker-compose/apigateway/conf/whisk-docker-compose.conf b/docker-compose/apigateway/conf/whisk-docker-compose.conf index 945ab96..51857d6 100644 --- a/docker-compose/apigateway/conf/whisk-docker-compose.conf +++ b/docker-compose/apigateway/conf/whisk-docker-compose.conf @@ -12,8 +12,8 @@ server { ssl_session_cacheshared:SSL:1m; ssl_session_timeout 10m; - ssl_certificate /etc/ssl/openwhisk-cert.pem; - ssl_certificate_key /etc/ssl/openwhisk-key.pem; + ssl_certificate /etc/ssl/openwhisk-server-cert.pem; + ssl_certificate_key /etc/ssl/openwhisk-server-key.pem; ssl_verify_client off; ssl_protocolsTLSv1 TLSv1.1 TLSv1.2; ssl_ciphers RC4:HIGH:!aNULL:!MD5; @@ -39,4 +39,3 @@ server { } } - -- To stop receiving notification emails like this one, please contact ['"commits@openwhisk.apache.org" '].
[incubator-openwhisk] branch master updated: Remove consul and registrator from the deployment. (#2452)
This is an automated email from the ASF dual-hosted git repository. markusthoemmes pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git The following commit(s) were added to refs/heads/master by this push: new e466e48 Remove consul and registrator from the deployment. (#2452) e466e48 is described below commit e466e48a8cb7bf44b358e38728f58360b8377f7e Author: rodric rabbahAuthorDate: Mon Jul 31 16:15:26 2017 -0400 Remove consul and registrator from the deployment. (#2452) - 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. --- ansible/README.md | 2 +- ansible/consul.yml | 10 - ansible/environments/distributed/group_vars/all| 4 - ansible/environments/distributed/hosts | 2 - ansible/environments/docker-machine/group_vars/all | 3 +- ansible/environments/docker-machine/hosts.j2.ini | 4 - ansible/environments/local/hosts | 4 - ansible/environments/mac/hosts | 4 - ansible/group_vars/all | 11 - ansible/openwhisk.yml | 2 - ansible/roles/consul/handlers/main.yml | 7 - ansible/roles/consul/tasks/clean.yml | 34 --- ansible/roles/consul/tasks/deploy.yml | 92 -- ansible/roles/consul/tasks/main.yml| 10 - ansible/roles/consul/templates/config.json.j2 | 15 - ansible/roles/controller/tasks/deploy.yml | 37 ++- ansible/roles/invoker/tasks/deploy.yml | 36 ++- ansible/tasks/writeWhiskProperties.yml | 2 +- ansible/templates/whisk.properties.j2 | 4 - .../src/main/scala/whisk/common/ConsulClient.scala | 325 - .../main/scala/whisk/common/ConsulKVReporter.scala | 68 - .../src/main/scala/whisk/core/WhiskConfig.scala| 43 +-- .../main/scala/whisk/core/controller/Backend.scala | 3 - .../scala/whisk/core/controller/Controller.scala | 1 - .../scala/whisk/core/controller/RestAPIs.scala | 7 - .../core/entitlement/ActivationThrottler.scala | 6 +- .../scala/whisk/core/entitlement/Entitlement.scala | 4 +- .../core/loadBalancer/InvokerSupervision.scala | 18 +- .../core/loadBalancer/LoadBalancerService.scala| 8 +- .../scala/whisk/core/container/ContainerPool.scala | 4 - .../whisk/core/container/ContainerUtils.scala | 3 +- .../containerpool/docker/DockerContainer.scala | 2 +- .../main/scala/whisk/core/invoker/Invoker.scala| 13 +- docs/about.md | 12 +- docs/reference.md | 1 - tests/src/test/scala/common/WhiskProperties.java | 8 - .../scala/whisk/consul/ConsulClientTests.scala | 198 - .../scala/whisk/consul/ConsulHealthTests.scala | 61 .../test/scala/whisk/core/WhiskConfigTests.scala | 23 -- .../docker/test/DockerContainerTests.scala | 2 +- .../controller/test/ControllerTestCommon.scala | 2 - .../test/InvokerSupervisionTests.scala | 42 +-- tools/build/redo | 4 - tools/health/isAlive | 14 - tools/health/kvstore | 144 - 45 files changed, 91 insertions(+), 1208 deletions(-) diff --git a/ansible/README.md b/ansible/README.md index 2d30324..176665f 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -204,7 +204,7 @@ cd ansible ansible-playbook -i environments/ controller.yml -e mode=clean ``` -**Caveat:** In distributed environments some components (e.g. Consul, Invoker, etc.) exist on multiple machines. So if you run a playbook to clean or deploy those components, it will run on **all** of the hosts targeted by the component's playbook. +**Caveat:** In distributed environments some components (e.g. Invoker, etc.) exist on multiple machines. So if you run a playbook to clean or deploy those components, it will run on **all** of the hosts targeted by the component's playbook. ### Cleaning an OpenWhisk Deployment diff --git a/ansible/consul.yml b/ansible/consul.yml deleted file mode 100644 index 0e81cd2..000 --- a/ansible/consul.yml +++ /dev/null @@ -1,10 +0,0 @@ -# This playbook deploys a Consul cluster for Openwhisk. -# Consul agents are installed on all hosts except the ansible host. -# Consul servers are installed on all hosts in the consul_servers group. - -- include: properties.yml - -- hosts: all:!ansible - roles: - - consul diff --git a/ansible/environments/distributed/group_vars/all b/ansible/environments/distributed/group_vars/all index dfea9dc..7d30485 100755 --- a/ansible/environments/distributed/group_vars/all +++
[incubator-openwhisk] branch master updated: Add rule status to CLI rule list (#2474)
This is an automated email from the ASF dual-hosted git repository. rabbah pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git The following commit(s) were added to refs/heads/master by this push: new 040bf98 Add rule status to CLI rule list (#2474) 040bf98 is described below commit 040bf9840788a93db0b21d8d498621e93262f626 Author: Jesus AlvaAuthorDate: Mon Jul 31 13:50:31 2017 -0500 Add rule status to CLI rule list (#2474) --- tests/src/test/scala/system/basic/WskRuleTests.scala | 20 +++- tools/cli/go-whisk-cli/commands/rule.go | 13 + tools/cli/go-whisk-cli/commands/util.go | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/tests/src/test/scala/system/basic/WskRuleTests.scala b/tests/src/test/scala/system/basic/WskRuleTests.scala index 5c2cd50..9cacc6c 100644 --- a/tests/src/test/scala/system/basic/WskRuleTests.scala +++ b/tests/src/test/scala/system/basic/WskRuleTests.scala @@ -19,7 +19,6 @@ package system.basic import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner - import common.TestHelpers import common.TestUtils import common.Wsk @@ -371,4 +370,23 @@ class WskRuleTests } } +it should "disable a rule and check its status is displayed when listed" in withAssetCleaner(wskprops) { +(wp, assetHelper) => +val ruleName = withTimestamp("ruleDisable") +val ruleName2 = withTimestamp("ruleEnable") +val triggerName = withTimestamp("ruleDisableTrigger") +val actionName = withTimestamp("ruleDisableAction") + +ruleSetup(Seq( +(ruleName, triggerName, (actionName, actionName, defaultAction)), +(ruleName2, triggerName, (actionName, actionName, defaultAction))), +assetHelper) + +wsk.rule.disable(ruleName) +val listOutput = wsk.rule.list().stdout.lines +listOutput.find(_.contains(ruleName2)).get should (include(ruleName2) and include("active")) +listOutput.find(_.contains(ruleName)).get should (include(ruleName) and include("inactive")) +wsk.rule.list().stdout should not include ("Unknown") +} + } diff --git a/tools/cli/go-whisk-cli/commands/rule.go b/tools/cli/go-whisk-cli/commands/rule.go index d5f258e..32ede97 100644 --- a/tools/cli/go-whisk-cli/commands/rule.go +++ b/tools/cli/go-whisk-cli/commands/rule.go @@ -388,6 +388,19 @@ var ruleListCmd = { map[string]interface{}{"name": getClientNamespace(), "err": err}) werr := whisk.MakeWskErrorFromWskError(errors.New(errStr), err, whisk.EXITCODE_ERR_GENERAL, whisk.DISPLAY_MSG, whisk.NO_DISPLAY_USAGE) return werr +} else { +//No errors, lets attempt to retrieve the status of each rule #312 +for index, rule := range rules { +ruleStatus, _, err := client.Rules.Get(rule.Name) +if err != nil { +errStr := wski18n.T("Unable to get status of rule '{{.name}}': {{.err}}", +map[string]interface{}{"name": rule.Name, "err": err}) +fmt.Println(errStr) +werr := whisk.MakeWskErrorFromWskError(errors.New(errStr), err, whisk.EXITCODE_ERR_GENERAL, whisk.DISPLAY_MSG, whisk.NO_DISPLAY_USAGE) +return werr +} +rules[index].Status = ruleStatus.Status +} } printList(rules) return nil diff --git a/tools/cli/go-whisk-cli/commands/util.go b/tools/cli/go-whisk-cli/commands/util.go index 3bd6cee..6a538b8 100644 --- a/tools/cli/go-whisk-cli/commands/util.go +++ b/tools/cli/go-whisk-cli/commands/util.go @@ -332,7 +332,7 @@ func printRuleList(rules []whisk.Rule) { fmt.Fprintf(color.Output, "%s\n", boldString("rules")) for _, rule := range rules { publishState := wski18n.T("private") -fmt.Printf("%-70s %s\n", fmt.Sprintf("/%s/%s", rule.Namespace, rule.Name), publishState) +fmt.Printf("%-70s %-20s %s\n", fmt.Sprintf("/%s/%s", rule.Namespace, rule.Name), publishState, rule.Status) } } -- To stop receiving notification emails like this one, please contact ['"commits@openwhisk.apache.org" '].