blob: e715352edb793f31528ead42d554cad30404340b [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{133:function(e,r,n){"use strict";n.r(r),n.d(r,"frontMatter",(function(){return o})),n.d(r,"metadata",(function(){return c})),n.d(r,"toc",(function(){return u})),n.d(r,"default",(function(){return l}));var t=n(3),a=n(7),i=(n(0),n(193)),o={title:"How to Build Submarine"},c={unversionedId:"devDocs/BuildFromCode",id:"devDocs/BuildFromCode",isDocsHomePage:!1,title:"How to Build Submarine",description:"\x3c!--",source:"@site/docs/devDocs/BuildFromCode.md",slug:"/devDocs/BuildFromCode",permalink:"/docs/next/devDocs/BuildFromCode",editUrl:"https://github.com/apache/submarine/edit/master/website/docs/devDocs/BuildFromCode.md",version:"current",sidebar:"docs",previous:{title:"Dependencies for Submarine",permalink:"/docs/next/devDocs/Dependencies"},next:{title:"Development Guide",permalink:"/docs/next/devDocs/Development"}},u=[{value:"Prerequisites",id:"prerequisites",children:[]},{value:"Quick Start",id:"quick-start",children:[{value:"Build Your Custom Submarine Docker Images",id:"build-your-custom-submarine-docker-images",children:[]},{value:"Checking releases for licenses",id:"checking-releases-for-licenses",children:[]},{value:"Building source code / binary distribution with Maven Wrapper",id:"building-source-code--binary-distribution-with-maven-wrapper",children:[]}]}],s={toc:u};function l(e){var r=e.components,n=Object(a.a)(e,["components"]);return Object(i.b)("wrapper",Object(t.a)({},s,n,{components:r,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"prerequisites"},"Prerequisites"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"JDK 1.8"),Object(i.b)("li",{parentName:"ul"},"Maven 3.3 or later ( < 3.8.1 )"),Object(i.b)("li",{parentName:"ul"},"Docker")),Object(i.b)("h2",{id:"quick-start"},"Quick Start"),Object(i.b)("h3",{id:"build-your-custom-submarine-docker-images"},"Build Your Custom Submarine Docker Images"),Object(i.b)("p",null,"Submarine provides default Docker image in the release artifacts, sometimes you would like to do some modifications on the images. You can rebuild Docker image after you make changes."),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Note that you need to make sure the images built above can be accessed in k8s\nUsually this needs to rename and push to a proper Docker registry.")),Object(i.b)("pre",null,Object(i.b)("code",{parentName:"pre",className:"language-bash"},"mvn clean package -DskipTests\n")),Object(i.b)("p",null,"Build submarine server image:"),Object(i.b)("pre",null,Object(i.b)("code",{parentName:"pre",className:"language-bash"},"./dev-support/docker-images/submarine/build.sh\n")),Object(i.b)("p",null,"Build submarine database image:"),Object(i.b)("pre",null,Object(i.b)("code",{parentName:"pre",className:"language-bash"},"./dev-support/docker-images/database/build.sh\n")),Object(i.b)("h3",{id:"checking-releases-for-licenses"},"Checking releases for licenses"),Object(i.b)("pre",null,Object(i.b)("code",{parentName:"pre"},"mvn clean org.apache.rat:apache-rat-plugin:check\n")),Object(i.b)("h3",{id:"building-source-code--binary-distribution-with-maven-wrapper"},"Building source code / binary distribution with Maven Wrapper"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Maven Wrapper (Optional): Maven Wrapper can help you avoid dependencies problem about Maven version.")),Object(i.b)("pre",null,Object(i.b)("code",{parentName:"pre"},"# Setup Maven Wrapper (Maven 3.6.1)\nmvn -N io.takari:maven:0.7.7:wrapper -Dmaven=3.6.1\n\n# Check Maven Wrapper\n./mvnw -version\n\n# Replace 'mvn' with 'mvnw'. Example:\n./mvnw clean package -DskipTests\n")))}l.isMDXComponent=!0},193:function(e,r,n){"use strict";n.d(r,"a",(function(){return p})),n.d(r,"b",(function(){return m}));var t=n(0),a=n.n(t);function i(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function o(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function c(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){i(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function u(e,r){if(null==e)return{};var n,t,a=function(e,r){if(null==e)return{};var n,t,a={},i=Object.keys(e);for(t=0;t<i.length;t++)n=i[t],r.indexOf(n)>=0||(a[n]=e[n]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)n=i[t],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),l=function(e){var r=a.a.useContext(s),n=r;return e&&(n="function"==typeof e?e(r):c(c({},r),e)),n},p=function(e){var r=l(e.components);return a.a.createElement(s.Provider,{value:r},e.children)},d={inlineCode:"code",wrapper:function(e){var r=e.children;return a.a.createElement(a.a.Fragment,{},r)}},b=a.a.forwardRef((function(e,r){var n=e.components,t=e.mdxType,i=e.originalType,o=e.parentName,s=u(e,["components","mdxType","originalType","parentName"]),p=l(n),b=t,m=p["".concat(o,".").concat(b)]||p[b]||d[b]||i;return n?a.a.createElement(m,c(c({ref:r},s),{},{components:n})):a.a.createElement(m,c({ref:r},s))}));function m(e,r){var n=arguments,t=r&&r.mdxType;if("string"==typeof e||t){var i=n.length,o=new Array(i);o[0]=b;var c={};for(var u in r)hasOwnProperty.call(r,u)&&(c[u]=r[u]);c.originalType=e,c.mdxType="string"==typeof e?e:t,o[1]=c;for(var s=2;s<i;s++)o[s]=n[s];return a.a.createElement.apply(null,o)}return a.a.createElement.apply(null,n)}b.displayName="MDXCreateElement"}}]);