From 7cb39996f0c1c6ad14a5150d29340a077542378b Mon Sep 17 00:00:00 2001 From: Dmytro Dovbii Date: Thu, 9 Apr 2015 10:18:33 +0300 Subject: [PATCH] Restructure murano-apps repository Change-Id: I9cdb1e4afcb9929c7b7a5437faaa25d284daefdb Closes-Bug: #1441644 --- .../Crate/package/Classes/DockerCrate.yaml | 52 ++ Applications/Crate/package/UI/ui.yaml | 39 ++ Applications/Crate/package/logo.png | Bin 0 -> 3756 bytes Applications/Crate/package/manifest.yaml | 10 + .../package/Classes/DockerGlassFish.yaml | 68 +++ Applications/GlassFish/package/UI/ui.yaml | 40 ++ Applications/GlassFish/package/logo.png | Bin 0 -> 5716 bytes Applications/GlassFish/package/manifest.yaml | 10 + .../package/Classes/DockerGrafana.yaml | 69 +++ Applications/Grafana/package/UI/ui.yaml | 70 +++ Applications/Grafana/package/logo.png | Bin 0 -> 4959 bytes Applications/Grafana/package/manifest.yaml | 10 + .../GuestBook/package/Classes/GuestBook.yaml | 63 +++ .../GuestBook/package/Classes/RedisSlave.yaml | 55 ++ Applications/GuestBook/package/UI/ui.yaml | 70 +++ Applications/GuestBook/package/logo.png | Bin 0 -> 10448 bytes Applications/GuestBook/package/manifest.yaml | 12 + .../package/Classes/DockerHTTPd.yaml | 47 ++ Applications/HTTPdServer/package/UI/ui.yaml | 34 ++ Applications/HTTPdServer/package/logo.png | Bin 0 -> 5396 bytes .../HTTPdServer/package/manifest.yaml | 10 + .../package/Classes/DockerHTTPdSite.yaml | 52 ++ Applications/HTTPdSite/package/UI/ui.yaml | 40 ++ Applications/HTTPdSite/package/logo.png | Bin 0 -> 5396 bytes Applications/HTTPdSite/package/manifest.yaml | 10 + .../package/Classes/DockerInfluxDB.yaml | 61 +++ Applications/InfluxDB/package/UI/ui.yaml | 42 ++ Applications/InfluxDB/package/logo.png | Bin 0 -> 3831 bytes Applications/InfluxDB/package/manifest.yaml | 10 + .../package/Classes/DockerJenkins.yaml | 49 ++ Applications/Jenkins/package/UI/ui.yaml | 34 ++ Applications/Jenkins/package/logo.png | Bin 0 -> 3856 bytes Applications/Jenkins/package/manifest.yaml | 10 + .../package/Classes/DockerMariaDB.yaml | 54 ++ Applications/MariaDB/package/UI/ui.yaml | 41 ++ Applications/MariaDB/package/logo.png | Bin 0 -> 4417 bytes Applications/MariaDB/package/manifest.yaml | 13 + .../package/Classes/DockerMongoDB.yaml | 49 ++ Applications/MongoDB/package/UI/ui.yaml | 33 ++ Applications/MongoDB/package/logo.png | Bin 0 -> 3649 bytes Applications/MongoDB/package/manifest.yaml | 10 + .../MySQL/package/Classes/DockerMySQL.yaml | 54 ++ Applications/MySQL/package/UI/ui.yaml | 39 ++ Applications/MySQL/package/logo.png | Bin 0 -> 4037 bytes Applications/MySQL/package/manifest.yaml | 10 + .../Nginx/package/Classes/DockerNginx.yaml | 48 ++ Applications/Nginx/package/UI/ui.yaml | 34 ++ Applications/Nginx/package/logo.png | Bin 0 -> 3731 bytes Applications/Nginx/package/manifest.yaml | 10 + .../package/Classes/DockerNginxSite.yaml | 52 ++ Applications/NginxSite/package/UI/ui.yaml | 41 ++ Applications/NginxSite/package/logo.png | Bin 0 -> 3731 bytes Applications/NginxSite/package/manifest.yaml | 10 + .../package/Classes/DockerPHPZendServer.yaml | 74 +++ Applications/PHPZendServer/package/UI/ui.yaml | 75 +++ Applications/PHPZendServer/package/logo.png | Bin 0 -> 3347 bytes .../PHPZendServer/package/manifest.yaml | 10 + .../package/Classes/DockerPostgreSQL.yaml | 53 ++ Applications/PostgreSQL/package/UI/ui.yaml | 40 ++ Applications/PostgreSQL/package/logo.png | Bin 0 -> 7352 bytes Applications/PostgreSQL/package/manifest.yaml | 10 + .../Redis/package/Classes/DockerRedis.yaml | 48 ++ Applications/Redis/package/UI/ui.yaml | 34 ++ Applications/Redis/package/logo.png | Bin 0 -> 4373 bytes Applications/Redis/package/manifest.yaml | 10 + .../Tomcat/package/Classes/DockerTomcat.yaml | 53 ++ Applications/Tomcat/package/UI/ui.yaml | 39 ++ Applications/Tomcat/package/logo.png | Bin 0 -> 6813 bytes Applications/Tomcat/package/manifest.yaml | 10 + .../package/Classes/ApplicationPort.yaml | 25 + .../package/Classes/DockerApplication.yaml | 91 ++++ .../package/Classes/DockerContainer.yaml | 46 ++ .../package/Classes/DockerContainerHost.yaml | 30 ++ .../package/Classes/DockerHelpers.yaml | 30 ++ .../package/Classes/DockerHostVolume.yaml | 20 + .../package/Classes/DockerTempVolume.yaml | 15 + .../package/Classes/DockerVolume.yaml | 19 + DockerInterfacesLibrary/package/manifest.yaml | 19 + .../package/Classes/DockerStandaloneHost.yaml | 277 +++++++++++ .../package/Resources/PullImage.template | 18 + .../Resources/RemoveContainer.template | 19 + .../package/Resources/RunContainer.template | 32 ++ .../Resources/SetupDockerRegistry.template | 19 + .../Resources/scripts/runDockerCommand.sh | 3 + .../Resources/scripts/setupDockerRegistry.sh | 7 + DockerStandaloneHost/package/UI/ui.yaml | 71 +++ DockerStandaloneHost/package/images.lst | 10 + DockerStandaloneHost/package/logo.png | Bin 0 -> 8736 bytes DockerStandaloneHost/package/manifest.yaml | 14 + .../package/Classes/KubernetesCluster.yaml | 468 ++++++++++++++++++ .../Classes/KubernetesGatewayNode.yaml | 61 +++ .../package/Classes/KubernetesMasterNode.yaml | 56 +++ .../package/Classes/KubernetesMinionNode.yaml | 102 ++++ .../package/Classes/KubernetesNode.yaml | 27 + .../DestroyReplicationController.template | 20 + .../package/Resources/DestroyService.template | 20 + .../package/Resources/EtcdAddMember.template | 21 + .../package/Resources/ExportConfig.template | 23 + .../package/Resources/HAProxySetup.template | 24 + .../Resources/KubeMasterSetup.template | 30 ++ .../Resources/KubeMinionSetup.template | 42 ++ .../Resources/KubeRegisterNode.template | 22 + .../Resources/MasterEtcdSetup.template | 24 + .../Resources/MemberEtcdSetup.template | 25 + .../package/Resources/RemoveMinion.template | 20 + .../Resources/SetupFlannelMaster.template | 18 + .../Resources/SetupFlannelNode.template | 22 + .../package/Resources/UpdatePod.template | 26 + .../UpdateReplicationController.template | 23 + .../package/Resources/UpdateService.template | 36 ++ .../Resources/scripts/cadvisor.manifest | 32 ++ .../scripts/default_scripts/etcd-master | 2 + .../scripts/default_scripts/etcd-member | 11 + .../scripts/default_scripts/flanneld | 7 + .../Resources/scripts/default_scripts/haproxy | 4 + .../scripts/default_scripts/kube-apiserver | 13 + .../default_scripts/kube-controller-manager | 11 + .../scripts/default_scripts/kube-proxy | 10 + .../scripts/default_scripts/kube-scheduler | 10 + .../Resources/scripts/default_scripts/kubelet | 14 + .../scripts/destroyReplicationController.sh | 3 + .../Resources/scripts/destroyService.sh | 3 + .../package/Resources/scripts/exportConfig.sh | 19 + .../package/Resources/scripts/getServiceIp.sh | 3 + .../Resources/scripts/haproxy-setup.sh | 18 + .../package/Resources/scripts/haproxy.tmpl | 17 + .../package/Resources/scripts/haproxy.toml | 7 + .../Resources/scripts/init_conf/confd.conf | 11 + .../Resources/scripts/init_conf/etcd.conf | 30 ++ .../Resources/scripts/init_conf/flanneld.conf | 32 ++ .../scripts/init_conf/kube-apiserver.conf | 33 ++ .../init_conf/kube-controller-manager.conf | 33 ++ .../scripts/init_conf/kube-proxy.conf | 33 ++ .../scripts/init_conf/kube-scheduler.conf | 33 ++ .../Resources/scripts/init_conf/kubelet.conf | 33 ++ .../Resources/scripts/initd_scripts/etcd | 100 ++++ .../Resources/scripts/initd_scripts/flanneld | 99 ++++ .../scripts/initd_scripts/kube-apiserver | 99 ++++ .../initd_scripts/kube-controller-manager | 99 ++++ .../scripts/initd_scripts/kube-proxy | 99 ++++ .../scripts/initd_scripts/kube-scheduler | 99 ++++ .../Resources/scripts/initd_scripts/kubelet | 99 ++++ .../Resources/scripts/kube-add-node.sh | 10 + .../Resources/scripts/master-add-member.sh | 14 + .../Resources/scripts/master-etcd-setup.sh | 18 + .../Resources/scripts/master-kube-setup.sh | 41 ++ .../Resources/scripts/member-etcd-setup.sh | 21 + .../Resources/scripts/minion-kube-setup.sh | 38 ++ .../Resources/scripts/minion-node.json | 14 + .../package/Resources/scripts/removeMinion.sh | 3 + .../Resources/scripts/setupDockerRegistry.sh | 7 + .../Resources/scripts/setupFlannelMaster.sh | 3 + .../Resources/scripts/setupFlannelNode.sh | 28 ++ .../package/Resources/scripts/updatePod.sh | 20 + .../scripts/updateReplicationController.sh | 8 + .../Resources/scripts/updateService.sh | 19 + .../KubernetesCluster/package/UI/ui.yaml | 171 +++++++ .../KubernetesCluster/package/images.lst | 9 + Kubernetes/KubernetesCluster/package/logo.png | Bin 0 -> 8767 bytes .../KubernetesCluster/package/manifest.yaml | 15 + .../package/Classes/Pod.yaml | 36 ++ .../Classes/ReplicationController.yaml | 39 ++ .../package/Classes/Service.yaml | 39 ++ .../DestroyReplicationController.template | 20 + .../package/Resources/DestroyService.template | 20 + .../package/Resources/UpdatePod.template | 23 + .../UpdateReplicationController.template | 23 + .../package/Resources/UpdateService.template | 23 + .../scripts/destroyReplicationController.sh | 3 + .../Resources/scripts/destroyService.sh | 3 + .../package/Resources/scripts/updatePod.sh | 13 + .../scripts/updateReplicationController.sh | 8 + .../Resources/scripts/updateService.sh | 8 + .../package/manifest.yaml | 13 + .../package/Classes/KubernetesPod.yaml | 225 +++++++++ Kubernetes/KubernetesPod/package/UI/ui.yaml | 38 ++ Kubernetes/KubernetesPod/package/logo.png | Bin 0 -> 9673 bytes .../KubernetesPod/package/manifest.yaml | 11 + Kubernetes/readme.md | 52 ++ 179 files changed, 5948 insertions(+) create mode 100644 Applications/Crate/package/Classes/DockerCrate.yaml create mode 100644 Applications/Crate/package/UI/ui.yaml create mode 100644 Applications/Crate/package/logo.png create mode 100644 Applications/Crate/package/manifest.yaml create mode 100644 Applications/GlassFish/package/Classes/DockerGlassFish.yaml create mode 100644 Applications/GlassFish/package/UI/ui.yaml create mode 100644 Applications/GlassFish/package/logo.png create mode 100644 Applications/GlassFish/package/manifest.yaml create mode 100644 Applications/Grafana/package/Classes/DockerGrafana.yaml create mode 100644 Applications/Grafana/package/UI/ui.yaml create mode 100644 Applications/Grafana/package/logo.png create mode 100644 Applications/Grafana/package/manifest.yaml create mode 100644 Applications/GuestBook/package/Classes/GuestBook.yaml create mode 100644 Applications/GuestBook/package/Classes/RedisSlave.yaml create mode 100644 Applications/GuestBook/package/UI/ui.yaml create mode 100644 Applications/GuestBook/package/logo.png create mode 100644 Applications/GuestBook/package/manifest.yaml create mode 100644 Applications/HTTPdServer/package/Classes/DockerHTTPd.yaml create mode 100644 Applications/HTTPdServer/package/UI/ui.yaml create mode 100644 Applications/HTTPdServer/package/logo.png create mode 100644 Applications/HTTPdServer/package/manifest.yaml create mode 100644 Applications/HTTPdSite/package/Classes/DockerHTTPdSite.yaml create mode 100644 Applications/HTTPdSite/package/UI/ui.yaml create mode 100644 Applications/HTTPdSite/package/logo.png create mode 100644 Applications/HTTPdSite/package/manifest.yaml create mode 100644 Applications/InfluxDB/package/Classes/DockerInfluxDB.yaml create mode 100644 Applications/InfluxDB/package/UI/ui.yaml create mode 100644 Applications/InfluxDB/package/logo.png create mode 100644 Applications/InfluxDB/package/manifest.yaml create mode 100644 Applications/Jenkins/package/Classes/DockerJenkins.yaml create mode 100644 Applications/Jenkins/package/UI/ui.yaml create mode 100644 Applications/Jenkins/package/logo.png create mode 100644 Applications/Jenkins/package/manifest.yaml create mode 100644 Applications/MariaDB/package/Classes/DockerMariaDB.yaml create mode 100644 Applications/MariaDB/package/UI/ui.yaml create mode 100644 Applications/MariaDB/package/logo.png create mode 100644 Applications/MariaDB/package/manifest.yaml create mode 100644 Applications/MongoDB/package/Classes/DockerMongoDB.yaml create mode 100644 Applications/MongoDB/package/UI/ui.yaml create mode 100644 Applications/MongoDB/package/logo.png create mode 100644 Applications/MongoDB/package/manifest.yaml create mode 100644 Applications/MySQL/package/Classes/DockerMySQL.yaml create mode 100644 Applications/MySQL/package/UI/ui.yaml create mode 100644 Applications/MySQL/package/logo.png create mode 100644 Applications/MySQL/package/manifest.yaml create mode 100644 Applications/Nginx/package/Classes/DockerNginx.yaml create mode 100644 Applications/Nginx/package/UI/ui.yaml create mode 100644 Applications/Nginx/package/logo.png create mode 100644 Applications/Nginx/package/manifest.yaml create mode 100644 Applications/NginxSite/package/Classes/DockerNginxSite.yaml create mode 100644 Applications/NginxSite/package/UI/ui.yaml create mode 100644 Applications/NginxSite/package/logo.png create mode 100644 Applications/NginxSite/package/manifest.yaml create mode 100644 Applications/PHPZendServer/package/Classes/DockerPHPZendServer.yaml create mode 100644 Applications/PHPZendServer/package/UI/ui.yaml create mode 100644 Applications/PHPZendServer/package/logo.png create mode 100644 Applications/PHPZendServer/package/manifest.yaml create mode 100644 Applications/PostgreSQL/package/Classes/DockerPostgreSQL.yaml create mode 100644 Applications/PostgreSQL/package/UI/ui.yaml create mode 100644 Applications/PostgreSQL/package/logo.png create mode 100644 Applications/PostgreSQL/package/manifest.yaml create mode 100644 Applications/Redis/package/Classes/DockerRedis.yaml create mode 100644 Applications/Redis/package/UI/ui.yaml create mode 100644 Applications/Redis/package/logo.png create mode 100644 Applications/Redis/package/manifest.yaml create mode 100644 Applications/Tomcat/package/Classes/DockerTomcat.yaml create mode 100644 Applications/Tomcat/package/UI/ui.yaml create mode 100644 Applications/Tomcat/package/logo.png create mode 100644 Applications/Tomcat/package/manifest.yaml create mode 100644 DockerInterfacesLibrary/package/Classes/ApplicationPort.yaml create mode 100644 DockerInterfacesLibrary/package/Classes/DockerApplication.yaml create mode 100644 DockerInterfacesLibrary/package/Classes/DockerContainer.yaml create mode 100644 DockerInterfacesLibrary/package/Classes/DockerContainerHost.yaml create mode 100644 DockerInterfacesLibrary/package/Classes/DockerHelpers.yaml create mode 100644 DockerInterfacesLibrary/package/Classes/DockerHostVolume.yaml create mode 100644 DockerInterfacesLibrary/package/Classes/DockerTempVolume.yaml create mode 100644 DockerInterfacesLibrary/package/Classes/DockerVolume.yaml create mode 100644 DockerInterfacesLibrary/package/manifest.yaml create mode 100644 DockerStandaloneHost/package/Classes/DockerStandaloneHost.yaml create mode 100644 DockerStandaloneHost/package/Resources/PullImage.template create mode 100644 DockerStandaloneHost/package/Resources/RemoveContainer.template create mode 100644 DockerStandaloneHost/package/Resources/RunContainer.template create mode 100644 DockerStandaloneHost/package/Resources/SetupDockerRegistry.template create mode 100644 DockerStandaloneHost/package/Resources/scripts/runDockerCommand.sh create mode 100644 DockerStandaloneHost/package/Resources/scripts/setupDockerRegistry.sh create mode 100644 DockerStandaloneHost/package/UI/ui.yaml create mode 100644 DockerStandaloneHost/package/images.lst create mode 100644 DockerStandaloneHost/package/logo.png create mode 100644 DockerStandaloneHost/package/manifest.yaml create mode 100644 Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml create mode 100644 Kubernetes/KubernetesCluster/package/Classes/KubernetesGatewayNode.yaml create mode 100644 Kubernetes/KubernetesCluster/package/Classes/KubernetesMasterNode.yaml create mode 100644 Kubernetes/KubernetesCluster/package/Classes/KubernetesMinionNode.yaml create mode 100644 Kubernetes/KubernetesCluster/package/Classes/KubernetesNode.yaml create mode 100644 Kubernetes/KubernetesCluster/package/Resources/DestroyReplicationController.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/DestroyService.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/EtcdAddMember.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/ExportConfig.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/HAProxySetup.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/KubeMinionSetup.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/KubeRegisterNode.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/MasterEtcdSetup.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/MemberEtcdSetup.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/RemoveMinion.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/SetupFlannelMaster.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/SetupFlannelNode.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/UpdatePod.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/UpdateReplicationController.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/UpdateService.template create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/cadvisor.manifest create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-master create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-member create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/flanneld create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/haproxy create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-apiserver create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-controller-manager create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-proxy create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-scheduler create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kubelet create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/destroyReplicationController.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/destroyService.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/exportConfig.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/getServiceIp.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy-setup.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.tmpl create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.toml create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/confd.conf create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/etcd.conf create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/flanneld.conf create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-apiserver.conf create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-controller-manager.conf create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-proxy.conf create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-scheduler.conf create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kubelet.conf create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/etcd create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/flanneld create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-apiserver create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-controller-manager create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-proxy create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-scheduler create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kubelet create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/kube-add-node.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/master-add-member.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/master-etcd-setup.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/member-etcd-setup.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/minion-kube-setup.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/minion-node.json create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/removeMinion.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerRegistry.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelMaster.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelNode.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/updatePod.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/updateReplicationController.sh create mode 100644 Kubernetes/KubernetesCluster/package/Resources/scripts/updateService.sh create mode 100644 Kubernetes/KubernetesCluster/package/UI/ui.yaml create mode 100644 Kubernetes/KubernetesCluster/package/images.lst create mode 100644 Kubernetes/KubernetesCluster/package/logo.png create mode 100644 Kubernetes/KubernetesCluster/package/manifest.yaml create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Classes/Pod.yaml create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Classes/ReplicationController.yaml create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Classes/Service.yaml create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyReplicationController.template create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyService.template create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdatePod.template create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateReplicationController.template create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateService.template create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyReplicationController.sh create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyService.sh create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updatePod.sh create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateReplicationController.sh create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateService.sh create mode 100644 Kubernetes/KubernetesEntitiesLibrary/package/manifest.yaml create mode 100644 Kubernetes/KubernetesPod/package/Classes/KubernetesPod.yaml create mode 100644 Kubernetes/KubernetesPod/package/UI/ui.yaml create mode 100644 Kubernetes/KubernetesPod/package/logo.png create mode 100644 Kubernetes/KubernetesPod/package/manifest.yaml create mode 100644 Kubernetes/readme.md diff --git a/Applications/Crate/package/Classes/DockerCrate.yaml b/Applications/Crate/package/Classes/DockerCrate.yaml new file mode 100644 index 0000000..7baff69 --- /dev/null +++ b/Applications/Crate/package/Classes/DockerCrate.yaml @@ -0,0 +1,52 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerCrate + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: crate + ports: + - port: 4300 + scope: $._scope + - port: 4200 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing Crate') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints. + where($.scope = $this._scope and $.containerPort = 4200). + select(format('http://{0}:{1}', $.address, $.port)) + + - $._environment.reporter.report($this, 'Application {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'Application {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/Crate/package/UI/ui.yaml b/Applications/Crate/package/UI/ui.yaml new file mode 100644 index 0000000..115320f --- /dev/null +++ b/Applications/Crate/package/UI/ui.yaml @@ -0,0 +1,39 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerCrate + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: DockerCrate + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: ports + type: string + required: false + hidden: true + description: Select Crate ports + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access the application from the Internet diff --git a/Applications/Crate/package/logo.png b/Applications/Crate/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..26b7c8318f76516ae67bd70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W*qiUX_y1_5XNJ0~gAMyXD88RU literal 0 HcmV?d00001 diff --git a/Applications/Crate/package/manifest.yaml b/Applications/Crate/package/manifest.yaml new file mode 100644 index 0000000..c0924c6 --- /dev/null +++ b/Applications/Crate/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerCrate +Name: Docker Crate +Description: | + Crate is an Elastic SQL Data Store. Distributed by design, Crate makes centralized database servers obsolete. Realtime non-blocking SQL engine with full blown search. Highly available, massively scalable yet simple to use. +Author: 'Mirantis, Inc' +Tags: [docker, application, crate] +Classes: + io.murano.apps.docker.DockerCrate: DockerCrate.yaml diff --git a/Applications/GlassFish/package/Classes/DockerGlassFish.yaml b/Applications/GlassFish/package/Classes/DockerGlassFish.yaml new file mode 100644 index 0000000..20f3363 --- /dev/null +++ b/Applications/GlassFish/package/Classes/DockerGlassFish.yaml @@ -0,0 +1,68 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerGlassFish + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + password: + Contract: $.string().notNull() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: 'tutum/glassfish' + env: + GLASSFISH_PASS: $.password + ports: + - port: 4848 + scope: $._scope + - port: 8080 + scope: $._scope + - port: 8181 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing GlassFish') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $adminEndpoints: join(', ', $.applicationEndpoints. + where($.scope = $this._scope and $.containerPort = 4848). + select(format('http://{0}:{1}', $.address, $.port))) + - $httpEndpoints: join(', ', $.applicationEndpoints. + where($.scope = $this._scope and $.containerPort = 8080). + select(format('http://{0}:{1}', $.address, $.port))) + - $httpsEndpoints: join(', ', $.applicationEndpoints. + where($.scope = $this._scope and $.containerPort = 8181). + select(format('https://{0}:{1}', $.address, $.port))) + + - $._environment.reporter.report( + $this, + 'GlassFish {0} is available at {1} (admin) and {2}/{3} (apps)'.format( + $.name, $adminEndpoints, $httpEndpoints, $httpsEndpoints)) + Else: + - $._environment.reporter.report($this, 'GlassFish {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/GlassFish/package/UI/ui.yaml b/Applications/GlassFish/package/UI/ui.yaml new file mode 100644 index 0000000..a3d3f35 --- /dev/null +++ b/Applications/GlassFish/package/UI/ui.yaml @@ -0,0 +1,40 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerGlassFish + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + password: $.appConfiguration.password + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: 'DockerGlassFish' + description: >- + Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and + underline are allowed + - name: password + type: password + required: true + label: GlassFish Admin Password + description: Password for admin user in GlassFish + - name: host + type: + - io.murano.apps.docker.kubernetes.KubernetesPod + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access the application from the Internet diff --git a/Applications/GlassFish/package/logo.png b/Applications/GlassFish/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2bb0bbb228c42126231d5f6541e4d0b795ac7950 GIT binary patch literal 5716 zcmbVQcQ~7E+mBVFwo;`ff}%zcEB1(0dseBDNNfp7)ZS`VwQ8@b+MC)nOI1;-R;v`X zw<@*y(&v4i_xt{MkN1!7K92jo);WIHIqu`Ut{6joO&TgTDgXdLqpbxqCbWixSA&9> z@Etpg2p}{!@ah(L6O04i8;(T*RFD`13aIT4cSISZ;7DK34=8y6fW*hy)BlZ zaTkIAp%L+M_aJZs0P;#c9&meC6ds5`IXa^iKs#?bKtN}t0_dKko~WLO8p_F8%MXh( z@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I#9X_1GrxvX z>@T6!qbbw1dd&rWkMdyhQvxM@>+*pmv_Ee$>?_9!_v0>N!}NJ&lJO zM!HUPXffOB--ga~Cc{rAZ*!2P_+eC7j*s2cuclsHeQ?R$36S96m^&VT3jMj~)mGPs JRjS&B{SRQ&a+?4E literal 0 HcmV?d00001 diff --git a/Applications/GlassFish/package/manifest.yaml b/Applications/GlassFish/package/manifest.yaml new file mode 100644 index 0000000..b622b0e --- /dev/null +++ b/Applications/GlassFish/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerGlassFish +Name: Docker GlassFish +Description: | + Oracle GlassFish Server is the world's first implementation of the Java Platform, Enterprise Edition (Java EE) 6 specification. Built using the GlassFish Server Open Source Edition, Oracle GlassFish Server delivers a flexible, lightweight, and production-ready Java EE 6 application server. +Author: 'Mirantis, Inc' +Tags: [docker, application, GlassFish] +Classes: + io.murano.apps.docker.DockerGlassFish: DockerGlassFish.yaml diff --git a/Applications/Grafana/package/Classes/DockerGrafana.yaml b/Applications/Grafana/package/Classes/DockerGrafana.yaml new file mode 100644 index 0000000..a02da45 --- /dev/null +++ b/Applications/Grafana/package/Classes/DockerGrafana.yaml @@ -0,0 +1,69 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerGrafana + +Extends: DockerApplication + + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + influxDB: + Contract: $.class(DockerInfluxDB).notNull() + + grafanaUser: + Contract: $.string().notNull() + + grafanaPassword: + Contract: $.string().notNull() + + dbName: + Contract: $.string().notNull() + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + - $influxDbLink: $.getConnectionTo($.influxDB, 8086) + - Return: + name: $.name + image: 'tutum/grafana' + env: + HTTP_USER: $.grafanaUser + HTTP_PASS: $.grafanaPassword + INFLUXDB_HOST: $influxDbLink.host + INFLUXDB_PORT: $influxDbLink.port + INFLUXDB_NAME: $.dbName + INFLUXDB_USER: root + INFLUXDB_PASS: root + ports: + - port: 80 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing Grafana') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('http://{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'Grafana {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'Grafana {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/Grafana/package/UI/ui.yaml b/Applications/Grafana/package/UI/ui.yaml new file mode 100644 index 0000000..b68c3b0 --- /dev/null +++ b/Applications/Grafana/package/UI/ui.yaml @@ -0,0 +1,70 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerGrafana + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + + influxDB: $.grafanaConfig.influxDB + dbName: $.grafanaConfig.dbName + grafanaUser: $.grafanaConfig.grafanaUser + grafanaPassword: $.grafanaConfig.grafanaPassword + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: 'DockerGrafana' + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Visible from outside + initial: false + required: true + description: >- + Check if you intend to access the application from the Internet + + - grafanaConfig: + fields: + - name: influxDB + type: io.murano.apps.docker.DockerInfluxDB + label: InfluxDB instance + required: true + description: >- + Please select existing InfluxDB instance or add a new one + + - name: dbName + type: string + label: InfluxDB database + required: true + description: >- + Please specify an InfluxDB database name to connect to + + - name: grafanaUser + type: string + label: Grafana user name + initial: admin + required: true + description: >- + User name that will be configured for Grafana access + + - name: grafanaPassword + type: password + label: Grafana user password + required: true + description: >- + User password that will be configured for Grafana access diff --git a/Applications/Grafana/package/logo.png b/Applications/Grafana/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9187ad142c39604adfc527873b067fed76aa270c GIT binary patch literal 4959 zcmbVQXH-+$wx%8FqJV&a5CbUELSkr<$c2O|0Sri&md z@vFtcaQq!Sym#k#J4?|trx?51QfOE*kxrf9iX#Gaow0UAG!aYia%(55($O(`+MAeD z%u)ID*8>6e1US%40VR(jA&9r_ zb-c+$V{Zc!ytgA>g#c8$3Q+Zg9V>7qQm_C|XD1hTm?s?gr(W3c`4<}m1pFyNafAc^ z?UXsn2!L=U69Ecxin4flFchGqA_rDbR8mor0YHvvki0SoA}=ei0#mpQlZOEQdVt5) z$OKy$8maY{tz!xfyiK8yU?32UMw6pmmUAWBfxs#%Dj<0X2m+BkmXLM#a-m>7WnJ9G zerrGy-SK3562;!t1@KEF7UxQ(z=6k}{yPL`5(@RVVi)(n5_Oz1kSCS|0?WyRoSlEg z^{2Eu1x@^KH~vxD-NcJT1fhxUu2eGqxE{7*zrn}3`_G1c2_Aa`GbGy|7X|Btbj4Gh zi7pgfBpi5rBS)|&z@W-lC1ofx|jo`1rt zBUCOcsX$ef!0MV{uqISR9f{D;L_oA4npzOBrs8j`u8TVb>w+i#wrziG`!B5Wf5gHN zWFnU0N;YwIb^6@}Mz>uluI{&8NdN@m&#D6?QCPga%P;1oUxoU2+(;tX-h)WcBD*>R z{>(JY{vW&mV{u>{6bq5XDL^jELUGDOSsYkdNfrlDP*PIBL9k$3CE#Cp!v8mepkt>% zzuM)0w9jwWaZmm_{yhxG#NXpYbUB_O^6{|5di2O{w9MyyDqOc( zT&Uzh%fCKfvSM+4*BL@DH0qCe7e~Natqti2Mrd8`@7jvi4Cgf9BQNB%Fa5}HSJ*vR zt*u|XyT&2K!tgD35ZRVy-pTm>f2|*W>vwKF}dwtju>V(X?DtNVx z02w(e0V(-8bMNk65^F+Fkwt^#l5o{mQJRKm>jtT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d@nt!#XJo@ z!+n@G1UgK*K~-~bmXtPP(t&9d8$Y92P?*!K4!mF>)Al935)AGJUmp3~ZH4AUhuZxU z9T%ccKFqj0ly2eF{<;1cOJ-b%nviT6uaw;aN<7iHpl(y}b0t+XP#3e&ddCg+mH<)Z zS~{AIlR#T<1?|3PRIg8Z5?0KWW&!7Zm?pBZvQ%ccQP=xvefW!1;;f`%P)INSdXgL!VPu%)0S z&Loww`D6Q}uqvnU3PyGFkH7i z*GjpDgEltb1JaLr1`s}=hzYh+l&Sh3J%zpH@Je!q1^=^=F-I!+LI+6|^4-E>=R+QV zw@pGt&n)KC-cqYl5oW)=!f$({A+;xYXZvDeEVr<^Vy#C6`o)u)(!%T>l>dFd`H1CE z25^A=;Xqw#W6;aO&bh4Z!5(y-LOM6a}xZ1V(ohNWL_10xwLct zqn4lQAK*3qq*WJ5={vajr*jUChN70k^XI!PXGi@;`oV&G-?eK&FRhB&tY<qTS7O-&*#^ rkqrv20W##VrS_qIOwdj}0|%WAPjZ_M#75`WFE3q91LRAMTY>)tkv9gI literal 0 HcmV?d00001 diff --git a/Applications/Grafana/package/manifest.yaml b/Applications/Grafana/package/manifest.yaml new file mode 100644 index 0000000..f494d62 --- /dev/null +++ b/Applications/Grafana/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerGrafana +Name: Docker Grafana +Description: | + Grafana is a frontend for Graphite, InfluxDB and OpenTSDB with powerfull visualization features for time series data. You will need either a Graphite, InfluxDB or OpenTSDB server for Grafana to be of any use. +Author: 'Mirantis, Inc' +Tags: [docker, application, Grafana] +Classes: + io.murano.apps.docker.DockerGrafana: DockerGrafana.yaml diff --git a/Applications/GuestBook/package/Classes/GuestBook.yaml b/Applications/GuestBook/package/Classes/GuestBook.yaml new file mode 100644 index 0000000..824d454 --- /dev/null +++ b/Applications/GuestBook/package/Classes/GuestBook.yaml @@ -0,0 +1,63 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerGuestBook + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + redisMaster: + Contract: $.class(DockerRedis).notNull() + + redisSlave: + Contract: $.class(DockerRedisSlave).notNull() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + - $.redisMaster.deploy() + - $.redisSlave.deploy() + - $redisMasterLink: $.getConnectionTo($.redisMaster, 6379) + - $redisSlaveLink: $.getConnectionTo($.redisSlave, 6379) + - Return: + name: $.name + image: 'brendanburns/php-redis' + env: + REDIS_MASTER_SERVICE_HOST: $.redisMaster.host + REDIS_MASTER_SERVICE_PORT: $.redisMaster.port + REDISSLAVE_SERVICE_HOST: $.redisSlave.host + REDISSLAVE_SERVICE_PORT: $.redisSlave.port + ports: + - port: 80 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing Redis Slave') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'GuestBook {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'GuestBook {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/GuestBook/package/Classes/RedisSlave.yaml b/Applications/GuestBook/package/Classes/RedisSlave.yaml new file mode 100644 index 0000000..8c37db9 --- /dev/null +++ b/Applications/GuestBook/package/Classes/RedisSlave.yaml @@ -0,0 +1,55 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerRedisSlave + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + redisMaster: + Contract: $.class(DockerRedis).notNull() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + - $redisMasterLink: $.getConnectionTo($.redisMaster, 6379) + - Return: + name: $.name + image: 'brendanburns/redis-slave' + env: + REDIS_MASTER_SERVICE_HOST: $redisMaster.host + REDIS_MASTER_SERVICE_PORT: $redisMaster.port + ports: + - port: 6379 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing RedisSlave') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'Redis Slave {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'Redis Slave {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/GuestBook/package/UI/ui.yaml b/Applications/GuestBook/package/UI/ui.yaml new file mode 100644 index 0000000..6c122eb --- /dev/null +++ b/Applications/GuestBook/package/UI/ui.yaml @@ -0,0 +1,70 @@ +Version: 2 +Templates: + guestBookHost: + ?: + type: io.murano.apps.docker.kubernetes.KubernetesPod + name: frontend + labels: 'name=frontend,app=frontend,uses=redis-slave-or-redis-master' + kubernetesCluster: $.appConfiguration.kubernetesCluster + replicas: 3 + + redisMaster: + ?: + type: io.murano.apps.docker.DockerRedis + name: RedisMaster + host: + ?: + type: io.murano.apps.docker.kubernetes.KubernetesPod + name: 'redis-master' + labels: 'name=redis-master,app=redis' + kubernetesCluster: $.appConfiguration.kubernetesCluster + replicas: 1 + publish: false + + redisSlave: + ?: + type: io.murano.apps.docker.DockerRedisSlave + name: RedisSlave + host: + ?: + type: io.murano.apps.docker.kubernetes.KubernetesPod + name: 'redis-slave' + labels: 'name=redis-slave,app=redis,uses=redis-master' + kubernetesCluster: $.appConfiguration.kubernetesCluster + replicas: 2 + publish: false + redisMaster: $redisMaster + +Application: + ?: + type: io.murano.apps.docker.DockerGuestBook + name: $.appConfiguration.name + host: $guestBookHost + redisMaster: $redisMaster + redisSlave: $redisSlave + publish: $.appConfiguration.publish + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: 'GuestBook' + description: >- + Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and + underline are allowed + - name: kubernetesCluster + type: io.murano.apps.docker.kubernetes.KubernetesCluster + label: Kubernetes cluster + required: true + description: >- + Kubernetes service + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/GuestBook/package/logo.png b/Applications/GuestBook/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..16cf9f3b4f155dafd38722fd8205bd01b11be892 GIT binary patch literal 10448 zcmbVyWmFu`w(sDTUJgySjVt>TpGQDNHnCGynjADI+be{Cd{@XMcnIdi+!>0{?mmv#l+BDxJsgM3_yGU}cS}`GXHAG4uZg`ai_t$cEbg`r zuiO9tzmU6wk%_gLGo`Vaxuu-|^+{_dHKnDg0JR1f!U}N^GqbRi_H;5+@sw9J@w7JK zF{Ks~q~v$!eHCD9=4?diZfj!)<8>FH{+C?d*Xw_}LDZE0B5}4Bp#CqTG$D$VV)jmE zlwcMvpb0A*CnYxz3mce=n}?g3lKr&}V*LbSX9cqI@PavbS=lN7y-~kvb25eUDvL}0 zTi0t#fZD>@*?|`Xa&vQIapPdIcQOaD@$m3~SlL1B?7&wFAk4$g*~lGe2c!9q1aUK% ziIb&+v!%Tq_56KUv>YR zSK@!=Gjg_fQnk0Y`A-xmTG%_=!z}C_D8j^LJYXmX z^}qQ||9=q#y&47jCtUuY@cB>IYfS!g`QMY_wejE6$;|F`4mrI}7C(rdIsia>EF&(W z>b`WShvKbj)+prW`B~vju&~9nm;XCNB-|otjbNmaK+1wQ3+g@A+!mS4z_<-J#SMBIgjFoZK2?A4#L#&!+bWD!*M=vO=N(rnJGTQfN(&# z-5?aK=PH68_0n`s%jwcka!(8B%vVS?*3+tjlDiL( z9QsRc6{xjOnMn?>i`7j89+SS$L1mL5uitaq#TxPM7fcf361jBt>v6sl?^3PrP(3lf zn2lg(i^{@q4EMDdWV9zjl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DL6onba{YYfNmMk^k`5iVO4Co-klMe}`!zpAm4*g`oQ_vO zmrq~p({067c3Ae3MpAy2nV>+?8AjM~=f`<6c_;^lTyGMQ`wS4NMfqA#=VwI4-=b1EelX*ecDlIb=WtN<{*^ z*|G8c`v?g@ZRSDH`7QJQ0&2o|_xnPGzqVV0kMZ3ka%H5^u3ekYEevdH(eglbP3(mpx*l{vFZ1}sp#tUk>{Y1aoS#=Pf|a| z$+!0WI{o_)ljpwY_#m-FrlgZ%N+lAkTL6AjryB4GQEeYp47WAHS__K3R^EHoh?O3e zJt^s$fS1;-nAkHsiT;~$MiyzYfuRLQ_jIjrSSh`QkSmqXwV4r@y-*ed!tvL9N?;qV zh)}ciNp0^#VA6C$ln6fdfe3jt~|KLeGhBy?U(Fgs0HG8p*bUE31T| zH*}8c5_5gUweEiU26+cO_YuC|*v2ltWm>fjvtYPZH~BxleY~UZ4yOb?FZrS5rH}}- zlomb^e0t4q)6zXQMqghz8kQYMs>^xCLdz_YE=XK-KnulG&n1@ zFK<#tCzZ~=_$qWNSt;KI9rxfPY7G%vJqF^zwk`h9en1m+c`f(M(A`-V7|12s37LC3 zGa%SbKa3~#=l-og$b`BBZThd0BQ^92Qx35@_HAy7EWimLSu^gh4qonFKa3_K89xaR z&0meRnP!};#<%EEXekfOhST7&muEg>Hc`vRU9(d7z1Gt#!LE<700clTITP7p^{>r; P{xOu1kQc8KH4OYegesOk literal 0 HcmV?d00001 diff --git a/Applications/GuestBook/package/manifest.yaml b/Applications/GuestBook/package/manifest.yaml new file mode 100644 index 0000000..bb53656 --- /dev/null +++ b/Applications/GuestBook/package/manifest.yaml @@ -0,0 +1,12 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.GuestBook +Name: Docker GuestBook +Description: | + Simple demo application using Kubernetes Cluster for deployment +Author: 'Mirantis, Inc' +Tags: [Docker, Kubernetes, guestbook] + +Classes: + io.murano.apps.docker.DockerRedisSlave: RedisSlave.yaml + io.murano.apps.docker.DockerGuestBook: GuestBook.yaml diff --git a/Applications/HTTPdServer/package/Classes/DockerHTTPd.yaml b/Applications/HTTPdServer/package/Classes/DockerHTTPd.yaml new file mode 100644 index 0000000..5185ff2 --- /dev/null +++ b/Applications/HTTPdServer/package/Classes/DockerHTTPd.yaml @@ -0,0 +1,47 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerHTTPd + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: httpd + ports: + - port: 80 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing HTTPd') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope).select(format('http://{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'HTTPd {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'HTTPd {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/HTTPdServer/package/UI/ui.yaml b/Applications/HTTPdServer/package/UI/ui.yaml new file mode 100644 index 0000000..5c288c3 --- /dev/null +++ b/Applications/HTTPdServer/package/UI/ui.yaml @@ -0,0 +1,34 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerHTTPd + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + + +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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/HTTPdServer/package/logo.png b/Applications/HTTPdServer/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6b9289065e7d3f1952b592f5b90eaf1ed41e47a7 GIT binary patch literal 5396 zcmbVQXH-+$wgyC+bZMes2u<-o3V}dK=!$?;=@tki^dywf6qJraXi^124TzvLX;P#L z0t(W5lO`ZdsZxA+?(x3&#<=7CczcY!*P3h3Z_aPFAA3L5*VSNQ;%B0wqGHj!scv|> z>Yv^>7-&wP14qHWr^^N6bu;2^f-TVt?S`dN!4Rym08Jd)4r_=-V|-jYut+MZGu{qH zW<)ccTL>EhP73{7N6H)La*C#+LMnN?plzJ6M1VEc&H;}CZqzma0S*`x&{ReTtmC4F zwRgDrzzuu*fv%Cw11B4K3{XiCfb>S38o*(RXn;4)8SjqpMgjk}i#Xl?J_Z2+f2$Ck zP{4nYGSkrqs1e+-02wJ+NgFT(27t>;L1bj%^6NI5_Z?p>tA_WHF zaKGdFTicyzi2ZLG|54lB$j1c>GQ_$QJlt$f>tQSW2Yi~l|J%`T#Zxv2JvWEbqM)7C z2{s-$ES{*Tjsl*(k-|7&5HLA3Tn>hjk%VESZ6sk>Ikcoa*cL7+V-11Auo!C?#2WI) z&VRy#)zwwta2ZuuIT;lQN=sTx!(}9~7#JJ_hRDNV7#rX}c+CGd zgP>DVpx^ECKicQd(P>Zq-u`0o%`r;^e8?jkVf3Evaoc<~b{&Kasq1r>Y7+Icn~nr)I@j1kR*Y@IanqsI;+iLDwgMqCFH%nvd?VgOv znLSrhmUk@SQJuM?n#(4LEMJRjsQdYI6;M3XiEmiDUul?;YDi)t$#US%DYyc}`LhR|}ihXH8s0x?sy3s8G$!L0{h6wkeM_(9gySkUUdO_`a1&;%MNtmoVu zS!OmUs`P#t{+HlK?<GlGxs>SagVLXr~K9^JBNh#>|%scSlRZ%UZ<2X;=7C zluWS5qy0*#Wq*>ubesI;lHSi(g`K_ZxlL*%G=f`cc@tc3Wfk+ZeWerR4}Eah-<;*2 zth)u9XR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xo;p|d}C8wv2osWTzZZV7KHb!|zcn0=pxzqq7$pWR(&C7LHX z^<+^nf$rB=_#C?WP>Xoy{aZNOK;W1H(<@N-rJ+8K8oT3@Rl1SP%#T_HBSq0=X-aK0 zY5XZO-W()yQQWng69uuN!%%NmTNN4vca}Te5d4gj2quTXE&aQ)t$Byu9l?@1vrUgDTxC2j@|9n>W{Mb*t{C*s(!XaMC_6eH98oXVQ-x#&uT}K_Pf4p zC3H(QZa$no4$EnTQ9B|_f3)(x5MYbPD9QR{mPg|)V2N#|3wKzLmj+bdgg>%sF&#E9 z&t_yr#^u+ze);NUQFOHZH6g^`n=5qp{zu)%T-!Hh?UB8Hpw}X<;HN@jD!#+f((@=K zuBT0!ZmG9s{ zGca|E`$^PC7~~RLz5>`-K~!mwLYY=HgNuT=U$K^48uBx?Gw8P(T4e2_xn}KEF^4!q zchBYuOQ6Z9K-5N(wf^1j5xWwm!v$;Y(dFI^Z+t4cdKkZaclD`S$TgI!+z$#` z%aZ&2I?EyS?fd6d3+C_e-;dfWZ5lamP6l#}N;9q5xPSb0dzFUsE3^8ruczD2T99HP zvf)h`_qUKhhGR#4iySy{Y>oZ_E7$h8ZO>p^pXuAsT-pIcaq*h$zeX-z=AWFVP$rtp xa{H@_r;d9vPrk9T4bxVG65s9g{bB@D?S;nZXRA$q`Td_#^SZ8jk*ZbTe*w@?%i#b3 literal 0 HcmV?d00001 diff --git a/Applications/HTTPdServer/package/manifest.yaml b/Applications/HTTPdServer/package/manifest.yaml new file mode 100644 index 0000000..0b9b5b5 --- /dev/null +++ b/Applications/HTTPdServer/package/manifest.yaml @@ -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 diff --git a/Applications/HTTPdSite/package/Classes/DockerHTTPdSite.yaml b/Applications/HTTPdSite/package/Classes/DockerHTTPdSite.yaml new file mode 100644 index 0000000..df29350 --- /dev/null +++ b/Applications/HTTPdSite/package/Classes/DockerHTTPdSite.yaml @@ -0,0 +1,52 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerHTTPdSite + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + siteRepo: + Contract: $.string().notNull() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: 'stanlagun/httpdgitsite' + env: + APP_URL: $.siteRepo + ports: + - port: 80 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing HTTPd and site from ' + $.siteRepo) + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope).select(format('http://{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'HTTPd application {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'HTTPD application {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/HTTPdSite/package/UI/ui.yaml b/Applications/HTTPdSite/package/UI/ui.yaml new file mode 100644 index 0000000..db74b42 --- /dev/null +++ b/Applications/HTTPdSite/package/UI/ui.yaml @@ -0,0 +1,40 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerHTTPdSite + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + siteRepo: $.appConfiguration.url + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: DockerHTTPdSite + description: >- + Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and + underline are allowed + - name: url + type: string + required: true + label: Repository URL + description: Enter an URL to git repository with site content + - name: host + type: + - io.murano.apps.docker.kubernetes.KubernetesPod + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/HTTPdSite/package/logo.png b/Applications/HTTPdSite/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6b9289065e7d3f1952b592f5b90eaf1ed41e47a7 GIT binary patch literal 5396 zcmbVQXH-+$wgyC+bZMes2u<-o3V}dK=!$?;=@tki^dywf6qJraXi^124TzvLX;P#L z0t(W5lO`ZdsZxA+?(x3&#<=7CczcY!*P3h3Z_aPFAA3L5*VSNQ;%B0wqGHj!scv|> z>Yv^>7-&wP14qHWr^^N6bu;2^f-TVt?S`dN!4Rym08Jd)4r_=-V|-jYut+MZGu{qH zW<)ccTL>EhP73{7N6H)La*C#+LMnN?plzJ6M1VEc&H;}CZqzma0S*`x&{ReTtmC4F zwRgDrzzuu*fv%Cw11B4K3{XiCfb>S38o*(RXn;4)8SjqpMgjk}i#Xl?J_Z2+f2$Ck zP{4nYGSkrqs1e+-02wJ+NgFT(27t>;L1bj%^6NI5_Z?p>tA_WHF zaKGdFTicyzi2ZLG|54lB$j1c>GQ_$QJlt$f>tQSW2Yi~l|J%`T#Zxv2JvWEbqM)7C z2{s-$ES{*Tjsl*(k-|7&5HLA3Tn>hjk%VESZ6sk>Ikcoa*cL7+V-11Auo!C?#2WI) z&VRy#)zwwta2ZuuIT;lQN=sTx!(}9~7#JJ_hRDNV7#rX}c+CGd zgP>DVpx^ECKicQd(P>Zq-u`0o%`r;^e8?jkVf3Evaoc<~b{&Kasq1r>Y7+Icn~nr)I@j1kR*Y@IanqsI;+iLDwgMqCFH%nvd?VgOv znLSrhmUk@SQJuM?n#(4LEMJRjsQdYI6;M3XiEmiDUul?;YDi)t$#US%DYyc}`LhR|}ihXH8s0x?sy3s8G$!L0{h6wkeM_(9gySkUUdO_`a1&;%MNtmoVu zS!OmUs`P#t{+HlK?<GlGxs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obN)?4i;y+4Ajp^yK-lNrZ?P6>scYn#_`CtJ70|RqQbfL*`>&hXtr4yoqS*)l1Sv&M_vE9ma_i$f)PSJhgk6ZJU{5 zv)dJ#$L8aH)YS`3jIxo;p|d}C8wv2osWTzZZV7KHb!|zcn0=pxzqq7$pWR(&C7LHX z^<+^nf$rB=_#C?WP>Xoy{aZNOK;W1H(<@N-rJ+8K8oT3@Rl1SP%#T_HBSq0=X-aK0 zY5XZO-W()yQQWng69uuN!%%NmTNN4vca}Te5d4gj2quTXE&aQ)t$Byu9l?@1vrUgDTxC2j@|9n>W{Mb*t{C*s(!XaMC_6eH98oXVQ-x#&uT}K_Pf4p zC3H(QZa$no4$EnTQ9B|_f3)(x5MYbPD9QR{mPg|)V2N#|3wKzLmj+bdgg>%sF&#E9 z&t_yr#^u+ze);NUQFOHZH6g^`n=5qp{zu)%T-!Hh?UB8Hpw}X<;HN@jD!#+f((@=K zuBT0!ZmG9s{ zGca|E`$^PC7~~RLz5>`-K~!mwLYY=HgNuT=U$K^48uBx?Gw8P(T4e2_xn}KEF^4!q zchBYuOQ6Z9K-5N(wf^1j5xWwm!v$;Y(dFI^Z+t4cdKkZaclD`S$TgI!+z$#` z%aZ&2I?EyS?fd6d3+C_e-;dfWZ5lamP6l#}N;9q5xPSb0dzFUsE3^8ruczD2T99HP zvf)h`_qUKhhGR#4iySy{Y>oZ_E7$h8ZO>p^pXuAsT-pIcaq*h$zeX-z=AWFVP$rtp xa{H@_r;d9vPrk9T4bxVG65s9g{bB@D?S;nZXRA$q`Td_#^SZ8jk*ZbTe*w@?%i#b3 literal 0 HcmV?d00001 diff --git a/Applications/HTTPdSite/package/manifest.yaml b/Applications/HTTPdSite/package/manifest.yaml new file mode 100644 index 0000000..c5b6243 --- /dev/null +++ b/Applications/HTTPdSite/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerHTTPdSite +Name: Docker HTTPd Site +Description: | + Deploys a site from a git URL using Apache HTTPd as the web server. +Author: 'Mirantis, Inc' +Tags: [docker, application, httpd] +Classes: + io.murano.apps.docker.DockerHTTPdSite: DockerHTTPdSite.yaml diff --git a/Applications/InfluxDB/package/Classes/DockerInfluxDB.yaml b/Applications/InfluxDB/package/Classes/DockerInfluxDB.yaml new file mode 100644 index 0000000..2457413 --- /dev/null +++ b/Applications/InfluxDB/package/Classes/DockerInfluxDB.yaml @@ -0,0 +1,61 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerInfluxDB + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + preCreateDB: + Contract: $.string() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: 'tutum/influxdb' + env: + PRE_CREATE_DB: $.preCreateDB + ports: + - port: 8083 + scope: $._scope + - port: 8086 + scope: $._scope + - port: 8090 + scope: internal + - port: 8099 + scope: internal + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing InfluxDB') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints. + where($.scope = $this._scope and $.containerPort = 8083). + select(format('http://{0}:{1}', $.address, $.port)) + + - $._environment.reporter.report($this, 'InfluxDB {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'InfluxDB {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/InfluxDB/package/UI/ui.yaml b/Applications/InfluxDB/package/UI/ui.yaml new file mode 100644 index 0000000..2a668f4 --- /dev/null +++ b/Applications/InfluxDB/package/UI/ui.yaml @@ -0,0 +1,42 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerInfluxDB + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + preCreateDB: $.appConfiguration.preCreateDB + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: 'DockerInfluxDB' + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: preCreateDB + type: string + label: DB list to pre-create + initial: 'db1;db2' + required: false + description: >- + Enter a semicolon separated list of databases. These databases will be pre-created on a container start + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/InfluxDB/package/logo.png b/Applications/InfluxDB/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..b5fc98a03af26424b4199ccecfc0d959bd7e37fa GIT binary patch literal 3831 zcmbVPX*`ts+n;P%5-Mw9j3UcmhB1sSX2{6Cm8`R2EHl&0*!QgsM~aXwr0hF|EFscx z99yaEin1n(DE&vL&hxxD&;P}9e?Iqp{jTeGeXsp`abL4EKg-K4#ti@fc+tivYbLd1 zzDArZ%WrViJHD*~ZRURgy$8L9$S(L}&h5h_sNuLs2RM#Z}$ ztWie4d@(s4kSCo^K`1K+1OzArs49`E9?B3+O-*GLs4^4^W@>${)VPi-3A zn(#ki{Hr$2Hi$w{wkFWXepDQ@AMVn>!OYtIcSrk*%xDl6R3ft}7#|cF=jTfx(a|U! z5c5U}PsAhCG%#=tH9QQghF8Ub)d(6Gu%?PT91O!kplSp>RtINcsLY>GSY_| z!Xf%72*glLQy+yiFhoL)poT_Jh@tv#ESf~4V@No{Z{I|w?_XHdf5jq@R04)hrrMIp zKEJ2H(vwUl(>%!(AQJhr>%h}y7#xwbFO=JF)Zcld2vnj!0dGVl`vQMf8bSP*C?FUt z1gnODg0V2DDp(DxK>%YR8gMWc3WLL8SSSYK4hQ|h z-}F%|@Ve47mgr~}g-6#TLGku-F3T62csMbJgOsZdSpF1tlmSpGD%MFw^YXYVTIS`r zN5H_I&QTVQ(?~%($HDLqcXoC^hfJ*PR=)hO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ow5jm?0^O?kYV?4Q`UUS0v!kqCs>sJi zAN2UzctZ;Y=yiE-4E2SKcDvC*1>f6F#g2~{u-s}tslsLYZ$$ewPuTJ<`@J~y^lnP( ztpaY>>=oI!2{LKne;qbZ#|8V`eX{5_M63?SZa-byUhT~v4pa>O(IVuxs+g;r?O#~F z<@Tz7Ds(*FCO@X|ae0rz9$9D}`XM4SyG};h9qAq#d9@UFaku~B%jF&pv_(aBxLzh> zds)O4t0OfMzb0@O^(>Z~{G{qOj-~J~kyv9%j0ykxpk$sUn@@Ln=}lm7W$TUM;t@*5 z^o(QRk0Cjk=GqF!DMHnq<`bScJbxP+z^! zxcUD1S-zB#VAF;nGn#Ty)5BvaF>y&P+vz1el*Yz`oL46(4}y?4gQr|Mz{gfL!qxEmX$Q2tCKl5CzXIrJOF@P~N#O z3o+oQPV+N@Hl?Gi(=$9@Ce)7=aXHQPM}Nw#2v9WRnYxiNopH7;Tq(QrZl#WOO^{K3 z<&E0SQXW1{qQkhtU8F6W?A+w>VHbu%bMuiCNnt%k>Q^o5|6~cksd}o*a==)GSW`Uf zv@$kB?g{3EBu>q?C#cJMz8&_EiF}}_WyzL$<1DbtNFr6OtBG_&5 z4bK%h$q)dzH0{>;g5`T#k=FV25B*R^Ov_|h3~9veY^ z0apmNfRVWLkB&M;_JdUM~E{`QznYYOI-`DsQWAjn{^h8(o>Ls27DeKo0nD zggu2DP8c13Tb|;!7T1e$fb0pAz2FkfEMTcoa0b7wEabFK$5xvO@4YkilQk<>yvcnh zHjsWH`hLgz;vU6A$);5$J%KGY2fvXQG9dL(?SK-$k$-0(53?YI}4i+3x>}q7BVa6$Wn6 F{{fM4xPbrw literal 0 HcmV?d00001 diff --git a/Applications/InfluxDB/package/manifest.yaml b/Applications/InfluxDB/package/manifest.yaml new file mode 100644 index 0000000..031d6d2 --- /dev/null +++ b/Applications/InfluxDB/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerInfluxDB +Name: Docker InfluxDB +Description: | + InfluxDB is a time series, events, and metrics database. It’s written in Go and has no external dependencies. That means once you install it there’s nothing else to manage (like Redis, HBase, or whatever). +Author: 'Mirantis, Inc' +Tags: [docker, application, InfluxDB] +Classes: + io.murano.apps.docker.DockerInfluxDB: DockerInfluxDB.yaml diff --git a/Applications/Jenkins/package/Classes/DockerJenkins.yaml b/Applications/Jenkins/package/Classes/DockerJenkins.yaml new file mode 100644 index 0000000..8481523 --- /dev/null +++ b/Applications/Jenkins/package/Classes/DockerJenkins.yaml @@ -0,0 +1,49 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerJenkins + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: jenkins + ports: + - port: 8080 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing Jenkins') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('http://{0}:{1}', $.address, $.port)) + + - $._environment.reporter.report($this, 'Jenkins {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'Jenkins {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/Jenkins/package/UI/ui.yaml b/Applications/Jenkins/package/UI/ui.yaml new file mode 100644 index 0000000..8f3fcab --- /dev/null +++ b/Applications/Jenkins/package/UI/ui.yaml @@ -0,0 +1,34 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerJenkins + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: 'DockerJenkins' + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/Jenkins/package/logo.png b/Applications/Jenkins/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..7f0ab00775c693d350cc5a7abbd29ecccf736453 GIT binary patch literal 3856 zcmbVPc{r5o`yWcE?8lN0O_tKhm@&pIn8b`VWXn!7V+LcH8Dp41B3mgHDP)PrevnEi zO36~$w~;JGAv-zNIebUwbiTho&h`D{_g>fgKF@tW_vha4>$%=IOA8~R{j&Q30DzE* zG1i*9T5?}Q0bcI6mlJ(~yBuN|I52Fe9t>Aj z4MXxG8;8(IHX#tto#J~ete!i3dEf!kghh8o2ewPha0R9kR z_@EX3a>~Kn5{RMFNkC0CILIBM4g(@kYU-MB1PY-FgmP&x1PO*hKoFFcriK;-3jF&~ z;98>-J+!Q`hJV}QQfLJ)27{&r1~ZvVHKv9dmF@{vN1;$)2owy3g18c(fM5y(&jL{b z6n|>Kk^0crE(ag>NQA`Q=J5k(}fmwJOSX~VQ_Ve3~ z>xXmz!i&o&Cs1eCTEf^AyK*ETcAQ(}@9RwpG@gNk$0|C+`s6$~SA_1mOQ2(jtU-1SQ zeT1O_1di0yQ&%^DAvG}?dU_Zb5{rQ%Q0nlXSQAPB15a@${j^QqwfzH&HT<7gEexH6 zXHe<3RI2aKF0k~XGN=JwR2mS2`B8PCiaFk$Oxb0g*e%pwabrnzauA7VNT>P%e`H#V z{4ZX3AT)_^yay6Q(j;hrU@)i#h@gSc1d)g^1QDW+Lcoab3V-8?|KALPxlVz1+vWeX z&rcS&CwI6134Tj@uugMk&la5jd^bK?Df2fQo2lozluYJm&D!un#=?cQKO!~nnx)zoeTI}fV0dyP ztm;*8zd-iO@Wt~Q{+C=ox7Y09n{V&#ER==WPtAS98RV}D8FTg&sJcF7Wb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NyKV3Wm)%8liLie90^h8BB^qUFr)>7bO9h+mM4qPO;; zzX+-68GpVK8;!}KA(88;0P#q^p;&&N_0`oNU@O>MX&3IYH zsw<+FseE2X4eNio!lxRe(`bFiaB$;5uvpy8oMKWp^9WR=A5m2i*ng%1s0dv zn0-igsT|#8$%rH0It`liy_4Ml$wbW`H=XKzdW=u%rgYGnzGD;k#u3jf`HKjp(JvEa zCT?5fJq0a!whE}tZ*IU_ zB1|q-_*a1Em`+pdC;xVV{dJ$++%gpS5GvRP*}rZ-n8vO>(>+QfS~f}K?M&_6cNf{w zVUXW_OMs5cHhR@jY!P-c(&7HboWTuMp_lBg@Tbq_m`75e4b5%IPv@4ScAR62 zlwPkQB5gc3EX;TM;Dl7v{iHbE(Mtcy`+uGtp&{kdx5qRx9ut}p4B5RW=MsxzVIg&0 z0^k0Gooc-r;T(Q(ee(6bOVRpoCQGmTioK;&tz?vWYj(7y9!`KXV)8Uqo`mQKhbHNA zP6kt!XI!KtuQkHgOxa9 zAmK~yx5G+HN#d#>dC?BA<~@9d%PrFjb^@P{zN3L7Rvw&xq23*?mwoch%+w>AbMZNX zg`n`Yx`*)Po~qYSFq^1s_@(dEpE*z7c3e7PSNPT2TY$Zqu34T{>^*nb+TJht@srB6 z+%uX9pE}Jp5*znhI zwBq3iqP6iAPj>cL8~7rN5;AObO?bPLH8GjfW_mR{Q2;`Em7*K`sPI8Ri6{GjQvIUx z4oBHa^jLP&D7eohw6{_rW9`+DNee1u6RdFptM4>F{L+A53!-w;BKZZb%X)gHGu=vP zTxqO%rM0C*9xd=jQDRZ?nj@qzx~~OW>xAG`2|SY&i&SAx8Aq!V`EoRB`AhZ6`t`6k zRMYpFIR<;Li(s=AEeXl?$|L^s+R5vGh>#;LPn;^*4{H8JNVD*MSd>9&pd=eKX;1?zw_ka?mw!Dfd#fq9~b!_VlKs` literal 0 HcmV?d00001 diff --git a/Applications/Jenkins/package/manifest.yaml b/Applications/Jenkins/package/manifest.yaml new file mode 100644 index 0000000..9b27cfa --- /dev/null +++ b/Applications/Jenkins/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerJenkins +Name: Docker Jenkins +Description: | + Jenkins is an award-winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron. +Author: 'Mirantis, Inc' +Tags: [docker, application, Jenkins] +Classes: + io.murano.apps.docker.DockerJenkins: DockerJenkins.yaml diff --git a/Applications/MariaDB/package/Classes/DockerMariaDB.yaml b/Applications/MariaDB/package/Classes/DockerMariaDB.yaml new file mode 100644 index 0000000..d573fd5 --- /dev/null +++ b/Applications/MariaDB/package/Classes/DockerMariaDB.yaml @@ -0,0 +1,54 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerMariaDB + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + password: + Contract: $.string().notNull() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: 'tutum/mariadb' + env: + MARIADB_PASS: $.password + ports: + - port: 3306 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing MariaDB') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('{0}:{1}', $.address, $.port)) + + - $._environment.reporter.report($this, 'MariaDB {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'MariaDB {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/MariaDB/package/UI/ui.yaml b/Applications/MariaDB/package/UI/ui.yaml new file mode 100644 index 0000000..c9da6ff --- /dev/null +++ b/Applications/MariaDB/package/UI/ui.yaml @@ -0,0 +1,41 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerMariaDB + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + password: $.appConfiguration.password + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: 'DockerMariaDB' + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: password + type: password + required: true + label: MariaDB Password + description: >- + Password for root user in MariaDB + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/MariaDB/package/logo.png b/Applications/MariaDB/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..7f51b2e59bc5d3eca3a7f377f214a63e6a56ed19 GIT binary patch literal 4417 zcmbVQc{G&m`yWfTY?URHCbBQHVa(XFjK~%yq?DO47|dd3LY8kROSHU^l3liBNsN6@ zb_v;I<;5_kkAQtaNAn8agR@X}b2`)NP_Uaa33yLA$ zonYcm#oPK@qH+G7IE0Ioo-R<^56M(O#M3cAKcW|jhV;{s`lT1i-2Y^Qq=3If=$<-K ze>>%1aSmumrs9F>sv0UdFhmUqN2o&7HQ)%iG7!q7L10Y~6s!V9Ak|?=FckRvkz!h- zy0{{3jEsNVVp2L%?sPf@2?F{0`l|ZERLN8~5CnlhfWS}?6sp3MP@!ET(J_81B%1Ue z4Munxj!K}=31kxRr$!8xe3h;v#q{*=5Qr2Di+>c8XulK1Oc}@zLjgfl!5|{>XI#Ie zX>=R>|GM$7(lqon3La#Gr;)Exam;$SO8)^fbNAm3{S;(+gS4U&m_@;O8If^UiFgv- z)JR8)d7|nN3{8mhjII$WxE+`}X!bVep>Cel#5clo|Ml9w<+uk?_r*z%B~*hYB7^6EoxEM( zCP2wzXR>dLwLw>?oXBVrx$d#nOwxYkjPG72Vx^u<>lpu+duV5Pk;E|H9ET5Eb;wu) zn-Wi4T~_Hg>IGW&_o+1C<@L{95l1SD?P^v`(v8P24ZRPE5dn$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BxgqLAoUgOJge%TBxi{Yvf4b|PrYHS&YAa1^xi!N7dE%ify@kA!&~@dr zwLQw$XG~_l&U$CC`ptVZ4GWS>Uh|v72jAcv8L9B-^=p_hhP>Y7@rL7N!u{NuYDFGm zrs)mRckOO*iXG*>lg`!Cvc9sG`gtgue`6X(?i98wQ?frHui!DebK(0lpSU}8<>X`P z>K*r@aG*uSxt@g6@6Ym1x!vY}EH0xtaq3E3z=2iv^o6ibMRHTDa$(y^Pl=o-&ppwo zp=Hh$oH-+z>#l|FS~=OjtevLuDa|G??1Wm5p%j>p=9-j{hnL{;Kz1*b!mF|&z~d!Q public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: mongo + ports: + - port: 27017 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing MongoDB') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('{0}:{1}', $.address, $.port)) + + - $._environment.reporter.report($this, 'MongoDB {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'MongoDB {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/MongoDB/package/UI/ui.yaml b/Applications/MongoDB/package/UI/ui.yaml new file mode 100644 index 0000000..32a7b88 --- /dev/null +++ b/Applications/MongoDB/package/UI/ui.yaml @@ -0,0 +1,33 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerMongoDB + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: 'DockerMongoDB' + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Make application accessible from outside + initial: false + required: true + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/MongoDB/package/logo.png b/Applications/MongoDB/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0238b03f548501c0cf62a510491cc60d6fd3788a GIT binary patch literal 3649 zcmbVPc{r5&+n)-_lAUZdO+uKB8DoawH;iS<*s@2ASs2V>W~`yeRJO=3J4q>IjfiAz zMcK0DD4n9Ch*VO9cXUqYeXr|1@9&TIxvuBAzxVyzpL@Tr=Xw$y?5rilRKx%PfF!{N z?7mR1zgJq?>920PKjM zJG=ATiMALrivb~R=|CbFYylboFfof@lgL3-9?*~KPiJC5i!JRSAf18*xgm)#BHMx* zK(~qFP>)90Ig_J;$Y=`4%oJ!6fe{#BPHEYJXRBbhu>1enP^@XG?8 z$|ZB?Y#yD(1a4U*`LRNISdbvnKT}|^iNwDRGr4~iN>DOr1c?oWLtsz_V=J$p+FYI! z^}oaTM{TZiB%2C#qH;%C=^+C&nW&fF3n+G^CFdE==ZdKi^r#bGgkKP!!)|3efs6p~^{ zq8WjyNIwHG0-qKP=c8DWb7OTn7egHtshk(a9M@-D;?R0P^sGRc8>6lhN1Jjnk3E^bq9i4^n z!wOGIAv&5~Gd=9A ze&!E!z(-=9IzOvfTU=S4GvkfToxSa@*91M}@q1fs!Zvcp9+*hV|0Znz^5ZUR!rOc* zY&T3p>4jI`CIe!DiUnYFFl_Ek&BJ%Z)qXX1|6yj^?apAFQ}Xpl#`{nGYTqbJq^sS& zb->3F2Gy5w>5egT^}?gdq1pUIT5|J;vv<4sQ@GAc{fb7n_t%e<8N88xW#}c;+F8eyQq%Pa~cL54D3&Tvu!j5=tj^r%cA+3cs9HrD)y-^ zoFF4+GwT#_6W3zQ^rT%bUVb__9* z&Siw?RK32M3raL$-^YukcD^|wl#nW}Zgyg|PUx8R27iZH#kA~s@7u4+a)FA7KplBa zh`aaavf71^5I15Tfo68ia?_&3>ilJGXB{1f1M-GRmM;pt_hR*K)KujuucV#1lb5Wu zdu0Iy$0wSZQs_~hWx$gh>9xy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rb~h zr0)2e)H05Sv~|3ArV1JzZWce}Jn=~A;Y&}y|Kp1Q6Zuho(661S1eYXt)DXnuTbU4IHd+mxo?moAGJvQtP?abfI+xF?BL_Oz5kD`@KVrpr zP1YWVc&*+!vSOBZhE93CYO`rs{8AUR%JYAwlIfYa`drIv{oAB&vURK7A73SsP*Uh^ zoOd|8_ZQ<%4X1`m^8YpG!J=XfxC6s43N2_0wHsr|sVw zRazadkL=Jod)P2f?_;nVq>x19ydD6Y?k~2G8*diR9;_S<<@w0IHP9;40=gh{v-vA~ zr?RC!FVEcqLY_uF?EK9&;>UCT@5eNSt6Me3QRLa?yEm}!u9=!N;;W9n4_Gf~_E(fJ z%QzV9^sde|^@vi^n3w#iGjeaNMDyiyGl~CdG5A38i_LCJyT7L8HJdbf0lj~t&#T!r zjb$9RU#2oea~d!)L<i!;t8+rL<2@_hCtW7gQK zCw6+krW4}{&W$RM@7r~W zJ=v`<(n=^d=t!B*F%;FK_FXV`*cBq=HNU>I>fTC1zfTWx)s?KZPZ(^LE&OsVaD7yj zf8^|%?bmSOQX^?O3CF-?{$y0{Tf1m^BSw0D%%>|CB11D0F7EWL@Erk)bS*SW)T;CQ zY9T`>Eu7mwN4hjPA%#TQanG7FPfyNEr^-~mqPvxPqQ8rzdX>|a@6Mj_~uI)-B9VENw!+nlW*L;%6k4qt8V8~ public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: mysql + env: + MYSQL_ROOT_PASSWORD: $.password + ports: + - port: 3306 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing MySQL') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('{0}:{1}', $.address, $.port)) + + - $._environment.reporter.report($this, 'MySQL {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'MySQL {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/MySQL/package/UI/ui.yaml b/Applications/MySQL/package/UI/ui.yaml new file mode 100644 index 0000000..1bef5b5 --- /dev/null +++ b/Applications/MySQL/package/UI/ui.yaml @@ -0,0 +1,39 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerMySQL + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + password: $.appConfiguration.password + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: DockerMySQL + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: password + type: password + label: MySQL Password + description: >- + Password for root user in MySQL + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/MySQL/package/logo.png b/Applications/MySQL/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..122106a6b6ba974edda0f82c6e0c0c04e8e6b2d8 GIT binary patch literal 4037 zcmbVPc|4Tu*B_C}UWk;MY>8%VEHjLK8`+ID+n5;)W`>!u3l$M*qmngiBug6x*|#hu zg$j8jVXRSPf2W>$-sSUret*38^||lsI_Emyv!6fi%NAya{5%po004j=W29%r-YwX# z!QNf$@7vAjaQ1eHp>NNyrg|`fa5N%7n?Q9Z0x@KqC((+CBZTqM)S~YU-tcBm!E>PRSH%>ZeQeA{m9! zh}NNISbV4t9!ZeW)Bvgnqu2__Ll|gtY3;|R@f?-O^DoB-6KscL*Kvf}dC4F8xP?9+8fx zk^C4WDh2pcBhH-~z(7l}J^ecbvY)BxKZ+^z--%+U3=)jSxm zwjKFVg~!VTd125^|Z@*gaQLTBJ8c;X-1B)09}Smb}iqI79Q9D_>3QmMXw zy1>GV%AnG{sD40Q-CtD)%A4ZwB+5_b$)AP#J8nH9jTA^E7|^I>;IB-hNdMvm5~0iv zlmG>}Bi)H0gwkmw2&al_6*V3!*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Op9DuwD7D;qu8jgZ)~u@eni>hR+EM=>*bk1N16jR z+hiZp|NRe3b;Z!!!Y5UApmAHgtHqw6G5?zUuCu^|bVZ-?w|y6*B81%ln!1~n{IMeU QfBslw^v(22b=)re7XeNw0{{R3 literal 0 HcmV?d00001 diff --git a/Applications/MySQL/package/manifest.yaml b/Applications/MySQL/package/manifest.yaml new file mode 100644 index 0000000..264532a --- /dev/null +++ b/Applications/MySQL/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerMySQL +Name: Docker MySQL +Description: | + MySQL Docker Application. Adds MySQL docker container with MySQL listening on port 3306. +Author: 'Mirantis, Inc' +Tags: [docker, application] +Classes: + io.murano.apps.docker.DockerMySQL: DockerMySQL.yaml diff --git a/Applications/Nginx/package/Classes/DockerNginx.yaml b/Applications/Nginx/package/Classes/DockerNginx.yaml new file mode 100644 index 0000000..075214f --- /dev/null +++ b/Applications/Nginx/package/Classes/DockerNginx.yaml @@ -0,0 +1,48 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerNginx + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: nginx + ports: + - port: 80 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing Nginx') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('http://{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'Nginx {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'Nginx {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/Nginx/package/UI/ui.yaml b/Applications/Nginx/package/UI/ui.yaml new file mode 100644 index 0000000..f771ccb --- /dev/null +++ b/Applications/Nginx/package/UI/ui.yaml @@ -0,0 +1,34 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerNginx + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: DockerNginx + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/Nginx/package/logo.png b/Applications/Nginx/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2ca7c292b58907827b4806873f3688903112a5a5 GIT binary patch literal 3731 zcmbVPX*`ts+m|g_qmW2rQWCQ;GsZGgjU`+5HH2C2VT_q!X6z&iMV7LaQYu4^aFU3U zD9M^oWS3+)wvx5*ADueS^Wr@J7tj6q-1qgnuHW^&_Upxc(c02jOn9#_4-b!+sfnR2 zms)e*6GFV)Z`Y6W;anoeHgaa$G05y7JQLu-kr)I3WJ<$(0k#016yo0qV0d`=f+_aS zY-fv;x%*FhXjh3=lY+0aDx0KohN_q4gVUN@ub0bRzKEH-+o_7gp=PVs#Ce0G`cY+A|ow zzo)?3o55zVycvEV1B0Jk2OYM+6Djm9q3Twn{?6MFU{V4B(g`Mm2KrfPUCO^iK}MrU zT6nTH1V9lG5F}C)0U;pJC0k~sRO+QMT+@Qcwm{Lx4Cg>4!FocO(^a?)J({8AAk0PcfD0D{=V6YHr5}6dFwg$ zR3qz@Z2r<`t0gdg<*1IN@fP+PbWVABeYvJNXmjk@3lW^n?lr8m%v!dz;MHy9vvQvQ zPF6N|Yjcj)ukTu>4bkNb`evJ-3`kU}q$!K09y{~NKVM&ETz~v_rd^cX^AVnE8-^qG zU76+g@T_j7lBzb{$J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r+?B;W?nC;t$U-25PpZVy}>7>&mu6RTap&7m}JVrr@l!fnR z){LbdOl{3dcm?|^71H>)bmHP$zbBT@EMH0sG)5osxQE2XA9W+t5ni6}X=qb%mJzL> zj#2S;@3-F{+FvyyqJm=@gqt0sR~z~GT6hr8MdAM!*<{GJm6Z`M#mEgy zHdUQEVEn<6A%4w66R3}PnQ70yM^Fo-9 z@^!u5FQ3|0P)+>X^{RO5yKO!}c8Pc1m^vf?+&jsZ5(pd4l;_viSJY|unZv_^U(?ky zlJCyHbqyZMns-l}ovJQ=G7wR{w|dZG)AGzCBo~LjP}9s;=$v!{i7USJ^2m`g2*04scp!pTVZB1vxRG|10L5# z_wSn$F+tBRzcjW8CC6`{?lx{V;FN2@X4MFiFGm(_9}88AoN`RW54ux@tR&j zpTjzKy}YxZbE_z!-=nv^x6dQ1?33Gz>ehxMwROfGXG(8B`rgs%m@^PjzTv%SMck&u zYgeO?Ft{;s;dl_m=~l)@2yY{KQf$RSXmE6KjN0#y7ui6 z>b;SU=Y?*s!lcqV(t4Pi&jKx5v&HAc4&G?D7KQ6GD|;A-rXU{YL8&l4XRQh|ksBQoHRH!AAUIbzwv!Qeo52V&S% zLGy6o@VgwrCU^0`VZDL%stOrF`YGhh!XNt?LH9to<3iys{;XI0a^-ujFDA4Zl{fbv zOEQuW*@PL}LN9=%=3>PbWlrn_^tVvr?uU-^`!F)E}tpUj3GS$RsMLs>{{Vo)#K9bup{2 z!RJi$!*-L~UiqO~WlQ1R{X13_G$&%@Aw+&fs%WP`DaZc#j5T${H$3D$(Nf=?739&H zy%c$xs<>mZVtv@Zx_&prFFrhib1@`iLo6*)1kRHZz^QFDNJ!uMO*A#KG%VKljQ$TZ CB8FiA literal 0 HcmV?d00001 diff --git a/Applications/Nginx/package/manifest.yaml b/Applications/Nginx/package/manifest.yaml new file mode 100644 index 0000000..3476f0e --- /dev/null +++ b/Applications/Nginx/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerNginx +Name: Docker Nginx +Description: | + Nginx (pronounced “engine-x”) is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). +Author: 'Mirantis, Inc' +Tags: [docker, application, Nginx] +Classes: + io.murano.apps.docker.DockerNginx: DockerNginx.yaml diff --git a/Applications/NginxSite/package/Classes/DockerNginxSite.yaml b/Applications/NginxSite/package/Classes/DockerNginxSite.yaml new file mode 100644 index 0000000..b4ab131 --- /dev/null +++ b/Applications/NginxSite/package/Classes/DockerNginxSite.yaml @@ -0,0 +1,52 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerNginxSite + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + siteRepo: + Contract: $.string().notNull() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: 'ddovbii/nginx-site' + env: + APP_URL: $.siteRepo + ports: + - port: 80 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing Nginx and site from ' + $.siteRepo) + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope).select(format('http://{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'Nginx application {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'Nginx application {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/NginxSite/package/UI/ui.yaml b/Applications/NginxSite/package/UI/ui.yaml new file mode 100644 index 0000000..531d1c9 --- /dev/null +++ b/Applications/NginxSite/package/UI/ui.yaml @@ -0,0 +1,41 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerNginxSite + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + siteRepo: $.appConfiguration.siteRepo + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: DockerNginxSite + description: >- + Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and + underline are allowed + - name: siteRepo + type: string + required: true + label: Repository URL + initial: http://github.com/* + description: Enter an URL to git repository with site content + - name: host + type: + - io.murano.apps.docker.kubernetes.KubernetesPod + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/NginxSite/package/logo.png b/Applications/NginxSite/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2ca7c292b58907827b4806873f3688903112a5a5 GIT binary patch literal 3731 zcmbVPX*`ts+m|g_qmW2rQWCQ;GsZGgjU`+5HH2C2VT_q!X6z&iMV7LaQYu4^aFU3U zD9M^oWS3+)wvx5*ADueS^Wr@J7tj6q-1qgnuHW^&_Upxc(c02jOn9#_4-b!+sfnR2 zms)e*6GFV)Z`Y6W;anoeHgaa$G05y7JQLu-kr)I3WJ<$(0k#016yo0qV0d`=f+_aS zY-fv;x%*FhXjh3=lY+0aDx0KohN_q4gVUN@ub0bRzKEH-+o_7gp=PVs#Ce0G`cY+A|ow zzo)?3o55zVycvEV1B0Jk2OYM+6Djm9q3Twn{?6MFU{V4B(g`Mm2KrfPUCO^iK}MrU zT6nTH1V9lG5F}C)0U;pJC0k~sRO+QMT+@Qcwm{Lx4Cg>4!FocO(^a?)J({8AAk0PcfD0D{=V6YHr5}6dFwg$ zR3qz@Z2r<`t0gdg<*1IN@fP+PbWVABeYvJNXmjk@3lW^n?lr8m%v!dz;MHy9vvQvQ zPF6N|Yjcj)ukTu>4bkNb`evJ-3`kU}q$!K09y{~NKVM&ETz~v_rd^cX^AVnE8-^qG zU76+g@T_j7lBzb{$Jq5z%Fuyl&Cgu&5L5RpojTk!zqG%6oqE})dM|8_5WlQ6S5{Rf znd$VT?|aFhJ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H>)bmHP$zbBT@EMH0sG)5osxQE2XA9W+t5ni6}X=qb%mJzL> zj#2S;@3-F{+FvyyqJm=@gqt0sR~z~GT6hr8MdAM!*<{GJm6Z`M#mEgy zHdUQEVEn<6A%4w66R3}PnQ70yM^Fo-9 z@^!u5FQ3|0P)+>X^{RO5yKO!}c8Pc1m^vf?+&jsZ5(pd4l;_viSJY|unZv_^U(?ky zlJCyHbqyZMns-l}ovJQ=G7wR{w|dZG)AGzCBo~LjP}9s;=$v!{i7USJ^2m`g2*04scp!pTVZB1vxRG|10L5# z_wSn$F+tBRzcjW8CC6`{?lx{V;FN2@X4MFiFGm(_9}88AoN`RW54ux@tR&j zpTjzKy}YxZbE_z!-=nv^x6dQ1?33Gz>ehxMwROfGXG(8B`rgs%m@^PjzTv%SMck&u zYgeO?Ft{;s;dl_m=~l)@2yY{KQf$RSXmE6KjN0#y7ui6 z>b;SU=Y?*s!lcqV(t4Pi&jKx5v&HAc4&G?D7KQ6GD|;A-rXU{YL8&l4XRQh|ksBQoHRH!AAUIbzwv!Qeo52V&S% zLGy6o@VgwrCU^0`VZDL%stOrF`YGhh!XNt?LH9to<3iys{;XI0a^-ujFDA4Zl{fbv zOEQuW*@PL}LN9=%=3>PbWlrn_^tVvr?uU-^`!F)E}tpUj3GS$RsMLs>{{Vo)#K9bup{2 z!RJi$!*-L~UiqO~WlQ1R{X13_G$&%@Aw+&fs%WP`DaZc#j5T${H$3D$(Nf=?739&H zy%c$xs<>mZVtv@Zx_&prFFrhib1@`iLo6*)1kRHZz^QFDNJ!uMO*A#KG%VKljQ$TZ CB8FiA literal 0 HcmV?d00001 diff --git a/Applications/NginxSite/package/manifest.yaml b/Applications/NginxSite/package/manifest.yaml new file mode 100644 index 0000000..12607ed --- /dev/null +++ b/Applications/NginxSite/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerNginxSite +Name: Docker Nginx Site +Description: | + Deploys a site from a Git URL using Nginx as the web server. +Author: 'Mirantis, Inc' +Tags: [docker, application, Nginx] +Classes: + io.murano.apps.docker.DockerNginxSite: DockerNginxSite.yaml diff --git a/Applications/PHPZendServer/package/Classes/DockerPHPZendServer.yaml b/Applications/PHPZendServer/package/Classes/DockerPHPZendServer.yaml new file mode 100644 index 0000000..f8d2b43 --- /dev/null +++ b/Applications/PHPZendServer/package/Classes/DockerPHPZendServer.yaml @@ -0,0 +1,74 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerPHPZendServer + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + password: + Contract: $.string().notNull() + + database: + Contract: $.class(DockerMySQL).notNull() + + dbName: + Contract: $.string().notNull() + + dbUser: + Contract: $.string().notNull() + + dbPass: + Contract: $.string().notNull() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + - $.database.deploy() + - $dbLink: $.getConnectionTo($.database, 3306) + - Return: + name: $.name + image: 'php-zendserver' + env: + MYSQL_HOSTNAME: $dbLink.host + MYSQL_PORT: $dbLink.port + MYSQL_USERNAME: $.dbUser + MYSQL_PASSWORD: $.dbPass + MYSQL_DBNAME: $.dbName + ZS_ADMIN_PASSWORD: $.password + ports: + - port: 80 + scope: $._scope + - port: 10081 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing PHPZendServer') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope and $.containerPort = 80). + select(format('http://{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'PHPZendServer {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'PHPZendServer {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/PHPZendServer/package/UI/ui.yaml b/Applications/PHPZendServer/package/UI/ui.yaml new file mode 100644 index 0000000..6b28e12 --- /dev/null +++ b/Applications/PHPZendServer/package/UI/ui.yaml @@ -0,0 +1,75 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerPHPZendServer + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + password: $.appConfiguration.password + database: $.dbConfig.database + dbName: $.dbConfig.dbName + dbUser: $.dbConfig.dbUser + dbPass: $.dbConfig.dbPass + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: DockerPHP-ZendServer + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: password + type: password + label: Admin Password + description: >- + Password for admin user in ZendServer + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet + + - dbConfig: + fields: + - name: database + type: io.murano.apps.docker.DockerMySQL + label: MySQL instance + required: true + description: >- + Please select existing MySQL instance or add a new one + + - name: dbName + type: string + label: MySQL database + required: true + description: >- + Please specify a MySQL database name to connect to + + - name: dbUser + type: string + label: MySQL user name + initial: admin + required: true + description: >- + Please specify a MySQL user + + - name: dbPass + type: password + label: MySQL user pass + required: true + description: >- + Please specify a MySQL user password diff --git a/Applications/PHPZendServer/package/logo.png b/Applications/PHPZendServer/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..4cf28d983e9ace71644c60a17c6be7a97c4e56a9 GIT binary patch literal 3347 zcmbVPc|25m8=quLp;QvDOd~?ZEN0Boc*P8*lBJQMEVCSDFpF8NMU)niD{d+&r8FrM zg=9-^5=BO?wIV9}z82{n-Ma7l$Nlujdp@6Yp5OC3&-dA%-}#)=PWyJMs%Wc#Kp<87 zT_hJ7b&}n7%5t)2)57t?GO|%0D+c= zvd9!6#bGa=&SjfXmt@RB**qB<1R_|4@~HFxKnSJ*ek_h9WVGZl1k7SsL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T$7Sct>oY7cOo!?w#^2?ynV?0x9=Lc4V7 OH^ts|A4y{46Z0RLqSO}v literal 0 HcmV?d00001 diff --git a/Applications/PHPZendServer/package/manifest.yaml b/Applications/PHPZendServer/package/manifest.yaml new file mode 100644 index 0000000..4cf3b1c --- /dev/null +++ b/Applications/PHPZendServer/package/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerPHPZendServer +Name: Docker PHP-ZendServer +Description: | + Zend Server provides a complete, reliable and secure PHP stack, bundling over 80 of the most popular PHP extensions and libraries. Whether on Apache, nginx or IIS - Zend Server provides you with a consistent PHP environment across all major operating systems, for both development and production. +Author: 'Mirantis, Inc' +Tags: [docker, application, PHPZendServer] +Classes: + io.murano.apps.docker.DockerPHPZendServer: DockerPHPZendServer.yaml diff --git a/Applications/PostgreSQL/package/Classes/DockerPostgreSQL.yaml b/Applications/PostgreSQL/package/Classes/DockerPostgreSQL.yaml new file mode 100644 index 0000000..83e4e3e --- /dev/null +++ b/Applications/PostgreSQL/package/Classes/DockerPostgreSQL.yaml @@ -0,0 +1,53 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerPostgreSQL + +Extends: DockerApplication + +Properties: + name: + Contract: $.string().notNull() + + publish: + Contract: $.bool().notNull() + Default: true + + password: + Contract: $.string().notNull() + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._scope: switch($.publish, $ => public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: postgres + env: + POSTGRES_PASSWORD: $.password + ports: + - port: 5432 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing PostgreSQL') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'PostgreSQL {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'PostgreSQL {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/PostgreSQL/package/UI/ui.yaml b/Applications/PostgreSQL/package/UI/ui.yaml new file mode 100644 index 0000000..7576f90 --- /dev/null +++ b/Applications/PostgreSQL/package/UI/ui.yaml @@ -0,0 +1,40 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerPostgreSQL + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + password: $.appConfiguration.password + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: DockerPostgres + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: password + type: password + required: true + label: PostgreSQL Password + description: >- + Password for root user in PostgreSQL + - name: publish + type: boolean + label: Visible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/PostgreSQL/package/logo.png b/Applications/PostgreSQL/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..157e493d26ff5761b314fa52275776fdcb884fc3 GIT binary patch literal 7352 zcmbVxXEa>>-nJIKM<=@IX0*W|dM{C7~zBrfcU_$l%NO)7`v7S#2ID;gFpkl2VrtpShy&-i8<0-PZ#Wn z@DPFg!HA$dyzbaoSaJ#|FNmWX49V^QbB24$a~`yGaI(Xp@|*xdbLc$TA?0+Oe91wm;dCoga|K);*m!95#1bh1aJ5YBa1E3&Y08tSjz{BH@ zUw@;0kw&opZ^nN``QED38=WEumnsRA}j-Rk`k755EYYvK^-JS9Yp_; z^WXTYqT*^&s_JSWX-P>@Q8fu^NfmJ=B^3#2RTVKQ8Bx$bTrE#uB*fDZ_K$A(o$h~g zRsUBmSj7hhK_Yxi5D52ws=&YnfkgPaAiUUBRQ}F7JD(oJ5$^eClmAbm{^hqS%m?ld zgR1)=JlOw^G#LJ0tZ)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T3Mv0uP2|SUAuM_OKq6&rVz6|Bl&_o~m%Q+TP4G2Z6dQ9P z)^hms_>)EaVira6&XEmhOX1d#I7!tyl?$dbS7m@001 zXzwy^cjtSr`5Q?s%~RF#kU1!jbGhwD1ZPH_cF|?g@9V*PP68Wewu*d2 zz;qH;{3@C-V5|Xeelk;uPEZ03aylVduPsY5f@!sFZB+K18QdKB%h{5QOyX1xoPKx~ i9MR_G6pJ8EXs9=kjr-5PL@hOa)pyGFQU4DX- public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: redis + ports: + - port: 6379 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing Redis') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'Redis {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'Redis {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/Redis/package/UI/ui.yaml b/Applications/Redis/package/UI/ui.yaml new file mode 100644 index 0000000..f37d38b --- /dev/null +++ b/Applications/Redis/package/UI/ui.yaml @@ -0,0 +1,34 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerRedis + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: DockerRedis + 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 + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Make application accessible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/Redis/package/logo.png b/Applications/Redis/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..24d454b597b7dc9537b6fbd47f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67TkY1&7_0mDBT`bF02Y5wrmp{MoW{n&AhywH zYAqnxHVj7U(>|0HYpkUKjL5bj;4GOWrM>8VJfK-rV4u_$O3XTvp0Y@Kv?ly^d zPb;Ms7D!E)oWgEzK1lOb7+a3n^I@K>Bmp}Qk5+u$NKyk|Qx#1=87D8b0^E#G%8~9x zz^=P9WJXHH8Vtk?38)31>sO$HaeO3XB&i@L>0eMwYCifWH%oL%D#&17}8 z)#mRpNG*}WC&)Lf6)@;VGxevVjkPbE0~S%7HpVX7%DG5Qy^sZl|M>;VbadpS+G6t9 zk}4?$mShj8(hO+skAZCRT~cgL<#~p~tFZd&0nVzHqp%whkcWp~D1$6VI07(Z8}kcLFA& z7v3)2EStZb)HwLTQN6R()yCnfuqT{09NLt0{%(wv$g!D^E!wie_t8>{7Mw49VKs*4 zchu1c=Vqb=m7jj{i7guG(Y8|2^g36_f-?tLFmJW7COx1mw6OM0;rdtF_A06kBK~c& zV<$PThvDxuvE8QWcQwy{hhdMt+d6}}T3GE=7{XeZNb9jFeKDwccuCK(uhfkq$6#z+ zQUIdwkJ*%SET(2FR^6Pd*dWHj}xvk zs|I^#D)tw_X9dCNuj4PlVCG72Z*k`R$A9ojYN+i8SQXvhrnWwvG(D>lG}$UE!$aUA z?(U2>f{V4zOWoaVY#&{mpG_tj;ZCWuvY#BgJ$K|`GRl8{)6){|XmDd$C?B94Jyycn zy*f7ffwvLMyW8qa_W081ArSq{a3zxjOyyRngonwK6Ry9BB z9O>ot=Qb>yzZiWkE~rrTTOnD9{@!bLLJiD?D#D~<<5bVswdtdb#~E5 z7gbWuuk&PPoV_$c>zqhId1mQBT;1HS<)k9oDQp9l>im1&SBG5OcJM;So_K}fW-1i~gj k`J3q8Mpeolh4UbX#+FaQ>9!Th_a7DJCYHv public, not $ => internal) + + + getContainer: + Body: + Return: + name: $.name + image: 'tutum/tomcat' + env: + TOMCAT_PASS: $.password + ports: + - port: 8080 + scope: $._scope + + + onInstallationStart: + Body: + - $._environment.reporter.report($this, 'Installing Tomcat') + + + onInstallationFinish: + Body: + - If: $.publish + Then: + - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). + select(format('http://{0}:{1}', $.address, $.port)) + - $._environment.reporter.report($this, 'Tomcat {0} is available at {1}'.format($.name, join(', ', $endpoints))) + Else: + - $._environment.reporter.report($this, 'Tomcat {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Applications/Tomcat/package/UI/ui.yaml b/Applications/Tomcat/package/UI/ui.yaml new file mode 100644 index 0000000..d5f51c1 --- /dev/null +++ b/Applications/Tomcat/package/UI/ui.yaml @@ -0,0 +1,39 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerTomcat + name: $.appConfiguration.name + host: $.appConfiguration.host + publish: $.appConfiguration.publish + password: $.appConfiguration.password + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: 'DockerTomcat' + description: >- + Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and + underline are allowed + - name: password + type: password + label: Admin Password + description: Password for admin user in Tomcat + - name: host + type: + - io.murano.apps.docker.kubernetes.KubernetesPod + - io.murano.apps.docker.DockerStandaloneHost + label: Container Host + description: >- + Select an instance of Docker contaniner hosting provider to run the app + - name: publish + type: boolean + label: Make application accessible from outside + initial: true + required: false + description: >- + Check if you intend to access application from the Internet diff --git a/Applications/Tomcat/package/logo.png b/Applications/Tomcat/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..df16fde24d8dc84ff5ee298586552f829547343c GIT binary patch literal 6813 zcmbVRbyQUCx(5NJQ2_~wp>r5u1_p+b?(PtTnW16mP9>yMQIL`r5NT`B!sktSXfvj%1UxNx2@Lgqkw<|*nhC=H6>MpWKTRSB`H>9qg zh92C{0WOMQmXZXB`@n7)I3YbO0X|NS&h9WD3Fg1}!fyM2ra{brzeqeBB$)rDl##j? zKo;eO1PJj71L6Dv5CBw^Pe4c*DhlNV2;PoC{30MhejvXnOb86)7X|8wTP|koq94)O-o*oj+x0?RT1Sc1D^?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v6?*w|AV-WM>y3eV{SU+eePjkksaGowv+%U- zW=^CmG4Ur!^i8&;HtOgnMX}EK8^_~Ejpq(&_lL6Va8TXuj8Nm$!{26NAgJM8ozDr1 z{;1Q(_C0uZIf4l00EvgP&1Oxw-ZY+jr7*ejOPocQ<`)V6bM8LJhY4@!)k24j7Hq*{ z=^CYyG+C@{2WdCHblmSsA$?p{1FJz)4zy%X%dW5GwB6@uuEgS0#%FDZWvX%Gul#a# z#5sH_QJ;$L4Ep2_pN;k85%+R91cux|27LS2QYIPu%ZoRBn8pliEoHKg3NFOOOGs99 z1#I{O=iUyefH|c!q?hZQHlF(mv7ogmbFp zd8Ft_XAy=xSS|_E1Z?Ee*27|28qSZ#H>r|4v2~O)wmTu=No<>{;Va@HP6FKejnV{wJ4rBSo88P>e z&bdNy6TLZ~=9)*}f;=}b>*g_a5LE|@O?t*MfmyRtrTg+ryuHxHN~}cghA#c;_Z@;h zGuMyPH->{ShgZHk6~I|kma4XjlC2=ZS65v#d^M7w#D<3i@I$krd6*MG{<5bmQ`G;E zCrfkxm%`07ALAYc*-`KDYu(iv^w`b8~`sRkOs z(MKehY}@dL=W*G$j9BK~SRb7&zJidK?DtrhQ11;=hea}9t*d$6<*Yh;yAR+3l?_G6 zd}I04W#Wppw0JYqRAOl36+$Q6MqA!)udP3?wO0$|aQk{3?2NW8vN=ka5So?V2;|Rq zD0*`2UJBNoy=YB&6kPZ9{%*;~S{T zzvU>Z+B3X#Aehz3OQkM@O!siLz 0 and $ < 65536) + + scope: + Contract: $.string().notNull().check($ in list(public, cloud, host, internal)) + Default: private + + protocol: + Contract: $.string().notNull().check($ in list(TCP, UDP)) + Default: TCP + +Methods: + getRepresentation: + Body: + Return: + port: $.port + scope: $.scope + protocol: $.protocol diff --git a/DockerInterfacesLibrary/package/Classes/DockerApplication.yaml b/DockerInterfacesLibrary/package/Classes/DockerApplication.yaml new file mode 100644 index 0000000..cfb3bb6 --- /dev/null +++ b/DockerInterfacesLibrary/package/Classes/DockerApplication.yaml @@ -0,0 +1,91 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerApplication + +Extends: std:Application + +Properties: + host: + Contract: $.class(DockerContainerHost).notNull() + + applicationEndpoints: + Contract: + - port: $.int().notNull().check($ > 0) + address: $.string().notNull() + scope: $.string().notNull().check($ in list(public, cloud, internal, host)) + portScope: $.string().notNull().check($ in list(public, cloud, internal, host)) + containerPort: $.int().notNull().check($ > 0) + protocol: $.string().notNull().check($ in list(TCP, UDP)) + Usage: Out + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + + + deploy: + Body: + - $._environment.reporter.report($this, 'Waiting for the host to be ready') + - $.host.deploy() + - $container: $.getContainer() + - $repr: $._getContainerRepresentation($container) + - If: $.getAttr(container, null) != $repr + Then: + - $.onInstallationStart() + - $.applicationEndpoints: $.host.hostContainer($container) + - $.setAttr(container, $repr) + - $.onInstallationFinish() + + + getConnectionTo: + Arguments: + - application: + Contract: $.class(DockerApplication).notNull() + - port: + Contract: $.int().notNull().check($ > 0) + - protocol: + Contract: $.string().notNull().check($ in list(TCP, UDP)) + Default: TCP + Body: + - $scopes: [cloud, public] + - If: $.host = $application.host + Then: + - $scopes: list(host, internal) + $scopes + Else: + - If: $.host.getInternalScopeId() = $application.host.getInternalScopeId() + Then: + - $scopes: list(internal) + $scope + - For: s + In: $scopes + Do: + - $endpoints: $application.applicationEndpoints.where(true).where( + $.scope = $s and $.containerPort = $port and $.protocol = $protocol) + - If: len($endpoints) > 0 + Then: + - $index: int(len($endpoints) * random()) + - $endpoint: $endpoints[$index] + - Return: + host: $endpoint.address + port: $endpoint.port + + + _getContainerRepresentation: + Arguments: + - container: + Contract: $.class(DockerContainer).notNull() + Body: + Return: $container.getRepresentation() + + + getContainer: + + + onInstallationStart: + Body: + + + onInstallationFinish: + Body: diff --git a/DockerInterfacesLibrary/package/Classes/DockerContainer.yaml b/DockerInterfacesLibrary/package/Classes/DockerContainer.yaml new file mode 100644 index 0000000..3633910 --- /dev/null +++ b/DockerInterfacesLibrary/package/Classes/DockerContainer.yaml @@ -0,0 +1,46 @@ +Namespaces: + =: io.murano.apps.docker + +Name: DockerContainer + +Properties: + name: + Contract: $.string().notNull() + + image: + Contract: $.string().notNull() + + commands: + Contract: + - $.string().notNull() + Default: [] + + env: + Contract: + $.string().notNull(): $.string().notNull() + Default: {} + + ports: + Contract: + - $.class(ApplicationPort) + Default: [] + + volumes: + Contract: + $.string().notNull(): $.class(DockerVolume).notNull() + Default: {} + +Methods: + getRepresentation: + Body: + - $volumeRepresentations: {} + - For: volume + In: $.volumes + Do: + - $volumeRepresentations[$volume]: $.volumes.get($volume).getRepresentation() + - Return: + name: $.name + image: $.image + env: env + ports: $.ports.select($.getRepresentation()) + volumes: $volumeRepresentations \ No newline at end of file diff --git a/DockerInterfacesLibrary/package/Classes/DockerContainerHost.yaml b/DockerInterfacesLibrary/package/Classes/DockerContainerHost.yaml new file mode 100644 index 0000000..fedfea2 --- /dev/null +++ b/DockerInterfacesLibrary/package/Classes/DockerContainerHost.yaml @@ -0,0 +1,30 @@ +Namespaces: + =: io.murano.apps.docker + std: io.murano + +Name: DockerContainerHost + +Extends: std:Application + +Properties: + name: + Contract: $.string().notNull() + +Methods: + hostContainer: + Arguments: + - container: + Contract: $.class(DockerContainer).notNull() + + + deleteContainer: + Arguments: + - name: + Contract: $.string().notNull() + + getEndpoints: + Arguments: + - applicationName: + Contract: $.string().notNull() + + getInternalScopeId: diff --git a/DockerInterfacesLibrary/package/Classes/DockerHelpers.yaml b/DockerInterfacesLibrary/package/Classes/DockerHelpers.yaml new file mode 100644 index 0000000..7c0a17d --- /dev/null +++ b/DockerInterfacesLibrary/package/Classes/DockerHelpers.yaml @@ -0,0 +1,30 @@ +Namespaces: + =: io.murano.apps.docker + +Name: DockerHelpers + +Methods: + labels2Map: + Arguments: + labelsString: + Contract: $.string().notNull() + Body: + - $result: {} + - For: t + In: $labelsString.replace(',', ';').split(';') + Do: + - $pair: $t.split('=') + - If: len($pair) < 2 + Then: + Continue: + - $key: $pair[0].trim() + - $result[$key]: $pair[1].trim() + - Return: $result + + map2labels: + Arguments: + labelsMap: + Contract: + $.string().notNull(): $.string().notNull() + Body: + - Return: join(';', $labelsMap.select(list($, $labelsMap.get($))).select(join('=', $))) diff --git a/DockerInterfacesLibrary/package/Classes/DockerHostVolume.yaml b/DockerInterfacesLibrary/package/Classes/DockerHostVolume.yaml new file mode 100644 index 0000000..1c3f631 --- /dev/null +++ b/DockerInterfacesLibrary/package/Classes/DockerHostVolume.yaml @@ -0,0 +1,20 @@ +Namespaces: + =: io.murano.apps.docker + +Name: DockerHostVolume + +Extends: DockerVolume + +Properties: + path: + Contract: $.string().notNull() + +Methods: + getType: + Body: + Return: HostDir + + getParameters: + Body: + Return: $.path + diff --git a/DockerInterfacesLibrary/package/Classes/DockerTempVolume.yaml b/DockerInterfacesLibrary/package/Classes/DockerTempVolume.yaml new file mode 100644 index 0000000..a66da13 --- /dev/null +++ b/DockerInterfacesLibrary/package/Classes/DockerTempVolume.yaml @@ -0,0 +1,15 @@ +Namespaces: + =: io.murano.apps.docker + +Name: DockerTempVolume + +Extends: DockerVolume + +Methods: + getType: + Body: + Return: TempVolume + + getParameters: + Body: + Return: null diff --git a/DockerInterfacesLibrary/package/Classes/DockerVolume.yaml b/DockerInterfacesLibrary/package/Classes/DockerVolume.yaml new file mode 100644 index 0000000..afa2366 --- /dev/null +++ b/DockerInterfacesLibrary/package/Classes/DockerVolume.yaml @@ -0,0 +1,19 @@ +Namespaces: + =: io.murano.apps.docker + +Name: DockerVolume + +Properties: + name: + Contract: $.string().notNull() + +Methods: + getType: + + getParameters: + + getRepresentation: + Body: + Return: + type: $.getType() + parameters: $.getParameters() diff --git a/DockerInterfacesLibrary/package/manifest.yaml b/DockerInterfacesLibrary/package/manifest.yaml new file mode 100644 index 0000000..278207e --- /dev/null +++ b/DockerInterfacesLibrary/package/manifest.yaml @@ -0,0 +1,19 @@ +Format: 1.0 +Type: Library +FullName: io.murano.apps.docker.Interfaces +Name: Docker Interface Library +Description: | + The library provides all necessary interface for Docker + and Kubernetes applications +Author: 'Mirantis, Inc' +Tags: [Docker, Kubernetes] + +Classes: + io.murano.apps.docker.DockerApplication: DockerApplication.yaml + io.murano.apps.docker.DockerContainer: DockerContainer.yaml + io.murano.apps.docker.DockerContainerHost: DockerContainerHost.yaml + io.murano.apps.docker.DockerHelpers: DockerHelpers.yaml + io.murano.apps.docker.DockerHostVolume: DockerHostVolume.yaml + io.murano.apps.docker.DockerTempVolume: DockerTempVolume.yaml + io.murano.apps.docker.DockerVolume: DockerVolume.yaml + io.murano.apps.docker.ApplicationPort: ApplicationPort.yaml diff --git a/DockerStandaloneHost/package/Classes/DockerStandaloneHost.yaml b/DockerStandaloneHost/package/Classes/DockerStandaloneHost.yaml new file mode 100644 index 0000000..5c0d198 --- /dev/null +++ b/DockerStandaloneHost/package/Classes/DockerStandaloneHost.yaml @@ -0,0 +1,277 @@ +Namespaces: + =: io.murano.apps.docker + res: io.murano.resources + std: io.murano + sys: io.murano.system + +Name: DockerStandaloneHost + +Extends: + - DockerContainerHost + +Properties: + name: + Contract: $.string().notNull() + + instance: + Contract: $.class(res:LinuxMuranoInstance).notNull() + + dockerRegistry: + Contract: $.string() + + applicationEndpoints: + Contract: + - port: $.int().notNull().check($ > 0) + address: $.string().notNull() + scope: $.string().notNull().check($ in list(public, cloud, internal, host)) + portScope: $.string().notNull().check($ in list(public, cloud, internal, host)) + containerPort: $.int().notNull().check($ > 0) + applicationName: $.string().notNull() + protocol: $.string().notNull().check($ in list(TCP, UDP)) + Default: [] + Usage: Out + + containers: + Contract: + - $.string().notNull() + Default: [] + Usage: Out + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + + + deploy: + Body: + - If: not $.getAttr(deployed, false) + Then: + - $._environment.reporter.report($this, 'Create VM for Docker Server') + - $.instance.deploy() + - If: $.dockerRegistry != null and $.dockerRegistry != '' + Then: + - $._environment.reporter.report($this, 'Configuring Docker registry') + - $resources: new(sys:Resources) + - $template: $resources.yaml('SetupDockerRegistry.template').bind(dict( + dockerRegistry => $.dockerRegistry + )) + - $.instance.agent.call($template, $resources) + - $._environment.reporter.report($this, 'Docker Server is up and running') + - $.setAttr(deployed, true) + + + hostContainer: + Arguments: + - container: + Contract: $.class(DockerContainer).notNull() + Body: + - $.deploy() + - $.deleteContainer($container.name) + - $portBindings: {} + - $newEndpoints: [] + - $._pullImage(image => $container.image) + - For: applicationPort + In: $container.ports + Do: + - If: $applicationPort.scope != host + Then: + - $hostPort: $._acquirePort($applicationPort, $container.name) + - $containerPort: $._getPortSpec($applicationPort) + - $portBindings[$hostPort]: $containerPort + - If: $applicationPort.scope = public + Then: + - $rule: + - ToPort: $hostPort + FromPort: $hostPort + IpProtocol: toLower($applicationPort.protocol) + External: true + - $._environment.securityGroupManager.addGroupIngress($rule) + - $record: + port: $hostPort + address: $.instance.ipAddresses[0] + scope: cloud + containerPort: $applicationPort.port + portScope: $applicationPort.scope + protocol: $applicationPort.protocol + applicationName: $container.name + - $newEndpoints: $newEndpoints + list($record) + - If: $applicationPort.scope = public and $.instance.floatingIpAddress != null + Then: + - $record.address: $.instance.floatingIpAddress + - $record.scope: public + - $newEndpoints: $newEndpoints + list($record) + + - $volumeMap: {} + - For: path + In: $container.volumes + Do: + - $volume: $container.volumes.get($path) + - If: $volume.getType() = HostDir + Then: + - $hostDir: $volume.getParameters() + - $volumeMap[$hostDir]: $path + + - $._environment.reporter.report($this, 'Adding Docker Application') + - $resources: new(sys:Resources) + - $template: $resources.yaml('RunContainer.template').bind(dict( + appName => $container.name, + image => $container.image, + env => $container.env, + portMap => $portBindings, + volumeMap => $volumeMap, + commands => $container.commands + )) + - $._removeApplicationEndpoints($container.name) + - $privateIp: $.instance.agent.call($template, $resources) + - $record: + port: $applicationPort.port + address: $privateIp + scope: host + containerPort: $applicationPort.port + portScope: $applicationPort.scope + protocol: $applicationPort.protocol + applicationName: $container.name + - $newEndpoints: $newEndpoints + list($record) + - $._environment.stack.push() + + - If: not $container.name in $.containers + Then: + - $.containers: $.containers + list($container.name) + - $.applicationEndpoints: $.applicationEndpoints + $newEndpoints + - Return: $.getEndpoints($container.name) + + + getEndpoints: + Arguments: + - applicationName: + Contract: $.string().notNull() + Body: + - Return: $.applicationEndpoints.where($.applicationName = $applicationName) + + + _getPortSpec: + Arguments: + - applicationPort: + Contract: $.class(ApplicationPort).notNull() + Body: + - If: $applicationPort.protocol = UDP + Then: + - Return: format('{0}/udp', $applicationPort.port) + Else: + - Return: str($applicationPort.port) + + + _pullImage: + Arguments: + - image: + Contract: $.string().notNull() + Body: + - $._environment.reporter.report($this, 'Pulling app image {0}'.format($image)) + - $resources: new(sys:Resources) + - $template: $resources.yaml('PullImage.template').bind(dict( + image => $image + )) + - $.instance.agent.call($template, $resources) + - $._environment.reporter.report($this, 'Image saved') + + + _acquirePort: + Arguments: + - applicationPort: + Contract: $.class(ApplicationPort).notNull() + - applicationName: + Contract: $.string().notNull() + Body: + - $portMap: $.getAttr(portMap, dict()) + - $applicationPorts: $.getAttr(applicationPorts, dict()) + - $key: format('{0}-{1}-{2}', $applicationPort.port, $applicationPort.protocol, $applicationName) + - If: $key in $applicationPorts + Then: + - Return: $applicationPorts[$key] + + - $port: $applicationPort.port + - If: $port in $portMap + Then: + - $port: 1025 + - While: $port in $portMap + Do: + $port: $port + 1 + + - $portMap[$port]: $applicationName + - $applicationPorts[$key]: $port + + - $.setAttr(portMap, $portMap) + - $.setAttr(applicationPorts, $applicationPorts) + - Return: $port + + + _releaseApplicationPorts: + Arguments: + - applicationName: + Contract: $.string().notNull() + Body: + - $portMap: $.getAttr(portMap, dict()) + - $applicationPorts: $.getAttr(applicationPorts, dict()) + - $newPortMap: {} + - $newApplicationPorts: {} + - $portsToDelete: [] + - For: port + In: $portMap.keys() + Do: + - $value: $portMap.get($port) + - If: $value = $applicationName + Then: + - $portsToDelete: $portsToDelete + list($port) + Else: + - $newPortMap[$port]: $value + - For: key + In: $applicationPorts.keys() + Do: + - $value: $applicationPorts.get($port) + - If: not $value in $portsToDelete + Then: + - $newApplicationPorts[$key]: $value + - $.setAttr(portMap, $newPortMap) + - $.setAttr(applicationPorts, $newApplicationPorts) + + + _getResourceName: + Arguments: + - applicationName: + Contract: $.string().notNull() + Body: + - Return: format('{0}-{1}', $applicationName, $.id()) + + + _removeApplicationEndpoints: + Arguments: + - applicationName: + Contract: $.string().notNull() + Body: + - $.applicationEndpoints: $.applicationEndpoints.select($.applicationName != $applicationName) + + + deleteContainer: + Arguments: + - name: + Contract: $.string().notNull() + Body: + - If: $name in $.containers + Then: + - $._environment.reporter.report($this, 'Deleting container {0}'.format($name)) + - $._removeApplicationEndpoints($name) + - $._releaseApplicationPorts($name) + - $.containers: $.containers.where($ != $name) + - $resources: new(sys:Resources) + - $template: $resources.yaml('RemoveContainer.template').bind(dict( + name => $name + )) + - $.instance.agent.call($template, $resources) + - $._environment.reporter.report($this, 'Container {0} deleted'.format($name)) + + + getInternalScopeId: + Body: + Return: $.id() diff --git a/DockerStandaloneHost/package/Resources/PullImage.template b/DockerStandaloneHost/package/Resources/PullImage.template new file mode 100644 index 0000000..888e381 --- /dev/null +++ b/DockerStandaloneHost/package/Resources/PullImage.template @@ -0,0 +1,18 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Pull image + +Parameters: + image: $image + +Body: | + runDockerCommand('pull {0}'.format(args.image)) + +Scripts: + runDockerCommand: + Type: Application + Version: 1.0.0 + EntryPoint: runDockerCommand.sh + Options: + captureStdout: true + captureStderr: true diff --git a/DockerStandaloneHost/package/Resources/RemoveContainer.template b/DockerStandaloneHost/package/Resources/RemoveContainer.template new file mode 100644 index 0000000..f3d942e --- /dev/null +++ b/DockerStandaloneHost/package/Resources/RemoveContainer.template @@ -0,0 +1,19 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Remove container + +Parameters: + name: $name + +Body: | + runDockerCommand('rm -f {0}'.format(args.name)) + +Scripts: + runDockerCommand: + Type: Application + Version: 1.0.0 + EntryPoint: runDockerCommand.sh + Options: + captureStdout: false + captureStderr: false + verifyExitcode: false diff --git a/DockerStandaloneHost/package/Resources/RunContainer.template b/DockerStandaloneHost/package/Resources/RunContainer.template new file mode 100644 index 0000000..fe9520a --- /dev/null +++ b/DockerStandaloneHost/package/Resources/RunContainer.template @@ -0,0 +1,32 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Run container + +Parameters: + appName: $appName + portMap: $portMap + volumeMap: $volumeMap + env: $env + image: $image + commands: $commands + +Body: | + options = ['-d', '--name ' + args.appName] + for container_port, host_port in args.portMap.iteritems(): + options.append('-p {0}:{1}'.format(host_port, container_port)) + for host_dir, container_dir in args.volumeMap.iteritems(): + options.append("-v '{0}':'{1}'".format(host_dir, container_dir)) + for key, value in args.env.iteritems(): + options.append("-e '{0}'='{1}'".format(key, value)) + runDockerCommand('run {0} {1} {2}'.format(' '.join(options), args.image, ' '.join(args.commands)).rstrip()) + + return runDockerCommand('inspect -f={{.NetworkSettings.IPAddress}} ' + args.appName).stdout + +Scripts: + runDockerCommand: + Type: Application + Version: 1.0.0 + EntryPoint: runDockerCommand.sh + Options: + captureStdout: true + captureStderr: true diff --git a/DockerStandaloneHost/package/Resources/SetupDockerRegistry.template b/DockerStandaloneHost/package/Resources/SetupDockerRegistry.template new file mode 100644 index 0000000..01ee5b4 --- /dev/null +++ b/DockerStandaloneHost/package/Resources/SetupDockerRegistry.template @@ -0,0 +1,19 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Setup Docker registry + +Parameters: + dockerRegistry: $dockerRegistry + +Body: | + setupRegistry(args.dockerRegistry) + +Scripts: + setupRegistry: + Type: Application + Version: 1.0.0 + EntryPoint: setupDockerRegistry.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/DockerStandaloneHost/package/Resources/scripts/runDockerCommand.sh b/DockerStandaloneHost/package/Resources/scripts/runDockerCommand.sh new file mode 100644 index 0000000..e44d140 --- /dev/null +++ b/DockerStandaloneHost/package/Resources/scripts/runDockerCommand.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker $* \ No newline at end of file diff --git a/DockerStandaloneHost/package/Resources/scripts/setupDockerRegistry.sh b/DockerStandaloneHost/package/Resources/scripts/setupDockerRegistry.sh new file mode 100644 index 0000000..bde5b5e --- /dev/null +++ b/DockerStandaloneHost/package/Resources/scripts/setupDockerRegistry.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +source /etc/default/docker +DOCKER_OPTS+=" --registry-mirror=$1" +echo DOCKER_OPTS=\"$DOCKER_OPTS\" > /etc/default/docker + +service docker restart \ No newline at end of file diff --git a/DockerStandaloneHost/package/UI/ui.yaml b/DockerStandaloneHost/package/UI/ui.yaml new file mode 100644 index 0000000..a8aefc1 --- /dev/null +++ b/DockerStandaloneHost/package/UI/ui.yaml @@ -0,0 +1,71 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.DockerStandaloneHost + name: $.appConfiguration.name + dockerRegistry: $.appConfiguration.dockerRegistry + instance: + ?: + type: io.murano.resources.LinuxMuranoInstance + name: generateHostname($.instanceConfiguration.unitNamingPattern, 1) + flavor: $.instanceConfiguration.flavor + image: 'ubuntu14.04-x64-docker' + keyname: $.instanceConfiguration.keyPair + assignFloatingIp: $.appConfiguration.assignFloatingIP + availabilityZone: $.instanceConfiguration.availabilityZone + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + initial: Docker Standalone Host + description: >- + Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and + underline are allowed + - name: assignFloatingIP + type: boolean + label: Assign Floating IP + description: >- + Select to true to assign floating IP automatically + initial: true + required: false + - name: dockerRegistry + type: string + label: Custom Docker registry URL + description: >- + URL of docker repository mirror to use. Leave empty for Docker default + required: false + + - instanceConfiguration: + fields: + - name: title + type: string + required: false + hidden: true + description: Specify some instance parameters on which the application would be created + - name: flavor + type: flavor + label: Instance flavor + description: >- + Select registered in Openstack flavor. Consider that application performance + depends on this parameter. + required: false + - name: keyPair + type: keypair + label: Key Pair + description: >- + Select a Key Pair to control access to instances. You can login to + instances using this KeyPair after the deployment of application. + required: false + - name: availabilityZone + type: azone + label: Availability zone + description: Select availability zone where the application would be installed. + required: false + - name: unitNamingPattern + label: Hostname + type: string + required: false diff --git a/DockerStandaloneHost/package/images.lst b/DockerStandaloneHost/package/images.lst new file mode 100644 index 0000000..929700b --- /dev/null +++ b/DockerStandaloneHost/package/images.lst @@ -0,0 +1,10 @@ +Images: +- Name: 'ubuntu14.04-x64-docker' + Hash: 'f1688ab306415289280d3946984e1583' + Meta: + title: 'ubuntu14.04-x64-docker' + type: 'linux' + DiskFormat: 'qcow2' + ContainerFormat: 'bare' + Url: 'http://murano-files.mirantis.com/ubuntu14.04-x64-docker.qcow2' + diff --git a/DockerStandaloneHost/package/logo.png b/DockerStandaloneHost/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2062a931fedf162e7a6a334a2102d69cf8dfee74 GIT binary patch literal 8736 zcmV+*BH!JKP)?^JuGvT$`in5-fp#y|8%jK|aF68Cqz5l|DsgEBL1^0sg8KPss zy3=+l{*G49J|LFSD2D)qKq>eY>Cy1EL#5x|@IOPeU}#aZ=dmz)9Sb2A0^uCs3|ydK z4mYIgoe=c8_@UObHT=&I4MISS1f+`XyNG5MI2FNMK7jKUrj$Pq{&$E@fm0EjiVeha zDuN62P^-099JV^z3I8)Anh?SO4q_U~l$tugIf!K*YW4Ptb|ZT7<4@Dl%BmbQkst&d zK;!u|H4P9UNnSGugrK%;r_5y=5}kVQwit4|3(ERsNjZN~v>VYo%PVrX>?ql2CNz<> zxM=Z4MDLz&83uK3UI`^s15*Dm>g8|_v8n_tH}jzCeC}1(zTmXmRxOx2Yu16vYB!=y zT_a%!O-y+pyrHgv7@;7zDq~mF!exWw!76Kmff~({sRNvW=qgAe z-ZW_{V3{DyYPqhVfpCVFrku8*V9lz3st&)R4Lk$dF=r!q#xu;9p>DugsN7jRXX2wzF%&w_lI0P*Q^)Htr>dW?QT)pDqw#aQaq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??f<(ggtEb-CVen|HWgw*N`|+Yj9*r* z!M%?^ji{i7N8D9kh7iI!W@p`RR}@%`;qz~QfMr>5 zI_y?vM*3r)&YySI@QW`DjlOqMr)zJ&>$-^#Pw#c0L^qj4$KF4scR}Hn6`@E(i6;_p zIUG3Q=z-|oxf3kQ#KtY#ux!O@=!OBCBE#?Xlpc5VfTJf*7*|m*WAuHK25#8AWm!~J z<+!FLWeggK?w#_%7(+qPRxDky3Z`j7k!7U&eI-MVJ?5x;#@<|AFXP(r6NeOT+wpBe z*Ch}Fn=Hd_v;9a2*2NPERgvX0V`{uVr2=|(={#)i6VpCy7V9Ye_iHca{^QE)?hZvF z(@fI@r4&xP{f@5|zW!u=I~QJe^RwlZRb%R3eMOdyfX};7jce7iB=rwPBFCGSQ;g9c`#1)lS|T%~@m2WfsE(tJMny&lW& z@vP~Xoi*;W`SVU0cf)mCT9WbZ+?k8|_wG5+<8sY$I_wp)B*7-j5Jd`y-EMhY&b1xV z0=K^M%#05JfDmGF&j0IhI6x`+nsaUdz{ju7eYkU8?gKWP4R)KNr~7?PNc-rO7w*W< z&Ki>D_kZB9+v@7uk!2YUyS*eME%0=o9^KApJemQ33UrAqNf1R*XN>JNl)A@wa!qxW za>pZ&_i)&3`C1|o_qyGsPffXhw;;}*P_S{6IhmP9R8&>(?3kNfIqlwwyUF-y(dXjl-!JYx;*twDojCZICdAxy*Zl*% zE?45Q2kzd`T02k9ele|}XiG1z+np1NM0Q*{^z5}~opwsAM;=CwyYpz9qNuYUn_AFX znZw5o+6jmM51s9d!$h|e4inu@I81aq;V{wdgu_I)6AlyIPWXSx?Fm3vurJsE0000< KMNUMnLSTZ%q`A`o literal 0 HcmV?d00001 diff --git a/DockerStandaloneHost/package/manifest.yaml b/DockerStandaloneHost/package/manifest.yaml new file mode 100644 index 0000000..5a3c096 --- /dev/null +++ b/DockerStandaloneHost/package/manifest.yaml @@ -0,0 +1,14 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.docker.DockerStandaloneHost +Name: Docker Standalone Host +Description: | + Docker is an open platform for developers and sysadmins to build, ship, and run + distributed applications. Consisting of Docker Engine, a portable, lightweight + runtime and packaging tool, and Docker Hub, a cloud service for sharing applications + and automating workflows, Docker enables apps to be quickly assembled from components + and eliminates the friction between development, QA, and production environments. +Author: 'Mirantis, Inc' +Tags: [ Docker ] +Classes: + io.murano.apps.docker.DockerStandaloneHost: DockerStandaloneHost.yaml diff --git a/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml b/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml new file mode 100644 index 0000000..b7a2c10 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml @@ -0,0 +1,468 @@ +Namespaces: + =: io.murano.apps.docker.kubernetes + std: io.murano + res: io.murano.resources + sys: io.murano.system + docker: io.murano.apps.docker + + +Name: KubernetesCluster + +Extends: std:Application + +Properties: + name: + Contract: $.string().notNull() + + masterNode: + Contract: $.class(KubernetesMasterNode).notNull() + + minionNodes: + Contract: + - $.class(KubernetesMinionNode).notNull() + - 1 + + nodeCount: + Contract: $.int().notNull().check($ > 0) + Usage: InOut + + gatewayCount: + Contract: $.int().notNull() + Usage: InOut + + gatewayNodes: + Contract: + - $.class(KubernetesGatewayNode).notNull() + + dockerRegistry: + Contract: $.string() + + serviceEndpoints: + Contract: + - port: $.int().notNull().check($ > 0) + address: $.string().notNull() + scope: $.string().notNull().check($ in list(public, cloud, internal, host)) + portScope: $.string().notNull().check($ in list(public, cloud, internal, host)) + containerPort: $.int().notNull().check($ > 0) + protocol: $.string().notNull().check($ in list(TCP, UDP)) + applicationName: $.string().notNull() + podId: $.string().notNull() + serviceName: $.string() + Default: [] + Usage: Out + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + + + deploy: + Body: + - If: not $.getAttr(deployed, false) + Then: + - $._environment.reporter.report($this, 'Creating VMs for Kubernetes cluster') + - $securityGroupIngress: + - ToPort: 4001 + FromPort: 4001 + IpProtocol: tcp + External: false + - ToPort: 7001 + FromPort: 7001 + IpProtocol: tcp + External: false + - ToPort: 10250 + FromPort: 10250 + IpProtocol: tcp + External: false + - ToPort: 8080 + FromPort: 8080 + IpProtocol: tcp + External: $.masterNode.instance.assignFloatingIp + - ToPort: 2380 + FromPort: 2380 + IpProtocol: tcp + External: false + - ToPort: 8285 + FromPort: 8285 + IpProtocol: udp + External: false + - $._environment.securityGroupManager.addGroupIngress($securityGroupIngress) + - $.setAttr(deployed, true) + + - $._environment.reporter.report($this, 'Setting up Kubernetes cluster') + - Parallel: + - Do: $.masterNode.deployInstance() + - Do: $.minionNodes.take($.nodeCount).pselect($.deployInstance()) + - Do: $.gatewayNodes.take($.gatewayCount).pselect($.deployInstance()) + + - $.masterNode.setupEtcd() + - $.minionNodes.take($.nodeCount).select($.setupEtcd()) + - $.gatewayNodes.take($.gatewayCount).select($.setupEtcd()) + + - $.masterNode.setupNode() + - Parallel: + - Do: $.minionNodes.take($.nodeCount).pselect($.setupNode()) + - Do: $.minionNodes.skip($.nodeCount).pselect($.removeFromCluster()) + - Do: $.gatewayNodes.take($.gatewayCount).pselect($.setupNode()) + - $._updateEndpoints() + - $._environment.reporter.report($this, 'Kubernetes cluster is up and running') + + + getIp: + Body: + Return: $.masterNode.getIp() + + createPod: + Arguments: + - definition: + Contract: {} + - isNew: + Contract: $.bool().notNull() + Default: true + Body: + - $.deploy() + - $resources: new(sys:Resources) + - $template: $resources.yaml('UpdatePod.template').bind(dict( + podDefinition => $definition, + isNew => $isNew + )) + - $.masterNode.instance.agent.call($template, $resources) + + + createReplicationController: + Arguments: + - definition: + Contract: {} + - isNew: + Contract: $.bool().notNull() + Default: true + Body: + - $.deploy() + - $resources: new(sys:Resources) + - $template: $resources.yaml('UpdateReplicationController.template').bind(dict( + controllerDefinition => $definition, + isNew => $isNew + )) + - $.masterNode.instance.agent.call($template, $resources) + + + destroyReplicationController: + Arguments: + - id: + Contract: $.string().notNull() + Body: + - $.deploy() + - $resources: new(sys:Resources) + - $template: $resources.yaml('DestroyReplicationController.template').bind(dict(rcId => $id)) + - $.kubernetesCluster.masterNode.instance.agent.call($template, $resources) + + + createServices: + Arguments: + - applicationName: + Contract: $.string().notNull() + - applicationPorts: + Contract: + - $.class(docker:ApplicationPort) + - podId: + Contract: $.string().notNull() + Body: + - $resources: new(sys:Resources) + + - $applicationServices: {} + - For: endpoint + In: $.serviceEndpoints.where($.applicationName = $applicationName).where($.serviceName != null) + Do: + - $serviceName: $endpoint.serviceName + - $applicationServices[$serviceName]: $endpoint + + - $.serviceEndpoints: $.serviceEndpoints.where($.applicationName != $applicationName) + + - $servicesUsed: [] + - For: applicationPort + In: $applicationPorts + Do: + - If: $applicationPort.scope != host + Then: + - $serviceName: null + - $reuseEndpoint: null + - For: service + In: $applicationServices.keys() + Do: + - $endpoint: $applicationServices.get($service) + - If: $endpoint.containerPort = $applicationPort.port and $endpoint.protocol = $applicationPort.protocol + Then: + - $serviceName: $service + - $reuseEndpoint: $endpoint + - Break: + + - If: $serviceName = null + Then: + - $serviceName: format('svc-{0}', randomName()) + - $servicePort: $._findUnusedPort($applicationPort.port, $applicationPort.protocol) + - $serviceIp: $._createService($podId, $serviceName, $servicePort, $applicationPort) + Else: + - $servicesUsed: $servicesUsed + list($serviceName) + - $servicePort: $reuseEndpoint.port + - $serviceIp: $._updateService($podId, $reuseEndpoint) + + - $newEndpoint: + port: $servicePort + address: $serviceIp + scope: internal + portScope: $applicationPort.scope + applicationName: $applicationName + containerPort: $applicationPort.port + protocol: $applicationPort.protocol + podId: $podId + serviceName: $serviceName + - $.serviceEndpoints: $.serviceEndpoints + list($newEndpoint) + + - If: $applicationPort.scope in list(public, cloud) + Then: + - If: $.gatewayCount > 0 + Then: + - $nodes: $.gatewayNodes.take($.gatewayCount) + Else: + - $nodes: $.minionNodes.take($.nodeCount) + + - For: t + In: $nodes + Do: + - $newEndpoint.address: $t.getIp() + - $newEndpoint.scope: cloud + - $.serviceEndpoints: $.serviceEndpoints + list($newEndpoint) + + - If: $t.instance.floatingIpAddress != null and $applicationPort.scope = public + Then: + - $newEndpoint.address: $t.instance.floatingIpAddress + - $newEndpoint.scope: public + - $.serviceEndpoints: $.serviceEndpoints + list($newEndpoint) + - $newEndpoint: + port: $applicationPort.port + address: '127.0.0.1' + scope: host + portScope: $applicationPort.scope + containerPort: $applicationPort.port + protocol: $applicationPort.protocol + applicationName: $applicationName + podId: $podId + serviceName: null + - $.serviceEndpoints: $.serviceEndpoints + list($newEndpoint) + + - For: service + In: $applicationServices.keys() + Do: + - If: not $service in $servicesUsed + Then: + - $._destroyService($service) + - $._environment.stack.push() + + + _createService: + Arguments: + - podId: + Contract: $.string().notNull() + - serviceName: + Contract: $.string().notNull() + - servicePort: + Contract: $.int().notNull() + - applicationPort: + Contract: $.class(docker:ApplicationPort) + Body: + - $resources: new(sys:Resources) + - $serviceDefinition: $._buildServiceDefinition( + $serviceName, + $servicePort, + $applicationPort.protocol, + $applicationPort.port, + $podId, + $.gatewayCount = 0 + ) + - $template: $resources.yaml('UpdateService.template').bind(dict( + serviceDefinition => $serviceDefinition, + isNew => true + )) + - $securityGroupIngress: + - ToPort: $servicePort + FromPort: $servicePort + IpProtocol: toLower($applicationPort.protocol) + External: $applicationPort.scope = public + + - $._environment.securityGroupManager.addGroupIngress($securityGroupIngress) + + - Return: $.masterNode.instance.agent.call($template, $resources) + + + _updateService: + Arguments: + - podId: + Contract: $.string().notNull() + - endpoint: + Contract: + port: $.int().notNull().check($ > 0) + address: $.string().notNull() + scope: $.string().notNull().check($ in list(public, cloud, internal, host)) + containerPort: $.int().notNull().check($ > 0) + protocol: $.string().notNull().check($ in list(TCP, UDP)) + applicationName: $.string().notNull() + podId: $.string().notNull() + serviceName: $.string() + + Body: + - $resources: new(sys:Resources) + - $prevNodeCount: $.getAttr(lastNodeCount, 0-1) # 0-1 instead of -1 because YAQL 0.2 doesn't understand unary operators + - $prevGatewayCount: $.getAttr(lastGatewayCount, 0-1) + - $gatewayModeChanged: $prevGatewayCount != $.gatewayCount and $prevGatewayCount * $.gatewayCount = 0 + + - $serviceChanged: $endpoint.podId != $podId or + $endpoint.portScope in list(public, cloud) and ( + $gatewayModeChanged or $.gatewayCount = 0 and $prevNodeCount != $.nodeCount) + - If: $serviceChanged + Then: + - $serviceDefinition: $._buildServiceDefinition( + $endpoint.serviceName, + $endpoint.port, + $endpoint.protocol, + $endpoint.containerPort, + $podId, + $.gatewayCount = 0 + ) + - $template: $resources.yaml('UpdateService.template').bind(dict( + serviceDefinition => $serviceDefinition, + isNew => false + )) + - $serviceIp: $.masterNode.instance.agent.call($template, $resources) + Else: + - $serviceIp: $endpoint.address + - Return: $serviceIp + + _updateEndpoints: + Body: + - For: endpoint + In: $.serviceEndpoints + Do: + - $._updateService($endpoint.podId, $endpoint) + - $.setAttr(lastNodeCount, $.nodeCount) + - $.setAttr(lastGatewayCount, $.gatewayCount) + + + _destroyService: + Arguments: + serviceName: + Contract: $.string().notNull() + Body: + - $resources: new(sys:Resources) + - $template: $resources.yaml('DestroyService.template').bind(dict( + serviceId => $service + )) + - $.masterNode.instance.agent.call($template, $resources) + + + destroyService: + Arguments: + - applicationName: + Contract: $.string().notNull() + - podId: + Contract: $.string().notNull() + Body: + - $._destroyService($applicationName, $podId) + + + _findUnusedPort: + Arguments: + - initial: + Contract: $.int().notNull() + - protocol: + Contract: $.string().notNull() + Body: + - If: initial != 22 and $._checkIfPortIsNotUsed($initial, $protocol) + Then: + Return: $initial + + - $port: 1025 + - While: not $._checkIfPortIsNotUsed($port, $protocol) + Do: + $port: $port + 1 + - Return: $port + + + _checkIfPortIsNotUsed: + Arguments: + - port: + Contract: $.int().notNull() + - protocol: + Contract: $.string().notNull() + Body: + - Return: len(list($.serviceEndpoints.where($.port = $port).where($.protocol = $protocol))) = 0 + + + _buildServiceDefinition: + Arguments: + - serviceName: + Contract: $.string().notNull() + - servicePort: + Contract: $.int().notNull() + - protocol: + Contract: $.string().notNull() + - containerPort: + Contract: $.int().notNull() + - podId: + Contract: $.string().notNull() + - withNodeIps: + Contract: $.bool().notNull() + Body: + - $result: + id: $serviceName + kind: Service + apiVersion: v1beta1 + port: $servicePort + containerPort: $containerPort + protocol: $protocol + selector: + id: $podId + - If: $withNodeIps + Then: + - $result.publicIPs: $.minionNodes.take($.nodeCount).select($.getIp()) + - Return: $result + + scaleNodesUp: + Usage: Action + Body: + - If: $.nodeCount < len($.minionNodes) + Then: + - $._environment.reporter.report($this, 'Scaling up Kubernetes cluster') + - $.nodeCount: $.nodeCount + 1 + - $.deploy() + + scaleNodesDown: + Usage: Action + Body: + - If: $.nodeCount > 1 + Then: + - $._environment.reporter.report($this, 'Scaling Kubernetes cluster down') + - $.nodeCount: $.nodeCount - 1 + - $.deploy() + + scaleGatewaysUp: + Usage: Action + Body: + - If: $.gatewayCount < len($.gatewayNodes) + Then: + - $._environment.reporter.report($this, 'Adding new gateway node') + - $.gatewayCount: $.gatewayCount + 1 + - $.deploy() + + + exportConfig: + Usage: Action + Body: + - $._environment.reporter.report($this, 'Action exportConfig called') + - $resources: new(sys:Resources) + - $template: $resources.yaml('ExportConfig.template') + - $result: $.masterNode.instance.agent.call($template, $resources) + - $._environment.reporter.report($this, 'Got archive from Kubernetes') + - Return: new(std:File, base64Content => $result.content, + filename => 'application.tar.gz') diff --git a/Kubernetes/KubernetesCluster/package/Classes/KubernetesGatewayNode.yaml b/Kubernetes/KubernetesCluster/package/Classes/KubernetesGatewayNode.yaml new file mode 100644 index 0000000..b965f79 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Classes/KubernetesGatewayNode.yaml @@ -0,0 +1,61 @@ +Namespaces: + =: io.murano.apps.docker.kubernetes + std: io.murano + res: io.murano.resources + sys: io.murano.system + +Name: KubernetesGatewayNode + +Extends: KubernetesNode + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._cluster: $.find(KubernetesCluster).require() + + deployInstance: + Body: + - If: not $.getAttr(instanceDeployed, false) + Then: + - $._environment.reporter.report($this, 'Creating Gateway node for Kubernetes services') + - $.super($.deployInstance()) + - $.setAttr(instanceDeployed, true) + + setupEtcd: + Body: + - If: not $.getAttr(etcdConfigured, false) + Then: + - $._environment.reporter.report($, 'Configuring etcd node {0}'.format($.instance.name)) + - $resources: new(sys:Resources) + - $template: $resources.yaml('EtcdAddMember.template').bind(dict( + name => $.instance.name, + ip => $.getIp() + )) + - $clusterConfig: $._cluster.masterNode.instance.agent.call($template, $resources) + + - $template: $resources.yaml('MemberEtcdSetup.template').bind(dict( + name => $.instance.name, + ip => $.getIp(), + clusterConfig => $clusterConfig + )) + - $.instance.agent.call($template, $resources) + - $.setAttr(etcdConfigured, true) + + + setupNode: + Body: + - If: not $.getAttr(nodeConfigured, false) + Then: + - $._environment.reporter.report($this, 'Setup Flannel network on {0}'.format($.instance.name)) + - $resources: new(sys:Resources) + - $template: $resources.yaml('SetupFlannelNode.template') + - $.instance.agent.call($template, $resources) + + - $._environment.reporter.report($, 'Setup Load Balancer on {0}'.format($.instance.name)) + - $template: $resources.yaml('HAProxySetup.template').bind(dict( + masterIp => $._cluster.masterNode.getIp() + )) + - $.instance.agent.call($template, $resources) + - $.setAttr(nodeConfigured, true) + diff --git a/Kubernetes/KubernetesCluster/package/Classes/KubernetesMasterNode.yaml b/Kubernetes/KubernetesCluster/package/Classes/KubernetesMasterNode.yaml new file mode 100644 index 0000000..02c802b --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Classes/KubernetesMasterNode.yaml @@ -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) diff --git a/Kubernetes/KubernetesCluster/package/Classes/KubernetesMinionNode.yaml b/Kubernetes/KubernetesCluster/package/Classes/KubernetesMinionNode.yaml new file mode 100644 index 0000000..70dc628 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Classes/KubernetesMinionNode.yaml @@ -0,0 +1,102 @@ +Namespaces: + =: io.murano.apps.docker.kubernetes + std: io.murano + res: io.murano.resources + sys: io.murano.system + +Name: KubernetesMinionNode + +Extends: KubernetesNode + +Properties: + enableMonitoring: + Contract: $.bool().notNull() + Default: false + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + - $._cluster: $.find(KubernetesCluster).require() + + + deployInstance: + Body: + - If: not $.getAttr(instanceDeployed, false) + Then: + - $._environment.reporter.report($this, 'Creating Kubernetes Minion') + - $.super($.deployInstance()) + - $.setAttr(instanceDeployed, true) + + + setupEtcd: + Body: + - If: not $.getAttr(etcdConfigured, false) + Then: + - $._environment.reporter.report($, 'Configuring etcd node {0}'.format($.instance.name)) + - $resources: new(sys:Resources) + - $template: $resources.yaml('EtcdAddMember.template').bind(dict( + name => $.instance.name, + ip => $.getIp() + )) + - $clusterConfig: $._cluster.masterNode.instance.agent.call($template, $resources) + + - $template: $resources.yaml('MemberEtcdSetup.template').bind(dict( + name => $.instance.name, + ip => $.getIp(), + clusterConfig => $clusterConfig + )) + - $.instance.agent.call($template, $resources) + - $.setAttr(etcdConfigured, true) + + + setupNode: + Body: + - If: not $.getAttr(nodeConfigured, false) + Then: + - $._environment.reporter.report($this, 'Setup Flannel network on {0}'.format($.instance.name)) + - $resources: new(sys:Resources) + - $template: $resources.yaml('SetupFlannelNode.template') + - $.instance.agent.call($template, $resources) + + - If: $.enableMonitoring + Then: + - $._environment.reporter.report($this, 'Adding access to cAdvisor') + - $securityGroupIngress: + - ToPort: 4194 + FromPort: 4194 + IpProtocol: tcp + External: true + - $._environment.securityGroupManager.addGroupIngress($securityGroupIngress) + + - $._environment.reporter.report($, 'Setup Kubernetes Minion on {0}'.format($.instance.name)) + - $template: $resources.yaml('KubeMinionSetup.template').bind(dict( + name => $.instance.name, + ip => $.getIp(), + masterIp => $._cluster.masterNode.getIp(), + enableMonitoring => $.enableMonitoring, + dockerRegistry => $._cluster.dockerRegistry + )) + - $.instance.agent.call($template, $resources) + + - $template: $resources.yaml('KubeRegisterNode.template').bind(dict( + name => $.instance.name, + nodeId => $.getIp() + )) + - $._cluster.masterNode.instance.agent.call($template, $resources) + - $.setAttr(nodeConfigured, true) + + + removeFromCluster: + Body: + - If: $.getAttr(nodeConfigured, false) + Then: + - $._environment.reporter.report($this, 'Deleting Kubernetes Minion') + - $resources: new(sys:Resources) + - $template: $resources.yaml('RemoveMinion.template').bind(dict( + nodeId => $.getIp() + )) + - $._cluster.masterNode.instance.agent.call($template, $resources) + - $._environment.reporter.report($this, 'Node {0} deleted'.format($.instance.name)) + - $.setAttr(nodeConfigured, false) diff --git a/Kubernetes/KubernetesCluster/package/Classes/KubernetesNode.yaml b/Kubernetes/KubernetesCluster/package/Classes/KubernetesNode.yaml new file mode 100644 index 0000000..bc0914a --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Classes/KubernetesNode.yaml @@ -0,0 +1,27 @@ +Namespaces: + =: io.murano.apps.docker.kubernetes + std: io.murano + res: io.murano.resources + sys: io.murano.system + +Name: KubernetesNode + + +Properties: + instance: + Contract: $.class(res:LinuxMuranoInstance).notNull() + + +Methods: + getIp: + Body: + Return: $.instance.ipAddresses[0] + + + deployInstance: + Body: + - $.instance.deploy() + + + setupEtcd: + setupNode: diff --git a/Kubernetes/KubernetesCluster/package/Resources/DestroyReplicationController.template b/Kubernetes/KubernetesCluster/package/Resources/DestroyReplicationController.template new file mode 100644 index 0000000..6668533 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/DestroyReplicationController.template @@ -0,0 +1,20 @@ +FormattVersion: 2.0.0 +Version: 1.0.0 +Name: Destroy Replication Controller + +Parameters: + rcId: $rcId + +Body: | + return destroyReplicationController(args.rcId).stdout + +Scripts: + destroyReplicationController: + Type: Application + Version: 1.0.0 + EntryPoint: destroyReplicationController.sh + Files: [] + Options: + captureStdout: true + captureStderr: true + diff --git a/Kubernetes/KubernetesCluster/package/Resources/DestroyService.template b/Kubernetes/KubernetesCluster/package/Resources/DestroyService.template new file mode 100644 index 0000000..4a8d639 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/DestroyService.template @@ -0,0 +1,20 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Destroy Service + +Parameters: + serviceId: $serviceId + +Body: | + return destroyService('{0}'.format(args.serviceId)).stdout + +Scripts: + destroyService: + Type: Application + Version: 1.0.0 + EntryPoint: destroyService.sh + Files: [] + Options: + captureStdout: true + captureStderr: true + diff --git a/Kubernetes/KubernetesCluster/package/Resources/EtcdAddMember.template b/Kubernetes/KubernetesCluster/package/Resources/EtcdAddMember.template new file mode 100644 index 0000000..9c1952c --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/EtcdAddMember.template @@ -0,0 +1,21 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Add etcd member + +Parameters: + name: $name + ip: $ip + +Body: | + return setup('{0} {1}'.format(args.name, args.ip)).stdout + +Scripts: + setup: + Type: Application + Version: 1.0.0 + EntryPoint: master-add-member.sh + Files: [] + + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/ExportConfig.template b/Kubernetes/KubernetesCluster/package/Resources/ExportConfig.template new file mode 100644 index 0000000..57d2e95 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/ExportConfig.template @@ -0,0 +1,23 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Export Config + +Parameters: + name: $name + +Body: | + log=setup('{0}'.format(args.name)).stdout + filename='/var/run/murano-kubernetes/application.tgz.b64' + with open(filename,'r') as f: + content=f.read() + return {'log': log, 'content': content} + +Scripts: + setup: + Type: Application + Version: 1.0.0 + EntryPoint: exportConfig.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/HAProxySetup.template b/Kubernetes/KubernetesCluster/package/Resources/HAProxySetup.template new file mode 100644 index 0000000..a8c4176 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/HAProxySetup.template @@ -0,0 +1,24 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Setup HAProxy + +Parameters: + masterIp: $masterIp + +Body: | + setup(args.masterIp) + +Scripts: + setup: + Type: Application + Version: 1.0.0 + EntryPoint: haproxy-setup.sh + Files: + - default_scripts/haproxy + - init_conf/confd.conf + - haproxy.tmpl + - haproxy.toml + + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template b/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template new file mode 100644 index 0000000..ed8e461 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template @@ -0,0 +1,30 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Setup Kubernetes Master + +Parameters: + name: $name + ip: $ip + +Body: | + return setup('{0} {1}'.format(args.name, args.ip)).stdout + +Scripts: + setup: + Type: Application + Version: 1.0.0 + EntryPoint: master-kube-setup.sh + Files: + - init_conf/kube-apiserver.conf + - init_conf/kube-controller-manager.conf + - init_conf/kube-scheduler.conf + - initd_scripts/kube-apiserver + - initd_scripts/kube-controller-manager + - initd_scripts/kube-scheduler + - default_scripts/kube-apiserver + - default_scripts/kube-scheduler + - default_scripts/kube-controller-manager + + Options: + captureStdout: true + captureStderr: true \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/KubeMinionSetup.template b/Kubernetes/KubernetesCluster/package/Resources/KubeMinionSetup.template new file mode 100644 index 0000000..0dc037f --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/KubeMinionSetup.template @@ -0,0 +1,42 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Setup Kubernetes Minion + +Parameters: + name: $name + ip: $ip + masterIp: $masterIp + enableMonitoring: $enableMonitoring + dockerRegistry: $dockerRegistry + +Body: | + if args.dockerRegistry: + setupRegistry(args.dockerRegistry) + setup('{0} {1} {2} {3}'.format(args.name, args.ip, args.masterIp, args.enableMonitoring)) + +Scripts: + setup: + Type: Application + Version: 1.0.0 + EntryPoint: minion-kube-setup.sh + Files: + - default_scripts/kube-proxy + - default_scripts/kubelet + - init_conf/kubelet.conf + - init_conf/kube-proxy.conf + - initd_scripts/kubelet + - initd_scripts/kube-proxy + - cadvisor.manifest + + Options: + captureStdout: true + captureStderr: true + + setupRegistry: + Type: Application + Version: 1.0.0 + EntryPoint: setupDockerRegistry.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/KubeRegisterNode.template b/Kubernetes/KubernetesCluster/package/Resources/KubeRegisterNode.template new file mode 100644 index 0000000..b9fbdf6 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/KubeRegisterNode.template @@ -0,0 +1,22 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Register Kubernetes Node + +Parameters: + name: $name + nodeId: $nodeId + +Body: | + return register('{0} {1}'.format(args.name, args.nodeId)).stdout + +Scripts: + register: + Type: Application + Version: 1.0.0 + EntryPoint: kube-add-node.sh + Files: + - minion-node.json + + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/MasterEtcdSetup.template b/Kubernetes/KubernetesCluster/package/Resources/MasterEtcdSetup.template new file mode 100644 index 0000000..bebf5d4 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/MasterEtcdSetup.template @@ -0,0 +1,24 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Setup etcd Master + +Parameters: + name: $name + ip: $ip + +Body: | + return setup('{0} {1}'.format(args.name, args.ip)).stdout + +Scripts: + setup: + Type: Application + Version: 1.0.0 + EntryPoint: master-etcd-setup.sh + Files: + - default_scripts/etcd-master + - init_conf/etcd.conf + - initd_scripts/etcd + + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/MemberEtcdSetup.template b/Kubernetes/KubernetesCluster/package/Resources/MemberEtcdSetup.template new file mode 100644 index 0000000..6f0ab77 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/MemberEtcdSetup.template @@ -0,0 +1,25 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Setup etcd Member + +Parameters: + name: $name + ip: $ip + clusterConfig: $clusterConfig + +Body: | + return setup('{0} {1} {2}'.format(args.name, args.ip, args.clusterConfig)).stdout +Scripts: + setup: + Type: Application + Version: 1.0.0 + EntryPoint: member-etcd-setup.sh + Files: + - default_scripts/etcd-member + - init_conf/etcd.conf + - initd_scripts/etcd + + + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/RemoveMinion.template b/Kubernetes/KubernetesCluster/package/Resources/RemoveMinion.template new file mode 100644 index 0000000..2b25ec3 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/RemoveMinion.template @@ -0,0 +1,20 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Remove Minion + +Parameters: + nodeId: $nodeId + +Body: | + return removeMinion('{0}'.format(args.nodeId)).stdout + +Scripts: + removeMinion: + Type: Application + Version: 1.0.0 + EntryPoint: removeMinion.sh + Files: [] + Options: + captureStdout: true + captureStderr: true + diff --git a/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelMaster.template b/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelMaster.template new file mode 100644 index 0000000..0667ab9 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelMaster.template @@ -0,0 +1,18 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Setup Flannel + +Parameters: + +Body: | + setupFlannel() + +Scripts: + setupFlannel: + Type: Application + Version: 1.0.0 + EntryPoint: setupFlannelMaster.sh + + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelNode.template b/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelNode.template new file mode 100644 index 0000000..4eb341e --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelNode.template @@ -0,0 +1,22 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Setup Flannel + +Parameters: + +Body: | + setupFlannel() + +Scripts: + setupFlannel: + Type: Application + Version: 1.0.0 + EntryPoint: setupFlannelNode.sh + Files: + - init_conf/flanneld.conf + - initd_scripts/flanneld + - default_scripts/flanneld + + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/UpdatePod.template b/Kubernetes/KubernetesCluster/package/Resources/UpdatePod.template new file mode 100644 index 0000000..4aaee1c --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/UpdatePod.template @@ -0,0 +1,26 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Update Pod + +Parameters: + podDefinition: $podDefinition + isNew: $isNew + +Body: | + import json + import uuid + fileName = '/var/run/murano-kubernetes/' + str(uuid.uuid4()) + '.json' + with open(fileName, 'w') as f: + json.dump(args.podDefinition, f) + + return updatePod('{0} {1} {2} {3}'.format(args.isNew, args.podDefinition['id'], args.podDefinition['kind'], fileName )).stdout + +Scripts: + updatePod: + Type: Application + Version: 1.0.0 + EntryPoint: updatePod.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/UpdateReplicationController.template b/Kubernetes/KubernetesCluster/package/Resources/UpdateReplicationController.template new file mode 100644 index 0000000..b7b2bc8 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/UpdateReplicationController.template @@ -0,0 +1,23 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Update Replication Controller + +Parameters: + controllerDefinition: $controllerDefinition + isNew: $isNew + +Body: | + import json + with open('/tmp/controller.json', 'w') as f: + json.dump(args.controllerDefinition, f) + return updateReplicationController('{0}'.format(args.isNew)).stdout + +Scripts: + updateReplicationController: + Type: Application + Version: 1.0.0 + EntryPoint: updateReplicationController.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/UpdateService.template b/Kubernetes/KubernetesCluster/package/Resources/UpdateService.template new file mode 100644 index 0000000..705fa75 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/UpdateService.template @@ -0,0 +1,36 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Update Service + +Parameters: + serviceDefinition: $serviceDefinition + isNew: $isNew + +Body: | + import json + import uuid + fileName = '/var/run/murano-kubernetes/' + str(uuid.uuid4()) + '.json' + with open(fileName, 'w') as f: + json.dump(args.serviceDefinition, f) + + updateService('{0} {1} {2} {3}'.format(args.isNew, args.serviceDefinition['id'], args.serviceDefinition['kind'], fileName)) + return getServiceIp(args.serviceDefinition['id']).stdout + +Scripts: + updateService: + Type: Application + Version: 1.0.0 + EntryPoint: updateService.sh + Files: [] + Options: + captureStdout: true + captureStderr: true + + getServiceIp: + Type: Application + Version: 1.0.0 + EntryPoint: getServiceIp.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/cadvisor.manifest b/Kubernetes/KubernetesCluster/package/Resources/scripts/cadvisor.manifest new file mode 100644 index 0000000..18827e1 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/cadvisor.manifest @@ -0,0 +1,32 @@ +version: v1beta2 +id: cadvisor-agent +containers: + - name: cadvisor + image: google/cadvisor:latest + ports: + - name: http + containerPort: 8080 + hostPort: 4194 + volumeMounts: + - name: varrun + mountPath: /var/run + readOnly: false + - name: varlibdocker + mountPath: /var/lib/docker + readOnly: true + - name: cgroups + mountPath: /sys/fs/cgroup + readOnly: true +volumes: + - name: varrun + source: + hostDir: + path: /var/run + - name: varlibdocker + source: + hostDir: + path: /var/lib/docker + - name: cgroups + source: + hostDir: + path: /sys/fs/cgroup diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-master b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-master new file mode 100644 index 0000000..0b1aeff --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-master @@ -0,0 +1,2 @@ +# Use ETCD_OPTS to modify the start/restart options +ETCD_OPTS="--name %%NAME%% --data-dir /var/lib/etcd --snapshot-count 1000 --listen-peer-urls http://%%IP%%:7001,http://127.0.0.1:7001 --listen-client-urls http://%%IP%%:4001,http://127.0.0.1:4001 --initial-advertise-peer-urls http://%%IP%%:7001 --initial-cluster-state new --initial-cluster-token new-token --initial-cluster %%NAME%%=http://%%IP%%:7001 --advertise-client-urls http://%%IP%%:4001,http://127.0.0.1:4001" diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-member b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-member new file mode 100644 index 0000000..9dd106a --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-member @@ -0,0 +1,11 @@ +INIT_ETCD_OPTS="--name %%NAME%% --initial-cluster-state existing --initial-cluster %%CLUSTER_CONFIG%% --data-dir /var/lib/etcd --snapshot-count 1000 --listen-peer-urls http://%%IP%%:7001,http://127.0.0.1:7001 --listen-client-urls http://%%IP%%:4001,http://127.0.0.1:4001 --initial-advertise-peer-urls http://%%IP%%:7001 --advertise-client-urls http://%%IP%%:4001,http://127.0.0.1:4001" + +EXISTING_ETCD_OPTS="--name %%NAME%% --data-dir /var/lib/etcd --snapshot-count 1000 --listen-peer-urls http://%%IP%%:7001,http://127.0.0.1:7001 --listen-client-urls http://%%IP%%:4001,http://127.0.0.1:4001 --advertise-client-urls http://%%IP%%:4001,http://127.0.0.1:4001" + +if [ -d /var/lib/etcd/wal/ ] + then + #This will allow to restart etcd service properly to pick up properties from other peers + ETCD_OPTS=$EXISTING_ETCD_OPTS + else + ETCD_OPTS=$INIT_ETCD_OPTS +fi \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/flanneld b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/flanneld new file mode 100644 index 0000000..0e8cc34 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/flanneld @@ -0,0 +1,7 @@ +# flannel Upstart and SysVinit configuration file + +# Customize kube-apiserver binary location +# FLANNEL="/opt/bin/flanneld" + +# Use FLANNEL_OPTS to modify the start/restart options +FLANNEL_OPTS="" \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/haproxy b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/haproxy new file mode 100644 index 0000000..9a2ee79 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/haproxy @@ -0,0 +1,4 @@ +# Set ENABLED to 1 if you want the init script to start haproxy. +ENABLED=1 +# Add extra flags here. +#EXTRAOPTS="-de -m 16" diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-apiserver b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-apiserver new file mode 100644 index 0000000..b9225c8 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-apiserver @@ -0,0 +1,13 @@ +#Kube-Apiserver Upstart and SysVinit configuration file + +# Customize kube-apiserver binary location +# KUBE_APISERVER="/opt/bin/kube-apiserver" + +# Use KUBE_APISERVER_OPTS to modify the start/restart options +KUBE_APISERVER_OPTS="--address=0.0.0.0 \ + --port=8080 \ + --etcd_servers=http://127.0.0.1:4001 \ + --logtostderr=false \ + --portal_net=11.1.0.0/16 --log_dir=/var/log/kubernetes" + +# Add more envionrment settings used by kube-apiserver here \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-controller-manager b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-controller-manager new file mode 100644 index 0000000..63c0047 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-controller-manager @@ -0,0 +1,11 @@ + # Kube-Controller-Manager Upstart and SysVinit configuration file + + # Customize kube-controller-manager binary location + # KUBE_CONTROLLER_MANAGER="/opt/bin/kube-controller-manager" + + # Use KUBE_CONTROLLER_MANAGER_OPTS to modify the start/restart options + KUBE_CONTROLLER_MANAGER_OPTS="--master=127.0.0.1:8080 \ + --machines= \ + --logtostderr=false --log_dir=/var/log/kubernetes" + + # Add more envionrment settings used by kube-controller-manager here \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-proxy b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-proxy new file mode 100644 index 0000000..37a786f --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-proxy @@ -0,0 +1,10 @@ +# Kube-Proxy Upstart and SysVinit configuration file + +# Customize kube-proxy binary location +# KUBE_PROXY="/opt/bin/kube-proxy" + +# Use KUBE_PROXY_OPTS to modify the start/restart options +KUBE_PROXY_OPTS="--etcd_servers=http://127.0.0.1:4001 \ + --logtostderr=false --master=http://%%MASTER_IP%%:8080 --log_dir=/var/log/kubernetes" + +# Add more envionrment settings used by kube-apiserver here \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-scheduler b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-scheduler new file mode 100644 index 0000000..ed806b2 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-scheduler @@ -0,0 +1,10 @@ +# Kube-Scheduler Upstart and SysVinit configuration file + +# Customize kube-apiserver binary location +# KUBE_SCHEDULER="/opt/bin/kube-apiserver" + +# Use KUBE_SCHEDULER_OPTS to modify the start/restart options +KUBE_SCHEDULER_OPTS="--logtostderr=false --log_dir=/var/log/kubernetes \ + --master=%%MASTER_IP%%:8080 --address=%%IP%%" + +# Add more envionrment settings used by kube-scheduler here \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kubelet b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kubelet new file mode 100644 index 0000000..b08cf1b --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kubelet @@ -0,0 +1,14 @@ +# Kubelet Upstart and SysVinit configuration file + +# Customize kubelet binary location +# KUBELET="/opt/bin/kubelet" + +# Use KUBELET_OPTS to modify the start/restart options +KUBELET_OPTS="--address=%%IP%% \ + --port=10250 \ + --hostname_override=%%IP%% \ + --api_servers=%%MASTER_IP%%:8080 \ + --logtostderr=false \ + --log_dir=/var/log/kubernetes" + +# Add more envionrment settings used by kube-scheduler here \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/destroyReplicationController.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/destroyReplicationController.sh new file mode 100644 index 0000000..5c35bb2 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/destroyReplicationController.sh @@ -0,0 +1,3 @@ +#!/bin/bash +echo "Deleting a replication controller" >> /tmp/murano-kube.log +/opt/bin/kubectl delete replicationcontrollers $1 >> /tmp/murano-kube.log diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/destroyService.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/destroyService.sh new file mode 100644 index 0000000..cba8d8f --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/destroyService.sh @@ -0,0 +1,3 @@ +#!/bin/bash +echo "Deleting a Service" >> /tmp/murano-kube.log +/opt/bin/kubectl delete services $1 >> /tmp/murano-kube.log diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/exportConfig.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/exportConfig.sh new file mode 100644 index 0000000..c4c9a1a --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/exportConfig.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +DEFINITION_DIR=/var/run/murano-kubernetes +cd $DEFINITION_DIR +rm /tmp/application.tgz +rm ./application.tgz.b64 + +echo "#!/bin/bash" > setup.sh +while read line +do + name=`echo $line | cut -d' ' -f1` + kind=`echo $line | cut -d' ' -f2` + file=`basename $(echo $line | cut -d' ' -f3)` + echo "echo 'Creating $kind $name'" >> setup.sh + echo "/opt/bin/kubectl create -f $file" >> setup.sh +done < ./elements.list + +tar czf /tmp/application.tgz * --exclude=*.list +base64 /tmp/application.tgz > ./application.tgz.b64 diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/getServiceIp.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/getServiceIp.sh new file mode 100644 index 0000000..2be4daf --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/getServiceIp.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +/opt/bin/kubectl get service $1 -t '{{.portalIP}}' -o template \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy-setup.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy-setup.sh new file mode 100644 index 0000000..4dc37d4 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy-setup.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# $1 - MASTER_IP + +cp -f haproxy.toml /etc/confd/conf.d/ +cp -f haproxy.tmpl /etc/confd/templates/ + +/usr/local/bin/confd -onetime -backend etcd -node $1:4001 + +cp -f default_scripts/haproxy /etc/default/ + +sed -i.bkp "s/%%MASTER_NODE%%/$1/g" init_conf/confd.conf +cp -f init_conf/confd.conf /etc/init/ + +service confd start +service haproxy start + +sleep 1 \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.tmpl b/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.tmpl new file mode 100644 index 0000000..4813df1 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.tmpl @@ -0,0 +1,17 @@ +defaults + option redispatch + retries 5 + maxconn 2000 + contimeout 5000 + clitimeout 50000 + srvtimeout 50000 + +{{range $svc := ls "/registry/services/endpoints/default"}} +{{$se := printf "/registry/services/endpoints/default/%s" $svc }}{{$ss := printf "/registry/services/specs/default/%s" $svc }} +{{$seKey := get $se}}{{$ssKey := get $ss}}{{$seJson := json $seKey.Value}}{{$ssJson := json $ssKey.Value}} +listen {{base $svc}} 0.0.0.0:{{$ssJson.port}} + mode tcp + balance leastconn +{{range $index, $endpoint := $seJson.endpoints}} + server svr{{$index}} {{$endpoint}}{{end}} +{{end}} diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.toml b/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.toml new file mode 100644 index 0000000..510a69e --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.toml @@ -0,0 +1,7 @@ +[template] +src = "haproxy.tmpl" +dest = "/etc/haproxy/haproxy.cfg" +keys = [ + "/registry/services" +] +reload_cmd = "/usr/sbin/service haproxy reload" diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/confd.conf b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/confd.conf new file mode 100644 index 0000000..fb06b09 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/confd.conf @@ -0,0 +1,11 @@ +description "confd" + +respawn + +start on started etcd +stop on stopping etcd + +exec /usr/local/bin/confd -backend etcd -node %%MASTER_NODE%%:4001 -interval 15 + +start on runlevel [235] +stop on runlevel [016] \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/etcd.conf b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/etcd.conf new file mode 100644 index 0000000..6a808bd --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/etcd.conf @@ -0,0 +1,30 @@ +description "Etcd service" +author "@jainvipin" + +respawn + +pre-start script + # see also https://github.com/jainvipin/kubernetes-ubuntu-start + ETCD=/opt/bin/$UPSTART_JOB + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + if [ -f $ETCD ]; then + exit 0 + fi + echo "$ETCD binary not found, exiting" + exit 22 +end script + +script + # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) + ETCD=/opt/bin/$UPSTART_JOB + ETCD_OPTS="" + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + exec "$ETCD" $ETCD_OPTS +end script + +start on runlevel [235] +stop on runlevel [016] \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/flanneld.conf b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/flanneld.conf new file mode 100644 index 0000000..d84491a --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/flanneld.conf @@ -0,0 +1,32 @@ +description "Flannel service" +author "@chenxingyu" + +# respawn + +# start in conjunction with etcd +start on started etcd +stop on stopping etcd + +pre-start script + FLANNEL=/opt/bin/$UPSTART_JOB + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + if [ -f $FLANNEL ]; then + exit 0 + fi + exit 22 +end script + +script + # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) + FLANNEL=/opt/bin/$UPSTART_JOB + FLANNEL_OPTS="" + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + exec "$FLANNEL" $FLANNEL_OPTS +end script + +start on runlevel [235] +stop on runlevel [016] \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-apiserver.conf b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-apiserver.conf new file mode 100644 index 0000000..bf03e23 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-apiserver.conf @@ -0,0 +1,33 @@ +description "Kube-Apiserver service" +author "@jainvipin" + +# respawn + +# start in conjunction with etcd +start on started etcd +stop on stopping etcd + +pre-start script + # see also https://github.com/jainvipin/kubernetes-start + KUBE_APISERVER=/opt/bin/$UPSTART_JOB + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + if [ -f $KUBE_APISERVER ]; then + exit 0 + fi + exit 22 +end script + +script + # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) + KUBE_APISERVER=/opt/bin/$UPSTART_JOB + KUBE_APISERVER_OPTS="" + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + exec "$KUBE_APISERVER" $KUBE_APISERVER_OPTS +end script + +start on runlevel [235] +stop on runlevel [016] \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-controller-manager.conf b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-controller-manager.conf new file mode 100644 index 0000000..0ae9464 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-controller-manager.conf @@ -0,0 +1,33 @@ +description "Kube-Controller-Manager service" +author "@jainvipin" + +# respawn + +# start in conjunction with etcd +start on started etcd +stop on stopping etcd + +pre-start script + # see also https://github.com/jainvipin/kubernetes-ubuntu-start + KUBE_CONTROLLER_MANAGER=/opt/bin/$UPSTART_JOB + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + if [ -f $KUBE_CONTROLLER_MANAGER ]; then + exit 0 + fi + exit 22 +end script + +script + # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) + KUBE_CONTROLLER_MANAGER=/opt/bin/$UPSTART_JOB + KUBE_CONTROLLER_MANAGER_OPTS="" + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + exec "$KUBE_CONTROLLER_MANAGER" $KUBE_CONTROLLER_MANAGER_OPTS +end script + +start on runlevel [235] +stop on runlevel [016] \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-proxy.conf b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-proxy.conf new file mode 100644 index 0000000..fcc7762 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-proxy.conf @@ -0,0 +1,33 @@ +description "Kube-Proxy service" +author "@jainvipin" + +# respawn + +# start in conjunction with etcd +start on started etcd +stop on stopping etcd + +pre-start script + # see also https://github.com/jainvipin/kubernetes-start + KUBE_PROXY=/opt/bin/$UPSTART_JOB + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + if [ -f $KUBE_PROXY ]; then + exit 0 + fi + exit 22 +end script + +script + # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) + KUBE_PROXY=/opt/bin/$UPSTART_JOB + KUBE_PROXY_OPTS="" + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + exec "$KUBE_PROXY" $KUBE_PROXY_OPTS +end script + +start on runlevel [235] +stop on runlevel [016] \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-scheduler.conf b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-scheduler.conf new file mode 100644 index 0000000..32e0bba --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-scheduler.conf @@ -0,0 +1,33 @@ +description "Kube-Scheduler service" +author "@jainvipin" + +# respawn + +# start in conjunction with etcd +start on started etcd +stop on stopping etcd + +pre-start script + # see also https://github.com/jainvipin/kubernetes-start + KUBE_SCHEDULER=/opt/bin/$UPSTART_JOB + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + if [ -f $KUBE_SCHEDULER ]; then + exit 0 + fi + exit 22 +end script + +script + # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) + KUBE_SCHEDULER=/opt/bin/$UPSTART_JOB + KUBE_SCHEDULER_OPTS="" + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + exec "$KUBE_SCHEDULER" $KUBE_SCHEDULER_OPTS +end script + +start on runlevel [235] +stop on runlevel [016] \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kubelet.conf b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kubelet.conf new file mode 100644 index 0000000..a13807c --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kubelet.conf @@ -0,0 +1,33 @@ +description "Kubelet service" +author "@jainvipin" + +# respawn + +# start in conjunction with etcd +start on started etcd +stop on stopping etcd + +pre-start script + # see also https://github.com/jainvipin/kubernetes-ubuntu-start + KUBELET=/opt/bin/$UPSTART_JOB + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + if [ -f $KUBELET ]; then + exit 0 + fi + exit 22 +end script + +script + # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) + KUBELET=/opt/bin/$UPSTART_JOB + KUBELET_OPTS="" + if [ -f /etc/default/$UPSTART_JOB ]; then + . /etc/default/$UPSTART_JOB + fi + exec "$KUBELET" $KUBELET_OPTS +end script + +start on runlevel [235] +stop on runlevel [016] \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/etcd b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/etcd new file mode 100644 index 0000000..65bc898 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/etcd @@ -0,0 +1,100 @@ +#!/bin/sh +set -e + +### BEGIN INIT INFO +# Provides: etcd +# Required-Start: $docker +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: +# Short-Description: Start distributed key/value pair service +# Description: +# http://www.github.com/coreos/etcd +### END INIT INFO + +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/bin: + +BASE=$(basename $0) + +# modify these in /etc/default/$BASE (/etc/default/etcd) +ETCD=/opt/bin/$BASE +# This is the pid file managed by etcd itself +ETCD_PIDFILE=/var/run/$BASE.pid +ETCD_LOGFILE=/var/log/$BASE.log +ETCD_OPTS="" +ETCD_DESC="Etcd" + +# Get lsb functions +. /lib/lsb/init-functions + +if [ -f /etc/default/$BASE ]; then + . /etc/default/$BASE +fi + +# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it) +if false && [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then + log_failure_msg "$ETCD_DESC is managed via upstart, try using service $BASE $1" + exit 1 +fi + +# Check etcd is present +if [ ! -x $ETCD ]; then + log_failure_msg "$ETCD not present or not executable" + exit 1 +fi + +fail_unless_root() { + if [ "$(id -u)" != '0' ]; then + log_failure_msg "$ETCD_DESC must be run as root" + exit 1 + fi +} + +ETCD_START="start-stop-daemon \ +--start \ +--background \ +--quiet \ +--exec $ETCD \ +--make-pidfile \ +--pidfile $ETCD_PIDFILE \ +-- $ETCD_OPTS \ +>> $ETCD_LOGFILE 2>&1" + +ETCD_STOP="start-stop-daemon \ +--stop \ +--pidfile $ETCD_PIDFILE" + +case "$1" in + start) + fail_unless_root + log_begin_msg "Starting $ETCD_DESC: $BASE" + $ETCD_START + log_end_msg $? + ;; + + stop) + fail_unless_root + log_begin_msg "Stopping $ETCD_DESC: $BASE" + $ETCD_STOP + log_end_msg $? + ;; + + restart | force-reload) + fail_unless_root + log_begin_msg "Restarting $ETCD_DESC: $BASE" + $ETCD_STOP + $ETCD_START + log_end_msg $? + ;; + + status) + status_of_proc -p "$ETCD_PIDFILE" "$ETCD" "$ETCD_DESC" + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/flanneld b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/flanneld new file mode 100644 index 0000000..d741488 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/flanneld @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +### BEGIN INIT INFO +# Provides: flannel +# Required-Start: $etcd +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: +# Short-Description: Start flannel networking service +# Description: +# https://github.com/coreos/flannel +### END INIT INFO + +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/bin: + +BASE=$(basename $0) + +# modify these in /etc/default/$BASE (/etc/default/flannel) +FLANNEL=/opt/bin/$BASE +# This is the pid file managed by kube-apiserver itself +FLANNEL_PIDFILE=/var/run/$BASE.pid +FLANNEL_LOGFILE=/var/log/$BASE.log +FLANNEL_OPTS="" +FLANNEL_DESC="Flannel" + +# Get lsb functions +. /lib/lsb/init-functions + +if [ -f /etc/default/$BASE ]; then + . /etc/default/$BASE +fi + +# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it) +if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then + log_failure_msg "$FLANNEL_DESC is managed via upstart, try using service $BASE $1" + exit 1 +fi + +# Check flanneld is present +if [ ! -x $FLANNEL ]; then + log_failure_msg "$FLANNEL is not present or not executable" + exit 1 +fi + +fail_unless_root() { + if [ "$(id -u)" != '0' ]; then + log_failure_msg "$FLANNEL_DESC must be run as root" + exit 1 + fi +} + +FLANNEL_START="start-stop-daemon \ + --start \ + --background \ + --quiet \ + --exec $FLANNEL \ + --make-pidfile --pidfile $FLANNEL_PIDFILE \ + -- $FLANNEL_OPTS \ + >> $FLANNEL_LOGFILE 2>&1" + +FLANNEL_STOP="start-stop-daemon \ + --stop \ + --pidfile $FLANNEL_PIDFILE" + +case "$1" in + start) + fail_unless_root + log_begin_msg "Starting $FLANNEL_DESC: $BASE" + $KUBE_APISERVER_START + log_end_msg $? + ;; + + stop) + fail_unless_root + log_begin_msg "Stopping $FLANNEL_DESC: $BASE" + $KUBE_APISERVER_STOP + log_end_msg $? + ;; + + restart | force-reload) + fail_unless_root + log_begin_msg "Stopping $FLANNEL_DESC: $BASE" + $KUBE_APISERVER_STOP + $KUBE_APISERVER_START + log_end_msg $? + ;; + + status) + status_of_proc -p "$FLANNEL_DESC" "$FLANNEL" "$FLANNEL_DESC" + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-apiserver b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-apiserver new file mode 100644 index 0000000..77709f6 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-apiserver @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +### BEGIN INIT INFO +# Provides: kube-apiserver +# Required-Start: $etcd +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: +# Short-Description: Start distrubted key/value pair service +# Description: +# http://www.github.com/GoogleCloudPlatform/Kubernetes +### END INIT INFO + +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/bin: + +BASE=$(basename $0) + +# modify these in /etc/default/$BASE (/etc/default/kube-apiserver) +KUBE_APISERVER=/opt/bin/$BASE +# This is the pid file managed by kube-apiserver itself +KUBE_APISERVER_PIDFILE=/var/run/$BASE.pid +KUBE_APISERVER_LOGFILE=/var/log/$BASE.log +KUBE_APISERVER_OPTS="" +KUBE_APISERVER_DESC="Kube-Apiserver" + +# Get lsb functions +. /lib/lsb/init-functions + +if [ -f /etc/default/$BASE ]; then + . /etc/default/$BASE +fi + +# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it) +if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then + log_failure_msg "$KUBE_APISERVER_DESC is managed via upstart, try using service $BASE $1" + exit 1 +fi + +# Check kube-apiserver is present +if [ ! -x $KUBE_APISERVER ]; then + log_failure_msg "$KUBE_APISERVER not present or not executable" + exit 1 +fi + +fail_unless_root() { + if [ "$(id -u)" != '0' ]; then + log_failure_msg "$KUBE_APISERVER_DESC must be run as root" + exit 1 + fi +} + +KUBE_APISERVER_START="start-stop-daemon \ + --start \ + --background \ + --quiet \ + --exec $KUBE_APISERVER \ + --make-pidfile --pidfile $KUBE_APISERVER_PIDFILE \ + -- $KUBE_APISERVER_OPTS \ + >> $KUBE_APISERVER_LOGFILE 2>&1" + +KUBE_APISERVER_STOP="start-stop-daemon \ + --stop \ + --pidfile $KUBE_APISERVER_PIDFILE" + +case "$1" in + start) + fail_unless_root + log_begin_msg "Starting $KUBE_APISERVER_DESC: $BASE" + $KUBE_APISERVER_START + log_end_msg $? + ;; + + stop) + fail_unless_root + log_begin_msg "Stopping $KUBE_APISERVER_DESC: $BASE" + $KUBE_APISERVER_STOP + log_end_msg $? + ;; + + restart | force-reload) + fail_unless_root + log_begin_msg "Stopping $KUBE_APISERVER_DESC: $BASE" + $KUBE_APISERVER_STOP + $KUBE_APISERVER_START + log_end_msg $? + ;; + + status) + status_of_proc -p "$KUBE_APISERVER_PIDFILE" "$KUBE_APISERVER" "$KUBE_APISERVER_DESC" + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-controller-manager b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-controller-manager new file mode 100644 index 0000000..1eb467d --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-controller-manager @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +### BEGIN INIT INFO +# Provides: kube-controller-manager +# Required-Start: $etcd +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: +# Short-Description: Start distrubted key/value pair service +# Description: +# http://www.github.com/GoogleCloudPlatform/Kubernetes +### END INIT INFO + +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/bin: + +BASE=$(basename $0) + +# modify these in /etc/default/$BASE (/etc/default/kube-controller-manager) +KUBE_CONTROLLER_MANAGER=/opt/bin/$BASE +# This is the pid file managed by kube-controller-manager itself +KUBE_CONTROLLER_MANAGER_PIDFILE=/var/run/$BASE.pid +KUBE_CONTROLLER_MANAGER_LOGFILE=/var/log/$BASE.log +KUBE_CONTROLLER_MANAGER_OPTS="" +KUBE_CONTROLLER_MANAGER_DESC="Kube-Controller-Manager" + +# Get lsb functions +. /lib/lsb/init-functions + +if [ -f /etc/default/$BASE ]; then + . /etc/default/$BASE +fi + +# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it) +if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then + log_failure_msg "$KUBE_CONTROLLER_MANAGER_DESC is managed via upstart, try using service $BASE $1" + exit 1 +fi + +# Check kube-controller-manager is present +if [ ! -x $KUBE_CONTROLLER_MANAGER ]; then + log_failure_msg "$KUBE_CONTROLLER_MANAGER not present or not executable" + exit 1 +fi + +fail_unless_root() { + if [ "$(id -u)" != '0' ]; then + log_failure_msg "$KUBE_CONTROLLER_MANAGER_DESC must be run as root" + exit 1 + fi +} + +KUBE_CONTROLLER_MANAGER_START="start-stop-daemon + --start --background \ + --quiet \ + --exec $KUBE_CONTROLLER_MANAGER \ + --make-pidfile \ + --pidfile $KUBE_CONTROLLER_MANAGER_PIDFILE \ + -- $KUBE_CONTROLLER_MANAGER_OPTS \ + >> "$KUBE_CONTROLLER_MANAGER_LOGFILE" 2>&1 + +KUBE_CONTROLLER_MANAGER_STOP="start-stop-daemon \ + --stop \ + --pidfile $KUBE_CONTROLLER_MANAGER_PIDFILE" + +case "$1" in + start) + fail_unless_root + log_begin_msg "Starting $KUBE_CONTROLLER_MANAGER_DESC: $BASE" + $KUBE_CONTROLLER_MANAGER_START + log_end_msg $? + ;; + + stop) + fail_unless_root + log_begin_msg "Stopping $KUBE_CONTROLLER_MANAGER_DESC: $BASE" + $KUBE_CONTROLLER_MANAGER_STOP + log_end_msg $? + ;; + + restart | force-reload) + fail_unless_root + log_daemon_message "Restarting $KUBE_CONTROLLER_MANAGER" || true + $KUBE_CONTROLLER_MANAGER_STOP + $KUBE_CONTROLLER_MANAGER_START + log_end_msg $? + ;; + + status) + status_of_proc -p "$KUBE_CONTROLLER_MANAGER_PIDFILE" "$KUBE_CONTROLLER_MANAGER" "$KUBE_CONTROLLER_MANAGER_DESC" + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-proxy b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-proxy new file mode 100644 index 0000000..8dbb620 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-proxy @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +### BEGIN INIT INFO +# Provides: kube-proxy +# Required-Start: $etcd +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: +# Short-Description: Start kube-proxy service +# Description: +# http://www.github.com/GoogleCloudPlatform/Kubernetes +### END INIT INFO + +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/bin: + +BASE=$(basename $0) + +# modify these in /etc/default/$BASE (/etc/default/kube-proxy) +KUBE_PROXY=/opt/bin/$BASE +# This is the pid file managed by kube-proxy itself +KUBE_PROXY_PIDFILE=/var/run/$BASE.pid +KUBE_PROXY_LOGFILE=/var/log/$BASE.log +KUBE_PROXY_OPTS="" +KUBE_PROXY_DESC="Kube-Proxy" + +# Get lsb functions +. /lib/lsb/init-functions + +if [ -f /etc/default/$BASE ]; then + . /etc/default/$BASE +fi + +# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it) +if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then + log_failure_msg "$KUBE_PROXY_DESC is managed via upstart, try using service $BASE $1" + exit 1 +fi + +# Check kube-proxy is present +if [ ! -x $KUBE_PROXY ]; then + log_failure_msg "$KUBE_PROXY not present or not executable" + exit 1 +fi + +fail_unless_root() { + if [ "$(id -u)" != '0' ]; then + log_failure_msg "$KUBE_PROXY_DESC must be run as root" + exit 1 + fi +} + +KUBE_PROXY_START="start-stop-daemon \ + --start \ + --background \ + --quiet \ + --exec $KUBE_PROXY \ + --make-pidfile --pidfile $KUBE_PROXY_PIDFILE \ + -- $KUBE_PROXY_OPTS \ + >> $KUBE_PROXY_LOGFILE 2>&1" + +KUBE_PROXY_STOP="start-stop-daemon \ + --stop \ + --pidfile $KUBE_PROXY_PIDFILE" + +case "$1" in + start) + fail_unless_root + log_begin_msg "Starting $KUBE_PROXY_DESC: $BASE" + $KUBE_PROXY_START + log_end_msg $? + ;; + + stop) + fail_unless_root + log_begin_msg "Stopping $KUBE_PROXY_DESC: $BASE" + $KUBE_PROXY_STOP + log_end_msg $? + ;; + + restart | force-reload) + fail_unless_root + log_begin_msg "Stopping $KUBE_PROXY_DESC: $BASE" + $KUBE_PROXY_STOP + $KUBE_PROXY_START + log_end_msg $? + ;; + + status) + status_of_proc -p "$KUBE_PROXY_PIDFILE" "$KUBE_PROXY" "$KUBE_PROXY_DESC" + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-scheduler b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-scheduler new file mode 100644 index 0000000..7e9ba6f --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-scheduler @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +### BEGIN INIT INFO +# Provides: kube-scheduler +# Required-Start: $etcd +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: +# Short-Description: Start kube-proxy service +# Description: +# http://www.github.com/GoogleCloudPlatform/Kubernetes +### END INIT INFO + +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/bin: + +BASE=$(basename $0) + +# modify these in /etc/default/$BASE (/etc/default/kube-scheduler) +KUBE_SCHEDULER=/opt/bin/$BASE +# This is the pid file managed by kube-scheduler itself +KUBE_SCHEDULER_PIDFILE=/var/run/$BASE.pid +KUBE_SCHEDULER_LOGFILE=/var/log/$BASE.log +KUBE_SCHEDULER_OPTS="" +KUBE_SCHEDULER_DESC="Kube-Scheduler" + +# Get lsb functions +. /lib/lsb/init-functions + +if [ -f /etc/default/$BASE ]; then + . /etc/default/$BASE +fi + +# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it) +if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then + log_failure_msg "$KUBE_SCHEDULER_DESC is managed via upstart, try using service $BASE $1" + exit 1 +fi + +# Check kube-scheduler is present +if [ ! -x $KUBE_SCHEDULER ]; then + log_failure_msg "$KUBE_SCHEDULER not present or not executable" + exit 1 +fi + +fail_unless_root() { + if [ "$(id -u)" != '0' ]; then + log_failure_msg "$KUBE_SCHEDULER_DESC must be run as root" + exit 1 + fi +} + +KUBE_SCHEDULER_START="start-stop-daemon \ + --start \ + --background \ + --quiet \ + --exec $KUBE_SCHEDULER \ + --make-pidfile --pidfile $KUBE_SCHEDULER_PIDFILE \ + -- $KUBE_SCHEDULER_OPTS \ + >> $KUBE_SCHEDULER_LOGFILE 2>&1" + +KUBE_SCHEDULER_STOP="start-stop-daemon \ + --stop \ + --pidfile $KUBE_SCHEDULER_PIDFILE" + +case "$1" in + start) + fail_unless_root + log_begin_msg "Starting $KUBE_SCHEDULER_DESC: $BASE" + $KUBE_SCHEDULER_START + log_end_msg $? + ;; + + stop) + fail_unless_root + log_begin_msg "Stopping $KUBE_SCHEDULER_DESC: $BASE" + $KUBE_SCHEDULER_STOP + log_end_msg $? + ;; + + restart | force-reload) + fail_unless_root + log_begin_msg "Restarting $KUBE_SCHEDULER_DESC: $BASE" + $KUBE_SCHEDULER_STOP + $KUBE_SCHEDULER_START + log_end_msg $? + ;; + + status) + status_of_proc -p "$KUBE_SCHEDULER_PIDFILE" "$KUBE_SCHEDULER" "$KUBE_SCHEDULER_DESC" + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kubelet b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kubelet new file mode 100644 index 0000000..47e016c --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kubelet @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +### BEGIN INIT INFO +# Provides: kubelet +# Required-Start: $etcd +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: +# Short-Description: Start kubelet service +# Description: +# http://www.github.com/GoogleCloudPlatform/Kubernetes +### END INIT INFO + +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/bin: + +BASE=$(basename $0) + +# modify these in /etc/default/$BASE (/etc/default/kube-apiserver) +KUBELET=/opt/bin/$BASE +# This is the pid file managed by kube-apiserver itself +KUBELET_PIDFILE=/var/run/$BASE.pid +KUBELET_LOGFILE=/var/log/$BASE.log +KUBELET_OPTS="" +KUBELET_DESC="Kube-Apiserver" + +# Get lsb functions +. /lib/lsb/init-functions + +if [ -f /etc/default/$BASE ]; then + . /etc/default/$BASE +fi + +# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it) +if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then + log_failure_msg "$KUBELET_DESC is managed via upstart, try using service $BASE $1" + exit 1 +fi + +# Check kube-apiserver is present +if [ ! -x $KUBELET ]; then + log_failure_msg "$KUBELET not present or not executable" + exit 1 +fi + +fail_unless_root() { + if [ "$(id -u)" != '0' ]; then + log_failure_msg "$KUBELET_DESC must be run as root" + exit 1 + fi +} + +KUBELET_START="start-stop-daemon \ + --start \ + --background \ + --quiet \ + --exec $KUBELET \ + --make-pidfile --pidfile $KUBELET_PIDFILE \ + -- $KUBELET_OPTS \ + >> $KUBELET_LOGFILE 2>&1" + +KUBELET_STOP="start-stop-daemon \ + --stop \ + --pidfile $KUBELET_PIDFILE" + +case "$1" in + start) + fail_unless_root + log_begin_msg "Starting $KUBELET_DESC: $BASE" + $KUBELET_START + log_end_msg $? + ;; + + stop) + fail_unless_root + log_begin_msg "Stopping $KUBELET_DESC: $BASE" + $KUBELET_STOP + log_end_msg $? + ;; + + restart | force-reload) + fail_unless_root + log_begin_msg "Stopping $KUBELET_DESC: $BASE" + $KUBELET_STOP + $KUBELET_START + log_end_msg $? + ;; + + status) + status_of_proc -p "$KUBELET_PIDFILE" "$KUBELET" "$KUBELET_DESC" + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/kube-add-node.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/kube-add-node.sh new file mode 100644 index 0000000..6925867 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/kube-add-node.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# $1 - NAME +# $2 - IP +# + +sed -i.bkp "s/%%NAME%%/$1/g" minion-node.json +sed -i.bkp "s/%%IP%%/$2/g" minion-node.json + +/opt/bin/kubectl create -f minion-node.json diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/master-add-member.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/master-add-member.sh new file mode 100644 index 0000000..06e1de5 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/master-add-member.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# $1 - NAME +# $2 - IP +count=5 +done=false + +while [ $count -gt 0 ] && [ "$done" != "true" ] +do + /opt/bin/etcdctl member add $1 http://$2:7001 > /tmp/out && done="true" + ((count-- )) + sleep 2 +done +cat /tmp/out | grep ETCD_INITIAL_CLUSTER | grep -n 1 | cut -f 2 -d'"' \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/master-etcd-setup.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/master-etcd-setup.sh new file mode 100644 index 0000000..7ad4bea --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/master-etcd-setup.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# $1 - NAME +# $2 - IP +# +service etcd stop +mkdir /var/lib/etcd + +sed -i.bkp "s/%%NAME%%/$1/g" default_scripts/etcd-master +sed -i.bkp "s/%%IP%%/$2/g" default_scripts/etcd-master + +cp -f default_scripts/etcd-master /etc/default/etcd +cp init_conf/etcd.conf /etc/init/ + +chmod +x initd_scripts/* +cp initd_scripts/etcd /etc/init.d/ +service etcd start +sleep 5 \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh new file mode 100644 index 0000000..5322317 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# $1 - NAME +# $2 - IP + +service kube-proxy stop +service kube-scheduler stop +service kube-controller-manager stop +service kubelet stop +service kube-apiserver stop + +#Disable controller-manager for now +#chmod -x /etc/init.d/kube-controller-manager + +#Create log folder for Kubernetes services +mkdir /var/log/kubernetes +mkdir -p /var/run/murano-kubernetes + +sed -i.bkp "s/%%MASTER_IP%%/$2/g" default_scripts/kube-scheduler +sed -i.bkp "s/%%IP%%/$2/g" default_scripts/kube-scheduler + +cp -f default_scripts/kube-apiserver /etc/default/ +cp -f default_scripts/kube-scheduler /etc/default/ +cp -f default_scripts/kube-controller-manager /etc/default/ + +cp init_conf/kube-apiserver.conf /etc/init/ +cp init_conf/kube-controller-manager.conf /etc/init/ +cp init_conf/kube-scheduler.conf /etc/init/ + +chmod +x initd_scripts/* +cp initd_scripts/kube-apiserver /etc/init.d/ +cp initd_scripts/kube-controller-manager /etc/init.d/ +cp initd_scripts/kube-scheduler /etc/init.d/ + +service kube-apiserver start +service kube-scheduler start +service kube-controller-manager start + +/opt/bin/kubectl delete node 127.0.0.1 + +sleep 1 \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/member-etcd-setup.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/member-etcd-setup.sh new file mode 100644 index 0000000..5a29b96 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/member-etcd-setup.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# $1 - NAME +# $2 - IP +# $3 - ETCD_INITIAL_CLUSTER + +service etcd stop + +mkdir /var/lib/etcd +sed -i.bkp "s/%%NAME%%/$1/g" default_scripts/etcd-member +sed -i.bkp "s/%%IP%%/$2/g" default_scripts/etcd-member +sed -i.bkp "s#%%CLUSTER_CONFIG%%#$3#g" default_scripts/etcd-member + +cp -f default_scripts/etcd-member /etc/default/etcd +cp init_conf/etcd.conf /etc/init/ +chmod +x initd_scripts/etcd +cp initd_scripts/etcd /etc/init.d/ + +service etcd start + +sleep 10 \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-kube-setup.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-kube-setup.sh new file mode 100644 index 0000000..e09af20 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-kube-setup.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# $1 - NAME +# $2 - IP +# $3 - MASTER_IP +# $4 - IS_CA_ENABLED + +mkdir /var/log/kubernetes +mkdir -p /var/run/murano-kubernetes + +sed -i.bkp "s/%%MASTER_IP%%/$3/g" default_scripts/kube-proxy +sed -i.bkp "s/%%MASTER_IP%%/$3/g" default_scripts/kubelet +sed -i.bkp "s/%%IP%%/$2/g" default_scripts/kubelet + +cp init_conf/kubelet.conf /etc/init/ +cp init_conf/kube-proxy.conf /etc/init/ + +chmod +x initd_scripts/* +cp initd_scripts/kubelet /etc/init.d/ +cp initd_scripts/kube-proxy /etc/init.d/ + +cp -f default_scripts/kube-proxy /etc/default +cp -f default_scripts/kubelet /etc/default/ + +if [ "$4" == "True" ]; then + #Create directory for manifests used by kubelet + mkdir /etc/kubernetes + mkdir /etc/kubernetes/manifests + cp -f cadvisor.manifest /etc/kubernetes/manifests + #Add path to kubelet parameters + sed -i 's/kubernetes"/kubernetes \\/g' /etc/default/kubelet + sed -i '/--log_dir*/a --config=/etc/kubernetes/manifests"' /etc/default/kubelet +fi + +service kubelet start +service kube-proxy start + +sleep 1 \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-node.json b/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-node.json new file mode 100644 index 0000000..1f8fce9 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-node.json @@ -0,0 +1,14 @@ +{ + "id": "%%IP%%", + "kind": "Minion", + "apiVersion": "v1beta1", + "resources": { + "capacity": { + "cpu": 200, + "memory": 4145438720 + } + }, + "labels": { + "name": "%%NAME%%" + } +} \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/removeMinion.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/removeMinion.sh new file mode 100644 index 0000000..9e6db2f --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/removeMinion.sh @@ -0,0 +1,3 @@ +#!/bin/bash +echo "Deleting a Minion" >> /tmp/murano-kube.log +/opt/bin/kubectl delete node $1 >> /tmp/murano-kube.log diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerRegistry.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerRegistry.sh new file mode 100644 index 0000000..bde5b5e --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerRegistry.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +source /etc/default/docker +DOCKER_OPTS+=" --registry-mirror=$1" +echo DOCKER_OPTS=\"$DOCKER_OPTS\" > /etc/default/docker + +service docker restart \ No newline at end of file diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelMaster.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelMaster.sh new file mode 100644 index 0000000..ed0ee50 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelMaster.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +/opt/bin/etcdctl mk /coreos.com/network/config '{"Network":"10.200.0.0/16"}' diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelNode.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelNode.sh new file mode 100644 index 0000000..5df9170 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelNode.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +cp init_conf/flanneld.conf /etc/init/ +chmod +x initd_scripts/flanneld +cp initd_scripts/flanneld /etc/init.d/ +cp default_scripts/flanneld /etc/default/ + + +service flanneld start + +source /run/flannel/subnet.env 2> /dev/null +while [ -z "$FLANNEL_SUBNET" ] +do + sleep 1 + source /run/flannel/subnet.env 2> /dev/null +done + + +ip link set dev docker0 down +brctl delbr docker0 + +echo DOCKER_OPTS=\"-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock --bip=${FLANNEL_SUBNET} --mtu=${FLANNEL_MTU}\" > /etc/default/docker + +echo post-up iptables -t nat -A POSTROUTING -s 10.200.0.0/16 ! -d 10.200.0.0/16 -j MASQUERADE >> /etc/network/interfaces.d/eth0.cfg +iptables -t nat -A POSTROUTING -s 10.200.0.0/16 ! -d 10.200.0.0/16 -j MASQUERADE + +service docker restart + diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/updatePod.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/updatePod.sh new file mode 100644 index 0000000..c4b855e --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/updatePod.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# File with pod is /tmp/pod.json +# $1 new or update +DEFINITION_DIR=/var/run/murano-kubernetes +mkdir -p $DEFINITION_DIR + +podId=$2 +kind=$3 +fileName=$4 +echo "$podId $kind $fileName" >> $DEFINITION_DIR/elements.list + +if [ "$1" == "True" ]; then + #new Pod + echo "Creating a new Pod" >> /tmp/murano-kube.log + /opt/bin/kubectl create -f $fileName >> /tmp/murano-kube.log +else + echo "Updating a Pod" >> /tmp/murano-kube.log + /opt/bin/kubectl update -f $fileName >> /tmp/murano-kube.log +fi diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/updateReplicationController.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/updateReplicationController.sh new file mode 100644 index 0000000..cff32c7 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/updateReplicationController.sh @@ -0,0 +1,8 @@ +#!/bin/bash +if [ "$1" == "True" ]; then + echo "Creating a new Replication Controller" >> /tmp/murano-kube.log + /opt/bin/kubectl create -f /tmp/controller.json >> /tmp/murano-kube.log +else + echo "Updating a Replication Controller" >> /tmp/murano-kube.log + /opt/bin/kubectl update -f /tmp/controller.json >> /tmp/murano-kube.log +fi diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/updateService.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/updateService.sh new file mode 100644 index 0000000..5361ddd --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/updateService.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# File with service is /tmp/service.json +# $1 new or update +DEFINITION_DIR=/var/run/murano-kubernetes +mkdir -p $DEFINITION_DIR +serviceId=$2 +kind=$3 +fileName=$4 + +echo "$serviceId $kind $fileName" >> $DEFINITION_DIR/elements.list + +if [ "$1" == "True" ]; then + echo "Creating a new Service" >> /tmp/murano-kube.log + /opt/bin/kubectl create -f $fileName >> /tmp/murano-kube.log +else + echo "Updating a Service" >> /tmp/murano-kube.log + /opt/bin/kubectl update -f $fileName >> /tmp/murano-kube.log +fi diff --git a/Kubernetes/KubernetesCluster/package/UI/ui.yaml b/Kubernetes/KubernetesCluster/package/UI/ui.yaml new file mode 100644 index 0000000..5acb4f4 --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/UI/ui.yaml @@ -0,0 +1,171 @@ +Version: 2 +Templates: + masterNode: + ?: + type: io.murano.apps.docker.kubernetes.KubernetesMasterNode + instance: + ?: + type: io.murano.resources.LinuxMuranoInstance + name: generateHostname($.appConfiguration.unitNamingPattern, 1) + flavor: $.instanceConfiguration.flavor + image: 'ubuntu14.04-x64-kubernetes' + assignFloatingIp: $.appConfiguration.assignFloatingIP + keyname: $.instanceConfiguration.keyPair + availabilityZone: $.instanceConfiguration.availabilityZone + + minionNode: + ?: + type: io.murano.apps.docker.kubernetes.KubernetesMinionNode + instance: + ?: + type: io.murano.resources.LinuxMuranoInstance + name: generateHostname($.appConfiguration.unitNamingPattern, $index + 1) + flavor: $.instanceConfiguration.flavor + image: 'ubuntu14.04-x64-kubernetes' + assignFloatingIp: $.appConfiguration.assignFloatingIP + keyname: $.instanceConfiguration.keyPair + enableMonitoring: $.appConfiguration.enableMonitoring + + + gatewayNode: + ?: + type: io.murano.apps.docker.kubernetes.KubernetesGatewayNode + instance: + ?: + type: io.murano.resources.LinuxMuranoInstance + name: generateHostname($.appConfiguration.gatewayNamingPattern, $index) + flavor: $.instanceConfiguration.flavor + image: 'ubuntu14.04-x64-kubernetes' + assignFloatingIp: $.appConfiguration.assignGatewayFloatingIP + keyname: $.instanceConfiguration.keyPair + +Application: + ?: + type: io.murano.apps.docker.kubernetes.KubernetesCluster + name: $.appConfiguration.name + masterNode: $masterNode + minionNodes: repeat($minionNode, $.appConfiguration.maxMinionCount) + nodeCount: $.appConfiguration.minionCount + gatewayCount: $.appConfiguration.gatewayCount + gatewayNodes: repeat($gatewayNode, $.appConfiguration.maxGatewayCount) + dockerRegistry: $.appConfiguration.dockerRegistry + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Cluster Name + initial: KubernetesCluster + description: >- + Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and + underline are allowed + - name: minionCount + type: integer + label: Initial/current number of minions + initial: 2 + minValue: 1 + required: true + description: >- + Select number of minions + - name: maxMinionCount + type: integer + label: Maximum number of minions + initial: 3 + required: true + minValue: 1 + description: >- + Select maximum number of minions + - name: assignFloatingIP + type: boolean + initial: true + label: Assign floating IP to Kubernetes nodes + description: >- + Check to assign floating IP to Kubernetes nodes + required: false + - name: unitNamingPattern + type: string + initial: 'kube-#' + helpText: \'#\' expands to machine sequence number + required: false + description: >- + For your convenience instance hostname can be specified. + Enter a name or leave blank for random name generation. + regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$' + label: Kubernetes node hostname pattern + - name: enableMonitoring + type: boolean + initial: true + required: false + label: Enable cAdvisor monitoring + description: >- + Enable cAdvisor monitoring + - name: gatewayCount + type: integer + label: Initial/current number of gateway nodes + initial: 1 + minValue: 0 + required: true + description: >- + External traffic will be routed through gateway nodes. + Increasing gateways count allows to set up complex and HA clusters. + - name: maxGatewayCount + type: integer + label: Maximum number of gateway nodes + initial: 2 + required: true + minValue: 0 + description: >- + Maximum number of gateway nodes. + Taken into account when performing scalability actions. + - name: assignGatewayFloatingIP + type: boolean + initial: true + label: Assign floating IP to gateway nodes + description: >- + Check to assign floating IP to gateway nodes + required: false + - name: gatewayNamingPattern + type: string + initial: gateway-# + required: false + regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$' + label: Gateway hostname pattern + helpText: \'#\' expands to gateway sequence number + description: >- + Check to assign floating IP to gateway nodes + - name: dockerRegistry + type: string + label: Custom Docker registry URL + description: >- + URL of docker repository mirror to use. + Leave empty to use Docker default. + required: false + + - instanceConfiguration: + fields: + - name: title + type: string + required: false + hidden: true + description: Specify some instance parameters on which application would be created. + - name: flavor + type: flavor + label: Instance flavor + description: >- + Select one of the existing flavors. Consider that application performance + depends on this parameter. + required: false + - name: keyPair + type: keypair + label: Key Pair + description: >- + Select the Key Pair to control access to instances. You can login to + instances using this KeyPair after the deployment. + required: false + - name: availabilityZone + type: azone + label: Availability zone + description: Select an availability zone where the application would be installed. + required: false diff --git a/Kubernetes/KubernetesCluster/package/images.lst b/Kubernetes/KubernetesCluster/package/images.lst new file mode 100644 index 0000000..b3f093f --- /dev/null +++ b/Kubernetes/KubernetesCluster/package/images.lst @@ -0,0 +1,9 @@ +Images: +- Name: 'ubuntu14.04-x64-kubernetes' + Hash: '99d8b54136369f93eabec911a3bbea11' + Meta: + title: 'ubuntu14.04-x64-kubernetes' + type: 'linux' + DiskFormat: 'qcow2' + ContainerFormat: 'bare' + Url: 'http://murano-files.mirantis.com/ubuntu14.04-x64-kubernetes.qcow2' diff --git a/Kubernetes/KubernetesCluster/package/logo.png b/Kubernetes/KubernetesCluster/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..bf09f0df5a73d20b61642f44e607adae06c386fd GIT binary patch literal 8767 zcmbVyWmsIxvi9IEL4yQlkl?OEaCZ;x!{8R&EkJN5xCaQq-8HyF0t3MrEP(_F8uXjJ z&)Mg@KhAT1-1R(5x>wa()zwwqtE*Rxrn&+iHYGLy0KijHl+{Mujs7|@(GgeSk5b5p z8-=Hwfv1kEji-;LI}{*g?P>)DDmh!)Lbaim)_!lsp`ri)im$z{fv16*stCl@nbYzw z8cttlHv~5TAS&VOW(jeGdIGJWw)QS!bSGVXbU=G+F*{qcou{Xp2p5-+j}NC0AE&FkEf)_M4CdnI<>KY#Ku~aa__=sm`f|8<(Eo!V z3-y4w+q-$%ySf1XLbSAU_3{*>LumT1COEsPsr?7o#pBb5PO`2L zFK4KWr;@A~9pVkAwY{~70KX+4gwM)`Lzqv9kAt5d!p$KJg<5ieZFsDOgn2E&0ual8 zaQ+)Vue2bqu(Z64G@mpN504zbl&pZ1oS={tSYAqAmPb(TA6_LF4^K-M2=pJ>_6XVk z=9T_mc|~O0p_ZPm?z*n7PXBm;rk$&&tB0Md8&F2(?_LKot64(qUH+Vk+NcSNxGdG9&`05qmbvQoOf z-;PZ&e08BqkL6Hh-tVFOGHDw!iYdUx=ulu$bu?z&1s!UA{ZZYoUrq0yGC9>^v5`Bg z8?iAblYojDtiYbOIUS~P>)VhG*M0T!wefUS;IGHcb6LL6Q$5!KCx2%AW&>t?=o?m? zj-M3v2>u)thRnFTyMNjpHe@H$)7BpR>L8$^q*VE(0Wx}JRMU#|kTzw&atLKZfaImpeX?S{iX5?zXYE7%i z<`CZIv@;abgSAB~8Yb#LZkKy*TI{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P0~*|)`+!{d8SpQG?_0xk}D@ayJTqqZ=E+DbGI zrGFA&O&rax7Fyv?2>6@fYX}3F!$B_S{nC8&jhr7Hh#J+|z)I~XYpAlp+a8L+r#(ip zC%pk}BDUo9{b95l@SLVbyNNV|6H*Q zlXrJ^xczvKs+^(Iy6htXQ1f@MWUsF7yb;BUe9HlbRi2oW1s6$}8)|oeb~3!?ev*aCG%D&MJ_z{J1dJ#=0*> zg5%x99vg9;u<9O)@uM+-Gpj{#FIBlvcjR#MZoLt*9?Fw7zFtJKDQP@M0&`yk+3JNA zJtwDnug}Rw$g}13Q_7x+x~YlnmNv<@Ny8V_$a?5C(l4~YNyCi>KPjkZAmwT3tn^y} zn4vf?hhBBnBK8xSGCsP@c6W<`i)RNeIX9nGbz?tWj}9PX z1uKTmse(Op^S)&2oKgvdJl?An)4)`c@S(@c4RC|iR_B)8Iz9`5<=;^pE@YQHwz0v`T>`8KUZjBwgV|Ka3K@LTg| z`{Cfoga_TP3SEgF2Q%xuxzqYFLgGm*tFC>G zh?NJ&wupiOV%S-3afH=P=LqPuI<4>$4>ahgkcL>#RXW<#UJa}pRuep7nBJGk2iUxF z^b~b<8!~9JnSN(zXy`HM$0sv``+!%Y#|G-}b4DbR%(un(cP&svW4o8$9k*-6)X}g( zHCnYAdMhbyQKk{&_mZuR&DEFho|ZlR$`3gCUPnudJ13dGk7#Q5raIWEf|D}0106MV zAtt1-SjSpicHucCC8Z2|@NWt}8`UmESKl pgP $.podDefinition, + isNew => true + )) + - $.kubernetesCluster.masterNode.instance.agent.call($template, $resources) diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Classes/ReplicationController.yaml b/Kubernetes/KubernetesEntitiesLibrary/package/Classes/ReplicationController.yaml new file mode 100644 index 0000000..4a2a56e --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Classes/ReplicationController.yaml @@ -0,0 +1,39 @@ +Namespaces: + =: io.murano.apps.docker.kubernetes.static + std: io.murano + sys: io.murano.system + +Name: ReplicationController + +Properties: + kubernetesCluster: + Contract: $.class(KubernetesCluster).notNull() + + replicationControllerDefinition: + Contract: {} + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + + + deploy: + Body: + - $.kubernetesCluster.deploy() + - If: not $.getAttr(deployed, false) + Then: + - $.deployReplicationController() + - $.setAttr(deployed, true) + + + deployReplicationController: + Body: + - $resources: new(sys:Resources) + + - $template: $resources.yaml('UpdateReplicationController.template').bind(dict( + controllerDefinition => $.replicationControllerDefinition, + isNew => true + )) + - $.kubernetesCluster.masterNode.instance.agent.call($template, $resources) + diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Service.yaml b/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Service.yaml new file mode 100644 index 0000000..01e0638 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Service.yaml @@ -0,0 +1,39 @@ +Namespaces: + =: io.murano.apps.docker.kubernetes.static + std: io.murano + sys: io.murano.system + +Name: Service + +Properties: + kubernetesCluster: + Contract: $.class(KubernetesCluster).notNull() + + serviceDefinition: + Contract: {} + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + + + deploy: + Body: + - $.kubernetesCluster.deploy() + - If: not $.getAttr(deployed, false) + Then: + - $.deployService() + - $.setAttr(deployed, true) + + + deployService: + Body: + - $resources: new(sys:Resources) + + - $template: $resources.yaml('UpdateService.template').bind(dict( + serviceDefinition => $.serviceDefinition, + isNew => true + )) + - $.kubernetesCluster.masterNode.instance.agent.call($template, $resources) + diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyReplicationController.template b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyReplicationController.template new file mode 100644 index 0000000..ec26d6d --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyReplicationController.template @@ -0,0 +1,20 @@ +FormattVersion: 2.0.0 +Version: 1.0.0 +Name: Destroy Replication Controller + +Parameters: + serviceId: $serviceId + +Body: | + return destroyReplicationController('{0}'.format(args.serviceId).stdout + +Scripts: + destroyReplicationController: + Type: Application + Version: 1.0.0 + EntryPoint: destroyReplicationController.sh + Files: [] + Options: + captureStdout: true + captureStderr: true + diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyService.template b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyService.template new file mode 100644 index 0000000..4a8d639 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyService.template @@ -0,0 +1,20 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Destroy Service + +Parameters: + serviceId: $serviceId + +Body: | + return destroyService('{0}'.format(args.serviceId)).stdout + +Scripts: + destroyService: + Type: Application + Version: 1.0.0 + EntryPoint: destroyService.sh + Files: [] + Options: + captureStdout: true + captureStderr: true + diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdatePod.template b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdatePod.template new file mode 100644 index 0000000..1e77e6b --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdatePod.template @@ -0,0 +1,23 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Update Pod + +Parameters: + podDefinition: $podDefinition + isNew: $isNew + +Body: | + import json + with open('/tmp/pod.json', 'w') as f: + json.dump(args.podDefinition, f) + return updatePod('{0}'.format(args.isNew)).stdout + +Scripts: + updatePod: + Type: Application + Version: 1.0.0 + EntryPoint: updatePod.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateReplicationController.template b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateReplicationController.template new file mode 100644 index 0000000..b7b2bc8 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateReplicationController.template @@ -0,0 +1,23 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Update Replication Controller + +Parameters: + controllerDefinition: $controllerDefinition + isNew: $isNew + +Body: | + import json + with open('/tmp/controller.json', 'w') as f: + json.dump(args.controllerDefinition, f) + return updateReplicationController('{0}'.format(args.isNew)).stdout + +Scripts: + updateReplicationController: + Type: Application + Version: 1.0.0 + EntryPoint: updateReplicationController.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateService.template b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateService.template new file mode 100644 index 0000000..e9bd016 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateService.template @@ -0,0 +1,23 @@ +FormatVersion: 2.0.0 +Version: 1.0.0 +Name: Update Service + +Parameters: + serviceDefinition: $serviceDefinition + isNew: $isNew + +Body: | + import json + with open('/tmp/service.json', 'w') as f: + json.dump(args.serviceDefinition, f) + return updateService('{0}'.format(args.isNew)).stdout + +Scripts: + updateService: + Type: Application + Version: 1.0.0 + EntryPoint: updateService.sh + Files: [] + Options: + captureStdout: true + captureStderr: true diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyReplicationController.sh b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyReplicationController.sh new file mode 100644 index 0000000..5c35bb2 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyReplicationController.sh @@ -0,0 +1,3 @@ +#!/bin/bash +echo "Deleting a replication controller" >> /tmp/murano-kube.log +/opt/bin/kubectl delete replicationcontrollers $1 >> /tmp/murano-kube.log diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyService.sh b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyService.sh new file mode 100644 index 0000000..cba8d8f --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyService.sh @@ -0,0 +1,3 @@ +#!/bin/bash +echo "Deleting a Service" >> /tmp/murano-kube.log +/opt/bin/kubectl delete services $1 >> /tmp/murano-kube.log diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updatePod.sh b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updatePod.sh new file mode 100644 index 0000000..36c7e37 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updatePod.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# File with pod is /tmp/pod.json +# $1 new or update + +if [ "$1" == "True" ]; then + #new Pod + echo "Creating a new Pod" >> /tmp/murano-kube.log + /opt/bin/kubectl create -f /tmp/pod.json >> /tmp/murano-kube.log +else + echo "Updating a Pod" >> /tmp/murano-kube.log + /opt/bin/kubectl update -f /tmp/pod.json >> /tmp/murano-kube.log +fi diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateReplicationController.sh b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateReplicationController.sh new file mode 100644 index 0000000..cff32c7 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateReplicationController.sh @@ -0,0 +1,8 @@ +#!/bin/bash +if [ "$1" == "True" ]; then + echo "Creating a new Replication Controller" >> /tmp/murano-kube.log + /opt/bin/kubectl create -f /tmp/controller.json >> /tmp/murano-kube.log +else + echo "Updating a Replication Controller" >> /tmp/murano-kube.log + /opt/bin/kubectl update -f /tmp/controller.json >> /tmp/murano-kube.log +fi diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateService.sh b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateService.sh new file mode 100644 index 0000000..01a2487 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateService.sh @@ -0,0 +1,8 @@ +#!/bin/bash +if [ "$1" == "True" ]; then + echo "Creating a new Service" >> /tmp/murano-kube.log + /opt/bin/kubectl create -f /tmp/service.json >> /tmp/murano-kube.log +else + echo "Updating a Service" >> /tmp/murano-kube.log + /opt/bin/kubectl update -f /tmp/service.json >> /tmp/murano-kube.log +fi diff --git a/Kubernetes/KubernetesEntitiesLibrary/package/manifest.yaml b/Kubernetes/KubernetesEntitiesLibrary/package/manifest.yaml new file mode 100644 index 0000000..374b1d8 --- /dev/null +++ b/Kubernetes/KubernetesEntitiesLibrary/package/manifest.yaml @@ -0,0 +1,13 @@ +Format: 1.0 +Type: Library +FullName: io.murano.apps.docker.kubernetes.static.KubernetesEntities +Name: Kubernetes static entities +Description: | + Kubernes Pod - A collection of containers which will be scheduled onto the same node, + which share and an IP and port space, and which can be created/destroyed together. +Author: 'Mirantis, Inc' +Tags: [docker, kubernetes, pod] +Classes: + io.murano.apps.docker.kubernetes.static.Pod: Pod.yaml + io.murano.apps.docker.kubernetes.static.Service: Service.yaml + io.murano.apps.docker.kubernetes.static.ReplicationController: ReplicationController.yaml diff --git a/Kubernetes/KubernetesPod/package/Classes/KubernetesPod.yaml b/Kubernetes/KubernetesPod/package/Classes/KubernetesPod.yaml new file mode 100644 index 0000000..a334b71 --- /dev/null +++ b/Kubernetes/KubernetesPod/package/Classes/KubernetesPod.yaml @@ -0,0 +1,225 @@ +Namespaces: + =: io.murano.apps.docker.kubernetes + docker: io.murano.apps.docker + std: io.murano + sys: io.murano.system + +Name: KubernetesPod + +Extends: + - docker:DockerContainerHost + - docker:DockerHelpers + +Properties: + name: + Contract: $.string().notNull() + + kubernetesCluster: + Contract: $.class(KubernetesCluster).notNull() + + labels: + Contract: $.string().notNull() # convert to key-value map as soon as it will be possible to input it in UI + Default: '' + + replicas: + Contract: $.int().notNull().check($ >= 0) + + +Methods: + initialize: + Body: + - $._environment: $.find(std:Environment).require() + + - $podName: $._getPodName() + - $podDefinition: $.getAttr(lastPodDeployed, null) + - If: $podDefinition = null + Then: + - $podDefinition: + id: $podName + kind: Pod + apiVersion: v1beta1 + desiredState: + manifest: + version: v1beta1 + id: $podName + containers: [] + volumes: [] + labels: $._getPodLabels($podName) + + - $.setAttr(lastPodDeployed, $podDefinition) + - $._podDefinition: $podDefinition + + _getPodName: + Body: + - Return: toLower($.name) + + _getPodLabels: + Arguments: + - podName: + Contract: $.string().notNull() + Body: + Return: $.labels2Map(toLower($.labels)).mergeWith(dict(id => $podName)) + + hostContainer: + Arguments: + - container: + Contract: $.class(docker:DockerContainer) + Body: + - $._deleteContainer($container.name) + + - $containerDef: + name: toLower($container.name) + image: $container.image + command: $container.commands + ports: $container.ports.select($this._getPortDefinition($)) + volumeMounts: $container.volumes.keys().select(dict(name => $this._generateVolumeName($container.volumes.get($)), mountPath => $)) + env: $container.env.keys().select(dict(key => $, value => $container.env.get($))) + + - $newVolumes: $container.volumes.values().where(not $this._generateVolumeName($) in $this._podDefinition.desiredState.volumes.name). + select($this._buildVolumeEntry($)) + + - $diff: + desiredState: + manifest: + containers: [$containerDef] + volumes: $newVolumes + - $._podDefinition: $._podDefinition.mergeWith($diff) + - $.deploy() + - $._environment.reporter.report($, 'Creating services for Pod {0}'.format($.name)) + - $.kubernetesCluster.createServices( + applicationName => $container.name, + applicationPorts => $container.ports, + podId => $._getPodName()) + - Return: $.getEndpoints($container.name) + + + getEndpoints: + Arguments: + - applicationName: + Contract: $.string().notNull() + Body: + - Return: $.kubernetesCluster.serviceEndpoints.where($.applicationName = $applicationName) + + + _getPortDefinition: + Arguments: + - port: + Contract: $.class(docker:ApplicationPort).notNull() + Body: + - $result: + containerPort: $port.port + - If: $port.scope = node + Then: + $result.hostPort: $port.port + - Return: $result + + + _buildVolumeEntry: + Arguments: + - volume: + Contract: $.class(docker:DockerVolume).notNull() + Body: + - $type: $volume.getType() + - Value: $type + Match: + HostDir: + - $spec: + hostDir: + path: $volume.getParameters() + TempVolume: + - $spec: + emptyDir: {} + Default: + - Throw: UnknownDockerVolumeType + Message: format('Unknown docker volume type {0}', $type) + - Return: + name: $._generateVolumeName($volume) + source: $spec + + + _deleteContainer: + Arguments: + - name: + Contract: $.string().notNull() + Body: + - $lenBefore: len($._podDefinition.desiredState.manifest.containers) + len($._podDefinition.desiredState.manifest.volumes) + - $newContainers: $._podDefinition.desiredState.manifest.containers.where($.name != $name) + - $newVolumes: $._podDefinition.desiredState.manifest.volumes.where( + $.name in $._podDefinition.desiredState.manifest.containers.volumeMounts.name) + - If: len($newContainers) + len($newVolumes) != $lenBefore + Then: + - $._podDefinition.desiredState.manifest.containers: $newContainers + - $._podDefinition.desiredState.manifest.volumes: $newVolumes + + + deleteContainer: + Arguments: + - name: + Contract: $.string().notNull() + Body: + - $._deleteContainer($name) + - $.kubernetesCluster.destroyService( + applicationName => $name, + podId => $._getPodName()) + - $.deploy() + + + _generateVolumeName: + Arguments: + - volume: + Contract: $.class(docker:DockerVolume).notNull() + Body: + Return: toLower($volume.name) + + deploy: + Body: + - $prevPod: $.getAttr(lastPodDeployed, null) + - $prevReplicas: $.getAttr(lastReplicas, 0) + + - $podDefinition: $._podDefinition + - If: $prevPod != $podDefinition + Then: + - $._environment.reporter.report($, 'Deploying Pod {0}'.format($.name)) + - $.kubernetesCluster.createPod( + definition => $podDefinition, isNew => not $.getAttr(deployed, false)) + - $.setAttr(lastPodDeployed, $podDefinition) + - $.setAttr(deployed, true) + + - If: $.replicas != $prevReplicas or $prevPod != $podDefinition + Then: + - If: $.replicas > 0 + Then: + - $._environment.reporter.report($, 'Deploying Replication Controller for Pod {0}'.format($.name)) + - $rcDefinition: $._buildReplicationControllerDefinition($podDefinition) + - $.kubernetesCluster.createReplicationController( + definition => $rcDefinition, isNew => $prevReplicas = 0) + - If: $.replicas = 0 and $prevReplicas > 0 + Then: + - $.kubernetesCluster.destroyReplicationController($._getReplicationControllerId()) + - $.setAttr(lastReplicas, $.replicas) + - $._environment.reporter.report($, 'Pod {0} is ready'.format($.name)) + + _buildReplicationControllerDefinition: + Arguments: + - podDefinition: + Contract: {} + Body: + Return: + id: $._getReplicationControllerId() + kind: ReplicationController + apiVersion: v1beta1 + desiredState: + replicas: $.replicas + replicaSelector: + id: $._getPodName() + podTemplate: + desiredState: $podDefinition.desiredState + labels: $podDefinition.labels + + _getReplicationControllerId: + Body: + - Return: $._getPodName() + + getInternalScopeId: + Body: + Return: $.kubernetesCluster.id() diff --git a/Kubernetes/KubernetesPod/package/UI/ui.yaml b/Kubernetes/KubernetesPod/package/UI/ui.yaml new file mode 100644 index 0000000..97ef04f --- /dev/null +++ b/Kubernetes/KubernetesPod/package/UI/ui.yaml @@ -0,0 +1,38 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.docker.kubernetes.KubernetesPod + name: $.appConfiguration.name + labels: $.appConfiguration.labels + kubernetesCluster: $.appConfiguration.kubernetesCluster + replicas: $.appConfiguration.replicas + + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Pod Name + description: >- + Name of the pod to create. + This name must be unique throughout the cluster + - name: labels + type: string + label: Labels + required: false + description: >- + Comma separated list of labels. Allows easy selecting in the future + - name: kubernetesCluster + type: io.murano.apps.docker.kubernetes.KubernetesCluster + label: Kubernetes cluster + description: >- + Kubernetes service + - name: replicas + type: integer + label: Replicas (0 = disabled) + initial: 2 + minValue: 0 + description: >- + Number of cluster Replicas. Setting to '0' prevents Replication Controller creation diff --git a/Kubernetes/KubernetesPod/package/logo.png b/Kubernetes/KubernetesPod/package/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..c4dec09eeea9c5ce633e56174a13d43dc3644024 GIT binary patch literal 9673 zcmbVyWmp`|(&*yuE(x#@EWpB|ixb>6uq-Z%JBvFcAwX~o1PK}>1a}V-T!Om>3&CA4 zIp@6R-XGud{kZcyGdU0CRTH71CXa_rjST<*@Dvqfw4O@X-y0MC=_ynsh5S@d zA!MNlZD%Wlmzf(JAZ6)n4yRXiG_!_l!ObjvT>Igo004@&tqv3cRaFtTaCYP}`wPS6 z?dbA^4FHHrc)OTc*uxR@=5T9UCo$k*b32gU)=~_p$FIt*>LLxdu~qPOgKPV$=~(#M zTR<#<65{lt-oj4=9N`EvdT&PuCwF0QG2p-G3O~L7Z3Y49{{@1u7X$uVD5$Ciy|l9% zoSvUcfYXAThmT$m!o|ZcAP5o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