blob: 6d0218861de587cdb120e05f9677cf98dd22a26a [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{s0aW:function(e,t,o){"use strict";o.r(t),o.d(t,"_frontmatter",(function(){return i})),o.d(t,"default",(function(){return p}));var n=o("k1TG"),a=o("8o2o"),s=(o("q1tI"),o("7ljp")),r=o("hhGP"),i=(o("qKvR"),{});void 0!==i&&i&&i===Object(i)&&Object.isExtensible(i)&&!i.hasOwnProperty("__filemeta")&&Object.defineProperty(i,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/pages/docs/installation/index.mdx"}});var c={_frontmatter:i},l=r.a;function p(e){var t=e.components,o=Object(a.a)(e,["components"]);return Object(s.b)(l,Object(n.a)({},c,o,{components:t,mdxType:"MDXLayout"}),Object(s.b)("h2",{id:"installing-superset-locally-using-docker-compose"},"Installing Superset Locally Using Docker Compose"),Object(s.b)("p",null,"The fastest way to try Superset locally is using Docker and Docker Compose on a Linux or Mac OSX\ncomputer. Superset does not have official support for Windows, so we have provided a VM workaround\nbelow."),Object(s.b)("h3",{id:"1-install-a-docker-engine-and-docker-compose"},"1. Install a Docker Engine and Docker Compose"),Object(s.b)("p",null,Object(s.b)("strong",{parentName:"p"},"Mac OSX")),Object(s.b)("p",null,Object(s.b)("a",Object(n.a)({parentName:"p"},{href:"https://docs.docker.com/docker-for-mac/install/"}),"Install Docker for Mac"),", which includes the Docker\nengine and a recent version of ",Object(s.b)("inlineCode",{parentName:"p"},"docker-compose")," out of the box."),Object(s.b)("p",null,'Once you have Docker for Mac installed, open up the preferences pane for Docker, go to the\n"Resources" section and increase the allocated memory to 6GB. With only the 2GB of RAM allocated by\ndefault, Superset will fail to start.'),Object(s.b)("p",null,Object(s.b)("strong",{parentName:"p"},"Linux")),Object(s.b)("p",null,Object(s.b)("a",Object(n.a)({parentName:"p"},{href:"https://docs.docker.com/engine/install/"}),"Install Docker on Linux")," by following Docker’s\ninstructions for whichever flavor of Linux suits you. Because ",Object(s.b)("inlineCode",{parentName:"p"},"docker-compose")," is not installed as\npart of the base Docker installation on Linux, once you have a working engine, follow the\n",Object(s.b)("a",Object(n.a)({parentName:"p"},{href:"https://docs.docker.com/compose/install/"}),"docker-compose installation instructions")," for Linux."),Object(s.b)("p",null,Object(s.b)("strong",{parentName:"p"},"Windows")),Object(s.b)("p",null,"Superset is not officially supported on Windows unfortunately. One option for Windows users to\ntry out Superset locally is to install an Ubuntu Desktop VM via\n",Object(s.b)("a",Object(n.a)({parentName:"p"},{href:"https://www.virtualbox.org/"}),"VirtualBox")," and proceed with the Docker on Linux instructions inside\nof that VM. We recommend assigning at least 8GB of RAM to the virtual machine as well as\nprovisioning a hard drive of at least 40GB, so that there will be enough space for both the OS and\nall of the required dependencies. Docker Desktop ",Object(s.b)("a",Object(n.a)({parentName:"p"},{href:"https://docs.docker.com/docker-for-windows/wsl/"}),"recently added support for Windows Subsystem for Linux (WSL) 2"),", which may be another option."),Object(s.b)("h3",{id:"2-clone-supersets-github-repository"},"2. Clone Superset's Github repository"),Object(s.b)("p",null,Object(s.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/apache/superset"}),"Clone Superset's repo")," in your terminal with the\nfollowing command:"),Object(s.b)("pre",null,Object(s.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),"$ git clone https://github.com/apache/superset.git\n")),Object(s.b)("p",null,"Once that command completes successfully, you should see a new ",Object(s.b)("inlineCode",{parentName:"p"},"superset")," folder in your\ncurrent directory."),Object(s.b)("h3",{id:"3-launch-superset-through-docker-compose"},"3. Launch Superset Through Docker Compose"),Object(s.b)("p",null,"Navigate to the folder you created in step 1:"),Object(s.b)("pre",null,Object(s.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),"$ cd superset\n")),Object(s.b)("p",null,"Then, run the following command:"),Object(s.b)("pre",null,Object(s.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),"$ docker-compose -f docker-compose-non-dev.yml up\n")),Object(s.b)("p",null,"You should see a wall of logging output from the containers being launched on your machine. Once\nthis output slows, you should have a running instance of Superset on your local machine!"),Object(s.b)("p",null,Object(s.b)("strong",{parentName:"p"},"Note:")," This will bring up superset in a non-dev mode, changes to the codebase will not be reflected.\nIf you would like to run superset in dev mode to test local changes, simply replace the previous command with: ",Object(s.b)("inlineCode",{parentName:"p"},"docker-compose up"),",\nand wait for the ",Object(s.b)("inlineCode",{parentName:"p"},"superset_node")," container to finish building the assets."),Object(s.b)("h4",{id:"configuring-docker-compose"},"Configuring Docker Compose"),Object(s.b)("p",null,"The following is for users who want to configure how Superset starts up in Docker Compose; otherwise, you can skip to the next section."),Object(s.b)("p",null,"You can configure the Docker Compose settings for dev and non-dev mode with ",Object(s.b)("inlineCode",{parentName:"p"},"docker/.env")," and ",Object(s.b)("inlineCode",{parentName:"p"},"docker/.env-non-dev")," respectively. These environment files set the environment for most containers in the Docker Compose setup, and some variables affect multiple containers and others only single ones."),Object(s.b)("p",null,"One important variable is ",Object(s.b)("inlineCode",{parentName:"p"},"SUPERSET_LOAD_EXAMPLES")," which determines whether the ",Object(s.b)("inlineCode",{parentName:"p"},"superset_init")," container will load example data and visualizations into the database and Superset. These examples are quite helpful for most people, but probably unnecessary for experienced users. The loading process can sometimes take a few minutes and a good amount of CPU, so you may want to disable it on a resource-constrained device."),Object(s.b)("p",null,Object(s.b)("strong",{parentName:"p"},"Note:")," Users often want to connect to other databases from Superset. Currently, the easiest way to do this is to modify the ",Object(s.b)("inlineCode",{parentName:"p"},"docker-compose-non-dev.yml")," file and add your database as a service that the other services depend on (via ",Object(s.b)("inlineCode",{parentName:"p"},"x-superset-depends-on"),"). Others have attempted to set ",Object(s.b)("inlineCode",{parentName:"p"},"network_mode: host")," on the Superset services, but these generally break the installation, because the configuration requires use of the Docker Compose DNS resolver for the service names. If you have a good solution for this, let us know!"),Object(s.b)("h3",{id:"4-log-in-to-superset"},"4. Log in to Superset"),Object(s.b)("p",null,"Your local Superset instance also includes a Postgres server to store your data and is already\npre-loaded with some example datasets that ship with Superset. You can access Superset now via your\nweb browser by visiting ",Object(s.b)("inlineCode",{parentName:"p"},"http://localhost:8088"),". Note that many browsers now default to ",Object(s.b)("inlineCode",{parentName:"p"},"https")," - if\nyours is one of them, please make sure it uses ",Object(s.b)("inlineCode",{parentName:"p"},"http"),"."),Object(s.b)("p",null,"Log in with the default username and password:"),Object(s.b)("pre",null,Object(s.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),"username: admin\n")),Object(s.b)("pre",null,Object(s.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),"password: admin\n")))}void 0!==p&&p&&p===Object(p)&&Object.isExtensible(p)&&!p.hasOwnProperty("__filemeta")&&Object.defineProperty(p,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/pages/docs/installation/index.mdx"}}),p.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-pages-docs-installation-index-mdx-8e0be5d391c188437e8b.js.map