"use strict";(self.webpackChunkriak_docs=self.webpackChunkriak_docs||[]).push([["57098"],{23890:function(e,n,i){i.r(n),i.d(n,{default:()=>u,frontMatter:()=>a,metadata:()=>s,assets:()=>o,toc:()=>c,contentTitle:()=>l});var s=JSON.parse('{"id":"setup/installing/installing_amazon_web_services","title":"Amazon Web Services","description":"Launching Riak VMs via the AWS Marketplace","source":"@site/versioned_docs/version-2.0.7/setup/installing/amazon-web-services.md","sourceDirName":"setup/installing","slug":"/setup/installing/amazon-web-services","permalink":"/docs/2.0.7/setup/installing/amazon-web-services","draft":false,"unlisted":false,"editUrl":"https://github.com/riak/riak.github.io/edit/main/versioned_docs/version-2.0.7/setup/installing/amazon-web-services.md","tags":[],"version":"2.0.7","sidebarPosition":0,"frontMatter":{"title":"Amazon Web Services","id":"installing_amazon_web_services","slug":"amazon-web-services","sidebar_position":0},"sidebar":"tutorialSidebar","previous":{"title":"Installing","permalink":"/docs/2.0.7/setup/installing/"},"next":{"title":"Debian and Ubuntu","permalink":"/docs/2.0.7/setup/installing/debian-ubuntu"}}'),t=i("85893"),r=i("50065");let a={title:"Amazon Web Services",id:"installing_amazon_web_services",slug:"amazon-web-services",sidebar_position:0},l=void 0,o={},c=[{value:"Launching Riak VMs via the AWS Marketplace",id:"launching-riak-vms-via-the-aws-marketplace",level:2},{value:"Security Group Settings",id:"security-group-settings",level:3},{value:"Clustering Riak on AWS",id:"clustering-riak-on-aws",level:2}];function d(e){let n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"launching-riak-vms-via-the-aws-marketplace",children:"Launching Riak VMs via the AWS Marketplace"}),"\n",(0,t.jsxs)(n.p,{children:["In order to launch a Riak virtual machine via the AWS Marketplace, you will first need to sign up for an ",(0,t.jsx)(n.a,{href:"http://aws.amazon.com",children:"Amazon Web Services"})," account."]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Navigate to ",(0,t.jsx)(n.a,{href:"https://aws.amazon.com/marketplace/",children:"https://aws.amazon.com/marketplace/"})," and sign in with your Amazon Web Services account."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Locate Riak in the ",(0,t.jsx)(n.strong,{children:"Databases & Caching"})," category or search for Riak from any page."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Set your desired AWS region, EC2 instance type, firewall settings, and key pair"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"AWS Marketplace Instance Settings",src:i(50334).Z+"",width:"519",height:"727"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Click the ",(0,t.jsx)(n.strong,{children:"Accept Terms and Launch with 1-Click"})," button."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"security-group-settings",children:"Security Group Settings"}),"\n",(0,t.jsx)(n.p,{children:"Once the virtual machine is created, you should verify that your selected EC2 security group is properly configured for Riak."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the AWS EC2 Management Console, click ",(0,t.jsx)(n.strong,{children:"Security Groups"}),", then click the name of the security group for your Riak VM."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Click on the ",(0,t.jsx)(n.strong,{children:"Inbound"})," tab in the lower pane.  Your security group should include the following open ports:"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"22 (SSH)"}),"\n",(0,t.jsx)(n.li,{children:"8087 (Riak Protocol Buffers Interface)"}),"\n",(0,t.jsx)(n.li,{children:"8098 (Riak HTTP Interface)"}),"\n"]}),"\n",(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsxs)(n.li,{children:["You will need to add additional rules within this security group to allow your Riak instances to communicate.  For each port range below, create a new ",(0,t.jsx)(n.strong,{children:"Custom TCP rule"})," with the source set to the current security group ID (found on the ",(0,t.jsx)(n.strong,{children:"Details"})," tab)."]}),"\n"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Port range: 4369"}),"\n",(0,t.jsx)(n.li,{children:"Port range: 6000-7999"}),"\n",(0,t.jsx)(n.li,{children:"Port range: 8099"}),"\n"]}),"\n",(0,t.jsxs)(n.ol,{start:"4",children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["When complete, your security group should contain all of the rules listed below. If you are missing any rules, add them in the lower panel and then click the ",(0,t.jsx)(n.strong,{children:"Apply Rule Changes"})," button."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"EC2 Security Group Settings",src:i(48876).Z+"",width:"797",height:"175"})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["We also recommend that you read more about Riak's ",(0,t.jsx)(n.a,{href:"/docs/2.0.7/using/security/",children:"Security and Firewalls"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"clustering-riak-on-aws",children:"Clustering Riak on AWS"}),"\n",(0,t.jsx)(n.p,{children:"You will need need to launch at least 3 instances to form a Riak cluster.  When the instances have been provisioned and the security group is configured, you can connect to them using SSH or PuTTY as the ec2-user."}),"\n",(0,t.jsxs)(n.p,{children:["You can find more information on connecting to an instance on the official ",(0,t.jsx)(n.a,{href:"http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/AccessingInstances.html",children:"Amazon EC2 instance guide"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"Note",type:"note",children:(0,t.jsxs)(n.p,{children:["The following clustering setup will ",(0,t.jsx)(n.em,{children:"not"})," be resilient to instance restarts\nunless deployed in Amazon VPC."]})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"On the first node, obtain the internal IP address:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl http://169.254.169.254/latest/meta-data/local-ipv4\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"For all other nodes, use the internal IP address of the first node:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo riak-admin cluster join riak@<ip.of.first.node>\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"After all of the nodes are joined, execute the following:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo riak-admin cluster plan\n"})}),"\n",(0,t.jsx)(n.p,{children:"If this looks good:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo riak-admin cluster commit\n"})}),"\n",(0,t.jsx)(n.p,{children:"To check the status of clustering use:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo riak-admin member_status\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"You now have a Riak cluster running on AWS."})]})}function u(e={}){let{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},48876:function(e,n,i){i.d(n,{Z:function(){return s}});let s=i.p+"assets/images/aws-marketplace-security-group-8bcf795a49bbb7cc66764df97f207ba8.png"},50334:function(e,n,i){i.d(n,{Z:function(){return s}});let s=i.p+"assets/images/aws-marketplace-settings-e148cb3d0aaa2f940cdd5b13007198e3.png"},50065:function(e,n,i){i.d(n,{Z:function(){return l},a:function(){return a}});var s=i(67294);let t={},r=s.createContext(t);function a(e){let n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]);