You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2018/02/10 03:17:07 UTC

[incubator-openwhisk] branch master updated: change tmp dir for vagrant (#3269)

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 e325be7  change tmp dir for vagrant (#3269)
e325be7 is described below

commit e325be7e9dcc2fbd5e6d77deb83d8b78328100e0
Author: Carlos Santana <cs...@gmail.com>
AuthorDate: Fri Feb 9 22:17:04 2018 -0500

    change tmp dir for vagrant (#3269)
    
    * change tmp dir for vagrant
    
    * no need to set namespace
    
    * setup /tmp as default if OPENWHISK_TMP_DIR not defined
---
 ansible/environments/local/group_vars/all | 5 +++--
 tools/vagrant/Vagrantfile                 | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ansible/environments/local/group_vars/all b/ansible/environments/local/group_vars/all
index 0d8dc06..fbed10e 100755
--- a/ansible/environments/local/group_vars/all
+++ b/ansible/environments/local/group_vars/all
@@ -1,6 +1,7 @@
 whisk_version_name: local
-config_root_dir: /tmp/wskconf
-whisk_logs_dir: /tmp/wsklogs
+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: ""
 bypass_pull_for_local_images: true
diff --git a/tools/vagrant/Vagrantfile b/tools/vagrant/Vagrantfile
index 074aece..7d1ef88 100644
--- a/tools/vagrant/Vagrantfile
+++ b/tools/vagrant/Vagrantfile
@@ -62,6 +62,7 @@ $script_common = <<SCRIPT
 
   HOME=/home/vagrant
   OPENWHISK_HOME=${HOME}/openwhisk
+  OPENWHISK_TMP_DIR=${HOME}/.openwhisk/ansible/tmp
   ANSIBLE_HOME=${OPENWHISK_HOME}/ansible
   ANSIBLE_REMOTE_TEMP=${ANSIBLE_HOME}/tmp
   # Add Global environments variables
@@ -69,6 +70,7 @@ $script_common = <<SCRIPT
   echo ANSIBLE_HOME=${ANSIBLE_HOME} >> /etc/environment
   echo ANSIBLE_REMOTE_TEMP=${ANSIBLE_REMOTE_TEMP} >> /etc/environment
   echo OPENWHISK_HOME=${OPENWHISK_HOME} >> /etc/environment
+  echo OPENWHISK_TMP_DIR=${OPENWHISK_TMP_DIR} >> /etc/environment
   echo PATH=${PATH}:${HOME}/bin:${OPENWHISK_HOME}/tools/build >> /etc/environment
 
   cd /home/vagrant/openwhisk
@@ -159,8 +161,8 @@ $script_end = <<SCRIPT
   touch $HOME/.wskprops
   chown -R vagrant:vagrant $HOME
   # This allows user to see how to configure the wsk cli outside the VM
+  wsk property set --apihost ${WHISK_IP} --auth `cat ${ANSIBLE_HOME}/files/auth.guest`
   echo "Swagger UI URL: https://${WHISK_IP}/api/v1/docs/index.html?url=/api/v1/api-docs"
-  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

-- 
To stop receiving notification emails like this one, please contact
rabbah@apache.org.