|
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, |
|
769 | 766 | $jenkins_repo_base = undef, |
770 | 767 | $optional_repo = undef, |
771 | 768 | $domain = 'example.com', |
772 | | - $broker_hostname = "broker.${domain}", |
773 | | - $node_hostname = "node.${domain}", |
774 | | - $nameserver_hostname = "ns1.${domain}", |
775 | | - $msgserver_hostname = "msgserver.${domain}", |
776 | | - $datastore_hostname = "mongodb.${domain}", |
777 | | - $datastore1_ip_addr = undef, |
778 | | - $datastore2_ip_addr = undef, |
779 | | - $datastore3_ip_addr = undef, |
780 | | - $nameserver_ip_addr = $::ipaddress, |
781 | 769 | $bind_key = '', |
782 | 770 | $bind_key_algorithm = 'HMAC-MD5', |
783 | 771 | $bind_krb_keytab = '', |
784 | 772 | $bind_krb_principal = '', |
| 773 | + $dns_infrastructure_zone = '', |
| 774 | + $dns_infrastructure_key = '', |
| 775 | + $dns_infrastructure_key_algorithm = 'HMAC-MD5', |
| 776 | + $dns_infrastructure_names = [], |
| 777 | + $broker_hostname = '', |
| 778 | + $node_hostname = '', |
| 779 | + $nameserver_hostname = '', |
| 780 | + $msgserver_hostname = '', |
| 781 | + $datastore_hostname = '', |
| 782 | + $datastore1_ip_addr = undef, |
| 783 | + $datastore2_ip_addr = undef, |
| 784 | + $datastore3_ip_addr = undef, |
| 785 | + $nameserver_ip_addr = $::ipaddress, |
785 | 786 | $aws_access_key_id = '', |
786 | 787 | $aws_secret_key = '', |
787 | 788 | $aws_zone_id = '', |
788 | 789 | $broker_ip_addr = $::ipaddress, |
789 | 790 | $broker_cluster_members = undef, |
790 | 791 | $broker_cluster_ip_addresses = undef, |
791 | 792 | $broker_virtual_ip_address = undef, |
792 | | - $broker_virtual_hostname = "broker.${domain}", |
| 793 | + $broker_virtual_hostname = '', |
793 | 794 | $load_balancer_master = false, |
794 | 795 | $load_balancer_auth_password = 'changeme', |
795 | 796 | $node_ip_addr = $::ipaddress, |
|
817 | 818 | $ntp_servers = ['time.apple.com iburst', 'pool.ntp.org iburst', 'clock.redhat.com iburst'], |
818 | 819 | $msgserver_cluster = false, |
819 | 820 | $msgserver_cluster_members = undef, |
820 | | - $mcollective_cluster_members = $msgserver_cluster_members, |
| 821 | + $mcollective_cluster_members = undef, |
821 | 822 | $msgserver_password = 'changeme', |
822 | 823 | $msgserver_admin_password = inline_template('<%= require "securerandom"; SecureRandom.base64 %>'), |
823 | 824 | $mcollective_user = 'mcollective', |
|
841 | 842 | $conf_broker_auth_private_key = undef, |
842 | 843 | $conf_broker_session_secret = undef, |
843 | 844 | $conf_broker_multi_haproxy_per_node = false, |
844 | | - $conf_console_product_logo = $ose_version ? { |
845 | | - undef => '/assets/logo-origin.svg', |
846 | | - default => '/assets/logo-enterprise-horizontal.svg', |
847 | | - }, |
848 | | - $conf_console_product_title = $ose_version ? { |
849 | | - undef => 'OpenShift Origin', |
850 | | - default => 'OpenShift Enterprise', |
851 | | - }, |
| 845 | + $conf_console_product_logo = undef, |
| 846 | + $conf_console_product_title = undef, |
852 | 847 | $conf_console_session_secret = undef, |
853 | 848 | $conf_valid_gear_sizes = ['small'], |
854 | 849 | $conf_default_gear_capabilities = ['small'], |
|
863 | 858 | $broker_ldap_uri = '', |
864 | 859 | $broker_ldap_bind_dn = '', |
865 | 860 | $broker_ldap_bind_password = '', |
866 | | - $node_shmmax = undef, |
867 | | - $node_shmall = undef, |
| 861 | + $node_shmmax = $openshift_origin::params::node_shmmax, |
| 862 | + $node_shmall = $openshift_origin::params::node_shmall, |
868 | 863 | $node_container_plugin = 'selinux', |
869 | 864 | $node_frontend_plugins = ['apache-vhost','nodejs-websocket'], |
870 | 865 | $node_unmanaged_users = [], |
|
881 | 876 | $conf_node_custom_motd = undef, |
882 | 877 | $development_mode = false, |
883 | 878 | $conf_nameserver_upstream_dns = ['8.8.8.8'], |
| 879 | + $conf_nameserver_allow_recursion = false, |
884 | 880 | $install_login_shell = false, |
885 | 881 | $register_host_with_nameserver = false, |
886 | | - $dns_infrastructure_zone = '', |
887 | | - $dns_infrastructure_key = '', |
888 | | - $dns_infrastructure_key_algorithm = 'HMAC-MD5', |
889 | | - $dns_infrastructure_names = [], |
890 | 882 | $update_network_conf_files = true, |
891 | | - $install_cartridges = $ose_version ? { |
892 | | - undef => ['10gen-mms-agent','cron','diy','haproxy','mongodb','nodejs', |
893 | | - 'perl','php','phpmyadmin','postgresql','python','ruby', |
894 | | - 'jenkins','jenkins-client','mysql',], |
895 | | - default => ['cron','diy','haproxy','mongodb','nodejs','perl','php', |
896 | | - 'postgresql','python','ruby','jenkins','jenkins-client', |
897 | | - 'jbossews','mysql'], |
898 | | - }, |
899 | | - $install_cartridges_recommended_deps = $ose_version ? { |
900 | | - undef => ['diy','nodejs','perl','php','python','ruby'], |
901 | | - default => ['jbossews','nodejs','perl','php','python','ruby'], |
902 | | - }, |
| 883 | + $install_cartridges = undef, |
| 884 | + $install_cartridges_recommended_deps = undef, |
903 | 885 | $install_cartridges_optional_deps = undef, |
904 | 886 | $manage_firewall = true, |
905 | | -){ |
| 887 | +) inherits openshift_origin::params { |
906 | 888 | include openshift_origin::role |
907 | 889 |
|
| 890 | + $default_host_domain = $dns_infrastructure_zone ? { |
| 891 | + '' => $domain, |
| 892 | + default => $dns_infrastructure_zone, |
| 893 | + } |
| 894 | + |
| 895 | + $broker_fqdn = $broker_hostname ? { |
| 896 | + '' => "broker.${default_host_domain}", |
| 897 | + default => $broker_hostname, |
| 898 | + } |
| 899 | + |
| 900 | + $broker_virtual_fqdn = $broker_virtual_hostname ? { |
| 901 | + '' => "broker.${default_host_domain}", |
| 902 | + default => $broker_virtual_hostname, |
| 903 | + } |
| 904 | + |
| 905 | + $node_fqdn = $node_hostname ? { |
| 906 | + '' => "node.${default_host_domain}", |
| 907 | + default => $node_hostname, |
| 908 | + } |
| 909 | + |
| 910 | + $nameserver_fqdn = $nameserver_hostname ? { |
| 911 | + '' => "ns1.${default_host_domain}", |
| 912 | + default => $nameserver_hostname, |
| 913 | + } |
| 914 | + |
| 915 | + $msgserver_fqdn = $msgserver_hostname ? { |
| 916 | + '' => "msgserver.${default_host_domain}", |
| 917 | + default => $msgserver_hostname, |
| 918 | + } |
| 919 | + |
| 920 | + $datastore_fqdn = $datastore_hostname ? { |
| 921 | + '' => "mongodb.${default_host_domain}", |
| 922 | + default => $datastore_hostname, |
| 923 | + } |
| 924 | + |
| 925 | + # set defaults that are origin/enterprise specific |
| 926 | + case $ose_version { |
| 927 | + undef: { |
| 928 | + $console_product_logo_default = '/assets/logo-origin.svg' |
| 929 | + $console_product_title_default = 'OpenShift Origin' |
| 930 | + $cartridges_to_install_default = ['10gen-mms-agent','cron','diy','haproxy','mongodb','nodejs', |
| 931 | + 'perl','php','phpmyadmin','postgresql','python','ruby', |
| 932 | + 'jenkins','jenkins-client','mysql',] |
| 933 | + $cartridge_deps_to_install_default = ['diy','nodejs','perl','php','python','ruby'] |
| 934 | + } |
| 935 | + default: { |
| 936 | + $console_product_logo_default = '/assets/logo-enterprise-horizontal.svg' |
| 937 | + $console_product_title_default = 'OpenShift Enterprise' |
| 938 | + $cartridges_to_install_default = ['cron','diy','haproxy','mongodb','nodejs','perl','php', |
| 939 | + 'postgresql','python','ruby','jenkins','jenkins-client', |
| 940 | + 'jbossews','mysql'] |
| 941 | + $cartridge_deps_to_install_default = ['jbossews','nodejs','perl','php','python','ruby'] |
| 942 | + } |
| 943 | + } |
| 944 | + |
| 945 | + $console_product_logo = $conf_console_product_logo ? { |
| 946 | + undef => $console_product_logo_default, |
| 947 | + default => $conf_console_product_logo, |
| 948 | + } |
| 949 | + |
| 950 | + $console_product_title = $conf_console_product_title ? { |
| 951 | + undef => $console_product_title_default, |
| 952 | + default => $conf_console_product_title, |
| 953 | + } |
| 954 | + |
| 955 | + $cartridges_to_install = $install_cartridges ? { |
| 956 | + undef => $cartridges_to_install_default, |
| 957 | + default => $install_cartridges, |
| 958 | + } |
| 959 | + |
| 960 | + $cartridge_deps_to_install = $install_cartridges_recommended_deps ? { |
| 961 | + undef => $cartridge_deps_to_install_default, |
| 962 | + default => $install_cartridges_recommended_deps, |
| 963 | + } |
| 964 | + |
908 | 965 | # Check for various unsupported OSE configs |
909 | 966 | if $ose_version != undef { |
910 | 967 | class { 'openshift_origin::ose_supported_config': } |
911 | 968 | } |
912 | 969 |
|
913 | | - if $msgserver_cluster and ! $msgserver_cluster_members and ! $mcollective_cluster_members { |
| 970 | + if $msgserver_cluster_members and $mcollective_cluster_members == undef { |
| 971 | + $real_mcollective_cluster_members = $msgserver_cluster_members |
| 972 | + } |
| 973 | + |
| 974 | + if $msgserver_cluster and ! $msgserver_cluster_members and ! $real_mcollective_cluster_members { |
914 | 975 | fail('msgserver_cluster_members and mcollective_cluster_members parameters are required when msgserver_cluster is set') |
915 | 976 | } |
916 | 977 |
|
|
0 commit comments