starting superset, mysql, redis

docker상에서 superset(server-worker), mysql, redis 분산 실행 

## Environment
    centos 7.6
    docker 1.13.1
## architecture


## starting mysql
[root@kylin docker-files]# docker run --name mysql --rm --env-file .env -d -p 3306:3306 docker.io/mysql:5.7
d399db893198be4ef8cea8b47dbbd27357795bec7b5d1426dc0ea63a6fb20d33
[root@kylin docker-files]# docker ps -a
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                               NAMES
d399db893198        docker.io/mysql:5.7   "docker-entrypoint..."   5 seconds ago       Up 4 seconds        0.0.0.0:3306->3306/tcp, 33060/tcp   mysql
[root@kylin docker-files]#
[root@kylin docker-files]# docker inspect d399db893198
"Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "f1f7e838ec0d181240f6300e5ba039a308a87046bfea9447c06f61b9bd1eb8f6",
                    "EndpointID": "1c3ef318158b94ca70e0c78a26afda06f94cc51441e2ae8d54f87ec23e3cf9d9",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02"
                }



## starting redis
[root@kylin docker-files]# docker run --name redis --rm --env-file .env -d -p 6379:6379 docker.io/redis:3.2
5e8626fb0852663d7aaafefb22a6ee620b2410789fc99a73f1275c3923cc1a25
[root@kylin docker-files]# docker ps -a
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                               NAMES
5e8626fb0852        docker.io/redis:3.2   "docker-entrypoint..."   4 seconds ago       Up 3 seconds        0.0.0.0:6379->6379/tcp              redis
d399db893198        docker.io/mysql:5.7   "docker-entrypoint..."   39 minutes ago      Up 39 minutes       0.0.0.0:3306->3306/tcp, 33060/tcp   mysql
[root@kylin docker-files]# docker inspect 5e8626fb0852
[
    {
        "Id": "5e8626fb0852663d7aaafefb22a6ee620b2410789fc99a73f1275c3923cc1a25",
"Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "f1f7e838ec0d181240f6300e5ba039a308a87046bfea9447c06f61b9bd1eb8f6",
                    "EndpointID": "8527ad527fa04a9cf50617a302d735e2e0aed4c51d4ac1d73bb0f348beae6927",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.3",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:03"
                }

## starting superset server
[root@kylin docker-files]# docker run -p 8088:8088 --rm -v config:/home/superset/config/ abhioncbr/docker-superset:0.29.0rc5 cluster server mysql://superset:superset@172.17.0.2:3306/superset redis://172.17.0.3:6379
Environment Variable: SUPERSET_ENV:
Provided Script Arguments: cluster server mysql://superset:superset@172.17.0.2:3306/superset redis://172.17.0.3:6379
Environment Variable Exported: DB_URL: mysql://superset:superset@172.17.0.2:3306/superset
Environment Variable Exported: REDIS_URL: redis://172.17.0.3:6379
Environment Variable Exported: INVOCATION_TYPE: RUN
Starting Initialization[if needed]
/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
Apache-Superset Already Initialized.
Container deployment type: cluster
[2019-08-24 14:16:57 +0000] [20] [INFO] Starting gunicorn 19.8.0
[2019-08-24 14:16:57 +0000] [20] [INFO] Listening at: http://0.0.0.0:8088 (20)
[2019-08-24 14:16:57 +0000] [20] [INFO] Using worker: gevent
[2019-08-24 14:16:57 +0000] [23] [INFO] Booting worker with pid: 23
[2019-08-24 14:16:57 +0000] [24] [INFO] Booting worker with pid: 24

## starting superset worker1
[root@kylin docker-files]# docker run -p 5555:5555 --rm -v config:/home/superset/config/ abhioncbr/docker-superset:0.29.0rc5 cluster worker mysql://superset:superset@172.17.0.2:3306/superset redis://172.17.0.3:6379
Environment Variable: SUPERSET_ENV:
Provided Script Arguments: cluster worker mysql://superset:superset@172.17.0.2:3306/superset redis://172.17.0.3:6379
Environment Variable Exported: DB_URL: mysql://superset:superset@172.17.0.2:3306/superset
Environment Variable Exported: REDIS_URL: redis://172.17.0.3:6379
Environment Variable Exported: INVOCATION_TYPE: RUN
Starting Initialization[if needed]
/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
Apache-Superset Already Initialized.
Container deployment type: cluster
/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
2019-08-24 14:53:42,331:INFO:flower.command:Visit me at http://localhost:5555
2019-08-24 14:53:42,458:INFO:flower.command:Broker: redis://172.17.0.3:6379/0
2019-08-24 14:53:42,470:INFO:flower.command:Registered tasks:
['celery.accumulate',
 'celery.backend_cleanup',
 'celery.chain',
 'celery.chord',
 'celery.chord_unlock',
 'celery.chunks',
 'celery.group',
 'celery.map',
 'celery.starmap',
 'superset.sql_lab.get_sql_results']
2019-08-24 14:53:42,583:INFO:kombu.mixins:Connected to redis://172.17.0.3:6379/0
2019-08-24 14:53:45,879:WARNING:flower.api.control:'stats' inspect method failed
2019-08-24 14:53:45,879:WARNING:flower.api.control:'active_queues' inspect method failed
2019-08-24 14:53:45,880:WARNING:flower.api.control:'registered' inspect method failed
2019-08-24 14:53:45,880:WARNING:flower.api.control:'scheduled' inspect method failed
2019-08-24 14:53:45,880:WARNING:flower.api.control:'active' inspect method failed
2019-08-24 14:53:45,880:WARNING:flower.api.control:'reserved' inspect method failed
2019-08-24 14:53:45,881:WARNING:flower.api.control:'revoked' inspect method failed
2019-08-24 14:53:45,881:WARNING:flower.api.control:'conf' inspect method failed


## starting superset worker2
[root@kylin docker-files]# docker run --rm -v config:/home/superset/config/ abhioncbr/docker-superset:0.29.0rc5 cluster worker mysql://superset:superset@172.17.0.2:3306/superset redis://172.17.0.3:6379
Environment Variable: SUPERSET_ENV:
Provided Script Arguments: cluster worker mysql://superset:superset@172.17.0.2:3306/superset redis://172.17.0.3:6379
Environment Variable Exported: DB_URL: mysql://superset:superset@172.17.0.2:3306/superset
Environment Variable Exported: REDIS_URL: redis://172.17.0.3:6379
Environment Variable Exported: INVOCATION_TYPE: RUN
Starting Initialization[if needed]
/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
Apache-Superset Already Initialized.
Container deployment type: cluster
/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
2019-08-24 14:59:49,513:INFO:flower.command:Visit me at http://localhost:5555
2019-08-24 14:59:49,557:INFO:flower.command:Broker: redis://172.17.0.3:6379/0
2019-08-24 14:59:49,568:INFO:flower.command:Registered tasks:
['celery.accumulate',
 'celery.backend_cleanup',
 'celery.chain',
 'celery.chord',
 'celery.chord_unlock',
 'celery.chunks',
 'celery.group',
 'celery.map',
 'celery.starmap',
 'superset.sql_lab.get_sql_results']
2019-08-24 14:59:49,648:INFO:kombu.mixins:Connected to redis://172.17.0.3:6379/0
## result

댓글

이 블로그의 인기 게시물

error You have $NVM_DIR set to "/root/.nvm", but that directory does not exist. Check your profile files and environment.

linux mint install xrdp

centos 6.x yum update problem making ssl connection