Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions io.murano.apps.docker.DockerCAdvisor/Classes/DockerCAdvisor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Namespaces:
=: io.murano.apps.docker
std: io.murano

Name: DockerCAdvisor

Extends: std:Application

Properties:
name:
Contract: $.string().notNull()
host:
Contract: $.class(DockerContainerHost).notNull()
port:
Contract: $.int().check($ > 0 and $ < 65536)


Methods:
initialize:
Body:
- $._environment: $.find(std:Environment).require()

deploy:
Body:
- If: not $.getAttr(deployed, false)
Then:
- $._environment.reporter.report($this, 'Installing Application')

- $volumes:
- name: varrun
source:
hostDir:
path: '/var/run'
- name: varlibdocker
source:
hostDir:
path: '/var/lib/docker'
- name: sysfs
source:
hostDir:
path: '/sys'

- $.host.hostContainer(
name => $.name,
image => 'google/cadvisor:0.8.0',
commands => list(),
env => dict(),
ports => list($.port),
volumes => $volumes
)
- $.host.deploy()

- $._environment.reporter.report($this, 'cAdvisor installed')
- $.setAttr(deployed, true)

34 changes: 34 additions & 0 deletions io.murano.apps.docker.DockerCAdvisor/UI/ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Version: 2

Application:
?:
type: io.murano.apps.docker.DockerCAdvisor
name: $.appConfiguration.name
host: $.appConfiguration.host
port: $.appConfiguration.port


Forms:
- appConfiguration:
fields:
- name: name
type: string
label: Application Name
initial: 'Google cAdvisor'
description: >-
Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and
underline are allowed
- name: host
type: io.murano.apps.docker.kubernetes.KubernetesPod
label: Container Host
description: >-
Select an instance of Docker contaniner to run the app
- name: port
type: integer
label: Port
minValue: 1
maxValue: 65535
initial: 4194
description: >-
Select a port to run the app

Binary file added io.murano.apps.docker.DockerCAdvisor/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions io.murano.apps.docker.DockerCAdvisor/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Format: 1.0
Type: Application
FullName: io.murano.apps.docker.DockerCAdvisor
Name: Google cAdvisor
Description: |
This application deploys Google Heapster service in a Kubernetes environment.
Author: 'Mirantis, Inc'
Tags: [docker, heapster, monitoring]
Classes:
io.murano.apps.docker.DockerHeapster: DockerHeapster.yaml
40 changes: 40 additions & 0 deletions io.murano.apps.docker.DockerHTTPd/Classes/DockerHTTPd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Namespaces:
=: io.murano.apps.docker
std: io.murano

Name: DockerHTTPd

Extends: std:Application

Properties:
name:
Contract: $.string().notNull()
host:
Contract: $.class(DockerContainerHost).notNull()
port:
Contract: $.int().check($ > 0 and $ < 65536)


Methods:
initialize:
Body:
- $._environment: $.find(std:Environment).require()

deploy:
Body:
- If: not $.getAttr(deployed, false)
Then:
- $._environment.reporter.report($this, 'Installing Application')
- $.host.hostContainer(
name => $.name,
image => httpd,
commands => list(),
env => dict(),
ports => list($.port),
volumes => dict()
)
- $.host.deploy()

- $._environment.reporter.report($this, 'Application HTTPd available at {0}:{1}'.format($.host.getIp(), $.port))
- $.setAttr(deployed, true)

34 changes: 34 additions & 0 deletions io.murano.apps.docker.DockerHTTPd/UI/ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Version: 2

Application:
?:
type: io.murano.apps.docker.DockerHTTPd
name: $.appConfiguration.name
host: $.appConfiguration.host
port: $.appConfiguration.port


Forms:
- appConfiguration:
fields:
- name: name
type: string
label: Application Name
initial: 'DockerHTTPd'
description: >-
Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and
underline are allowed
- name: host
type: io.murano.apps.docker.kubernetes.KubernetesPod
label: Container Host
description: >-
Select an instance of Docker contaniner to run the app
- name: port
type: integer
label: Port
minValue: 1
maxValue: 65535
initial: 80
description: >-
Select a port to run the app

Binary file added io.murano.apps.docker.DockerHTTPd/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions io.murano.apps.docker.DockerHTTPd/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Format: 1.0
Type: Application
FullName: io.murano.apps.docker.DockerHTTPd
Name: Docker HTTPd
Description: |
The Apache HTTP Server, colloquially called Apache, is a Web server application notable for playing a key role in the initial growth of the World Wide Web.
Author: 'Mirantis, Inc'
Tags: [docker, application, HTTPd]
Classes:
io.murano.apps.docker.DockerHTTPd: DockerHTTPd.yaml
35 changes: 35 additions & 0 deletions io.murano.apps.docker.DockerHeapster/Classes/DockerHeapster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Namespaces:
=: io.murano.apps.docker
kube: io.murano.apps.docker.kubernetes.static
std: io.murano

Name: DockerHeapster

Extends: std:Application

Properties:
name:
Contract: $.string().notNull()
influxdb:
Contract: $.class(DockerInfluxDB).notNull()
heapsterRC:
Contract: $.class(kube:DockerInfluxDB).notNull()


Methods:
initialize:
Body:
- $._environment: $.find(std:Environment).require()

deploy:
Body:
- If: not $.getAttr(deployed, false)
Then:
- $._environment.reporter.report($this, 'Starting deployment')
- $._environment.reporter.report($this, 'Installing Database service')
- $.influxdb.deploy()
- $._environment.reporter.report($this, 'Installing Heapster app')
- $.heapsterRC.deploy()
- $._environment.reporter.report($this, 'Heapster is ready')
- $.setAttr(deployed, true)

59 changes: 59 additions & 0 deletions io.murano.apps.docker.DockerHeapster/UI/ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Version: 2
Templates:
heapsterRC:
?:
type: io.murano.apps.docker.kubernetes.static.ReplicationController
kubernetesCluster: $.appConfiguration.kubernetes
replicationControllerDefinition:
apiVersion: "v1beta1"
id: "monitoring-heapster-controller"
kind: "ReplicationController"
desiredState:
replicas: 1
replicaSelector:
name: "heapster"
podTemplate:
desiredState:
manifest:
version: "v1beta1"
id: "monitoring-heapster-controller"
containers:
- name: "heapster"
image: "kubernetes/heapster:v0.6"
env:
- name: "INFLUXDB_HOST"
value: "monitoring-influxdb"
labels:
name: "heapster"
uses: "monitoring-influxdb"
labels:
name: "heapster"

Application:
?:
type: io.murano.apps.docker.DockerHeapster
name: $.appConfiguration.name
heapsterRC: $heapsterRC
influxdb: $.appConfiguration.influxdb


Forms:
- appConfiguration:
fields:
- name: name
type: string
label: Application Name
initial: 'Heapster'
description: >-
Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and
underline are allowed
- name: kubernetes
type: io.murano.apps.docker.kubernetes.KubernetesCluster
label: Kubernetes cluster
description: >-
Kubernetes service
- name: influxdb
type: io.murano.apps.docker.DockerInfluxDB
label: Database
description: >-
Select database service
Binary file added io.murano.apps.docker.DockerHeapster/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions io.murano.apps.docker.DockerHeapster/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Format: 1.0
Type: Application
FullName: io.murano.apps.docker.DockerHeapster
Name: Docker Heapster
Description: |
This application deploys Google Heapster service in a Kubernetes environment.
Author: 'Mirantis, Inc'
Tags: [docker, application, heapster]
Classes:
io.murano.apps.docker.DockerHeapster: DockerHeapster.yaml
33 changes: 33 additions & 0 deletions io.murano.apps.docker.DockerInfluxDB/Classes/DockerInfluxDB.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Namespaces:
=: io.murano.apps.docker
kube: io.murano.apps.docker.kubernetes.static
std: io.murano

Name: DockerInfluxDB

Extends: std:Application

Properties:
name:
Contract: $.string().notNull()
influxdbRC:
Contract: $.class(kube:ReplicationController).notNull()
influxdbService:
Contract: $.class(kube:Service).notNull()


Methods:
initialize:
Body:
- $._environment: $.find(std:Environment).require()

deploy:
Body:
- If: not $.getAttr(deployed, false)
Then:
- $._environment.reporter.report($this, 'Installing Application')
- $.influxdbRC.deploy()
- $.influxdbService.deploy()
- $._environment.reporter.report($this, 'Application InfluxDB is ready')
- $.setAttr(deployed, true)

Loading