You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dg...@apache.org on 2021/05/14 19:06:35 UTC
[openwhisk-runtime-swift] branch master updated: Deploy OpenWhisk
system using as much configuration from the core repo as possible (#137)
This is an automated email from the ASF dual-hosted git repository.
dgrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-swift.git
The following commit(s) were added to refs/heads/master by this push:
new d724ec9 Deploy OpenWhisk system using as much configuration from the core repo as possible (#137)
d724ec9 is described below
commit d724ec93b7f0a2fde17f3e8630176fc6c41fa5bc
Author: David Grove <dg...@users.noreply.github.com>
AuthorDate: Fri May 14 15:06:27 2021 -0400
Deploy OpenWhisk system using as much configuration from the core repo as possible (#137)
Co-authored-by: Dominic Kim <st...@apache.org>
---
ansible/environments/local/group_vars/all | 81 -----------------------------
ansible/environments/local/hosts | 52 -------------------
ansible/files/runtimes.json | 84 +++++++++++++++++++++++++++++++
tools/travis/build.sh | 10 +---
tools/travis/deploy.sh | 10 ++--
5 files changed, 91 insertions(+), 146 deletions(-)
diff --git a/ansible/environments/local/group_vars/all b/ansible/environments/local/group_vars/all
deleted file mode 100644
index fa613d9..0000000
--- a/ansible/environments/local/group_vars/all
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-whisk_version_name: local
-openwhisk_tmp_dir: "{{ lookup('env', 'OPENWHISK_TMP_DIR')|default('/tmp', true) }}"
-config_root_dir: "{{ openwhisk_tmp_dir }}/wskconf"
-whisk_logs_dir: "{{ openwhisk_tmp_dir }}/wsklogs"
-docker_registry: ""
-docker_dns: ""
-runtimes_bypass_pull_for_local_images: true
-invoker_use_runc: "{{ ansible_distribution != 'MacOSX' }}"
-
-db_prefix: whisk_local_
-
-# Auto lookup to find the db credentials
-db_provider: "{{ lookup('ini', 'db_provider section=db_creds file={{ playbook_dir }}/db_local.ini') }}"
-db_username: "{{ lookup('ini', 'db_username section=db_creds file={{ playbook_dir }}/db_local.ini') }}"
-db_password: "{{ lookup('ini', 'db_password section=db_creds file={{ playbook_dir }}/db_local.ini') }}"
-db_protocol: "{{ lookup('ini', 'db_protocol section=db_creds file={{ playbook_dir }}/db_local.ini') }}"
-db_host: "{{ lookup('ini', 'db_host section=db_creds file={{ playbook_dir }}/db_local.ini') }}"
-db_port: "{{ lookup('ini', 'db_port section=db_creds file={{ playbook_dir }}/db_local.ini') }}"
-
-# API GW connection configuration
-apigw_auth_user: ""
-apigw_auth_pwd: ""
-apigw_host_v2: "http://{{ groups['apigateway']|first }}:{{apigateway.port.api}}/v2"
-
-invoker_allow_multiple_instances: true
-
-
-env_hosts_dir: "{{ playbook_dir }}/environments/local"
-
-skip_pull_runtimes: true
-runtimes_manifest:
- runtimes:
- nodejs:
- - kind: "nodejs:6"
- default: true
- image:
- name: "nodejs6action"
- deprecated: false
- swift:
- - kind: "swift:4.1"
- default: false
- image:
- name: "action-swift-v4.1"
- deprecated: false
- - kind: "swift:4.2"
- default: true
- image:
- name: "action-swift-v4.2"
- deprecated: false
- - kind: "swift:5.1"
- default: false
- image:
- name: "action-swift-v5.1"
- deprecated: false
- - kind: "swift:5.3"
- default: false
- image:
- name: "action-swift-v5.3"
- deprecated: false
-
- blackboxes:
- - name: "dockerskeleton"
-
-controller_protocol: "http"
diff --git a/ansible/environments/local/hosts b/ansible/environments/local/hosts
deleted file mode 100644
index 085f5d2..0000000
--- a/ansible/environments/local/hosts
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-; the first parameter in a host is the inventory_hostname
-
-; used for local actions only
-ansible ansible_connection=local
-
-[edge]
-172.17.0.1 ansible_host=172.17.0.1 ansible_connection=local
-
-[controllers]
-controller0 ansible_host=172.17.0.1 ansible_connection=local
-
-[kafkas]
-kafka0 ansible_host=172.17.0.1 ansible_connection=local
-
-[zookeepers:children]
-kafkas
-
-[invokers]
-invoker0 ansible_host=172.17.0.1 ansible_connection=local
-
-; db group is only used if db_provider is CouchDB
-[db]
-172.17.0.1 ansible_host=172.17.0.1 ansible_connection=local
-
-[elasticsearch:children]
-db
-
-[redis]
-172.17.0.1 ansible_host=172.17.0.1 ansible_connection=local
-
-[apigateway]
-172.17.0.1 ansible_host=172.17.0.1 ansible_connection=local
-
-[etcd]
-etcd0 ansible_host=172.17.0.1 ansible_connection=local
diff --git a/ansible/files/runtimes.json b/ansible/files/runtimes.json
new file mode 100644
index 0000000..dbc4f3b
--- /dev/null
+++ b/ansible/files/runtimes.json
@@ -0,0 +1,84 @@
+{
+ "description": [
+ "This file describes the different languages (aka. managed action runtimes) supported by the system",
+ "as well as blackbox images that support the runtime specification.",
+ "Only actions with runtime families / kinds defined here can be created / read / updated / deleted / invoked.",
+ "Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:10').",
+ "Each runtime family needs a default kind (default: true).",
+ "When removing or renaming runtime families or runtime kinds from this file, preexisting actions",
+ "with the affected kinds can no longer be read / updated / deleted / invoked. In order to remove or rename",
+ "runtime families or runtime kinds, mark all affected runtime kinds as deprecated (deprecated: true) and",
+ "perform a manual migration of all affected actions.",
+ "",
+ "This file is meant to list all stable runtimes supported by the Apache Openwhisk community."
+ ],
+ "runtimes": {
+ "nodejs": [
+ {
+ "kind": "nodejs:10",
+ "default": true,
+ "image": {
+ "prefix": "openwhisk",
+ "name": "action-nodejs-v10",
+ "tag": "nightly"
+ },
+ "deprecated": false,
+ "attached": {
+ "attachmentName": "codefile",
+ "attachmentType": "text/plain"
+ }
+ }
+ ],
+ "swift": [
+ {
+ "kind": "swift:4.2",
+ "default": false,
+ "image": {
+ "prefix": "testing",
+ "name": "action-swift-v4.2",
+ "tag": "latest"
+ },
+ "deprecated": false,
+ "attached": {
+ "attachmentName": "codefile",
+ "attachmentType": "text/plain"
+ }
+ },
+ {
+ "kind": "swift:5.1",
+ "default": false,
+ "image": {
+ "prefix": "testing",
+ "name": "action-swift-v5.1",
+ "tag": "latest"
+ },
+ "deprecated": false,
+ "attached": {
+ "attachmentName": "codefile",
+ "attachmentType": "text/plain"
+ }
+ },
+ {
+ "kind": "swift:5.3",
+ "default": true,
+ "image": {
+ "prefix": "testing",
+ "name": "action-swift-v5.3",
+ "tag": "latest"
+ },
+ "deprecated": false,
+ "attached": {
+ "attachmentName": "codefile",
+ "attachmentType": "text/plain"
+ }
+ }
+ ]
+ },
+ "blackboxes": [
+ {
+ "prefix": "openwhisk",
+ "name": "dockerskeleton",
+ "tag": "nightly"
+ }
+ ]
+}
diff --git a/tools/travis/build.sh b/tools/travis/build.sh
index d60893b..3b9e7dc 100755
--- a/tools/travis/build.sh
+++ b/tools/travis/build.sh
@@ -38,19 +38,11 @@ cd $WHISKDIR
#pull down images
docker pull openwhisk/controller:nightly
-docker tag openwhisk/controller:nightly ${IMAGE_PREFIX}/controller
docker pull openwhisk/invoker:nightly
-docker tag openwhisk/invoker:nightly ${IMAGE_PREFIX}/invoker
-docker pull openwhisk/nodejs6action:nightly
-docker tag openwhisk/nodejs6action:nightly nodejs6action
+docker pull openwhisk/action-nodejs-v10:nightly
TERM=dumb ./gradlew install
-# install new version docker
-curl -fsSL https://get.docker.com -o get-docker.sh
-sudo sh get-docker.sh
-docker version
-
# Build runtime
cd $ROOTDIR
TERM=dumb ./gradlew \
diff --git a/tools/travis/deploy.sh b/tools/travis/deploy.sh
index 713866f..89131a4 100755
--- a/tools/travis/deploy.sh
+++ b/tools/travis/deploy.sh
@@ -26,18 +26,20 @@ WHISKDIR="$ROOTDIR/../openwhisk"
export OPENWHISK_HOME=$WHISKDIR
-IMAGE_PREFIX="testing"
-
# Deploy OpenWhisk
cd $WHISKDIR/ansible
-ANSIBLE_CMD="ansible-playbook -i ${ROOTDIR}/ansible/environments/local -e docker_image_prefix=${IMAGE_PREFIX}"
+# NOTE: manifest_file is a relative path appended to OPENWHISK_HOME
+ANSIBLE_CMD="ansible-playbook -i environments/local -e manifest_file=/../openwhisk-runtime-swift/ansible/files/runtimes.json -e docker_image_prefix=openwhisk -e docker_image_tag=nightly -e controller_protocol=http"
$ANSIBLE_CMD setup.yml
$ANSIBLE_CMD prereq.yml
$ANSIBLE_CMD couchdb.yml
$ANSIBLE_CMD initdb.yml
$ANSIBLE_CMD wipe.yml
-$ANSIBLE_CMD openwhisk.yml -e cli_installation_mode=remote
+$ANSIBLE_CMD openwhisk.yml -e cli_installation_mode=remote -e skip_pull_runtimes=true
$ANSIBLE_CMD postdeploy.yml
+$ANSIBLE_CMD properties.yml
+$ANSIBLE_CMD apigateway.yml
+$ANSIBLE_CMD routemgmt.yml
docker images
docker ps