csantanapr closed pull request #63: docker-compose: switch to download cli
remote
URL: https://github.com/apache/incubator-openwhisk-devtools/pull/63
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index 1f9ca78..7081ab0 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -10,6 +10,9 @@ DOCKER_KERNEL ?= $(shell docker version --format
"{{.Server.KernelVersion}}")
RUNC_BINARY ?= $(shell if [[ $(DOCKER_KERNEL) == *-moby || $(DOCKER_KERNEL)
== *-boot2docker ]]; then (docker run --rm --privileged --pid=host debian
nsenter -t 1 -m -u -n -i sh -c "which runc || which docker-runc"); else (which
runc || which docker-runc); fi)
DOCKER_BINARY ?= $(shell if [[ $(DOCKER_KERNEL) == *-moby || $(DOCKER_KERNEL)
== *-boot2docker ]]; then (docker run --rm --privileged --pid=host debian
nsenter -t 1 -m -u -n -i sh -c "which docker"); else (which docker); fi)
+
+UNAME_STR ?= $(shell uname)
+
ifndef VERBOSE
.SILENT:
endif
@@ -19,7 +22,7 @@ endif
# 2. then it starts all components using docker-compose
# 3. it runs a sample hello-world function
# To stop and cleanup the environment use: make destroy
-quick-start: download build-cli run quick-start-pause hello-world
quick-start-info
+quick-start: download download-cli run quick-start-pause hello-world
quick-start-info
.PHONY: download
download:
@@ -48,10 +51,20 @@ docker:
cd $(PROJECT_HOME) && \
./gradlew distdocker -x :core:swift3Action:distDocker -x
:core:swiftAction:distDocker
-build-cli:
- echo "building the CLI tool ... "
- cd $(PROJECT_HOME) && \
- ./gradlew :tools:cli:distDocker
+download-cli:
+ echo "downloading the CLI tool ... "
+ if [ "$(UNAME_STR)" = "Darwin" ]; then \
+ echo "downloading cli for mac" ; \
+ curl -o $(PROJECT_HOME)/bin/wsk.zip -L
https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-mac-amd64.zip
; \
+ cd $(PROJECT_HOME)/bin ; \
+ unzip -o wsk.zip; \
+ elif [ "$(UNAME_STR)" = "Linux" ]; then \
+ echo "downloading cli for linux" ; \
+ curl -o $(PROJECT_HOME)/bin/wsk.tgz -L
https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-linux-amd64.tgz
; \
+ cd $(PROJECT_HOME)/bin ; \
+ tar -xf wsk.tgz ; \
+ fi;
+
.PHONY: run
run: check-required-ports setup start-docker-compose init-couchdb
init-whisk-cli
diff --git a/docker-compose/docker-compose.yml
b/docker-compose/docker-compose.yml
index bad9335..28249de 100644
--- a/docker-compose/docker-compose.yml
+++ b/docker-compose/docker-compose.yml
@@ -12,11 +12,16 @@ services:
# KAFKA SERVICES
zookeeper:
- image: wurstmeister/zookeeper
+ image: zookeeper:3.4
ports:
- "2181:2181"
+ - "2888:2888"
+ - "3888:3888"
+ environment:
+ ZOO_SERVERS: server.1=0.0.0.0:2888:3888
+ ZOO_MY_ID: 1
kafka:
- image: wurstmeister/kafka
+ image: wurstmeister/kafka:0.11.0.1
links:
- zookeeper
depends_on:
@@ -25,17 +30,19 @@ services:
- "9092:9092"
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
+ KAFKA_ADVERTISED_HOST_NAME: kafka
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/tmp/openwhisk/kafka:/kafka:rw
# WHISK CONTROLLER
controller:
- image: openwhisk/controller:latest
+ image: openwhisk/controller
command: /bin/sh -c "controller/bin/controller 0 >>
/logs/controller-local_logs.log 2>&1"
links:
- db:db.docker
- kafka:kafka.docker
+ - zookeeper:zookeeper.docker
depends_on:
- db
- kafka
@@ -46,8 +53,8 @@ services:
COMPONENT_NAME: controller
PORT: 8888
- KAFKA_HOST: kafka.docker
- KAFKA_HOST_PORT: 9092
+ KAFKA_HOSTS: kafka.docker:9092
+ ZOOKEEPER_HOSTS: zookeeper.docker:2181
DB_PROVIDER: CouchDB
DB_PROTOCOL: http
@@ -55,6 +62,9 @@ services:
DB_HOST: db.docker
DB_USERNAME: whisk_admin
DB_PASSWORD: some_passw0rd
+ CONFIG_akka_remote_netty_tcp_hostname: controller
+ CONFIG_akka_remote_netty_tcp_port: 2551
+ CONFIG_akka_remote_netty_tcp_bindPort: 2551
LOADBALANCER_HOST: ${DOCKER_COMPOSE_HOST}
LOADBALANCER_HOST_PORT: 443
@@ -62,10 +72,11 @@ services:
- ~/tmp/openwhisk/controller/logs:/logs
ports:
- "8888:8888"
+ - "2551:2551"
# WHISK INVOKER AGENT
invoker:
- image: openwhisk/invoker:latest
+ image: openwhisk/invoker
command: /bin/sh -c "/invoker/bin/invoker 0 >>
/logs/invoker-local_logs.log 2>&1"
privileged: true
pid: "host"
@@ -73,6 +84,7 @@ services:
links:
- db:db.docker
- kafka:kafka.docker
+ - zookeeper:zookeeper.docker
depends_on:
- db
- kafka
@@ -84,8 +96,8 @@ services:
SERVICE_NAME: invoker0
PORT: 8085
- KAFKA_HOST: kafka.docker
- KAFKA_HOST_PORT: 9092
+ KAFKA_HOSTS: kafka.docker:9092
+ ZOOKEEPER_HOSTS: zookeeper.docker:2181
DB_PROVIDER: CouchDB
DB_PROTOCOL: http
diff --git a/docker-compose/docker-whisk-controller.env
b/docker-compose/docker-whisk-controller.env
index f94817a..cd6ebbf 100644
--- a/docker-compose/docker-whisk-controller.env
+++ b/docker-compose/docker-whisk-controller.env
@@ -10,29 +10,62 @@ SERVICE_CHECK_TIMEOUT=2s
SERVICE_CHECK_INTERVAL=15s
DB_PREFIX=local_
-DB_WHISK_ACTIONS=local_whisks
+
DB_WHISK_AUTHS=local_subjects
+DB_WHISK_ACTIONS=local_whisks
+DB_WHISK_ACTIONS_DDOC=whisks.v2
DB_WHISK_ACTIVATIONS=local_activations
+DB_WHISK_ACTIVATIONS_DDOC=whisks.v2
+DB_WHISK_ACTIVATIONS_FILTER_DDOC=whisks-filters.v2
-KAFKA_NUMPARTITIONS=1
+KAFKA_DEFAULT_REPLICATION_FACTOR=1
+KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
+KAFKA_BROKER_ID=0
+KAFKA_HEAP_OPTS=-Xmx512m -Xms512m
+KAFKA_ADVERTISED_PORT=9092
+KAFKA_TOPICS_COMPLETED_RETENTION_MS=300000
+KAFKA_TOPICS_COMPLETED_RETENTION_BYTES=104857600
+KAFKA_TOPICS_COMPLETED_SEGMENT_BYTES=536870912
+KAFKA_REPLICATIONFACTOR=1
LIMITS_ACTIONS_INVOKES_PERMINUTE=60000
LIMITS_ACTIONS_INVOKES_CONCURRENT=5000
LIMITS_TRIGGERS_FIRES_PERMINUTE=60000
LIMITS_ACTIONS_INVOKES_CONCURRENTINSYSTEM=5000
LIMITS_ACTIONS_SEQUENCE_MAXLENGTH=20
+
+CONFIG_whisk_loadbalancer_blackboxFraction=0.1
+CONFIG_kamon_statsd_port=8125
+CONFIG_whisk_loadbalancer_invokerBusyThreshold=16
+CONFIG_akka_actor_provider=cluster
+
CONTROLLER_BLACKBOXFRACTION=0.10
+CONTROLLER_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=1098
+CONTROLLER_HA=False
+CONTROLLER_INSTANCES=1
+CONTROLLER_LOCALBOOKKEEPING=true
+
+METRICS_KAMON=False
+METRICS_LOG=True
+METRICS_KAMON_PORT=8125
LOADBALANCER_ACTIVATIONCOUNTBEFORENEXTINVOKER=10
LOADBALANCER_INVOKERBUSYTHRESHOLD=16
+INVOKER_NUMCORE=2
+INVOKER_CORESHARE=2
+INVOKER_USE_RUNC=False
+INVOKER_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=1098
INVOKER_INSTANCES=1
-CONTROLLER_INSTANCES=1
-WHISK_SYSTEM_KEY=whisk.system
-RUNTIMES_MANIFEST={"runtimes":{"nodejs":[{"kind":"nodejs","image":{"name":"nodejsaction"},"deprecated":true},{"kind":"nodejs:6","default":true,"image":{"name":"nodejs6action"}}],"python":[{"kind":"python","image":{"name":"python2action"}},{"kind":"python:2","default":true,"image":{"name":"python2action"}},{"kind":"python:3","image":{"name":"python3action"}}],"swift":[{"kind":"swift","image":{"name":"swiftaction"},"deprecated":true},{"kind":"swift:3","default":true,"image":{"name":"swift3action"}}],"java":[{"kind":"java","attached":{"attachmentName":"jarfile","attachmentType":"application/java-archive"},"sentinelledLogs":false,"requireMain":true,"image":{"name":"java8action"},"default":true}]}}
-CONTROLLER_LOCALBOOKKEEPING=true
AKKA_CLUSTER_HOST=localhost
AKKA_CLUSTER_SEED_NODES=[]
AKKA_CLUSTER_BIND_PORT=5221
AKKA_ACTOR_PROVIDER=local
+
+WHISK_SYSTEM_KEY=whisk.system
+RUNTIMES_MANIFEST={"defaultImagePrefix": "openwhisk", "defaultImageTag":
"latest", "blackboxes": [{"name": "dockerskeleton"}], "runtimes": {"python":
[{"deprecated": false, "kind": "python", "image": {"name": "python2action"}},
{"default": true, "deprecated": false, "kind": "python:2", "image": {"name":
"python2action"}}, {"deprecated": false, "kind": "python:3", "image": {"name":
"python3action"}}], "java": [{"kind": "java", "default": true, "deprecated":
false, "image": {"name": "java8action"}, "attached": {"attachmentType":
"application/java-archive", "attachmentName": "jarfile"}, "sentinelledLogs":
false, "requireMain": true}], "php": [{"default": true, "deprecated": false,
"kind": "php:7.1", "image": {"name": "action-php-v7.1"}}], "swift":
[{"deprecated": true, "kind": "swift", "image": {"name": "swiftaction"}},
{"deprecated": false, "kind": "swift:3", "image": {"name": "swift3action"}},
{"default": true, "deprecated": false, "kind": "swift:3.1.1", "image": {"name":
"action-swift-v3.1.1"}}], "nodejs": [{"deprecated": true, "kind": "nodejs",
"image": {"name": "nodejsaction"}}, {"default": true, "deprecated": false,
"kind": "nodejs:6", "image": {"name": "nodejs6action"}}, {"default": false,
"deprecated": false, "kind": "nodejs:8", "image": {"name":
"action-nodejs-v8"}}]}}
+
+
+
+
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services