
* Migrated to v1beta3 API * cAdvisor is now enabled by default * command line daemon settings updated * HAproxy template updated for multi-port services * Better reporting Change-Id: Iefcbe8073fb35503e2fe2ee5c6bf4610561c3cb6 Closes-Bug: #1446306 Closes-Bug: #1445541
61 lines
1.9 KiB
YAML
61 lines
1.9 KiB
YAML
Namespaces:
|
|
=: io.murano.apps.docker.kubernetes
|
|
std: io.murano
|
|
res: io.murano.resources
|
|
sys: io.murano.system
|
|
|
|
Name: KubernetesMasterNode
|
|
|
|
Extends: KubernetesNode
|
|
|
|
Methods:
|
|
initialize:
|
|
Body:
|
|
- $._environment: $.find(std:Environment).require()
|
|
|
|
|
|
deployInstance:
|
|
Body:
|
|
- If: not $.getAttr(instanceDeployed, false)
|
|
Then:
|
|
- $._environment.reporter.report($this, 'Creating Kubernetes Master')
|
|
- $.super($.deployInstance())
|
|
- $.setAttr(instanceDeployed, true)
|
|
|
|
|
|
setupEtcd:
|
|
Body:
|
|
- If: not $.getAttr(etcdConfigured, false)
|
|
Then:
|
|
- $._environment.reporter.report($, 'Configuring etcd master node')
|
|
- $resources: new(sys:Resources)
|
|
- $template: $resources.yaml('MasterEtcdSetup.template').bind(dict(
|
|
name => $.instance.name,
|
|
ip => $.getIp()
|
|
))
|
|
- $.instance.agent.call($template, $resources)
|
|
- $.setAttr(etcdConfigured, true)
|
|
|
|
|
|
setupNode:
|
|
Body:
|
|
- If: not $.getAttr(nodeConfigured, false)
|
|
Then:
|
|
- $resources: new(sys:Resources)
|
|
- $._environment.reporter.report($this, 'Setup Flannel network on master node')
|
|
- $template: $resources.yaml('SetupFlannelMaster.template')
|
|
- $.instance.agent.call($template, $resources)
|
|
|
|
- $._environment.reporter.report($this, 'Setup Kubernetes API host')
|
|
- $resources: new(sys:Resources)
|
|
- $template: $resources.yaml('KubeMasterSetup.template').bind(dict(
|
|
name => $.instance.name,
|
|
ip => $.getIp()
|
|
))
|
|
- $.instance.agent.call($template, $resources)
|
|
- $.setAttr(nodeConfigured, true)
|
|
- $msg: 'Kubernetes API is now available at http://{0}:8080'
|
|
- $ip: coalesce($.instance.floatingIpAddress, $.getIp())
|
|
- $._environment.reporter.report($this, $msg.format($ip))
|
|
|