1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6320],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(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,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),c=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=c(n),m=r,h=u["".concat(s,".").concat(m)]||u[m]||p[m]||a;return n?o.createElement(h,i(i({ref:t},d),{},{components:n})):o.createElement(h,i({ref:t},d))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var c=2;c<a;c++)i[c]=n[c];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}m.displayName="MDXCreateElement"},1794:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var o=n(7462),r=n(3366),a=(n(7294),n(3905)),i=["components"],l={title:"Docker Deployment"},s=void 0,c={unversionedId:"nodes/hive/docker-deploy",id:"nodes/hive/docker-deploy",title:"Docker Deployment",description:"With the continuous maturity of Docker technology, service deployment based on the Docker environment has become a standardized deployment method. Hive Node first provides a Docker-based deployment mode. Because it c
1ontains three sub-services, three Docker Container service processes will be formed after the Docker deployment.",source:"@site/../docs/5.nodes/hive/docker-deploy.md",sourceDirName:"5.nodes/hive",slug:"/nodes/hive/docker-deploy",permalink:"/nodes/hive/docker-deploy",draft:!1,editUrl:"https://github.com/elastos/Elastos.Wiki/edit/master/website/../docs/5.nodes/hive/docker-deploy.md",tags:[],version:"current",lastUpdatedBy:"racollette",lastUpdatedAt:1682607517,formattedLastUpdatedAt:"Apr 27, 2023",frontMatter:{title:"Docker Deployment"},sidebar:"nodesSidebar",previous:{title:"Introduction",permalink:"/nodes/hive/introduction"},next:{title:"Direct Deployment",permalink:"/nodes/hive/direct-deploy"}},d={},u=[{value:"Requirements",id:"requirements",level:2},{value:"Deployment",id:"deployment",level:2}],p={toc:u},m="wrapper";function h(e){var t=e.components,n=(0,r.Z)(e,i);return(0,a.kt)(m,(0,o.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"With the continuous maturity of Docker technology, service deployment based on the Docker environment has become a standardized deployment method. Hive Node first provides a Docker-based deployment mode. Because it c
1ontains three sub-services, three Docker Container service processes will be formed after the Docker deployment."),(0,a.kt)("h2",{id:"requirements"},"Requirements"),(0,a.kt)("p",null,"In principle, Hive Node can be deployed in any Linux system, but currently, the Hive Node team only verifies in Ubuntu Linux 22.04 environment. Thus, please try to consider deploying and running in the Ubuntu Linux environment when community users install Hive Node. Docker and Python 3 are needed to deploy Hive Node. The installation steps are as follows:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Prerequisites Installed (Docker and Python3)\nAssumed the Docker and Python3 already shipped on your system. Otherwise, you need to install them manually. Generally, there is python3.6 already built inside Ubuntu 22.04. To Docker, you can run the following commands to install it:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"curl -fsSL https://get.docker.com -o get-docker.sh\nsudo sh get-docker.sh\nsudo usermod -aG docker your-userid\n")),(0,a.kt)("admonition",{title:"Notice",type:"info"},(0,a.kt)("p",{parentName:"admonition"},"You will need to sign out from the target server and log in again to make Docker work effectively.")),(0,a.kt)("ol",{start:2},(0,a.kt)("li",{parentName:"ol"},"Download Package and Unzip\nDownload the latest version of packages and untar it onto your server. At the time of this writing, you can run the commands as below:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"curl -fsL https://github.com/elastos/Elastos.NET.Hive.Node/archive/release-v2.0.1.tar.gz -o release.tar.gz\ntar -xzvf release.tar.gz\n")),(0,a.kt)("ol",{start:3},(0,a.kt)("li",{parentName:"ol"},"Start the Installation")),(0,a.kt)("p",null,"Enter into the source code folder and directly run the command to install the Hive node service:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'/bin/bash -c "$(curl -fsSL https://www.trinity-tech.io/hivenode/scripts/run.sh)" -s docker\n')),(0,a.kt)("p",null,"After the above steps have been finished, use the following command to check whether the Hive Node functions or not. If successful, it will display two container instances. One is hive-node, and the other is MongoDB."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker ps\n")),(0,a.kt)("ol",{start:4},(0,a.kt)("li",{parentName:"ol"},"Run the test-cases")),(0,a.kt)("p",null,"Run the next command to launch test-cases to verify the deployed node at the same device:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"./run.sh test\n")),(0,a.kt)("h2",{id:"deployment"},"Deployment"),(0,a.kt)("p",null,"At present, Hive Node automatically installs all Hive Node sub-services through scripted operation, and this script comes from the source code root directory of Hive Node."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"./run.sh docker\n")),(0,a.kt)("p",null,"This command will do the following:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Run MongoDB service and IPFS service with the mode of docker. If there is no image of MongoDB and IPFS, it will be downloaded automatically."),(0,a.kt)("li",{parentName:"ul"},"Run the Hive Node service with the mode of docker, which will create the image of Hive Node locally through the downloaded source code."),(0,a.kt)("li",{parentName:"ul"},"Execute the detection script to ensure that the Hive Node service starts normally so that it can be accessed later.")))}h.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.