You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by be...@apache.org on 2017/05/22 20:01:20 UTC
[incubator-openwhisk] branch master updated: speed vagrant by
downloading docker images vs. build local (#2269)
This is an automated email from the ASF dual-hosted git repository.
berstler 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 3ef9127 speed vagrant by downloading docker images vs. build local (#2269)
3ef9127 is described below
commit 3ef91271a4a08739eadd8e586c86246c45d47c38
Author: Carlos Santana <cs...@gmail.com>
AuthorDate: Mon May 22 16:01:17 2017 -0400
speed vagrant by downloading docker images vs. build local (#2269)
* speed vagrant by downloading docker images vs. build local
* Replace folder name openwhisk to incubator-openwhisk (#2272)
* Change clone command dest folder name
* added virtualbox req
* add virtualbox to readme
---
README.md | 4 ++--
tools/vagrant/README.md | 5 +++--
tools/vagrant/Vagrantfile | 12 +++++++++---
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 17811ea..69245b2 100644
--- a/README.md
+++ b/README.md
@@ -16,12 +16,12 @@ OpenWhisk is a cloud-first distributed event-based programming service. It provi
### Quick Start
A [Vagrant](http://vagrantup.com) machine is the easiest way to run OpenWhisk on Mac, Windows PC or GNU/Linux.
-Download and install [Vagrant](https://www.vagrantup.com/downloads.html) for your operating system and architecture.
+Download and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and [Vagrant](https://www.vagrantup.com/downloads.html) for your operating system and architecture.
Follow these step to run your first OpenWhisk Action:
```
# Clone openwhisk
-git clone --depth=1 https://github.com/apache/incubator-openwhisk.git
+git clone --depth=1 https://github.com/apache/incubator-openwhisk.git openwhisk
# Change directory to tools/vagrant
cd openwhisk/tools/vagrant
diff --git a/tools/vagrant/README.md b/tools/vagrant/README.md
index 5ec77f0..e1f3095 100644
--- a/tools/vagrant/README.md
+++ b/tools/vagrant/README.md
@@ -1,9 +1,10 @@
## Custom setup for OpenWhisk using Vagrant
-The following instructions were tested on Mac OS X El Capitan, Ubuntu 14.04.3 LTS and may work on Windows.
+The following instructions were tested on Mac OS X El Capitan, Ubuntu 14.04.3 LTS and Windows.
*Requirements*
-- Install [Vagrant](https://www.vagrantup.com/downloads.html)
+- Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) (tested with version 5.1.22)
+- Install [Vagrant](https://www.vagrantup.com/downloads.html) (tested with version 1.9.5)
### Clone the repository and change directory to `tools/vagrant`
```
diff --git a/tools/vagrant/Vagrantfile b/tools/vagrant/Vagrantfile
index ce3c25b..3ab2bba 100644
--- a/tools/vagrant/Vagrantfile
+++ b/tools/vagrant/Vagrantfile
@@ -48,6 +48,7 @@ Vagrant.configure('2') do |config|
$script_common = <<SCRIPT
set -e
set -x
+ echo "`date`: ubuntu-setup-start" >> /tmp/vagrant-times.txt
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
@@ -75,6 +76,7 @@ $script_common = <<SCRIPT
cd /home/vagrant/openwhisk
cd tools/ubuntu-setup
su vagrant -c 'source all.sh'
+ echo "`date`: ubuntu-setup-end" >> /tmp/vagrant-times.txt
SCRIPT
config.vm.provision "script_common", type: "shell", keep_color: true, inline: $script_common
@@ -104,11 +106,13 @@ SCRIPT
# Configure Default CouchDB
$couch_db = <<COUCH_DB
+echo "`date`: couchdb-setup-start" >> /tmp/vagrant-times.txt
export ANSIBLE_REMOTE_TEMP=/home/vagrant/openwhisk/ansible/tmp
cd /home/vagrant/openwhisk/ansible
su vagrant -c 'ansible-playbook -i environments/local setup.yml'
su vagrant -c 'ansible-playbook -i environments/local prereq.yml'
su vagrant -c 'ansible-playbook -i environments/local couchdb.yml'
+echo "`date`: couchdb-setup-end" >> /tmp/vagrant-times.txt
COUCH_DB
$init_db = <<INIT_DB
@@ -128,18 +132,19 @@ INIT_DB
$script_end = <<SCRIPT
set -e
set -x
-
+ echo "`date`: build-start" >> /tmp/vagrant-times.txt
HOME=/home/vagrant
source /etc/environment
# Build OpenWhisk using gradle
cd ${OPENWHISK_HOME}
- su vagrant -c './gradlew distDocker --parallel'
+ su vagrant -c './gradlew tools:cli:distDocker -PdockerImagePrefix=openwhisk'
+ echo "`date`: deploy-start" >> /tmp/vagrant-times.txt
# Deploy OpenWhisk using ansible
cd ${ANSIBLE_HOME}
su vagrant -c 'ansible-playbook -i environments/local wipe.yml'
su vagrant -c 'ansible-playbook -i environments/local apigateway.yml'
- su vagrant -c 'ansible-playbook -i environments/local openwhisk.yml'
+ su vagrant -c 'ansible-playbook -i environments/local -e docker_image_prefix=openwhisk openwhisk.yml'
su vagrant -c 'ansible-playbook -i environments/local postdeploy.yml'
# Setup OpenWhisk CLI
@@ -158,6 +163,7 @@ $script_end = <<SCRIPT
# This allows user to see how to configure the wsk cli outside the VM
wsk property set --apihost ${WHISK_IP} --namespace guest --auth `cat ${ANSIBLE_HOME}/files/auth.guest`
wsk action invoke /whisk.system/utils/echo -p message hello --result
+ echo "`date`: build-deploy-end" >> /tmp/vagrant-times.txt
SCRIPT
config.vm.provision "script_end", type: "shell", keep_color: true, inline: $script_end, env: {"WHISK_IP" => MACHINE_IP}
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].