├── .github └── ISSUE_TEMPLATE.md ├── .travis.yml ├── Dockerfile ├── Dockerrun.aws.json ├── Jenkinsfile ├── LICENSE ├── README.md ├── catalina.policy ├── docker-compose.yml ├── install.sh ├── k8s ├── README.md ├── deployment.yaml ├── kettle-pvc.yaml ├── pentaho-pvc.yaml └── service.yaml └── slave-server-config.xml /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Checklist before submitting an issue 2 | 3 | - [ ] This issue does not happen on Spoon. 4 | If your issue happens on Spoon too, it originates from Spoon (not from webSpoon). Please look at [Pentaho Community Forums](https://forums.pentaho.com/), or seek help at [Hitachi Vantara Community](https://community.hitachivantara.com/s/pentaho), or submit an issue at [Pentaho JIRA](https://jira.pentaho.com/projects/PDI)). 5 | - [ ] I searched for existing issues at [here](https://github.com/HiromuHota/pentaho-kettle/issues) and [there](https://github.com/HiromuHota/webspoon-docker/issues). 6 | 7 | ## Expected Behavior 8 | 9 | 10 | ## Actual Behavior 11 | Screenshots and error messages are helpful. 12 | 13 | ## Steps to Reproduce the Problem 14 | 15 | 1. 16 | 1. 17 | 1. 18 | 19 | ## Specifications 20 | 21 | ### Server 22 | #### If deployed as a Docker container 23 | - Docker tag (e.g., hiromuhota/webspoon:0.9.0.21): 24 | 25 | #### Else 26 | - OS (e.g., Mac OS X 10.12.6): 27 | - Java (e.g., Oracle JDK 8u151): 28 | - Servlet container (e.g., Apache Tomcat 8.5.20): 29 | - webSpoon (e.g., version: 0.8.0.13 or commitId: 0211d84b): 30 | 31 | ### Client 32 | - OS (e.g., Mac OS X 10.12.6): 33 | - Browser (e.g., Google Chrome 64.0.3282.140): 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | only: 3 | - master 4 | language: java 5 | jdk: openjdk8 6 | install: true 7 | script: 8 | - git config --local user.name "Hiromu Hota" 9 | - git config --local user.email "hiromu.hota@hal.hitachi.com" 10 | - export TRAVIS_TAG=nightly 11 | - git tag $TRAVIS_TAG --force 12 | - git push -f https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git $TRAVIS_TAG 13 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM tomcat:jdk8 2 | MAINTAINER Hiromu Hota 3 | ENV JAVA_OPTS="-Xms1024m -Xmx2048m" 4 | RUN rm -rf ${CATALINA_HOME}/webapps/* \ 5 | && mkdir ${CATALINA_HOME}/webapps/ROOT \ 6 | && echo "<% response.sendRedirect(\"spoon\"); %>" > ${CATALINA_HOME}/webapps/ROOT/index.jsp 7 | 8 | ARG base=9.0 9 | ARG patch=21 10 | ARG version=0.$base.$patch 11 | ARG dist=9.0.0.0-423 12 | 13 | RUN groupadd -r tomcat \ 14 | && useradd -r --create-home -g tomcat tomcat \ 15 | && chown -R tomcat:tomcat ${CATALINA_HOME} 16 | USER tomcat 17 | 18 | RUN wget -q https://sourceforge.net/projects/pentaho/files/Pentaho%20$base/client-tools/pdi-ce-$dist.zip && \ 19 | unzip -q pdi-ce-$dist.zip && \ 20 | mv data-integration/system ${CATALINA_HOME}/system && \ 21 | mv data-integration/plugins ${CATALINA_HOME}/plugins && \ 22 | mv data-integration/simple-jndi ${CATALINA_HOME}/simple-jndi && \ 23 | mv data-integration/samples ${CATALINA_HOME}/samples && \ 24 | mv data-integration/LICENSE.txt ${CATALINA_HOME}/webSpoon-LICENSE.txt && \ 25 | rm pdi-ce-$dist.zip && \ 26 | rm -rf data-integration 27 | 28 | ARG CACHEBUST=1 29 | 30 | RUN echo "org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true" | tee -a conf/catalina.properties 31 | COPY --chown=tomcat:tomcat install.sh /tmp/install.sh 32 | RUN sh /tmp/install.sh 33 | 34 | ADD --chown=tomcat:tomcat https://github.com/HiromuHota/pentaho-kettle/releases/download/webspoon%2F$version/webspoon-security-$dist-$patch.jar ${CATALINA_HOME}/lib/ 35 | RUN echo "CLASSPATH="$CATALINA_HOME"/lib/webspoon-security-$dist-$patch.jar" | tee ${CATALINA_HOME}/bin/setenv.sh 36 | COPY --chown=tomcat:tomcat catalina.policy ${CATALINA_HOME}/conf/ 37 | RUN mkdir -p $HOME/.kettle/users && mkdir -p $HOME/.pentaho/users 38 | RUN mkdir -p $HOME/.kettle/data && cp -r ${CATALINA_HOME}/samples $HOME/.kettle/data/samples 39 | -------------------------------------------------------------------------------- /Dockerrun.aws.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWSEBDockerrunVersion": 2, 3 | "containerDefinitions": [ 4 | { 5 | "name": "webSpoon", 6 | "image": "hiromuhota/webspoon", 7 | "essential": true, 8 | "memory": 1920, 9 | "environment": [ 10 | { 11 | "name": "JAVA_OPTS", 12 | "value": "-Xms1024m -Xmx1920m" 13 | } 14 | ], 15 | "portMappings": [ 16 | { 17 | "hostPort": 80, 18 | "containerPort": 8080 19 | } 20 | ] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | environment { 4 | version = 'nightly' 5 | } 6 | stages { 7 | stage('Build') { 8 | steps { 9 | sh ''' 10 | docker build --build-arg version=$version --build-arg CACHEBUST=$BUILD_NUMBER -t hiromuhota/webspoon:$version --pull=true . 11 | ''' 12 | } 13 | } 14 | stage('Publish') { 15 | steps { 16 | sh ''' 17 | docker push hiromuhota/webspoon:$version 18 | ''' 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2017 Hitachi America, Ltd. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Notice 2 | 3 | This repository has been archived and read-only now. 4 | All the contents have been migrated to under ./docker directory of https://github.com/HiromuHota/pentaho-kettle. 5 | 6 | # How to build an image 7 | 8 | ``` 9 | $ docker build --no-cache -t hiromuhota/webspoon:latest . 10 | ``` 11 | 12 | # Tags 13 | 14 | | Tag | 0.8.1.ZZ and lower | 0.8.2.ZZ | 0.8.3.ZZ and higher | 15 | | --- | --- | --- | --- | 16 | | nightly | Latest commit of webSpoon without plugins | Latest commit of webSpoon with plugins | <-- Ditto | 17 | | nightly-full | Latest commit of webSpoon with plugins | Identical to nightly, but deprecated | Discontinued | 18 | | latest | Latest release of webSpoon without plugins | Latest release of webSpoon with plugins | <-- Ditto | 19 | | latest-full | Latest release of webSpoon with plugins | Identical to latest, but deprecated | Discontinued | 20 | | 0.X.Y.ZZ | 0.X.Y.ZZ of webSpoon without plugins | 0.X.Y.ZZ of webSpoon with plugins | <-- Ditto | 21 | | 0.X.Y.ZZ-full | 0.X.Y.ZZ of webSpoon with plugins | Identical to 0.X.Y.ZZ, but deprecated | Discontinued | 22 | 23 | # How to use the image 24 | 25 | ## Basic usage 26 | 27 | ``` 28 | $ docker run -d -p 8080:8080 hiromuhota/webspoon 29 | ``` 30 | 31 | Please access `http://ip-address:8080/spoon/spoon`. 32 | 33 | ## Advanced usage 34 | 35 | ### Java heap size 36 | 37 | The Java heap size is configured as `-Xms1024m -Xmx2048m` by default, but can be overridden as `-Xms1024m -Xmx1920m` for example when a server has only 2GB of memory. 38 | 39 | ``` 40 | $ docker run -d -p 8080:8080 \ 41 | -e JAVA_OPTS="-Xms1024m -Xmx1920m" \ 42 | hiromuhota/webspoon 43 | ``` 44 | 45 | ### User config and data persistence/share 46 | 47 | If the configuration files should be shared among containers, add `-v kettle:/home/tomcat/.kettle -v pentaho:/home/tomcat/.pentaho` as 48 | 49 | ``` 50 | $ docker run -d -p 8080:8080 \ 51 | -v kettle:/home/tomcat/.kettle -v pentaho:/home/tomcat/.pentaho \ 52 | hiromuhota/webspoon 53 | ``` 54 | 55 | or execute the following docker-compose command 56 | 57 | ``` 58 | $ docker-compose up -d 59 | ``` 60 | 61 | ### webSpoon config 62 | 63 | From 0.8.0.14, spoon.war is pre-extracted at `$CATALINA_HOME/webapps/spoon` so that configs such as `web.xml` can be configured at run-time using a bind mount. 64 | If you want to enable user authentication, for example, download [web.xml](https://github.com/HiromuHota/pentaho-kettle/blob/webspoon-8.2/assemblies/static/src/main/resources-filtered/WEB-INF/web.xml) and edit it as described [here](https://github.com/HiromuHota/pentaho-kettle#user-authentication). 65 | Then add `-v $(pwd)/web.xml:/usr/local/tomcat/webapps/spoon/WEB-INF/web.xml` to the command. 66 | 67 | ``` 68 | $ docker run -d -p 8080:8080 \ 69 | -v $(pwd)/web.xml:/usr/local/tomcat/webapps/spoon/WEB-INF/web.xml \ 70 | hiromuhota/webspoon 71 | ``` 72 | 73 | Similarly, `$CATALINA_HOME/webapps/spoon/WEB-INF/spring/security.xml` can be configured at run-time. 74 | 75 | ### Security manager 76 | 77 | To enable the [custom security manager](https://github.com/HiromuHota/pentaho-kettle/wiki/Admin%3A-Security#file-access-control-by-a-custom-security-manager-experimental), enable [user authentication 78 | ](https://github.com/HiromuHota/pentaho-kettle/wiki/Admin%3A-Security#user-authentication) and add `-e CATALINA_OPTS="-Djava.security.manager=org.pentaho.di.security.WebSpoonSecurityManager -Djava.security.policy=/usr/local/tomcat/conf/catalina.policy"` to the run command. 79 | 80 | ``` 81 | $ docker run -d -p 8080:8080 \ 82 | -e CATALINA_OPTS="-Djava.security.manager=org.pentaho.di.security.WebSpoonSecurityManager -Djava.security.policy=/usr/local/tomcat/conf/catalina.policy" \ 83 | -v $(pwd)/web.xml:/usr/local/tomcat/webapps/spoon/WEB-INF/web.xml \ 84 | -v $(pwd)/catalina.policy:/usr/local/tomcat/conf/catalina.policy \ 85 | hiromuhota/webspoon 86 | ``` 87 | 88 | ## Debug 89 | 90 | ``` 91 | $ docker run -d -p 8080:8080 -p 8000:8000 \ 92 | -e JPDA_ADDRESS=8000 \ 93 | -e CATALINA_OPTS="-Dorg.eclipse.rap.rwt.developmentMode=true" \ 94 | hiromuhota/webspoon catalina.sh jpda run 95 | ``` 96 | -------------------------------------------------------------------------------- /catalina.policy: -------------------------------------------------------------------------------- 1 | grant 2 | { 3 | permission java.io.FilePermission "${java.io.tmpdir}", "read"; 4 | permission java.io.FilePermission "${java.io.tmpdir}/-", "read,write,delete"; 5 | permission java.io.FilePermission "${catalina.home}/webapps/spoon/rwt-resources", "write,delete"; 6 | permission java.io.FilePermission "${catalina.home}/webapps/spoon/rwt-resources/-", "read,write,delete"; 7 | 8 | permission java.io.FilePermission "${java.home}/lib/-", "read"; 9 | permission java.io.FilePermission "${catalina.home}/webapps/spoon/-", "read"; 10 | permission java.io.FilePermission "${user.home}/.pentaho", "read"; 11 | permission java.io.FilePermission "${user.home}/.pentaho/metastore", "read"; 12 | permission java.io.FilePermission "${catalina.home}/lib/-", "read"; 13 | permission java.io.FilePermission "${catalina.home}/plugins/-", "read"; 14 | permission java.io.FilePermission "${catalina.home}/ui/-", "read"; 15 | permission java.io.FilePermission "${catalina.home}/-", "read"; 16 | permission java.io.FilePermission "${catalina.home}/.", "read"; 17 | permission java.io.FilePermission "repositories.xml", "read"; 18 | 19 | // For SpoonGit 20 | permission java.io.FilePermission "${user.home}/.gitconfig", "read"; 21 | permission java.io.FilePermission "${user.home}/.gitignore_global", "read"; 22 | }; 23 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | webspoon: 4 | image: hiromuhota/webspoon 5 | ports: 6 | - "8080:8080" 7 | volumes: 8 | - kettle:/home/tomcat/.kettle 9 | - pentaho:/home/tomcat/.pentaho 10 | environment: 11 | - "JAVA_OPTS=-Xms1024m -Xmx2048m" 12 | volumes: 13 | kettle: 14 | pentaho: 15 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z ${version} ]; then echo "version is unset" && exit 1; fi 4 | if [ -z ${dist} ]; then echo "dist is unset" && exit 1; fi 5 | if [ -z ${CATALINA_HOME} ]; then echo "CATALINA_HOME is unset" && exit 1; fi 6 | 7 | echo 'Downloading and extracting spoon.war' 8 | wget -q https://github.com/HiromuHota/pentaho-kettle/releases/download/webspoon%2F$version/spoon.war || exit $? 9 | mkdir ${CATALINA_HOME}/webapps/spoon 10 | unzip -q spoon.war -d ${CATALINA_HOME}/webapps/spoon 11 | rm spoon.war 12 | 13 | echo 'Downloading and replacing plugins' 14 | wget -q https://github.com/HiromuHota/pdi-platform-utils-plugin/releases/download/webspoon%2F$version/pdi-platform-utils-plugin-core-$dist.jar -O ${CATALINA_HOME}/plugins/platform-utils-plugin/pdi-platform-utils-plugin-core-$dist.jar || exit $? 15 | wget -q https://github.com/HiromuHota/big-data-plugin/releases/download/webspoon%2F$version/hadoop-cluster-ui-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/pentaho/hadoop-cluster-ui/$dist/hadoop-cluster-ui-$dist.jar || exit $? 16 | wget -q https://github.com/HiromuHota/pentaho-kettle/releases/download/webspoon%2F$version/repositories-plugin-core-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/org/pentaho/di/plugins/repositories-plugin-core/$dist/repositories-plugin-core-$dist.jar || exit $? 17 | wget -q https://github.com/HiromuHota/pentaho-kettle/releases/download/webspoon%2F$version/pdi-engine-configuration-ui-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/org/pentaho/di/plugins/pdi-engine-configuration-ui/$dist/pdi-engine-configuration-ui-$dist.jar || exit $? 18 | wget -q https://github.com/HiromuHota/pentaho-kettle/releases/download/webspoon%2F$version/file-open-save-core-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/org/pentaho/di/plugins/file-open-save-core/$dist/file-open-save-core-$dist.jar || exit $? 19 | wget -q https://github.com/HiromuHota/pentaho-kettle/releases/download/webspoon%2F$version/file-open-save-new-core-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/org/pentaho/di/plugins/file-open-save-new-core/$dist/file-open-save-new-core-$dist.jar || exit $? 20 | wget -q https://github.com/HiromuHota/pentaho-kettle/releases/download/webspoon%2F$version/get-fields-core-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/org/pentaho/di/plugins/get-fields-core/$dist/get-fields-core-$dist.jar || exit $? 21 | wget -q https://github.com/HiromuHota/pentaho-kettle/releases/download/webspoon%2F$version/connections-ui-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/org/pentaho/di/plugins/connections-ui/$dist/connections-ui-$dist.jar || exit $? 22 | wget -q https://github.com/HiromuHota/pdi-dataservice-server-plugin/releases/download/webspoon%2F$version/pdi-dataservice-server-plugin-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/pentaho/pdi-dataservice-server-plugin/$dist/pdi-dataservice-server-plugin-$dist.jar || exit $? 23 | wget -q https://github.com/HiromuHota/marketplace/releases/download/webspoon%2F$version/pentaho-marketplace-di-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/org/pentaho/pentaho-marketplace-di/$dist/pentaho-marketplace-di-$dist.jar || exit $? 24 | wget -q https://github.com/HiromuHota/pentaho-osgi-bundles/releases/download/webspoon%2F$version/pentaho-i18n-webservice-bundle-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/pentaho/pentaho-i18n-webservice-bundle/$dist/pentaho-i18n-webservice-bundle-$dist.jar || exit $? 25 | wget -q https://github.com/HiromuHota/pentaho-osgi-bundles/releases/download/webspoon%2F$version/pentaho-kettle-repository-locator-impl-spoon-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/pentaho/pentaho-kettle-repository-locator-impl-spoon/$dist/pentaho-kettle-repository-locator-impl-spoon-$dist.jar || exit $? 26 | wget -q https://github.com/HiromuHota/pentaho-osgi-bundles/releases/download/webspoon%2F$version/pentaho-pdi-platform-$dist.jar -O ${CATALINA_HOME}/system/karaf/system/pentaho/pentaho-pdi-platform/$dist/pentaho-pdi-platform-$dist.jar || exit $? 27 | 28 | echo 'Configuring org.pentaho.requirejs.cfg' 29 | echo 'context.root=/spoon/osgi' | tee ${CATALINA_HOME}/system/karaf/etc/org.pentaho.requirejs.cfg 30 | 31 | echo 'Configuring custom.properties' 32 | wget -q https://raw.githubusercontent.com/HiromuHota/pentaho-karaf-assembly/webspoon%2F$version/assemblies/common-resources/src/main/resources-filtered/etc/custom.properties -O ${CATALINA_HOME}/system/karaf/etc/custom.properties || exit $? 33 | 34 | echo 'Configuring Carte' 35 | mkdir ${CATALINA_HOME}/system/kettle 36 | wget -q https://raw.githubusercontent.com/HiromuHota/webspoon-docker/$version/slave-server-config.xml -O ${CATALINA_HOME}/system/kettle/slave-server-config.xml || exit $? 37 | 38 | echo 'Removing Karaf cache' 39 | rm -rf ${CATALINA_HOME}/system/karaf/caches/webspoonservletcontextlistener || true 40 | -------------------------------------------------------------------------------- /k8s/README.md: -------------------------------------------------------------------------------- 1 | # Run webSpoon on Kubernetes 2 | 3 | Clone this repository and run this command to create required resources (`Deployment` and `Service`). 4 | 5 | ```sh 6 | $ kubectl create -f ./k8s 7 | deployment.apps/webspoon created 8 | service/webspoon created 9 | ``` 10 | 11 | Check that webspoon is running. 12 | 13 | ```sh 14 | $ kubectl get pod 15 | NAME READY STATUS RESTARTS AGE 16 | webspoon-78767c7f57-b9fzd 1/1 Running 0 5m7s 17 | ``` 18 | 19 | Do port forwarding of `8080` port of the service to local machine. 20 | 21 | ```sh 22 | kubectl port-forward service/webspoon 8080:8080 & 23 | ``` 24 | 25 | While port forwarding, access to the port of local machine. 26 | 27 | ``` 28 | http://localhost:8080 29 | ``` 30 | 31 | # Shared `~/.kettle` and `~/.pentaho` directory 32 | 33 | Pods share `~/.kettle` and `~/.pentaho` directory as PersistentVolumeClaim (PVC). 34 | If you want to deploy these PVCs to a Kubernetes cluster which only supports `ReadWriteOnce`, you can configure YAML files. 35 | 36 | Edit `kettle-pvc.yaml` and `pentaho-pvc.yaml`. 37 | 38 | ```yaml 39 | # - ReadWriteMany # Comment out 40 | - ReadWriteOnce # Uncomment 41 | ``` 42 | 43 | # Customize 44 | 45 | ## Add `web.xml` etc. 46 | 47 | Create your own `web.xml` file and run this command to make ConfigMap including the `web.xml`. 48 | 49 | ```sh 50 | $ kubectl create configmap webspoon-config-cm --from-file web.xml 51 | ``` 52 | 53 | Then, edit `deployment.yaml` and uncomment this section to mount ConfigMap to containers. 54 | 55 | ```yaml 56 | volumeMounts: 57 | ... 58 | # - mountPath: /usr/local/tomcat/webapps/spoon/WEB-INF/web.xml 59 | # name: webspoon-config-cm 60 | # subPath: web.xml 61 | ... 62 | volumes: 63 | # - name: webspoon-config-cm 64 | # configMap: 65 | # name: webspoon-config-cm 66 | ``` 67 | 68 | File locations by default 69 | 70 | | File | Mount target in webSpoon pod | 71 | |-|-| 72 | | `web.xml` | `/usr/local/tomcat/webapps/spoon/WEB-INF/web.xml` | 73 | | `catalina.policy` | `/usr/local/tomcat/conf/catalina.policy` | 74 | | `security.xml` | `/usr/local/tomcat/webapps/spoon/WEB-INF/spring/security.xml`| 75 | 76 | # Tear down 77 | 78 | ```sh 79 | $ kubectl delete -f ./k8s 80 | # If you created ConfigMap 81 | $ kubectl delete configmap webspoon-config-cm 82 | ``` -------------------------------------------------------------------------------- /k8s/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | run: webspoon 7 | name: webspoon 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | run: webspoon 13 | strategy: 14 | type: Recreate 15 | template: 16 | metadata: 17 | creationTimestamp: null 18 | labels: 19 | run: webspoon 20 | spec: 21 | containers: 22 | - env: 23 | - name: JAVA_OPTS 24 | value: -Xms1024m -Xmx2048m 25 | image: hiromuhota/webspoon 26 | imagePullPolicy: "" 27 | name: webspoon 28 | ports: 29 | - containerPort: 8080 30 | resources: {} 31 | volumeMounts: 32 | - mountPath: /home/tomcat/.kettle 33 | name: kettle-pvc 34 | - mountPath: /home/tomcat/.pentaho 35 | name: pentaho-pvc 36 | # # When you created your own config file, uncomment each section depending on file. 37 | # - mountPath: /usr/local/tomcat/webapps/spoon/WEB-INF/web.xml 38 | # name: webspoon-config-cm 39 | # subPath: web.xml 40 | # - mountPath: /usr/local/tomcat/conf/catalina.policy 41 | # name: webspoon-config-cm 42 | # subPath: catalina.policy 43 | # - mountPath: /usr/local/tomcat/webapps/spoon/WEB-INF/spring/security.xml 44 | # name: webspoon-config-cm 45 | # subPath: security.xml 46 | restartPolicy: Always 47 | serviceAccountName: "" 48 | volumes: 49 | - name: kettle-pvc 50 | persistentVolumeClaim: 51 | claimName: kettle-pvc 52 | - name: pentaho-pvc 53 | persistentVolumeClaim: 54 | claimName: pentaho-pvc 55 | # # Uncomment to mount ConfigMap if you created ConfigMap 56 | # - name: webspoon-config-cm 57 | # configMap: 58 | # name: webspoon-config-cm 59 | status: {} 60 | -------------------------------------------------------------------------------- /k8s/kettle-pvc.yaml: -------------------------------------------------------------------------------- 1 | kind: PersistentVolumeClaim 2 | apiVersion: v1 3 | metadata: 4 | name: kettle-pvc 5 | spec: 6 | accessModes: 7 | - ReadWriteMany 8 | # - ReadWriteOnce 9 | resources: 10 | requests: 11 | storage: 100Mi 12 | -------------------------------------------------------------------------------- /k8s/pentaho-pvc.yaml: -------------------------------------------------------------------------------- 1 | kind: PersistentVolumeClaim 2 | apiVersion: v1 3 | metadata: 4 | name: pentaho-pvc 5 | spec: 6 | accessModes: 7 | - ReadWriteMany 8 | # - ReadWriteOnce 9 | resources: 10 | requests: 11 | storage: 100Mi 12 | -------------------------------------------------------------------------------- /k8s/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | run: webspoon 7 | name: webspoon 8 | spec: 9 | ports: 10 | - name: "8080" 11 | port: 8080 12 | targetPort: 8080 13 | selector: 14 | run: webspoon 15 | status: 16 | loadBalancer: {} 17 | -------------------------------------------------------------------------------- /slave-server-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 10000 3 | 2880 4 | 240 5 | 6 | --------------------------------------------------------------------------------