blob: 3b9d15dc627b02aa30ca02582434c747e8ee3124 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{123:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return i})),n.d(t,"toc",(function(){return l})),n.d(t,"default",(function(){return s}));var a=n(3),r=n(7),b=(n(0),n(144)),o={},i={unversionedId:"adminDocs/yarn/workbench/HowToRun",id:"adminDocs/yarn/workbench/HowToRun",isDocsHomePage:!1,title:"HowToRun",description:"\x3c!--",source:"@site/docs/adminDocs/yarn/workbench/HowToRun.md",slug:"/adminDocs/yarn/workbench/HowToRun",permalink:"/docs/adminDocs/yarn/workbench/HowToRun",editUrl:"https://github.com/apache/submarine/edit/master/website/docs/adminDocs/yarn/workbench/HowToRun.md",version:"current"},l=[{value:"Two versions of Submarine Workbench",id:"two-versions-of-submarine-workbench",children:[]},{value:"Launch the Submarine Workbench(Angular)",id:"launch-the-submarine-workbenchangular",children:[]},{value:"Check the data in the submarine-database",id:"check-the-data-in-the-submarine-database",children:[]},{value:"Run Submarine Workbench",id:"run-submarine-workbench",children:[]},{value:"submarine-env.sh",id:"submarine-envsh",children:[]},{value:"submarine-site.xml",id:"submarine-sitexml",children:[]}],c={toc:l};function s(e){var t=e.components,n=Object(r.a)(e,["components"]);return Object(b.b)("wrapper",Object(a.a)({},c,n,{components:t,mdxType:"MDXLayout"}),Object(b.b)("h1",{id:"how-to-run-submarine-workbench"},"How To Run Submarine Workbench"),Object(b.b)("p",null,"We provide two methods to launch Submarine Workbench"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},"Method 1: Run Submarine Workbench on docker"),Object(b.b)("li",{parentName:"ul"},"Method 2: Run Submarine Workbench without docker")),Object(b.b)("h1",{id:"run-submarine-workbench-on-docker"},"Run Submarine Workbench on docker"),Object(b.b)("p",null,"By using the official images of Submarine, only a few docker commands are required to launch ",Object(b.b)("strong",{parentName:"p"},"Submarine Workbench"),". The document includes information about how to launch the Submarine Workbench via the new docker images and the information about how to switch between different Submarine Workbench versions(version Vue & version Angular)."),Object(b.b)("h3",{id:"two-versions-of-submarine-workbench"},"Two versions of Submarine Workbench"),Object(b.b)("ol",null,Object(b.b)("li",{parentName:"ol"},"Angular (default)"),Object(b.b)("li",{parentName:"ol"},"Vue (This is the old version, and it will be replaced by version Angular in the future.)")),Object(b.b)("h4",{id:"warning-please-restart-a-new-incognito-window-when-you-switch-to-different-versions-of-submarine-workbench"},"(WARNING: Please restart a new ",Object(b.b)("strong",{parentName:"h4"},"incognito window")," when you switch to different versions of Submarine Workbench)"),Object(b.b)("h3",{id:"launch-the-submarine-workbenchangular"},"Launch the Submarine Workbench(Angular)"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},"It should be noted that since Submarine Workbench depends on the Submarine database, so you need to run the docker container of the Submarine database first.")),Object(b.b)("pre",null,Object(b.b)("code",{parentName:"pre"},"docker run -it -p 3306:3306 -d --name submarine-database -e MYSQL_ROOT_PASSWORD=password apache/submarine:database-<REPLACE_VERSION>\ndocker run -it -p 8080:8080 -d --link=submarine-database:submarine-database --name submarine-server apache/submarine:server-<REPLACE_VERSION>\n")),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},"The login page of Submarine Workbench will be shown in ",Object(b.b)("inlineCode",{parentName:"li"},"http://127.0.0.1:8080"),".")),Object(b.b)("h3",{id:"check-the-data-in-the-submarine-database"},"Check the data in the submarine-database"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},"Step1: Enter the submarine-database container")),Object(b.b)("pre",null,Object(b.b)("code",{parentName:"pre"},"docker exec -it submarine-database bash\n")),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},"Step2: Enter MySQL database")),Object(b.b)("pre",null,Object(b.b)("code",{parentName:"pre"},"mysql -uroot -ppassword\n")),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},"Step3: List the data in the table")),Object(b.b)("pre",null,Object(b.b)("code",{parentName:"pre"},"// list all databases\nshow databases;\n\n// choose a database\nuse ${target_database};\n\n// list all tables\nshow tables;\n\n// list the data in the table\nselect * from ${target_table};\n")),Object(b.b)("h1",{id:"run-submarine-workbench-without-docker"},"Run Submarine Workbench without docker"),Object(b.b)("h3",{id:"run-submarine-workbench"},"Run Submarine Workbench"),Object(b.b)("pre",null,Object(b.b)("code",{parentName:"pre"},"cd submarine\n./bin/submarine-daemon.sh [start|stop|restart]\n")),Object(b.b)("p",null,"To start workbench server, you need to download MySQL jdbc jar and put it in the\npath of workbench/lib for the first time. Or you can add parameter, getMysqlJar,\nto get MySQL jar automatically."),Object(b.b)("pre",null,Object(b.b)("code",{parentName:"pre"},"cd submarine\n./bin/submarine-daemon.sh start getMysqlJar\n")),Object(b.b)("h3",{id:"submarine-envsh"},"submarine-env.sh"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"submarine-env.sh")," is automatically executed each time the ",Object(b.b)("inlineCode",{parentName:"p"},"submarine-daemon.sh")," script is executed, so we can set the ",Object(b.b)("inlineCode",{parentName:"p"},"submarine-daemon.sh")," script and the environment variables in the ",Object(b.b)("inlineCode",{parentName:"p"},"SubmarineServer")," process via ",Object(b.b)("inlineCode",{parentName:"p"},"submarine-env.sh"),"."),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",{parentName:"tr",align:null},"Name"),Object(b.b)("th",{parentName:"tr",align:null},"Variable"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"JAVA_HOME"),Object(b.b)("td",{parentName:"tr",align:null},"Set your java home path, default is ",Object(b.b)("inlineCode",{parentName:"td"},"java"),".")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"SUBMARINE_JAVA_OPTS"),Object(b.b)("td",{parentName:"tr",align:null},"Set the JAVA OPTS parameter when the Submarine Workbench process starts. If you need to debug the Submarine Workbench process, you can set it to ",Object(b.b)("inlineCode",{parentName:"td"},"-agentlib:jdwp=transport=dt_socket, server=y,suspend=n,address=5005"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"SUBMARINE_MEM"),Object(b.b)("td",{parentName:"tr",align:null},"Set the java memory parameter when the Submarine Workbench process starts.")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"MYSQL_JAR_URL"),Object(b.b)("td",{parentName:"tr",align:null},"The customized URL to download MySQL jdbc jar.")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"MYSQL_VERSION"),Object(b.b)("td",{parentName:"tr",align:null},"The version of MySQL jdbc jar to downloaded. The default value is 5.1.39. It's used to generate the default value of MYSQL_JDBC_URL")))),Object(b.b)("h3",{id:"submarine-sitexml"},"submarine-site.xml"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"submarine-site.xml")," is the configuration file for the entire ",Object(b.b)("inlineCode",{parentName:"p"},"Submarine")," system to run."),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",{parentName:"tr",align:null},"Name"),Object(b.b)("th",{parentName:"tr",align:null},"Variable"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.server.addr"),Object(b.b)("td",{parentName:"tr",align:null},"Submarine server address, default is ",Object(b.b)("inlineCode",{parentName:"td"},"0.0.0.0"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.server.port"),Object(b.b)("td",{parentName:"tr",align:null},"Submarine server port, default ",Object(b.b)("inlineCode",{parentName:"td"},"8080"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl"),Object(b.b)("td",{parentName:"tr",align:null},"Should SSL be used by the Submarine servers?, default ",Object(b.b)("inlineCode",{parentName:"td"},"false"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.server.ssl.port"),Object(b.b)("td",{parentName:"tr",align:null},"Server ssl port. (used when ssl property is set to true), default ",Object(b.b)("inlineCode",{parentName:"td"},"8483"))),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl.client.auth"),Object(b.b)("td",{parentName:"tr",align:null},"Should client authentication be used for SSL connections?")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl.keystore.path"),Object(b.b)("td",{parentName:"tr",align:null},"Path to keystore relative to Submarine configuration directory")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl.keystore.type"),Object(b.b)("td",{parentName:"tr",align:null},"The format of the given keystore (e.g. JKS or PKCS12)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl.keystore.password"),Object(b.b)("td",{parentName:"tr",align:null},"Keystore password. Can be obfuscated by the Jetty Password tool")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl.key.manager.password"),Object(b.b)("td",{parentName:"tr",align:null},"Key Manager password. Defaults to keystore password. Can be obfuscated.")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl.truststore.path"),Object(b.b)("td",{parentName:"tr",align:null},"Path to truststore relative to Submarine configuration directory. Defaults to the keystore path")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl.truststore.type"),Object(b.b)("td",{parentName:"tr",align:null},"The format of the given truststore (e.g. JKS or PKCS12). Defaults to the same type as the keystore type")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"submarine.ssl.truststore.password"),Object(b.b)("td",{parentName:"tr",align:null},"Truststore password. Can be obfuscated by the Jetty Password tool. Defaults to the keystore password")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"workbench.web.war"),Object(b.b)("td",{parentName:"tr",align:null},"Submarine Workbench web war file path.")))))}s.isMDXComponent=!0},144:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return p}));var a=n(0),r=n.n(a);function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},b=Object.keys(e);for(a=0;a<b.length;a++)n=b[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(a=0;a<b.length;a++)n=b[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=r.a.createContext({}),s=function(e){var t=r.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.a.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,b=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,p=u["".concat(o,".").concat(m)]||u[m]||d[m]||b;return n?r.a.createElement(p,i(i({ref:t},c),{},{components:n})):r.a.createElement(p,i({ref:t},c))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var b=n.length,o=new Array(b);o[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:a,o[1]=i;for(var c=2;c<b;c++)o[c]=n[c];return r.a.createElement.apply(null,o)}return r.a.createElement.apply(null,n)}m.displayName="MDXCreateElement"}}]);