blob: e312c3f9b630d071a107f072d17c7517dfc4effe [file] [log] [blame]
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6516],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return d}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),u=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(s.Provider,{value:n},e.children)},m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},p=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(t),d=o,k=p["".concat(s,".").concat(d)]||p[d]||m[d]||a;return t?r.createElement(k,i(i({ref:n},c),{},{components:t})):r.createElement(k,i({ref:n},c))}));function d(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=p;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var u=2;u<a;u++)i[u]=t[u];return r.createElement.apply(null,i)}return r.createElement.apply(null,t)}p.displayName="MDXCreateElement"},2784:function(e,n,t){t.r(n),t.d(n,{assets:function(){return c},contentTitle:function(){return s},default:function(){return d},frontMatter:function(){return l},metadata:function(){return u},toc:function(){return m}});var r=t(7462),o=t(3366),a=(t(7294),t(3905)),i=["components"],l={title:"Submarine CLI"},s=void 0,u={unversionedId:"userDocs/submarine-sdk/submarine-cli",id:"version-0.7.0/userDocs/submarine-sdk/submarine-cli",title:"Submarine CLI",description:"\x3c!--",source:"@site/versioned_docs/version-0.7.0/userDocs/submarine-sdk/submarine-cli.md",sourceDirName:"userDocs/submarine-sdk",slug:"/userDocs/submarine-sdk/submarine-cli",permalink:"/docs/userDocs/submarine-sdk/submarine-cli",editUrl:"https://github.com/apache/submarine/edit/master/website/versioned_docs/version-0.7.0/userDocs/submarine-sdk/submarine-cli.md",tags:[],version:"0.7.0",frontMatter:{title:"Submarine CLI"},sidebar:"docs",previous:{title:"Experiment Client",permalink:"/docs/userDocs/submarine-sdk/experiment-client"},next:{title:"Tracking",permalink:"/docs/userDocs/submarine-sdk/tracking"}},c={},m=[{value:"Config",id:"config",level:2},{value:"Init",id:"init",level:2},{value:"Show current config",id:"show-current-config",level:2},{value:"Set config",id:"set-config",level:2},{value:"Get config",id:"get-config",level:2},{value:"Notebooks",id:"notebooks",level:2},{value:"List Notebooks",id:"list-notebooks",level:3},{value:"Get Notebooks",id:"get-notebooks",level:3},{value:"Delete Notebooks",id:"delete-notebooks",level:3},{value:"Experiments",id:"experiments",level:2},{value:"List Experiments",id:"list-experiments",level:3},{value:"Get Experiment",id:"get-experiment",level:3},{value:"Delete Experiment",id:"delete-experiment",level:3},{value:"Environments",id:"environments",level:2},{value:"List Environments",id:"list-environments",level:3},{value:"Get Environments",id:"get-environments",level:3},{value:"Delete Environments",id:"delete-environments",level:3}],p={toc:m};function d(e){var n=e.components,t=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Submarine CLI comes with pysubmarine python package. You can get CLI tools by pip installing apache-submarine."),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("p",null,"You can set your CLI settings by this command"),(0,a.kt)("h2",{id:"init"},"Init"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine config init \n")),(0,a.kt)("p",null,"Return"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"Submarine CLI Config initialized\n")),(0,a.kt)("p",null,"Restore CLI config to default (hostname=",(0,a.kt)("inlineCode",{parentName:"p"},"localhost"),",port=",(0,a.kt)("inlineCode",{parentName:"p"},"32080"),")"),(0,a.kt)("h2",{id:"show-current-config"},"Show current config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine config list \n")),(0,a.kt)("p",null,"For example : return"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 SubmarineCliConfig \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 { \u2502\n\u2502 "connection": { \u2502\n\u2502 "hostname": "localhost", \u2502\n\u2502 "port": 32080 \u2502\n\u2502 } \u2502\n\u2502 } \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n')),(0,a.kt)("h2",{id:"set-config"},"Set config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine config set <parameter_path> <value> \n")),(0,a.kt)("p",null,"For example,\nSet connection port to 8080:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine config set connection.port 8080\n")),(0,a.kt)("h2",{id:"get-config"},"Get config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine config get <parameter_path>\n")),(0,a.kt)("p",null,"For example,"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine config get connection.port\n")),(0,a.kt)("p",null,"Return"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"connection.port=8080\n")),(0,a.kt)("h2",{id:"notebooks"},"Notebooks"),(0,a.kt)("h3",{id:"list-notebooks"},"List Notebooks"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine list notebook \n")),(0,a.kt)("h3",{id:"get-notebooks"},"Get Notebooks"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine get notebook <notebook id>\n")),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"you can get notebook id by using ",(0,a.kt)("inlineCode",{parentName:"p"},"list command"))),(0,a.kt)("h3",{id:"delete-notebooks"},"Delete Notebooks"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine delete notebook <notebook id>\n")),(0,a.kt)("h2",{id:"experiments"},"Experiments"),(0,a.kt)("h3",{id:"list-experiments"},"List Experiments"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine list experiment \n")),(0,a.kt)("h3",{id:"get-experiment"},"Get Experiment"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine get experiment <experiment id>\n")),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"you can get experiment id by using ",(0,a.kt)("inlineCode",{parentName:"p"},"list command"))),(0,a.kt)("h3",{id:"delete-experiment"},"Delete Experiment"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine delete experiment <experiment id> [--wait/--no-wait]\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"--wait/--no-wait: blocking or non blocking (default no wait)")),(0,a.kt)("h2",{id:"environments"},"Environments"),(0,a.kt)("h3",{id:"list-environments"},"List Environments"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine list environment \n")),(0,a.kt)("h3",{id:"get-environments"},"Get Environments"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine get environment <environment name>\n")),(0,a.kt)("h3",{id:"delete-environments"},"Delete Environments"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"submarine delete experiment <environment name>\n")))}d.isMDXComponent=!0}}]);