アプリケーション限定イメージを使用したクラスタ - Swarm
概要
Yellowfinのクラスタ導入をセットアップする手順では、Yellowfinの各ノードに4GBのRAMが割り当てられ、Docker ホストのポートは8080から始まり、次に8081、8082と続きます。さらに、以下に説明する理由からTraefikを設定しています。
Docker Swarm ルーティングメッシュは、Dockerのエンタープライズエディションを使用している場合にのみスティッキーセッションをサポートし、Swarmを使用しない場合と同等の導入と比較すると、すべてのYellowfin コンテナが同じポートで公開されます。そのため、Yellowfin インスタンス間のロードバランシングを処理し、ブラウザCookieを介してスティッキーセッションをサポートするために、Traefikを使用することを強く推奨します。
各Yellowfin インスタンスは別のポートで実行されているため、ユーザーがセッション中にいずれかのYellowfin インスタンスに誘導されるように、スティッキーセッションをサポートするロードバランサーまたはリバースプロキシをインスタンスの前に配置することを推奨します。
Yellowfin クラスタを導入する前に、リポジトリデータベースを作成し、すべてのYellowfin コンテナで使用するのと同じバージョンのYellowfinと同期していることを確認してください。これを実行するには、Yellowfinのフルアプリケーションインストーラーをダウンロードし、ワークステーションにインストールします。これにより、フォルダー内にYellowfin リポジトリデータベースおよびYellowfin インスタンスが作成されます。これらは、コンテナの設定後に削除することができます。
サポートされているデータベースのタイプを確認するには、Yellowfinのインストールおよび導入ページでデータベース情報を参照してください。
以下の手順では、3つのノードを備えたYellowfin クラスタを導入する方法を紹介します。
ワークステーションに、Yellowfinのフルアプリケーションインストーラーバージョンをインストールします (これは、コンテナがリポジトリデータベースを使用できるようにするための一時的なものです)。
このインストールからweb.xml ファイルをコピーし、バックアップとして任意の場所に保存します (これは、Yellowfin リポジトリデータベースに接続するために必要なYellowfin 認証情報の参照として機能します)。
DockerがSwarmモード実行され、Traefikが導入されていることを確認します。
次のテキストをコピーし、任意のテキストエディターに貼り付けます。
version: '3' services: yellowfin-cluster: ports: - "8080:8080" # Maps Yellowfin running on port 8080 to Docker Swarm port 8080 #- "7801:7800" # Maps the Yellowfin cluster port to an external port on the host (Optional) hostname: "yellowfin-node-{{.Task.Slot}}" # Optional, sets the hostname to the provided value. environment: # Required environment variables - JDBC_CLASS_NAME=INSERT_DATABASE_TYPE_HERE # Database driver class name - JDBC_CONN_URL=jdbc:INSERT_JDBC_CONNECTION_STRING_HERE # Database connection string - JDBC_CONN_USER=INSERT_DATABASE_USER_HERE # Username to use when accessing the database - JDBC_CONN_PASS=INSERT_JDBC_PASSWORD_HERE # Password for the database user - JDBC_CONN_ENCRYPTED=true # Flag for indicating if the database user's password supplied is encrypted or not. - APP_MEMORY=4096 # The amount of memory in megabytes to assign to the Yellowfin Application. - CLUSTER_INTERFACE=match-interface:eth1 #Sets the JGroups "Bind_addr" attribute. Adjust as needed if the containers aren't communicating with each other. - CLUSTER_PORT=7800 # TCP Port to use for cluster networking, used to connect between containers - NODE_BACKGROUND_TASKS=REPORT_BROADCAST_BROADCASTTASK,REPORT_BROADCAST_MIREPORTTASK,FILTER_CACHE,SOURCE_FILTER_REFRESH,SOURCE_FILTER_UPDATE_REMINDER,THIRD_PARTY_AUTORUN,ORGREF_CODE_REFRESH,ETL_PROCESS_TASK,SIGNALS_DCR_TASK,SIGNALS_ANALYSIS_TASK,SIGNALS_CLEANUP_TASK,COMPOSITE_VIEW_REFRESH,SIGNALS_CORRELATION_TASK # Comma separated list of which background Task Types can be run on this node. - NODE_PARALLEL_TASKS=4,4,4,4,4,4,4,4,4,4,4,4,4 # Comma separated list of the number of concurrent tasks for each Task Type that can be run on deploy: replicas: 2 # Total number of instances to deploy - this example deploys two labels: - "traefik.enable=true" # Tell Traefik to route to these instances, works with exposedbydefault param in Traefik - "traefik.docker.network=yellowfin-cluster_yf-cluster" # IMPORTANT: This will allow Traefik to route to the Yellowfin instances. Format: <%NameOfSwarmStack%>_<%NameOfDockerNetwork%> - "traefik.http.routers.yellowfin.rule=Host(`INSERT_DNS_HOSTNAME`)" #IMPORTANT: The URL/DNS Name that you want Traefik to use for routing to your Yellowfin instances. Eg: ` yellowfin.example.com` - "traefik.http.routers.yellowfin.entrypoints=web" # Utilizes Traefik's web entrypoint - "traefik.http.services.yellowfin.loadBalancer.server.port=8080" # Traefik to route to the Yellowfin application port - "traefik.http.services.yellowfin.loadBalancer.sticky.cookie" # Enables sticky sessions support networks: yf-cluster: # The network to add the Yellowfin instances to image: "yellowfinbi/yellowfin-app-only:<RELEASE_VERSION_GOES_HERE>" # Path to the app-only image of Yellowfin traefik: image: traefik # Pulls Traefik from Docker Hub command: - "--providers.docker.endpoint=unix:///var/run/docker.sock" #Gives Traefik access to the Docker API - "--providers.docker.swarmMode=true" # Tells Traefik we're using Docker Swarm - "--providers.docker.exposedbydefault=true" # Exposed by default will auto-route to any Docker containers/services that have the right labels. - "--providers.docker.network=yf-cluster" # The network Traefik should be monitoring. Must match the one Yellowfin will be deployed in. - "--providers.docker.watch=true" # Watch for Docker Events - "--entrypoints.web.address=:80" # Run Traefik on port 80 - "--api=true" # Enables the Traefik API ports: - 80:80 # Runs Traefik on port 80 (HTTP) #- 8090:8080 # Optional - Runs Traefik on port 8090 (if wanting to use the dashboard) volumes: # So that Traefik can listen to Docker events - /var/run/docker.sock:/var/run/docker.sock:ro networks: - yf-cluster # The network to add Traefik to. deploy: placement: constraints: - node.role == manager # IMPORTANT, only allows Traefik to deploy to a manager node. This is recommended by Traefik. networks: yf-cluster: # Creates a network using the overlay driver driver: overlay
上記構成テキストで、yellowfin-cluster_yf-clusterを含むテキスト行を見つけ、Swarmおよびネットワークのために、これを独自のDocker Stack名に置き換えます。
上記構成テキストで、 (`INSERT_DNS_HOSTNAME`) を含むテキスト行を見つけ、YellowfinをリッスンするTraefikのために、独自のDNS名を設定します。
上記テキストの各コンテナにおいて、環境変数プレースホルダーを独自の設定詳細に置き換えます (これらは、Yellowfin インストールのweb.xml ファイルにあります)。こちらは、PostgreSQL インスタンスに接続するための例です。
# Required environment variables - JDBC_CLASS_NAME=org.postgresql.Driver # Database driver class name - JDBC_CONN_URL=jdbc:postgresql://192.168.1.50/docker_yellowfin_cluster # Database connection string - JDBC_CONN_USER=postgres # Username to use when accessing the database - JDBC_CONN_PASS=bXF0oj5gnB1oRB1kZq5 # Password for the database user - JDBC_CONN_ENCRYPTED=true # Flag for indicating if the database user's password supplied is encrypted or not. - APP_MEMORY=4096 # The amount of memory in megabytes to assign to the Yellowfin Application. - CLUSTER_INTERFACE=match-interface:eth1 #Sets the JGroups "Bind_addr" attribute. Adjust as needed if the containers aren't communicating with each other. - CLUSTER_PORT=7800 # TCP Port to use for cluster networking - NODE_BACKGROUND_TASKS=REPORT_BROADCAST_BROADCASTTASK,REPORT_BROADCAST_MIREPORTTASK,FILTER_CACHE,SOURCE_FILTER_REFRESH,SOURCE_FILTER_UPDATE_REMINDER,THIRD_PARTY_AUTORUN,ORGREF_CODE_REFRESH,ETL_PROCESS_TASK,SIGNALS_DCR_TASK,SIGNALS_ANALYSIS_TASK,SIGNALS_CLEANUP_TASK,COMPOSITE_VIEW_REFRESH,SIGNALS_CORRELATION_TASK # Comma separated list of which background Task Types can be run on this node. - NODE_PARALLEL_TASKS=4,4,4,4,4,4,4,4,4,4,4,4,4 # Comma separated list of the number of concurrent tasks for each Task Type that can be run on image: "yellowfinbi/yellowfin-app-only:9.6.0" # Path to the app-only image of Yellowfin
テキストをyellowfin-cluster.ymlと呼ばれるYAML ファイルに保存します。
Yellowfinを導入するためにターミナルから次のコマンドを実行し、バックグラウンドで実行します。
docker stack deploy --compose-file yellowfin-cluster.yml yellowfin-clusterホストURLを8080ポート (または、設定した他のすべてのポート)で入力し 、Yellowfinを起動します。
Yellowfinがコンテナから実行されていること、およびログインできることを確認します (これにより、ログイン認証情報が正しいことが確認されるので、Yellowfinのワークステーションインスタンスを安全に削除することができます)。
フォルダーを削除して、Yellowfinのワークステーションインスタンスを削除します。
項目ナビゲーション
現在のトピック - コンテナ環境へのインストール
本ページはコンテナ環境へのインストール項目の一部であり、DockerおよびKubernetesそれぞれの項目には、以下のページが含まれます。
本ページはYellowfinのインストールおよび導入項目の一部であり、以下のトピックを含みます。