이 콘텐츠는 선택한 언어로 제공되지 않습니다.

6.3. Configuring a Complete Environment


The following is an example configuration for a complete OpenShift Enterprise deployment consisting of:
  • One host with the nameserver role.
  • Two hosts with the broker role.
  • Two hosts with the msgserver role.
  • Three hosts with the datastore role.
  • Multiple hosts with the node role.
This example uses a common set of variables to ensure that parameters between different roles match up properly. This example is also appropriate for deploying on Infrastructure-as-a-Service (IaaS) environments where public and private routing is in use; applications are made available via their public IP addresses by making use of the ec2_public_ipv4 fact.

Recommended Order of Deployment:

  1. Name server host.
  2. Message server hosts.
  3. Datastore hosts, ensuring the primary host is fully deployed before adding additional nodes to your replica set.
  4. Broker hosts.
  5. Node hosts.
Common Variables for This Example

$bind_key = 'oZmVeXEiAi3foJ5GPG/11aaliaw1Wm7hccODfqBDfKRluO8bUfHK08mFMxpBnSW2bNJb+567Mc2sOwWyg7a1AA=='
$broker_virtual_hostname = 'ose-broker.example.com'
$install_method = 'none'
$mongodb_replicasets = true
$mongodb_replicasets_members = ["ose-mongo01.example.com:27017","ose-mongo02.example.com:27017","ose-mongo03.example.com:27017"]
$msgserver_cluster = true
$msgserver_cluster_members = ["ose-amq01.example.com","ose-amq02.example.com"]
$nameserver_ip_addr = '10.3.8.18'
$nameserver_hostname = 'ose-ns01.example.com'
$ose_version = '2.2'
$register_host_with_nameserver = true
Copy to Clipboard Toggle word wrap

Example 6.10. Name Server Configuration

node /^ose-ns/ {
  class { 'openshift_origin':
    roles                         => ['nameserver'],
    bind_key                      => $bind_key,
    install_method                => $install_method,
    nameserver_ip_addr            => $nameserver_ip_addr,
    nameserver_hostname           => $nameserver_hostname,
    ose_version                   => $ose_version,
    register_host_with_nameserver => $register_host_with_nameserver,
  }
}
Copy to Clipboard Toggle word wrap

Example 6.11. Message Server Configuration (ActiveMQ)

node /^ose-amq/ {
  class { 'openshift_origin':
    roles                         => ['msgserver'],
    msgserver_cluster             => $msgserver_cluster,
    msgserver_cluster_members     => $msgserver_cluster_members,
    msgserver_hostname            => $::fqdn,
    msgserver_routing             => $msgserver_routing,
    msgserver_routing_password    => $msgserver_routing_password,
    # all node classes get these params
    bind_key                      => $bind_key,
    install_method                => $install_method,
    nameserver_ip_addr            => $nameserver_ip_addr,
    nameserver_hostname           => $nameserver_hostname,
    ose_version                   => $ose_version,
    register_host_with_nameserver => $register_host_with_nameserver,
  }
}
Copy to Clipboard Toggle word wrap

Example 6.12. Datastore Configuration

This assumes that you are naming your primary datastore node ose-mongo01.example.com.
node /^ose-mongo/ {
  class { 'openshift_origin':
    roles                           => ['datastore'],
    datastore1_ip_addr              => '10.3.9.214',
    datastore2_ip_addr              => '10.3.9.219',
    datastore3_ip_addr              => '10.3.9.221',
    mongodb_replica_primary_ip_addr => '10.3.9.214',
    mongodb_replicasets             => $mongodb_replicasets,
    mongodb_replicasets_members     => $mongodb_replicasets_members,
    mongodb_replica_primary         => $::fqdn ? {
      'ose-mongo01.example.com'     => true,
      default       => false,
    },
    datastore_hostname              => $::fqdn,
    # all node classes get these params
    bind_key                      => $bind_key,
    install_method                => $install_method,
    nameserver_ip_addr            => $nameserver_ip_addr,
    nameserver_hostname           => $nameserver_hostname,
    ose_version                   => $ose_version,
    register_host_with_nameserver => $register_host_with_nameserver,
  }
}
Copy to Clipboard Toggle word wrap

Example 6.13. Node Configuration

You must have one set of configuration options per district. This registers the node_ip_address using the public IP address so that all applications on these gears are publicly accessible.
node /^ose-small-node/ {
  class { 'openshift_origin':
    roles                         => ['node'],
    broker_hostname               => $::fqdn,
    node_hostname                 => $::fqdn,
    node_ip_addr                  => $::ec2_public_ipv4,
    node_frontend_plugins         => ["apache-mod-rewrite","nodejs-websocket"],
    install_cartridges            => ["cron","diy","haproxy","mongodb","nodejs","perl","php","postgresql","python","ruby","jenkins","jenkins-client","mysql"],
    msgserver_cluster             => $msgserver_cluster,
    msgserver_cluster_members     => $msgserver_cluster_members,
    # all node classes get these params
    bind_key                      => $bind_key,
    install_method                => $install_method,
    nameserver_ip_addr            => $nameserver_ip_addr,
    nameserver_hostname           => $nameserver_hostname,
    ose_version                   => $ose_version,
    register_host_with_nameserver => $register_host_with_nameserver,
  }
}
Copy to Clipboard Toggle word wrap

Example 6.14. Broker Configuration

node /^ose-broker/ {
  class { 'openshift_origin':
    roles                         => ['broker'],
    broker_cluster_members        => ["ose-broker01.example.com", "ose-broker02.example.com"],
    broker_hostname               => $::fqdn,
    broker_virtual_hostname       => $broker_virtual_hostname,
    msgserver_cluster             => $msgserver_cluster,
    msgserver_cluster_members     => $msgserver_cluster_members,
    conf_broker_session_secret    => 'secret',
    conf_console_session_secret   => 'secret',
    mongodb_replicasets           => $mongodb_replicasets,
    mongodb_replicasets_members   => $mongodb_replicasets_members,
    # all node classes get these params
    bind_key                      => $bind_key,
    install_method                => $install_method,
    nameserver_ip_addr            => $nameserver_ip_addr,
    nameserver_hostname           => $nameserver_hostname,
    ose_version                   => $ose_version,
    register_host_with_nameserver => $register_host_with_nameserver,
  }
}
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat