You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/12/11 19:46:56 UTC

[GitHub] csantanapr commented on issue #2911: Proposal to to reorganize core/ and root(openwhisk/) folders to reflect existing architecture better

csantanapr commented on issue #2911: Proposal to to reorganize core/ and root(openwhisk/) folders to reflect existing architecture better
URL: https://github.com/apache/incubator-openwhisk/issues/2911#issuecomment-347584400
 
 
   I will prefer we don't do a one off for setup.sh in Travis.
   
   I propose we keep using ansible, this allows for similar integrations and deployments we have today in different environments.
   
   Blueprint:
   1. Move core/routemgmt to cli repo openwhisk-cli/routemgmt/
   New location should be https://github.com/apache/incubator-openwhisk-cli/routemgmt/
   2. Move ansible/role/routemgmt/[installRouteMgmt.sh, uninstallRouteMgmt] to cli repo openwhisk-cli/routemgmt/
   - https://github.com/apache/incubator-openwhisk-cli/routemgmt/installRouteMgmt.sh
   - https://github.com/apache/incubator-openwhisk-cli/routemgmt/uninstallRouteMgmt
   Adjust scripts based on new location and how they are called from ansible now (i.e. no need for OPENWHISK HOME
   3. Update ansible/group_vars/all with location of routemgmt actions/package
   ```yaml
   routemgt:
     url: https://github.com/apache/incubator-openwhisk-cli.git
     # Set the local location as the same level as openwhisk home, but it can be changed.
     location: "{{ openwhisk_home }}/../openwhisk-cli-apigw"
     version: "HEAD"
     repo_update: "no"
   ```
   4. Update ansible/role/routemgmt/deploy.yml to git clone and run install script
   ```yaml
   - name: download the catalog repository to the catalog location if necessary
     git:
       repo: "{{ routemgmt.url }}"
       dest: "{{ routemgmt.location }}"
       update: "{{ routemgmt.repo_update }}"
       version: "{{ routemgmt.version }}"
   
   - name: install route management actions
     shell: ./installRouteMgmt.sh {{ catalog_auth_key }} {{ api_host }} {{ cli.path }} chdir="{{ routemgmt.location }}/routemgmt"
   ```
   5. Update ansible/role/routemgmt/clean.yml to call uninstall script from cloned location
   ```yaml
   - name: remove route management actions
     shell: ./uninstallRouteMgmt.sh {{ catalog_auth_key }} {{ api_host }} {{ cli.path }} chdir="{{ routemgmt.location }}/routemgmt"
   ```
   6. Refactor deploy.yml and installRouteMgm.sh to not depend on file whisk.properties, instead pass in to script more arguments with ansible variables {{apigw_auth_user}} {{apigw_auth_pwd}} {{apigw_host_v2}}
   ```yaml
   - name: install route management actions
     shell: ./installRouteMgmt.sh {{ catalog_auth_key }} {{ api_host }} {{ cli.path }} {{apigw_auth_user}} {{apigw_auth_pwd}} {{apigw_host_v2}} chdir="{{ routemgmt.location }}/routemgmt"
   ```
   
   Doing this will not require any changes to Travis deployment  in apigateway repo, cli repo, or openwhisk repo.
   
   
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services