Crowd Data Center のインストール

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Beta versions of Crowd Data Center are not intended to be deployed in production environments. Those versions are not feature complete and may contain bugs. Atlassian does not take responsibility for potential data loss or malfunctions caused by Crowd Data Center.

Crowd Data Center の概要

Crowd Data Center is a solution for larger enterprises where Crowd is used for authentication and user management, and where high availability is crucial.

Crowd Data Center consists of a cluster of dedicated machines with three distinct roles:

  • Load balancer – It distributes requests from your users to the nodes in the cluster. If a node stops working, the load balancer detects the failure and redirects the requests to other nodes within seconds.
  • Application nodes – A cluster of nodes, which share the incoming requests. A failure of one is not visible to users, because of the immediate redirects.
  • Shared database – A database where all the nodes store their data.

Problems?

If you encounter any problems while installing Crowd Data Center, create an issue, and we'll get this sorted out for you.

始める前に

Before you install Crowd Data Center, review this prerequisite information:

  • Prepare a Crowd Data Center license. As a participant in the private beta, you should have already received a license key from Atlassian in a separate email. If you need a new license or want to get involved, sign up for Beta
  • Understand the node requirements.

    詳細を読む...
    • Each Crowd node must run on its own machine (physical or virtual), with a separate machine for the database. The database must be accessible by each node.
    • Normal Crowd supported platforms and requirements apply to each node.
    • 各ノードはまったく同じである必要はありませんが、一貫性のあるパフォーマンスのために、可能な限り同質になるようにします。
    • Nodes must run the exact same Crowd version and must be located in the same data center.
    • ノードは、同じタイムゾーンに設定され、現在時刻の同期を維持する必要があります。これを行うには、ntpd や類似のサービスを利用すると便利です。
    • You'll need a directory (network share) that can be accessed by all your nodes.
  • Install and configure a load balancer of your choice.

    詳細を読む...
    • The load balancer must support "cookie based session affinity" (also known as "sticky sessions")
    • Make sure all Atlassian applications and other REST clients access application nodes using the load balancer

To guarantee high availability, you should also cluster the load balancer and database.

Crowd Data Center のインストール

This illustration shows the general method of installing a Crowd clustered instance:

CrowdDC  

This install guide assumes that you already have a Crowd instance, a load balancer, and a database service.

Before upgrading from an earlier version of Crowd, back up your data.

1. Create the shared directory

This step is required only for Crowd Data Center 3.0.0-m02 and onward.


  1. Create a directory and name it shared. All nodes in your Data Center must be able to access it.
  2. When installing Crowd, you'll create a home directory. Mount shared as a subdirectory of it.

    I have started Crowd and it created a local shared directory...

    If you, by any chance, have already installed and started Crowd Data Center, stop your instance, and copy the contents of the local shared directory to the network share, and replace the directory with a link to the network share.

2. Upgrade or install Crowd 3.0 or later

See Installation and Upgrade Guide. If you upgraded your license in an existing instance of Crowd, restart it before proceeding.

You can verify that Crowd is running in Data Center mode by checking that the node id is displayed in the footer


3. Add the first Crowd node to your load balancer

Crowd Data Center relies on a load balancer to balance traffic between the nodes. Many larger installations of Crowd already have a reverse proxy configured, and many reverse proxies have the ability to perform load balancing as well. We've provided a sample Apache httpd configuration to serve as an example, but check with your proxy vendor for specific information.

mod_balancer を使用したサンプル httpd 設定
<VirtualHost *:80>
        ProxyRequests off
 
        ServerName MyCompanyServer
        
        Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
        <Proxy balancer://crowdcluster>
                # Crowd node 1 (make sure there are no trailing slashes after port number)
                BalancerMember http://crowd1.internal.atlassian.com:8095 route=node1
                # Crowd node 2 (make sure there are no trailing slashes after port number)
                BalancerMember http://crowd2.internal.atlassian.com:8095 route=node2
 
                # Security "we aren't blocking anyone but this the place to make those changes
                Order Deny,Allow
                Deny from none
                Allow from all
 
                # Load Balancer Settings
                # We are not really balancing anything in this setup, but need to configure this
                ProxySet lbmethod=byrequests
                ProxySet stickysession=ROUTEID
        </Proxy>
 
        # Here's how to enable the load balancer's management UI if desired
        <Location /balancer-manager>
                SetHandler balancer-manager
 
                # You SHOULD CHANGE THIS to only allow trusted ips to use the manager
                Order deny,allow
                Allow from all
        </Location>
 
        # Don't reverse-proxy requests to the management UI
        ProxyPass /balancer-manager !
        # Reverse proxy all other requests to the Crowd cluster
        ProxyPass / balancer://crowdcluster/
        
        ProxyPreserveHost on
        ProxyPassReverse / balancer://mycluster/
</VirtualHost>
Sample haproxy configuration
global
    log 127.0.0.1   local0
    log 127.0.0.1   local1 debug
    maxconn 4096
 
  defaults
    log     global
    mode    http
    option  httplog
    option  dontlognull
    retries 3
    option redispatch
    maxconn 2000
    timeout connect      5000
    timeout client      50000
    timeout server      50000
 
  frontend localnodes
    bind *:8000
    mode http
    default_backend nodes
 
  backend nodes
    mode http
    balance roundrobin
    option forwardfor
    http-request set-header X-Forwarded-Port %[dst_port]
    http-request add-header X-Forwarded-Proto https if { ssl_fc }
    option httpchk HEAD / HTTP/1.1\r\nHost:localhost
    cookie ROUTEID insert nocache
    server node1 http://crowd1.internal.atlassian.com:8095 check cookie node1
    server node2 http://crowd2.internal.atlassian.com:8095 check cookie node2

After adding Crowd to the load balancer, ensure that basic functionality is working after restarting the Crowd instance by navigating to the instance, logging in, and noting any broken links or malfunctioning Crowd functionality.

You can also use the REST endpoint ( http://<your instance>/crowd/rest/admin/1.0/cluster to verify that the first node is correctly listed, and that you're running in the clustered mode. Be sure to check that the base server URL is configured properly (to the load balancer public URL).


4. Configure the first Crowd node

 Make sure that the Base URL configured in Crowd's General settings points to the load balancer URL.

5. Add a new node to the cluster

  1. Copy your existing Crowd installation directory to the new node. You can install a new Crowd instance, but we recommend copying the existing one to keep the configuration (installation paths, users, permissions, etc.) on both nodes the same, which makes the deployment easier.
  2. Create a home directory for Crowd on the new node, and mount shared as a subdirectory of it.
  3. Start Crowd on the new node. The node should automatically join the cluster.
  4. Ensure that the user and group management, directory sync, and any custom integrations work as expected.
  5. Verify that the new node is listed in the Cluster Monitoring page in the Administration menu.

6. この新しいノードをロードバランサに接続する

Verify that the new node is in the cluster and receiving requests by checking the logs on each node to ensure both are receiving traffic. Also check that updates done on one node are visible on the other.

Repeat steps 3 and 4 for each node


Interested in learning more about what Crowd Data Center provides? Click here for an overview.

最終更新日 2018 年 8 月 17 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.