|
757 | 757 | $roles = ['broker','node','msgserver','datastore','nameserver'], |
758 | 758 | $install_method = 'yum', |
759 | 759 | $parallel_deployment = false, |
760 | | - $repos_base = $::operatingsystem ? { |
761 | | - 'Fedora' => 'https://mirror.openshift.com/pub/origin-server/nightly/fedora-19', |
762 | | - default => 'https://mirror.openshift.com/pub/origin-server/nightly/rhel-6', |
763 | | - }, |
| 760 | + $repos_base = $openshift_origin::params::repos_base, |
764 | 761 | $architecture = undef, |
765 | 762 | $override_install_repo = undef, |
766 | 763 | $os_repo = undef, |
|
777 | 774 | $dns_infrastructure_key = '', |
778 | 775 | $dns_infrastructure_key_algorithm = 'HMAC-MD5', |
779 | 776 | $dns_infrastructure_names = [], |
780 | | - $broker_hostname = $dns_infrastructure_zone ? { |
781 | | - '' => "broker.${domain}", |
782 | | - default => "broker.${dns_infrastructure_zone}", |
783 | | - }, |
784 | | - $node_hostname = $dns_infrastructure_zone ? { |
785 | | - '' => "node.${domain}", |
786 | | - default => "node.${dns_infrastructure_zone}", |
787 | | - }, |
788 | | - $nameserver_hostname = $dns_infrastructure_zone ? { |
789 | | - '' => "ns1.${domain}", |
790 | | - default => "ns1.${dns_infrastructure_zone}", |
791 | | - }, |
792 | | - $msgserver_hostname = $dns_infrastructure_zone ? { |
793 | | - '' => "msgserver.${domain}", |
794 | | - default => "msgserver.${dns_infrastructure_zone}", |
795 | | - }, |
796 | | - $datastore_hostname = $dns_infrastructure_zone ? { |
797 | | - '' => "mongodb.${domain}", |
798 | | - default => "mongodb.${dns_infrastructure_zone}", |
799 | | - }, |
| 777 | + $broker_hostname = '', |
| 778 | + $node_hostname = '', |
| 779 | + $nameserver_hostname = '', |
| 780 | + $msgserver_hostname = '', |
| 781 | + $datastore_hostname = '', |
800 | 782 | $datastore1_ip_addr = undef, |
801 | 783 | $datastore2_ip_addr = undef, |
802 | 784 | $datastore3_ip_addr = undef, |
|
808 | 790 | $broker_cluster_members = undef, |
809 | 791 | $broker_cluster_ip_addresses = undef, |
810 | 792 | $broker_virtual_ip_address = undef, |
811 | | - $broker_virtual_hostname = $dns_infrastructure_zone ? { |
812 | | - '' => "broker.${domain}", |
813 | | - default => "broker.${dns_infrastructure_zone}", |
814 | | - }, |
| 793 | + $broker_virtual_hostname = '', |
815 | 794 | $load_balancer_master = false, |
816 | 795 | $load_balancer_auth_password = 'changeme', |
817 | 796 | $node_ip_addr = $::ipaddress, |
|
839 | 818 | $ntp_servers = ['time.apple.com iburst', 'pool.ntp.org iburst', 'clock.redhat.com iburst'], |
840 | 819 | $msgserver_cluster = false, |
841 | 820 | $msgserver_cluster_members = undef, |
842 | | - $mcollective_cluster_members = $msgserver_cluster_members, |
| 821 | + $mcollective_cluster_members = undef, |
843 | 822 | $msgserver_password = 'changeme', |
844 | 823 | $msgserver_admin_password = inline_template('<%= require "securerandom"; SecureRandom.base64 %>'), |
845 | 824 | $mcollective_user = 'mcollective', |
|
863 | 842 | $conf_broker_auth_private_key = undef, |
864 | 843 | $conf_broker_session_secret = undef, |
865 | 844 | $conf_broker_multi_haproxy_per_node = false, |
866 | | - $conf_console_product_logo = $ose_version ? { |
867 | | - undef => '/assets/logo-origin.svg', |
868 | | - default => '/assets/logo-enterprise-horizontal.svg', |
869 | | - }, |
870 | | - $conf_console_product_title = $ose_version ? { |
871 | | - undef => 'OpenShift Origin', |
872 | | - default => 'OpenShift Enterprise', |
873 | | - }, |
| 845 | + $conf_console_product_logo = undef, |
| 846 | + $conf_console_product_title = undef, |
874 | 847 | $conf_console_session_secret = undef, |
875 | 848 | $conf_valid_gear_sizes = ['small'], |
876 | 849 | $conf_default_gear_capabilities = ['small'], |
|
885 | 858 | $broker_ldap_uri = '', |
886 | 859 | $broker_ldap_bind_dn = '', |
887 | 860 | $broker_ldap_bind_password = '', |
888 | | - $node_shmmax = undef, |
889 | | - $node_shmall = undef, |
| 861 | + $node_shmmax = $openshift_origin::params::node_shmmax, |
| 862 | + $node_shmall = $openshift_origin::params::node_shmall, |
890 | 863 | $node_container_plugin = 'selinux', |
891 | 864 | $node_frontend_plugins = ['apache-vhost','nodejs-websocket'], |
892 | 865 | $node_unmanaged_users = [], |
|
906 | 879 | $install_login_shell = false, |
907 | 880 | $register_host_with_nameserver = false, |
908 | 881 | $update_network_conf_files = true, |
909 | | - $install_cartridges = $ose_version ? { |
910 | | - undef => ['10gen-mms-agent','cron','diy','haproxy','mongodb','nodejs', |
911 | | - 'perl','php','phpmyadmin','postgresql','python','ruby', |
912 | | - 'jenkins','jenkins-client','mysql',], |
913 | | - default => ['cron','diy','haproxy','mongodb','nodejs','perl','php', |
914 | | - 'postgresql','python','ruby','jenkins','jenkins-client', |
915 | | - 'jbossews','mysql'], |
916 | | - }, |
917 | | - $install_cartridges_recommended_deps = $ose_version ? { |
918 | | - undef => ['diy','nodejs','perl','php','python','ruby'], |
919 | | - default => ['jbossews','nodejs','perl','php','python','ruby'], |
920 | | - }, |
| 882 | + $install_cartridges = undef, |
| 883 | + $install_cartridges_recommended_deps = undef, |
921 | 884 | $install_cartridges_optional_deps = undef, |
922 | 885 | $manage_firewall = true, |
923 | | -){ |
| 886 | +) inherits openshift_origin::params { |
924 | 887 | include openshift_origin::role |
925 | 888 |
|
| 889 | + $default_host_domain = $dns_infrastructure_zone ? { |
| 890 | + '' => $domain, |
| 891 | + default => $dns_infrastructure_zone, |
| 892 | + } |
| 893 | + |
| 894 | + $broker_fqdn = $broker_hostname ? { |
| 895 | + '' => "broker.${default_host_domain}", |
| 896 | + default => $broker_hostname, |
| 897 | + } |
| 898 | + |
| 899 | + $broker_virtual_fqdn = $broker_virtual_hostname ? { |
| 900 | + '' => "broker.${default_host_domain}", |
| 901 | + default => $broker_virtual_hostname, |
| 902 | + } |
| 903 | + |
| 904 | + $node_fqdn = $node_hostname ? { |
| 905 | + '' => "node.${default_host_domain}", |
| 906 | + default => $node_hostname, |
| 907 | + } |
| 908 | + |
| 909 | + $nameserver_fqdn = $nameserver_hostname ? { |
| 910 | + '' => "ns1.${default_host_domain}", |
| 911 | + default => $nameserver_hostname, |
| 912 | + } |
| 913 | + |
| 914 | + $msgserver_fqdn = $msgserver_hostname ? { |
| 915 | + '' => "msgserver.${default_host_domain}", |
| 916 | + default => $msgserver_hostname, |
| 917 | + } |
| 918 | + |
| 919 | + $datastore_fqdn = $datastore_hostname ? { |
| 920 | + '' => "mongodb.${default_host_domain}", |
| 921 | + default => $datastore_hostname, |
| 922 | + } |
| 923 | + |
| 924 | + # set defaults that are origin/enterprise specific |
| 925 | + case $ose_version { |
| 926 | + undef: { |
| 927 | + $console_product_logo_default = '/assets/logo-origin.svg' |
| 928 | + $console_product_title_default = 'OpenShift Origin' |
| 929 | + $cartridges_to_install_default = ['10gen-mms-agent','cron','diy','haproxy','mongodb','nodejs', |
| 930 | + 'perl','php','phpmyadmin','postgresql','python','ruby', |
| 931 | + 'jenkins','jenkins-client','mysql',] |
| 932 | + $cartridge_deps_to_install_default = ['diy','nodejs','perl','php','python','ruby'] |
| 933 | + } |
| 934 | + default: { |
| 935 | + $console_product_logo_default = '/assets/logo-enterprise-horizontal.svg' |
| 936 | + $console_product_title_default = 'OpenShift Enterprise' |
| 937 | + $cartridges_to_install_default = ['cron','diy','haproxy','mongodb','nodejs','perl','php', |
| 938 | + 'postgresql','python','ruby','jenkins','jenkins-client', |
| 939 | + 'jbossews','mysql'] |
| 940 | + $cartridge_deps_to_install_default = ['jbossews','nodejs','perl','php','python','ruby'] |
| 941 | + } |
| 942 | + } |
| 943 | + |
| 944 | + $console_product_logo = $conf_console_product_logo ? { |
| 945 | + undef => $console_product_logo_default, |
| 946 | + default => $conf_console_product_logo, |
| 947 | + } |
| 948 | + |
| 949 | + $console_product_title = $conf_console_product_title ? { |
| 950 | + undef => $console_product_title_default, |
| 951 | + default => $conf_console_product_title, |
| 952 | + } |
| 953 | + |
| 954 | + $cartridges_to_install = $install_cartridges ? { |
| 955 | + undef => $cartridges_to_install_default, |
| 956 | + default => $install_cartridges, |
| 957 | + } |
| 958 | + |
| 959 | + $cartridge_deps_to_install = $install_cartridges_recommended_deps ? { |
| 960 | + undef => $cartridge_deps_to_install_default, |
| 961 | + default => $install_cartridges_recommended_deps, |
| 962 | + } |
| 963 | + |
926 | 964 | # Check for various unsupported OSE configs |
927 | 965 | if $ose_version != undef { |
928 | 966 | class { 'openshift_origin::ose_supported_config': } |
929 | 967 | } |
930 | 968 |
|
931 | | - if $msgserver_cluster and ! $msgserver_cluster_members and ! $mcollective_cluster_members { |
| 969 | + if $msgserver_cluster_members and $mcollective_cluster_members == undef { |
| 970 | + $real_mcollective_cluster_members = $msgserver_cluster_members |
| 971 | + } |
| 972 | + |
| 973 | + if $msgserver_cluster and ! $msgserver_cluster_members and ! $real_mcollective_cluster_members { |
932 | 974 | fail('msgserver_cluster_members and mcollective_cluster_members parameters are required when msgserver_cluster is set') |
933 | 975 | } |
934 | 976 |
|
|
0 commit comments