Add k8s installation by vagrant + kubeadm
[openretriever.git] / src / fuel-plugin / deployment_scripts / puppet / manifests / k8s-master-install.pp
1 notice('MODULAR: k8s-master-install')
2 # get options
3
4 $network_metadata = hiera_hash('network_metadata')
5 $k8s_nodes_hash = get_nodes_hash_by_roles($network_metadata, ['k8s-master'])
6 $k8s_mgmt_ips_hash = get_node_to_ipaddr_map_by_network_role($k8s_nodes_hash, 'management')
7 $k8s_mgmt_ips = values($k8s_mgmt_ips_hash)
8
9 $network_scheme = hiera_hash('network_scheme')
10 $service_cidr = $network_scheme['endpoints']['br-mgmt']['IP']
11
12 $k8s_settings  = hiera_hash('fuel-plugin-k8s')
13 $pod_network  = $k8s_settings['pod_network']
14 $pod_network_cidr  = $k8s_settings['pod_network_cidr']
15
16 if $operatingsystem == 'Ubuntu' {
17       exec { 'install k8s master':
18           command => "/etc/fuel/plugins/fuel-plugin-k8s-1.0/k8s-master-install.sh $k8s_mgmt_ips $service_cidr $pod_network $pod_network_cidr",
19           path    => '/usr/bin:/usr/sbin:/bin:/sbin',
20       }
21 } elsif $operatingsystem == 'CentOS' {
22 }