Restructure murano-apps repository
Change-Id: I9cdb1e4afcb9929c7b7a5437faaa25d284daefdb Closes-Bug: #1441644
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
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)
|
Reference in New Issue
Block a user