blob: 9264479c830e2b1580b95de3bc3f6d337b9f7ca5 [file] [log] [blame]
{"version":3,"sources":["webpack:///./src/pages/docs/installation/installing_scratch.mdx"],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","parentName","isMDXComponent"],"mappings":"wPAQaA,G,UAAe,S,oOAC5B,IAAMC,EAAc,CAClBD,gBAEIE,EAAYC,IACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,EACF,8BACD,OAAO,YAACJ,EAAD,eAAeD,EAAiBK,EAAhC,CAAuCD,WAAYA,EAAYE,QAAQ,cAG5E,iBAAQ,CACN,GAAM,oCADR,oCAGA,iBAAQ,CACN,GAAM,mBADR,mBAGA,qPAGA,qBAAG,sBAAQC,WAAW,KAAnB,sBACH,wGACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,iHAEL,wHACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,mHAEL,qBAAG,sBAAQA,WAAW,KAAnB,mDACH,iEAAgD,0BAAYA,WAAW,KAAvB,OAAhD,qBACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,mIAEL,qBAAG,sBAAQA,WAAW,KAAnB,aACH,0QAGA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,6BAEL,0GACF,6BAAGA,WAAW,KAAQ,CAChB,KAAQ,qBADd,YADE,iDAIA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,qEAEL,gJAA+H,6BAAGA,WAAW,KAAQ,CACjJ,KAAQ,mCADmH,SAA/H,cAEiC,6BAAGA,WAAW,KAAQ,CACnD,KAAQ,8CADqB,oBAFjC,MAKA,2EAA0D,0BAAYA,WAAW,KAAvB,OAA1D,QAAkH,0BAAYA,WAAW,KAAvB,cAAlH,KACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,2CAEL,2JACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,0GAGL,sFACA,iBAAQ,CACN,GAAM,8BADR,8BAGA,oHACF,0BAAYA,WAAW,KAAvB,cADE,oCACyF,6BAAGA,WAAW,KAAQ,CAC3G,KAAQ,mCAD6E,SADzF,qBAGwC,6BAAGA,WAAW,KAAQ,CAC1D,KAAQ,8CAD4B,oBAHxC,gCAK8D,0BAAYA,WAAW,KAAvB,OAL9D,KAMA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,6BAEL,iFACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,wKAKL,kDACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,oGAIL,wMAC4E,0BAAYA,WAAW,KAAvB,cAD5E,0BAGA,iBAAQ,CACN,GAAM,wCADR,wCAGA,mDAAkC,0BAAYA,WAAW,KAAvB,mBAAlC,KACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,kCAEL,mEACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,0BAEL,qFACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,4aAaL,gFAA+D,0BAAYA,WAAW,KAAvB,iBAA/D,iDACoB,0BAAYA,WAAW,KAAvB,kBADpB,4DAEA,iBAAQ,CACN,GAAM,+CADR,+CAGA,sEAAqD,6BAAGA,WAAW,KAAQ,CACvE,KAAQ,qBADyC,QAArD,kCAGE,0BAAYA,WAAW,KAAvB,SAHF,eAIA,yFACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,mFAGL,+EAA8D,0BAAYA,WAAW,KAAvB,WAA9D,iD,kOAMJJ,EAAWK,gBAAiB","file":"component---src-pages-docs-installation-installing-scratch-mdx-8f15606c5838c1f89661.js","sourcesContent":["import * as React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\n\nimport DefaultLayout from \"/home/runner/work/superset/superset/docs/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nexport const _frontmatter = {};\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n\n\n <h2 {...{\n \"id\": \"installing-superset-from-scratch\"\n }}>{`Installing Superset from Scratch`}</h2>\n <h3 {...{\n \"id\": \"os-dependencies\"\n }}>{`OS Dependencies`}</h3>\n <p>{`Superset stores database connection information in its metadata database. For that purpose, we use\nthe cryptography Python library to encrypt connection passwords. Unfortunately, this library has OS\nlevel dependencies.`}</p>\n <p><strong parentName=\"p\">{`Debian and Ubuntu`}</strong></p>\n <p>{`The following command will ensure that the required dependencies are installed:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`sudo apt-get install build-essential libssl-dev libffi-dev python-dev python-pip libsasl2-dev libldap2-dev\n`}</code></pre>\n <p>{`In Ubuntu 20.04 the following command will ensure that the required dependencies are installed:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev\n`}</code></pre>\n <p><strong parentName=\"p\">{`Fedora and RHEL-derivative Linux distributions`}</strong></p>\n <p>{`Install the following packages using the `}<inlineCode parentName=\"p\">{`yum`}</inlineCode>{` package manager:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel cyrus-sasl-devel openldap-devel\n`}</code></pre>\n <p><strong parentName=\"p\">{`Mac OS X`}</strong></p>\n <p>{`If you're not on the latest version of OS X, we recommend upgrading because we've found that many\nissues people have run into are linked to older versions of Mac OS X. After updating, install the\nlatest version of XCode command line tools:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`xcode-select --install\n`}</code></pre>\n <p>{`We don't recommend using the system installed Python. Instead, first install the\n`}<a parentName=\"p\" {...{\n \"href\": \"https://brew.sh/\"\n }}>{`homebrew`}</a>{` manager and then run the following commands:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`brew install readline pkg-config libffi openssl mysql postgres\n`}</code></pre>\n <p>{`You should install a recent version of Python (Superset uses 3.7.9). We'd recommend using a Python version manager like `}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/pyenv/pyenv\"\n }}>{`pyenv`}</a>{` (and also `}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/pyenv/pyenv-virtualenv\"\n }}>{`pyenv-virtualenv`}</a>{`).`}</p>\n <p>{`Let's also make sure we have the latest version of `}<inlineCode parentName=\"p\">{`pip`}</inlineCode>{` and `}<inlineCode parentName=\"p\">{`setuptools`}</inlineCode>{`:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`pip install --upgrade setuptools pip\n`}</code></pre>\n <p>{`Lastly, you may need to set LDFLAGS and CFLAGS for certain Python packages to properly build. You can export these variables with:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`export LDFLAGS=\"-L$(brew --prefix openssl)/lib\"\nexport CFLAGS=\"-I$(brew --prefix openssl)/include\"\n`}</code></pre>\n <p>{`These will now be available when pip installing requirements.`}</p>\n <h3 {...{\n \"id\": \"python-virtual-environment\"\n }}>{`Python Virtual Environment`}</h3>\n <p>{`We highly recommend installing Superset inside of a virtual environment. Python ships with\n`}<inlineCode parentName=\"p\">{`virtualenv`}</inlineCode>{` out of the box. If you're using `}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/pyenv/pyenv\"\n }}>{`pyenv`}</a>{`, you can install `}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/pyenv/pyenv-virtualenv\"\n }}>{`pyenv-virtualenv`}</a>{`. Or you can install it with `}<inlineCode parentName=\"p\">{`pip`}</inlineCode>{`:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`pip install virtualenv\n`}</code></pre>\n <p>{`You can create and activate a virtual environment using:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`# virtualenv is shipped in Python 3.6+ as venv instead of pyvenv.\n# See https://docs.python.org/3.6/library/venv.html\npython3 -m venv venv\n. venv/bin/activate\n`}</code></pre>\n <p>{`Or with pyenv-virtualenv:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`# Here we name the virtual env 'superset'\npyenv virtualenv superset\npyenv activate superset\n`}</code></pre>\n <p>{`Once you activated your virtual environment, all of the Python packages you install or uninstall\nwill be confined to this environment. You can exit the environment by running `}<inlineCode parentName=\"p\">{`deactivate`}</inlineCode>{` on the\ncommand line.`}</p>\n <h3 {...{\n \"id\": \"installing-and-initializing-superset\"\n }}>{`Installing and Initializing Superset`}</h3>\n <p>{`First, start by installing `}<inlineCode parentName=\"p\">{`apache-superset`}</inlineCode>{`:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`pip install apache-superset\n`}</code></pre>\n <p>{`Then, you need to initialize the database:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`superset db upgrade\n`}</code></pre>\n <p>{`Finish installing by running through the following commands:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`# Create an admin user (you will be prompted to set a username, first and last name before setting a password)\n$ export FLASK_APP=superset\nsuperset fab create-admin\n\n# Load some data to play with\nsuperset load_examples\n\n# Create default roles and permissions\nsuperset init\n\n# To start a development web server on port 8088, use -p to bind to another port\nsuperset run -p 8088 --with-threads --reload --debugger\n`}</code></pre>\n <p>{`If everything worked, you should be able to navigate to `}<inlineCode parentName=\"p\">{`hostname:port`}</inlineCode>{` in your browser (e.g.\nlocally by default at `}<inlineCode parentName=\"p\">{`localhost:8088`}</inlineCode>{`) and login using the username and password you created.`}</p>\n <h3 {...{\n \"id\": \"installing-superset-with-helm-in-kubernetes\"\n }}>{`Installing Superset with Helm in Kubernetes`}</h3>\n <p>{`You can install Superset into Kubernetes with `}<a parentName=\"p\" {...{\n \"href\": \"https://helm.sh/\"\n }}>{`Helm`}</a>{`. The chart is located in\nthe `}<inlineCode parentName=\"p\">{`helm/`}</inlineCode>{` directory.`}</p>\n <p>{`To install Superset in your Kubernetes cluster with Helm 3, run:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`helm dep up ./helm/superset\nhelm upgrade --install superset ./helm/superset\n`}</code></pre>\n <p>{`Note that the above command will install Superset into `}<inlineCode parentName=\"p\">{`default`}</inlineCode>{` namespace of your Kubernetes\ncluster.`}</p>\n\n </MDXLayout>;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}