Mac OS siera に
実施した
前提
OS の
- OS
% sw_vers ProductName: Mac OS X ProductVersion: 10.12.6 BuildVersion: 16G29
手順
incubator-superset/installation.rst at master · apache/incubator-superset を
前提となる
パッケージ類の インストール pkg-config、brew install pkg-config libffi openssl python
opensslは インストール済みだったようで、
libffi、sqlite、 python が インストールされました。 ==> Summary 🍺 /usr/local/Cellar/libffi/3.2.1: 16 files, 297.0KB ==> Summary 🍺 /usr/local/Cellar/sqlite/3.20.0: 11 files, 3.0MB ==> Summary 🍺 /usr/local/Cellar/python/2.7.13_1: 3,528 files, 48MB
cryptographyの
インストール
cryptography という 暗号化ライブラリを インストールします。 以下のenv LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography==1.7.2
エラーが 発生しました。 Permission denied なので、OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/idna'
root ユーザーに スイッチして 再度コマンドを 実施し、 成功しました。 Successfully installed cffi-1.10.0 cryptography-1.7.2 enum34-1.1.6 idna-2.6 ipaddress-1.0.18 pycparser-2.18
supersetの インストールと 初期化
incubator-superset/installation.rst at master · apache/incubator-superset には、virtualenv
の
私は、
基本的にvirtualenv
環境で
supersetの
インストール
sudo をつけて pip install します。 結構時間がsudo pip install superset
かかり、 いろいろ インストールされました。 Successfully installed Flask-0.12.2 Flask-Babel-0.11.2 Flask-Login-0.2.11 Flask-OpenID-1.2.5 Mako-1.0.7 PyHive-0.4.0 WTForms-2.1 Werkzeug-0.12.2 alembic-0.9.5 amqp-1.4.9 anyjson-0.3.3 asn1crypto-0.22.0 babel-2.5.0 billiard-3.3.0.23 boto3-1.4.4 botocore-1.5.95 celery-3.1.25 certifi-2017.7.27.1 chardet-3.0.4 colorama-0.3.9 cryptography-1.9 docutils-0.14 flask-appbuilder-1.9.1 flask-cache-0.13.1 flask-migrate-2.0.3 flask-script-2.0.5 flask-sqlalchemy-2.1 flask-testing-0.6.2 flask-wtf-0.14.2 flower-0.9.1 futures-3.1.1 gunicorn-19.7.1 humanize-0.5.1 itsdangerous-0.24 jmespath-0.9.3 kombu-3.0.37 markdown-2.6.8 pandas-0.20.2 parsedatetime-2.0 pydruid-0.3.1 python-dateutil-2.6.0 python-editor-1.0.3 python-openid-2.2.5 requests-2.17.3 s3transfer-0.1.10 sasl-0.2.1 simplejson-3.10.0 sqlalchemy-1.1.9 sqlalchemy-utils-0.32.14 sqlparse-0.2.3 superset-0.19.0 thrift-0.10.0 thrift-sasl-0.2.1 tornado-4.2 urllib3-1.21.1
create-admin 実行
fabmanager が何かよく わかってないのですが、 Installation — Flask AppBuilder に 多少記載が あり、 Flask AppBuilder の コマンドだと 理解しました。
fabmanager create-admin
はどの ディレクトリで 実行しても 結果は 変わりません。 以降、fabmanager create-admin --app superset
管理者の username や password 等聞かれるので、 入力します。
ちなみにfabmanager
を引数なしで 実行すると 以下が コンソールに 出力されます。 % fabmanager Usage: fabmanager [OPTIONS] COMMAND [ARGS]... This is a set of commands to ease the creation and maintenance of your flask-appbuilder applications. All commands that import your app will assume by default that your running on your projects directory just before the app directory. will assume also that on the __init__.py your initializing AppBuilder like this (using a var named appbuilder) just like the skeleton app:: appbuilder = AppBuilder(......) If your using different namings use app and appbuilder parameters. Options: --help Show this message and exit. Commands: babel-compile Babel, Compiles all translations babel-extract Babel, Extracts and updates all messages... collect-static Copies flask-appbuilder static files to your... create-addon Create a Skeleton AddOn (needs internet... create-admin Creates an admin user create-app Create a Skeleton application (needs internet... create-db Create all your database objects (SQLAlchemy... list-users List all users on the database list-views List all registered views reset-password Resets a user's password run Runs Flask dev web server. security-cleanup Cleanup unused permissions from views and... version Flask-AppBuilder package version
babel-comlile
などのコマンドも あるのは、 Flask-Babel-0.11.2
とかがインストールされたからでしょうか? とりあえず 先に 進めます。 DB初期化
% superset db upgrade INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume transactional DDL.
サンプルデータの
ロード データセットが% superset load_examples Loading examples into <SQLA engine=u'sqlite:////Users/username/.superset/superset.db'> Loading [Birth names] Loading [Random time series data] Loading [Random long/lat data] Loading [Country Map data] Loading [Multiformat time series] Loading [Misc Charts] dashboard
ロードされます。 初期化 デフォルトロールの
作成 % superset init 2017-08-19 19:11:04,835:INFO:root:Syncing role definition 2017-08-19 19:11:04,835:INFO:root:Creating database reference 2017-08-19 19:11:04,889:INFO:root:Syncing Admin perms 2017-08-19 19:11:04,999:INFO:root:Syncing Alpha perms 2017-08-19 19:11:05,365:INFO:root:Syncing Gamma perms 2017-08-19 19:11:05,729:INFO:root:Syncing granter perms 2017-08-19 19:11:06,033:INFO:root:Syncing sql_lab perms 2017-08-19 19:11:06,375:INFO:root:Fetching a set of all perms to lookup which ones are missing 2017-08-19 19:11:06,471:INFO:root:Creating missing datasource permissions. 2017-08-19 19:11:06,481:INFO:root:Creating missing database permissions. 2017-08-19 19:11:06,495:INFO:root:Creating missing metrics permissions
サーバー起動
% superset runserver Starting server with command:
http://0.0.0.0:8088
に結構エラーは
以上です。
コメント