diff --git a/Docker/Applications/Crate/package/Classes/DockerCrate.yaml b/Docker/Applications/Crate/package/Classes/DockerCrate.yaml deleted file mode 100644 index ed72710a..00000000 --- a/Docker/Applications/Crate/package/Classes/DockerCrate.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerCrate - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Application {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/Crate/package/LICENSE b/Docker/Applications/Crate/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/Crate/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/Crate/package/UI/ui.yaml b/Docker/Applications/Crate/package/UI/ui.yaml deleted file mode 100644 index cda88446..00000000 --- a/Docker/Applications/Crate/package/UI/ui.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerCrate - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/Crate/package/logo.png b/Docker/Applications/Crate/package/logo.png deleted file mode 100644 index 26b7c831..00000000 Binary files a/Docker/Applications/Crate/package/logo.png and /dev/null differ diff --git a/Docker/Applications/Crate/package/manifest.yaml b/Docker/Applications/Crate/package/manifest.yaml deleted file mode 100644 index 90fbd7f3..00000000 --- a/Docker/Applications/Crate/package/manifest.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerCrate: DockerCrate.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: - diff --git a/Docker/Applications/DockerApp/package/Classes/DockerApp.yaml b/Docker/Applications/DockerApp/package/Classes/DockerApp.yaml deleted file mode 100644 index 72ef5420..00000000 --- a/Docker/Applications/DockerApp/package/Classes/DockerApp.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerApp - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - env: - Contract: $.string() - - image: - Contract: $.string().notNull() - - ports: - Contract: $.string().notNull() - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => internal) - - $._appPorts: $.ports.split(',').select(int($)) - - - getContainer: - Body: - Return: - name: $.name - image: $.image - env: $._env2Map($.env) - ports: $._appPorts.select(dict(port => $, scope => $this._scope)) - - onInstallationStart: - Body: - - $._environment.reporter.report($this, 'Installing Application') - - - onInstallationFinish: - Body: - - If: $.publish - Then: - - $endpoints: $.applicationEndpoints. - where($.scope = $this._scope). - select(format('{0}:{1}', $.address, $.port)) - - - $._environment.reporter.report($this, 'Application {0} is available at {1}'.format( - $.name, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Application {0} has deployed but is not accessible from outside'.format($.name)) - - _env2Map: - Arguments: - envString: - Contract: $.string().notNull() - Body: - - $result: {} - - For: t - In: $envString.split(',') - Do: - - $pair: $t.split('=') - - If: len($pair) < 2 - Then: - Continue: - - $key: $pair[0].trim() - - $result[$key]: $pair[1].trim() - - Return: $result - diff --git a/Docker/Applications/DockerApp/package/LICENSE b/Docker/Applications/DockerApp/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/DockerApp/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/DockerApp/package/UI/ui.yaml b/Docker/Applications/DockerApp/package/UI/ui.yaml deleted file mode 100644 index 3c203436..00000000 --- a/Docker/Applications/DockerApp/package/UI/ui.yaml +++ /dev/null @@ -1,73 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerApp - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - env: $.appConfiguration.env - ports: $.appConfiguration.ports - image: $.appConfiguration.image - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - name: name - type: string - label: Application Name - description: >- - Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and - underline are allowed - - name: host - type: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.docker.DockerStandaloneHost - label: Container Host - description: >- - Select an instance of Docker container hosting provider to run the app - - name: image - type: string - label: Docker image name from the Docker registry - description: >- - Please, provide an image name. You can use official Docker image names like mysql or mongo, or you can use a specific - repository name like dockerfile/mongodb. - - name: env - type: string - initial: 'Key1=Value1, key2=Value2' - required: false - label: Environment Variables - description: >- - Please, provide application environment variables as a comma separated list. Some Docker applications require - to have specific environment variables. Please check corresponding application web page. - - name: ports - type: string - label: Ports - description: >- - Please, provide comma separated application ports. - This information could be found in a Dockerfile, like EXPORT 27017 - - 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/Docker/Applications/DockerApp/package/logo.png b/Docker/Applications/DockerApp/package/logo.png deleted file mode 100644 index 093a007a..00000000 Binary files a/Docker/Applications/DockerApp/package/logo.png and /dev/null differ diff --git a/Docker/Applications/DockerApp/package/manifest.yaml b/Docker/Applications/DockerApp/package/manifest.yaml deleted file mode 100644 index b610b1fe..00000000 --- a/Docker/Applications/DockerApp/package/manifest.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerApp -Name: Docker Container -Description: | - The application provides ability to create Docker container to deploy one of - the 13,000+ apps available on Docker Hub at https://registry.hub.docker.com/ - To deploy app user need just to choose any image from the Docker Hub and - configure deployment process by specifying environment variables and ports. -Author: 'Mirantis, Inc' -Tags: [docker, application] -Classes: - com.example.docker.DockerApp: DockerApp.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/Elasticsearch/package/Classes/DockerElasticsearch.yaml b/Docker/Applications/Elasticsearch/package/Classes/DockerElasticsearch.yaml deleted file mode 100644 index 47fc40f6..00000000 --- a/Docker/Applications/Elasticsearch/package/Classes/DockerElasticsearch.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerElasticsearch - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - username: - Contract: $.string().notNull() - - password: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => internal) - - - getContainer: - Body: - Return: - name: $.name - image: 'tutum/elasticsearch' - env: - ELASTICSEARCH_USER: $.username - ELASTICSEARCH_PASS: $.password - ports: - - port: 9200 - scope: $._scope - - - onInstallationStart: - Body: - - $._environment.reporter.report($this, 'Installing Elasticsearch') - - - onInstallationFinish: - Body: - - If: $.publish - Then: - - $endpoints: $.applicationEndpoints.where($.scope = $this._scope).select(format('http://{0}:{1}', $.address, $.port)) - - $._environment.reporter.report($this, 'Elasticsearch {0} is available at {1}'.format($.name, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Elasticsearch {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/Elasticsearch/package/LICENSE b/Docker/Applications/Elasticsearch/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/Elasticsearch/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/Elasticsearch/package/UI/ui.yaml b/Docker/Applications/Elasticsearch/package/UI/ui.yaml deleted file mode 100644 index e4c02e1e..00000000 --- a/Docker/Applications/Elasticsearch/package/UI/ui.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerElasticsearch - name: $.appConfiguration.name - username: $.appConfiguration.username - password: $.appConfiguration.password - host: $.appConfiguration.host - publish: $.appConfiguration.publish - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - name: name - type: string - label: Application Name - initial: DockerElasticsearch - description: >- - Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and - underline are allowed - - name: username - type: string - label: Elasticsearch user name - initial: admin - description: >- - User name that will be configured for Elasticsearch access - - name: password - type: password - label: Elasticsearch user password - description: >- - User password that will be configured for Elasticsearch access - - name: host - type: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.docker.DockerStandaloneHost - label: Container Host - description: >- - Select an instance of Docker container 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/Docker/Applications/Elasticsearch/package/logo.png b/Docker/Applications/Elasticsearch/package/logo.png deleted file mode 100644 index e489fbae..00000000 Binary files a/Docker/Applications/Elasticsearch/package/logo.png and /dev/null differ diff --git a/Docker/Applications/Elasticsearch/package/manifest.yaml b/Docker/Applications/Elasticsearch/package/manifest.yaml deleted file mode 100644 index 77a246f2..00000000 --- a/Docker/Applications/Elasticsearch/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerElasticsearch -Name: Docker Elasticsearch -Description: | - Elasticsearch is a search server based on Lucene. It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents. -Author: 'Mirantis, Inc' -Tags: [docker, application, Elasticsearch] -Classes: - com.example.docker.DockerElasticsearch: DockerElasticsearch.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/GlassFish/package/Classes/DockerGlassFish.yaml b/Docker/Applications/GlassFish/package/Classes/DockerGlassFish.yaml deleted file mode 100644 index 59b39ec9..00000000 --- a/Docker/Applications/GlassFish/package/Classes/DockerGlassFish.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerGlassFish - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - password: - Contract: $.string().notNull() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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/Docker/Applications/GlassFish/package/LICENSE b/Docker/Applications/GlassFish/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/GlassFish/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/GlassFish/package/UI/ui.yaml b/Docker/Applications/GlassFish/package/UI/ui.yaml deleted file mode 100644 index 5312fdc5..00000000 --- a/Docker/Applications/GlassFish/package/UI/ui.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerGlassFish - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - password: $.appConfiguration.password - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/GlassFish/package/logo.png b/Docker/Applications/GlassFish/package/logo.png deleted file mode 100644 index 2bb0bbb2..00000000 Binary files a/Docker/Applications/GlassFish/package/logo.png and /dev/null differ diff --git a/Docker/Applications/GlassFish/package/manifest.yaml b/Docker/Applications/GlassFish/package/manifest.yaml deleted file mode 100644 index 9cd1a40b..00000000 --- a/Docker/Applications/GlassFish/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerGlassFish: DockerGlassFish.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/Grafana/package/Classes/DockerGrafana.yaml b/Docker/Applications/Grafana/package/Classes/DockerGrafana.yaml deleted file mode 100644 index eee3773c..00000000 --- a/Docker/Applications/Grafana/package/Classes/DockerGrafana.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerGrafana - -Extends: interfaces: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: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => internal) - - - deploy: - Body: - - $.influxDB.deploy() - - super($, $.deploy()) - - - 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Grafana {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/Grafana/package/LICENSE b/Docker/Applications/Grafana/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/Grafana/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/Grafana/package/UI/ui.yaml b/Docker/Applications/Grafana/package/UI/ui.yaml deleted file mode 100644 index 5dcbbd59..00000000 --- a/Docker/Applications/Grafana/package/UI/ui.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.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: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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 - - - grafanaConfig: - fields: - - name: influxDB - type: com.example.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/Docker/Applications/Grafana/package/logo.png b/Docker/Applications/Grafana/package/logo.png deleted file mode 100644 index 9187ad14..00000000 Binary files a/Docker/Applications/Grafana/package/logo.png and /dev/null differ diff --git a/Docker/Applications/Grafana/package/manifest.yaml b/Docker/Applications/Grafana/package/manifest.yaml deleted file mode 100644 index e16f23b2..00000000 --- a/Docker/Applications/Grafana/package/manifest.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerGrafana: DockerGrafana.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.example.docker.DockerInfluxDB: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/GuestBook/package/Classes/GuestBook.yaml b/Docker/Applications/GuestBook/package/Classes/GuestBook.yaml deleted file mode 100644 index 1a44a92e..00000000 --- a/Docker/Applications/GuestBook/package/Classes/GuestBook.yaml +++ /dev/null @@ -1,92 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerGuestBook - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - redisMaster: - Contract: $.class(DockerRedis).notNull() - - redisSlaveHost: - Contract: $.class(interfaces:DockerContainerHost).notNull() - - redisSlave: - Contract: $.class(DockerRedisSlave) - Usage: Out - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => internal) - - - deploy: - Body: - - $.redisMaster.deploy() - - $.redisSlave: new( - DockerRedisSlave, - $, - name => 'RedisSlave', - host => $this.redisSlaveHost, - publish => false, - redisMaster => $this.redisMaster) - - $.redisSlave.deploy() - - super($, $.deploy()) - - - getContainer: - Body: - - $redisMasterLink: $.getConnectionTo($.redisMaster, 6379) - - $redisSlaveLink: $.getConnectionTo($.redisSlave, 6379) - - Return: - name: $.name - image: 'brendanburns/php-redis' - env: - REDIS_MASTER_SERVICE_HOST: $redisMasterLink.host - REDIS_MASTER_SERVICE_PORT: $redisMasterLink.port - REDISSLAVE_SERVICE_HOST: $redisSlaveLink.host - REDISSLAVE_SERVICE_PORT: $redisSlaveLink.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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'GuestBook {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/GuestBook/package/Classes/RedisSlave.yaml b/Docker/Applications/GuestBook/package/Classes/RedisSlave.yaml deleted file mode 100644 index 344ddf42..00000000 --- a/Docker/Applications/GuestBook/package/Classes/RedisSlave.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerRedisSlave - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - redisMaster: - Contract: $.class(DockerRedis).notNull() - - -Methods: - getContainer: - Body: - - $redisMasterLink: $.getConnectionTo($.redisMaster, 6379) - - Return: - name: $.name - image: 'brendanburns/redis-slave' - env: - REDIS_MASTER_SERVICE_HOST: $redisMasterLink.host - REDIS_MASTER_SERVICE_PORT: $redisMasterLink.port - ports: - - port: 6379 - scope: switch($.publish => public, true => internal) diff --git a/Docker/Applications/GuestBook/package/LICENSE b/Docker/Applications/GuestBook/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/GuestBook/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/GuestBook/package/UI/ui.yaml b/Docker/Applications/GuestBook/package/UI/ui.yaml deleted file mode 100644 index 7a4f5cf9..00000000 --- a/Docker/Applications/GuestBook/package/UI/ui.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 -Templates: - guestBookHost: - ?: - type: com.mirantis.docker.kubernetes.KubernetesPod - name: frontend - labels: 'name=frontend,app=frontend,uses=redis-slave-or-redis-master' - kubernetesCluster: $.appConfiguration.kubernetesCluster - replicas: 3 - - redisSlaveHost: - ?: - type: com.mirantis.docker.kubernetes.KubernetesPod - name: 'redis-slave' - labels: 'name=redis-slave,app=redis,uses=redis-master' - kubernetesCluster: $.appConfiguration.kubernetesCluster - replicas: 2 - - redisMaster: - ?: - type: com.example.docker.DockerRedis - name: RedisMaster - host: - ?: - type: com.mirantis.docker.kubernetes.KubernetesPod - name: 'redis-master' - labels: 'name=redis-master,app=redis' - kubernetesCluster: $.appConfiguration.kubernetesCluster - replicas: 1 - publish: false - - -Application: - ?: - type: com.example.docker.DockerGuestBook - name: $.appConfiguration.name - host: $guestBookHost - redisMaster: $redisMaster - - redisSlaveHost: $redisSlaveHost - publish: $.appConfiguration.publish - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: com.mirantis.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/Docker/Applications/GuestBook/package/logo.png b/Docker/Applications/GuestBook/package/logo.png deleted file mode 100644 index 16cf9f3b..00000000 Binary files a/Docker/Applications/GuestBook/package/logo.png and /dev/null differ diff --git a/Docker/Applications/GuestBook/package/manifest.yaml b/Docker/Applications/GuestBook/package/manifest.yaml deleted file mode 100644 index 1d70d96e..00000000 --- a/Docker/Applications/GuestBook/package/manifest.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.GuestBook -Name: Docker GuestBook -Description: | - Simple demo application using Kubernetes Cluster for deployment -Author: 'Mirantis, Inc' -Tags: [Docker, Kubernetes, guestbook] - -Classes: - com.example.docker.DockerRedisSlave: RedisSlave.yaml - com.example.docker.DockerGuestBook: GuestBook.yaml -Require: - com.example.docker.DockerRedis: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.kubernetes.KubernetesCluster: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/HTTPdServer/package/Classes/DockerHTTPd.yaml b/Docker/Applications/HTTPdServer/package/Classes/DockerHTTPd.yaml deleted file mode 100644 index 3965227b..00000000 --- a/Docker/Applications/HTTPdServer/package/Classes/DockerHTTPd.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerHTTPd - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'HTTPd {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/HTTPdServer/package/LICENSE b/Docker/Applications/HTTPdServer/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/HTTPdServer/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/HTTPdServer/package/UI/ui.yaml b/Docker/Applications/HTTPdServer/package/UI/ui.yaml deleted file mode 100644 index 69d9b2c7..00000000 --- a/Docker/Applications/HTTPdServer/package/UI/ui.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerHTTPd - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/HTTPdServer/package/logo.png b/Docker/Applications/HTTPdServer/package/logo.png deleted file mode 100644 index 6b928906..00000000 Binary files a/Docker/Applications/HTTPdServer/package/logo.png and /dev/null differ diff --git a/Docker/Applications/HTTPdServer/package/manifest.yaml b/Docker/Applications/HTTPdServer/package/manifest.yaml deleted file mode 100644 index 002fc559..00000000 --- a/Docker/Applications/HTTPdServer/package/manifest.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerHTTPd: DockerHTTPd.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/HTTPdSite/package/Classes/DockerHTTPdSite.yaml b/Docker/Applications/HTTPdSite/package/Classes/DockerHTTPdSite.yaml deleted file mode 100644 index 34b5ab94..00000000 --- a/Docker/Applications/HTTPdSite/package/Classes/DockerHTTPdSite.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerHTTPdSite - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - siteRepo: - Contract: $.string().notNull() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'HTTPD application {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/HTTPdSite/package/LICENSE b/Docker/Applications/HTTPdSite/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/HTTPdSite/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/HTTPdSite/package/UI/ui.yaml b/Docker/Applications/HTTPdSite/package/UI/ui.yaml deleted file mode 100644 index 7538734a..00000000 --- a/Docker/Applications/HTTPdSite/package/UI/ui.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerHTTPdSite - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - siteRepo: $.appConfiguration.url - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/HTTPdSite/package/logo.png b/Docker/Applications/HTTPdSite/package/logo.png deleted file mode 100644 index 6b928906..00000000 Binary files a/Docker/Applications/HTTPdSite/package/logo.png and /dev/null differ diff --git a/Docker/Applications/HTTPdSite/package/manifest.yaml b/Docker/Applications/HTTPdSite/package/manifest.yaml deleted file mode 100644 index 7815bdd1..00000000 --- a/Docker/Applications/HTTPdSite/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerHTTPdSite: DockerHTTPdSite.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/InfluxDB/package/Classes/DockerInfluxDB.yaml b/Docker/Applications/InfluxDB/package/Classes/DockerInfluxDB.yaml deleted file mode 100644 index b6b9a980..00000000 --- a/Docker/Applications/InfluxDB/package/Classes/DockerInfluxDB.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerInfluxDB - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - preCreateDB: - Contract: $.string() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'InfluxDB {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/InfluxDB/package/LICENSE b/Docker/Applications/InfluxDB/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/InfluxDB/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/InfluxDB/package/UI/ui.yaml b/Docker/Applications/InfluxDB/package/UI/ui.yaml deleted file mode 100644 index 3b800b19..00000000 --- a/Docker/Applications/InfluxDB/package/UI/ui.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerInfluxDB - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - preCreateDB: $.appConfiguration.preCreateDB - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/InfluxDB/package/logo.png b/Docker/Applications/InfluxDB/package/logo.png deleted file mode 100644 index b5fc98a0..00000000 Binary files a/Docker/Applications/InfluxDB/package/logo.png and /dev/null differ diff --git a/Docker/Applications/InfluxDB/package/manifest.yaml b/Docker/Applications/InfluxDB/package/manifest.yaml deleted file mode 100644 index f9206c70..00000000 --- a/Docker/Applications/InfluxDB/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerInfluxDB: DockerInfluxDB.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/JBoss/package/Classes/DockerJBoss.yaml b/Docker/Applications/JBoss/package/Classes/DockerJBoss.yaml deleted file mode 100644 index 1faf49f0..00000000 --- a/Docker/Applications/JBoss/package/Classes/DockerJBoss.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerJBoss - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - password: - Contract: $.string().notNull() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => internal) - - - getContainer: - Body: - Return: - name: $.name - image: 'tutum/jboss' - env: - JBOSS_PASS: $.password - ports: - - port: 9990 - scope: $._scope - - port: 8080 - scope: $._scope - - - onInstallationStart: - Body: - - $._environment.reporter.report($this, 'Installing JBoss') - - - onInstallationFinish: - Body: - - If: $.publish - Then: - - $adminEndpoints: join(', ', $.applicationEndpoints. - where($.scope = $this._scope and $.containerPort = 9990). - select(format('http://{0}:{1}', $.address, $.port))) - - $httpEndpoints: join(', ', $.applicationEndpoints. - where($.scope = $this._scope and $.containerPort = 8080). - select(format('http://{0}:{1}', $.address, $.port))) - - $._environment.reporter.report( - $this, - 'JBoss {0} is available at {1} (admin) and {2} (apps)'.format($.name, $adminEndpoints, $httpEndpoints)) - Else: - - $._environment.reporter.report($this, 'JBoss {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/JBoss/package/LICENSE b/Docker/Applications/JBoss/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/JBoss/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/JBoss/package/UI/ui.yaml b/Docker/Applications/JBoss/package/UI/ui.yaml deleted file mode 100644 index 39c454ce..00000000 --- a/Docker/Applications/JBoss/package/UI/ui.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerJBoss - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - password: $.appConfiguration.password - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - name: name - type: string - label: Application Name - initial: 'DockerJBoss' - 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 JBoss - - name: host - type: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.docker.DockerStandaloneHost - label: Container Host - description: >- - Select an instance of Docker container 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/Docker/Applications/JBoss/package/logo.png b/Docker/Applications/JBoss/package/logo.png deleted file mode 100644 index 9c561f11..00000000 Binary files a/Docker/Applications/JBoss/package/logo.png and /dev/null differ diff --git a/Docker/Applications/JBoss/package/manifest.yaml b/Docker/Applications/JBoss/package/manifest.yaml deleted file mode 100644 index fee9011a..00000000 --- a/Docker/Applications/JBoss/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerJBoss -Name: Docker JBoss -Description: | - JBoss applications server is a J2EE platform for developing and deploying enterprise Java applications, Web applications and services, and portals. -Author: 'Mirantis, Inc' -Tags: [docker, application, JBoss] -Classes: - com.example.docker.DockerJBoss: DockerJBoss.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/Jenkins/package/Classes/DockerJenkins.yaml b/Docker/Applications/Jenkins/package/Classes/DockerJenkins.yaml deleted file mode 100644 index a6e2ed1c..00000000 --- a/Docker/Applications/Jenkins/package/Classes/DockerJenkins.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerJenkins - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Jenkins {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/Jenkins/package/LICENSE b/Docker/Applications/Jenkins/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/Jenkins/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/Jenkins/package/UI/ui.yaml b/Docker/Applications/Jenkins/package/UI/ui.yaml deleted file mode 100644 index 835c4d07..00000000 --- a/Docker/Applications/Jenkins/package/UI/ui.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerJenkins - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/Jenkins/package/logo.png b/Docker/Applications/Jenkins/package/logo.png deleted file mode 100644 index 7f0ab007..00000000 Binary files a/Docker/Applications/Jenkins/package/logo.png and /dev/null differ diff --git a/Docker/Applications/Jenkins/package/manifest.yaml b/Docker/Applications/Jenkins/package/manifest.yaml deleted file mode 100644 index 54a3d141..00000000 --- a/Docker/Applications/Jenkins/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerJenkins: DockerJenkins.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/MariaDB/package/Classes/DockerMariaDB.yaml b/Docker/Applications/MariaDB/package/Classes/DockerMariaDB.yaml deleted file mode 100644 index 803bfb7b..00000000 --- a/Docker/Applications/MariaDB/package/Classes/DockerMariaDB.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerMariaDB - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - password: - Contract: $.string().notNull() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'MariaDB {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/MariaDB/package/LICENSE b/Docker/Applications/MariaDB/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/MariaDB/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/MariaDB/package/UI/ui.yaml b/Docker/Applications/MariaDB/package/UI/ui.yaml deleted file mode 100644 index d31dfec7..00000000 --- a/Docker/Applications/MariaDB/package/UI/ui.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerMariaDB - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - password: $.appConfiguration.password - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/MariaDB/package/logo.png b/Docker/Applications/MariaDB/package/logo.png deleted file mode 100644 index 7f51b2e5..00000000 Binary files a/Docker/Applications/MariaDB/package/logo.png and /dev/null differ diff --git a/Docker/Applications/MariaDB/package/manifest.yaml b/Docker/Applications/MariaDB/package/manifest.yaml deleted file mode 100644 index 1f9a306e..00000000 --- a/Docker/Applications/MariaDB/package/manifest.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerMariaDB -Name: Docker MariaDB -Description: | - MariaDB strives to be the logical choice for database professionals looking for a robust, scalable, and reliable - SQL server. To accomplish this, the MariaDB Foundation work closely and cooperatively with the larger community - of users and developers in the true spirit of Free and open source software, and release software in a manner - that balances predictability with reliability. -Author: 'Mirantis, Inc' -Tags: [docker, application, MariaDB] -Classes: - com.example.docker.DockerMariaDB: DockerMariaDB.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/MongoDB/package/Classes/DockerMongoDB.yaml b/Docker/Applications/MongoDB/package/Classes/DockerMongoDB.yaml deleted file mode 100644 index b9aef66b..00000000 --- a/Docker/Applications/MongoDB/package/Classes/DockerMongoDB.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerMongoDB - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'MongoDB {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/MongoDB/package/LICENSE b/Docker/Applications/MongoDB/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/MongoDB/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/MongoDB/package/UI/ui.yaml b/Docker/Applications/MongoDB/package/UI/ui.yaml deleted file mode 100644 index 08f9c275..00000000 --- a/Docker/Applications/MongoDB/package/UI/ui.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerMongoDB - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/MongoDB/package/logo.png b/Docker/Applications/MongoDB/package/logo.png deleted file mode 100644 index 0238b03f..00000000 Binary files a/Docker/Applications/MongoDB/package/logo.png and /dev/null differ diff --git a/Docker/Applications/MongoDB/package/manifest.yaml b/Docker/Applications/MongoDB/package/manifest.yaml deleted file mode 100644 index da627330..00000000 --- a/Docker/Applications/MongoDB/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerMongoDB -Name: Docker MongoDB -Description: | - MongoDB (from “humongous”) is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas. -Author: 'Mirantis, Inc' -Tags: [Docker, MongoDB] -Classes: - com.example.docker.DockerMongoDB: DockerMongoDB.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/MySQL/package/Classes/DockerMySQL.yaml b/Docker/Applications/MySQL/package/Classes/DockerMySQL.yaml deleted file mode 100644 index 51ed2a25..00000000 --- a/Docker/Applications/MySQL/package/Classes/DockerMySQL.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerMySQL - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - password: - Contract: $.string().notNull() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'MySQL {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/MySQL/package/LICENSE b/Docker/Applications/MySQL/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/MySQL/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/MySQL/package/UI/ui.yaml b/Docker/Applications/MySQL/package/UI/ui.yaml deleted file mode 100644 index 4cde7a44..00000000 --- a/Docker/Applications/MySQL/package/UI/ui.yaml +++ /dev/null @@ -1,56 +0,0 @@ - -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -Version: 2 - -Application: - ?: - type: com.example.docker.DockerMySQL - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - password: $.appConfiguration.password - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/MySQL/package/logo.png b/Docker/Applications/MySQL/package/logo.png deleted file mode 100644 index 122106a6..00000000 Binary files a/Docker/Applications/MySQL/package/logo.png and /dev/null differ diff --git a/Docker/Applications/MySQL/package/manifest.yaml b/Docker/Applications/MySQL/package/manifest.yaml deleted file mode 100644 index 5a152156..00000000 --- a/Docker/Applications/MySQL/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerMySQL: DockerMySQL.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/Nginx/package/Classes/DockerNginx.yaml b/Docker/Applications/Nginx/package/Classes/DockerNginx.yaml deleted file mode 100644 index 1a147b35..00000000 --- a/Docker/Applications/Nginx/package/Classes/DockerNginx.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerNginx - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Nginx {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/Nginx/package/LICENSE b/Docker/Applications/Nginx/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/Nginx/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/Nginx/package/UI/ui.yaml b/Docker/Applications/Nginx/package/UI/ui.yaml deleted file mode 100644 index de5cfdc8..00000000 --- a/Docker/Applications/Nginx/package/UI/ui.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerNginx - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/Nginx/package/logo.png b/Docker/Applications/Nginx/package/logo.png deleted file mode 100644 index 2ca7c292..00000000 Binary files a/Docker/Applications/Nginx/package/logo.png and /dev/null differ diff --git a/Docker/Applications/Nginx/package/manifest.yaml b/Docker/Applications/Nginx/package/manifest.yaml deleted file mode 100644 index 60a63b4e..00000000 --- a/Docker/Applications/Nginx/package/manifest.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerNginx: DockerNginx.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/NginxSite/package/Classes/DockerNginxSite.yaml b/Docker/Applications/NginxSite/package/Classes/DockerNginxSite.yaml deleted file mode 100644 index a5dbf0ac..00000000 --- a/Docker/Applications/NginxSite/package/Classes/DockerNginxSite.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerNginxSite - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - siteRepo: - Contract: $.string().notNull() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Nginx application {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/NginxSite/package/LICENSE b/Docker/Applications/NginxSite/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/NginxSite/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/NginxSite/package/UI/ui.yaml b/Docker/Applications/NginxSite/package/UI/ui.yaml deleted file mode 100644 index c549aa55..00000000 --- a/Docker/Applications/NginxSite/package/UI/ui.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerNginxSite - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - siteRepo: $.appConfiguration.siteRepo - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/NginxSite/package/logo.png b/Docker/Applications/NginxSite/package/logo.png deleted file mode 100644 index 2ca7c292..00000000 Binary files a/Docker/Applications/NginxSite/package/logo.png and /dev/null differ diff --git a/Docker/Applications/NginxSite/package/manifest.yaml b/Docker/Applications/NginxSite/package/manifest.yaml deleted file mode 100644 index 881068ad..00000000 --- a/Docker/Applications/NginxSite/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.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: - com.example.docker.DockerNginxSite: DockerNginxSite.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/Orion/package/Classes/DockerOrion.yaml b/Docker/Applications/Orion/package/Classes/DockerOrion.yaml deleted file mode 100644 index 3648d7a7..00000000 --- a/Docker/Applications/Orion/package/Classes/DockerOrion.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerOrion - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - mongodb: - Contract: $.class(DockerMongoDB).notNull() - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => internal) - - deploy: - Body: - - $.mongodb.deploy() - - super($, $.deploy()) - - getContainer: - Body: - - $mongoendopoint: $.getConnectionTo($.mongodb, 27017) - - Return: - name: $.name - image: 'fiware/orion' - env: - MONGODB_HOST: $mongoendpoint.host - ports: - - port: 1026 - scope: $._scope - commands: format('-dbhost {0}', $mongoendpoint.host) - - onInstallationStart: - Body: - - $._environment.reporter.report($this, 'Installing Orion') - - - onInstallationFinish: - Body: - - If: $.publish - Then: - - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). - select(format('http://{0}:{1}', $.address, $.port)) - - $._environment.reporter.report($this, 'Orion {0} is available at {1}'.format($.name, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Orion {0} was deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/Orion/package/LICENSE b/Docker/Applications/Orion/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/Orion/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/Orion/package/UI/ui.yaml b/Docker/Applications/Orion/package/UI/ui.yaml deleted file mode 100644 index 117f2ef5..00000000 --- a/Docker/Applications/Orion/package/UI/ui.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerOrion - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - mongodb: $.mongoConfig.mongoDB - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - name: name - type: string - label: Application Name - initial: 'DockerOrion' - description: >- - Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and - underline are allowed - - name: host - type: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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 - - - mongoConfig: - fields: - - name: mongoDB - type: com.example.docker.DockerMongoDB - label: MongoDB instance - required: true - description: >- - Please select existing MongoDB instance or add a new one diff --git a/Docker/Applications/Orion/package/logo.png b/Docker/Applications/Orion/package/logo.png deleted file mode 100644 index e2e469fa..00000000 Binary files a/Docker/Applications/Orion/package/logo.png and /dev/null differ diff --git a/Docker/Applications/Orion/package/manifest.yaml b/Docker/Applications/Orion/package/manifest.yaml deleted file mode 100644 index 28ff6fe4..00000000 --- a/Docker/Applications/Orion/package/manifest.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerOrion -Name: Orion Docker -Description: | - The FIWARE Orion Context Broker is an implementation of the Publish/Subscribe Context Broker GE, providing the NGSI9 and NGSI10 interfaces. -Author: 'TID' -Tags: [docker, application, Orion, FIWARE] -Classes: - com.example.docker.DockerOrion: DockerOrion.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: - com.example.docker.DockerMongoDB: diff --git a/Docker/Applications/PostgreSQL/package/Classes/DockerPostgreSQL.yaml b/Docker/Applications/PostgreSQL/package/Classes/DockerPostgreSQL.yaml deleted file mode 100644 index 5082aaae..00000000 --- a/Docker/Applications/PostgreSQL/package/Classes/DockerPostgreSQL.yaml +++ /dev/null @@ -1,66 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerPostgreSQL - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - password: - Contract: $.string().notNull() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'PostgreSQL {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/PostgreSQL/package/LICENSE b/Docker/Applications/PostgreSQL/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/PostgreSQL/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/PostgreSQL/package/UI/ui.yaml b/Docker/Applications/PostgreSQL/package/UI/ui.yaml deleted file mode 100644 index 6d186535..00000000 --- a/Docker/Applications/PostgreSQL/package/UI/ui.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerPostgreSQL - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - password: $.appConfiguration.password - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/PostgreSQL/package/logo.png b/Docker/Applications/PostgreSQL/package/logo.png deleted file mode 100644 index 157e493d..00000000 Binary files a/Docker/Applications/PostgreSQL/package/logo.png and /dev/null differ diff --git a/Docker/Applications/PostgreSQL/package/manifest.yaml b/Docker/Applications/PostgreSQL/package/manifest.yaml deleted file mode 100644 index f64205be..00000000 --- a/Docker/Applications/PostgreSQL/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerPostgreSQL -Name: Docker Postgres -Description: | - PostgreSQL, often simply “Postgres”, is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance. As a database server, its primary function is to store data, securely and supporting best practices, and retrieve it later, as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet). -Author: 'Mirantis, Inc' -Tags: [docker, application, Postgres] -Classes: - com.example.docker.DockerPostgreSQL: DockerPostgreSQL.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/Redis/package/Classes/DockerRedis.yaml b/Docker/Applications/Redis/package/Classes/DockerRedis.yaml deleted file mode 100644 index c7b93952..00000000 --- a/Docker/Applications/Redis/package/Classes/DockerRedis.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerRedis - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Redis {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/Redis/package/LICENSE b/Docker/Applications/Redis/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/Redis/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/Redis/package/UI/ui.yaml b/Docker/Applications/Redis/package/UI/ui.yaml deleted file mode 100644 index e40d9b84..00000000 --- a/Docker/Applications/Redis/package/UI/ui.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerRedis - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/Redis/package/logo.png b/Docker/Applications/Redis/package/logo.png deleted file mode 100644 index 24d454b5..00000000 Binary files a/Docker/Applications/Redis/package/logo.png and /dev/null differ diff --git a/Docker/Applications/Redis/package/manifest.yaml b/Docker/Applications/Redis/package/manifest.yaml deleted file mode 100644 index eeb5146e..00000000 --- a/Docker/Applications/Redis/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerRedis -Name: Docker Redis -Description: | - Redis is an open-source, networked, in-memory, key-value data store with optional durability. It is written in ANSI C and the name Redis means REmote DIctionary Server. -Author: 'Mirantis, Inc' -Tags: [docker, application, Redis] -Classes: - com.example.docker.DockerRedis: DockerRedis.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: diff --git a/Docker/Applications/Tomcat/package/Classes/DockerTomcat.yaml b/Docker/Applications/Tomcat/package/Classes/DockerTomcat.yaml deleted file mode 100644 index 356d5f4f..00000000 --- a/Docker/Applications/Tomcat/package/Classes/DockerTomcat.yaml +++ /dev/null @@ -1,66 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.example.docker - std: io.murano - interfaces: com.mirantis.docker - -Name: DockerTomcat - -Extends: interfaces:DockerApplication - -Properties: - name: - Contract: $.string().notNull() - - publish: - Contract: $.bool().notNull() - Default: true - - password: - Contract: $.string().notNull() - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._scope: switch($.publish => public, true => 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, $endpoints.join(', '))) - Else: - - $._environment.reporter.report($this, 'Tomcat {0} has deployed but is not accessible from outside'.format($.name)) diff --git a/Docker/Applications/Tomcat/package/LICENSE b/Docker/Applications/Tomcat/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Applications/Tomcat/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Applications/Tomcat/package/UI/ui.yaml b/Docker/Applications/Tomcat/package/UI/ui.yaml deleted file mode 100644 index 9c9c35e8..00000000 --- a/Docker/Applications/Tomcat/package/UI/ui.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.example.docker.DockerTomcat - name: $.appConfiguration.name - host: $.appConfiguration.host - publish: $.appConfiguration.publish - password: $.appConfiguration.password - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: - - com.mirantis.docker.kubernetes.KubernetesPod - - com.mirantis.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/Docker/Applications/Tomcat/package/logo.png b/Docker/Applications/Tomcat/package/logo.png deleted file mode 100644 index df16fde2..00000000 Binary files a/Docker/Applications/Tomcat/package/logo.png and /dev/null differ diff --git a/Docker/Applications/Tomcat/package/manifest.yaml b/Docker/Applications/Tomcat/package/manifest.yaml deleted file mode 100644 index 1e340b06..00000000 --- a/Docker/Applications/Tomcat/package/manifest.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.example.docker.DockerTomcat -Name: Docker Tomcat -Description: >- - Apache Tomcat (or simply Tomcat) is an open source web server and servlet - container developed by the Apache Software Foundation (ASF). - Tomcat implements the Java Servlet and the JavaServer Pages (JSP) - specifications from Oracle, and provides a "pure Java" HTTP web server - environment for Java code to run in. -Author: 'Mirantis, Inc' -Tags: [docker, application, Tomcat] -Classes: - com.example.docker.DockerTomcat: DockerTomcat.yaml -Require: - com.mirantis.docker.DockerStandaloneHost: - com.mirantis.docker.kubernetes.KubernetesPod: - com.mirantis.docker.Interfaces: - diff --git a/Docker/DockerInterfacesLibrary/README.rst b/Docker/DockerInterfacesLibrary/README.rst deleted file mode 100644 index cb52d3f1..00000000 --- a/Docker/DockerInterfacesLibrary/README.rst +++ /dev/null @@ -1,206 +0,0 @@ -Docker Interface Library -======================== - -This library provides 3 major things: - -* DockerApplication: base class that all Docker applications must inherit. - Provides a way to define image name and docker container parameters. - -* DockerContainerHost: interface for applications that provide Docker - application hosting capabilities. Docker applications use this interface - to deploy themselves on the Docker host. - -* Data structures that are pass between DockerApplications and - DockerContainerHosts. They define things like volumes, ports etc. - Most important data structure is DockerContainer which describes the - container itself. - - -DockerApplication -================= - -This is the base class for all Docker applications. At minimum all inheritors -must provide an implementation of `getContainer` method. Everything else is -either optional or implemented in the base class. - -It has the following properties: - -* `host`: an instance of `DockerContainerHost`. This is the hosting provider - (`DockerStandaloneHost`, `KubernetesPod`, etc.) that applications should - be deployed to. - -* `applicationEndpoints`: output property that is filled with application - endpoints after deployment. See below for exact format details. - -Class also has the following methods: - -* `getContainer`: returns an instance of `DockerContainer` class that describes - container information. Alternatively method can return a properties - dictionary that would automatically be converted to `DockerContainer` by - MuranoPL. This method must be implemented by inheritors! - -* `deploy`: used to deploy Docker application on given `DockerContainerHost`. - This method is already implemented in this class and should not be overridden - by inheritors. It relies on the information returned by `getContainer`. - -* `getConnectionTo`: used to get full endpoint for another Docker application's - port when there is a need to connect two Docker applications. - Requires three parameters: - - * `application`: an instance of `DockerApplication` that we want to - talk to. - * `port`: port number of the target application. - * `protocol`: `TCP` or `UDP`. - - Returns a dictionary with two keys - `host` and `port` that represent the - endpoint. Note that target application must be deployed before calling this - method so it is advised to call `deploy()` first. - - See `DockerGrafana/DockerInfluxDB` as an example or connected Docker - applications. - -* `onInstallationStart`: a method that get get called when installation starts. - May be overridden by inheritor class to provide extra logging or reporting. - -* `onInstallationFinish`: a method that get get called when installation ends. - May be overridden by inheritor class to provide extra logging or reporting. - - -DockerContainer -=============== - -This is a data structure defining a Docker container. - -It has the following properties: - -* `name`: container name. Must be unique within single `DockerContainerHost`. - This is the same as application name for regular - applications. - -* `image`: Docker image name. - -* `commands`: optional list of shell commands to execute upon container start. - -* `env`: a dictionary of environment key-values (inputs for Docker containers) - -* `ports`: a list of `ApplicationPort` instances. This is a list of ports that - need to be opened/exposed by the container. - -* `volumes`: an optional mapping that defines volumes that need to be mounted - into Docker container. Keys are the paths within container and values are - instances of DockerVolume. - -* `privileged`: a flag that forces running container in privileged mode. - -ApplicationPort -=============== - -Defines a network port that need to be exposed by the application. -This is a structure with three properties: - -* `port`: port number - -* `protocol`: `TCP` or `UDP` - -* `scope`: one of `public`, `cloud`, `host` or `internal`. - This property specifies the scope of port visibility: within the single - docker instance (on single server) - `host`, within single - `DockerContainerHost` - `internal`, single OpenStack cloud - `cloud` - or `public` for ports that are bind to public floating IP. - - - -DockerVolume -============ - -Represents base class for Docker volumes. One of the two inheritors must be -used: - -* `DockerTempVolume`: temporary storage space - -* `DockerHostVolume`: a directory on the host machine that is mounted inside - container. The path on host server is specified by the `path` property - of `DockerHostVolume`. - - -DockerContainerHost -=================== - -Defines an interface that all applications capable of hosting Docker -applications must implement. Currently there are two implementations of this -interface: `DockerStandaloneHost` and `KubernetesPod`. - -It has the following property: - -* `name`: name of the application instance. - -It also has the following methods: - -* `hostContainer`: Docker applications call this method to register Docker - containers on the Docker host during deployment. It accepts single argument - - `container` - an instance of DockerContainer class. - - `deleteContainer`: deletes container from Docker host. Container is - identified by its name through `name` parameter. - - `getEndpoints`: returns a list of endpoints for specified Docker container - Container is identified by its name through `applicationName` parameter. - See below on endpoint format specification. - - `getInternalScopeId`: returns an common identifier for all Docker hosts - belonging to the same container manager (host aggregation used to group - together endpoints of `internal` scope. - - -Endpoint representation -======================= - -Docker container hosts are responsible for management of application -endpoints. Application define what ports they want to expose and what -should be the scope of visibility for those ports. It is up to the host -to map those ports to ports on hosting server and OpenStack floating IPs. - -Single port on the container might be accesses in different ways. -It usually it may be accessed using 127.0.0.1 address from other containers -on the same server, using internal IP from containers on the same cluster, -using internal OpenStack server IP from other servers in the same environment -or using floating IP for external access. Scope defines maximum level of -visibility in the order `host` -> `internal` -> `cloud` -> `public`. -Each subsequent scope extends the visibility for the previous one. So if -the application wants a `public` endpoint for its port the host allocates four -endpoints for that port starting from 127.0.0.1:port to access it from the -same server and up to FIP:port to access it from the Internet. Thus -each port/protocol pair results in 1-4 entries in `applicationEndpoints` list. - -Each entry of that list is a dictionary that has the following keys: - -* `address`: IP or hostname. -* `port`: port number that caller must use to access the application. -* `scope`: greatest visibility scope name for the endpoint. -* `portScope`: scope name for the port endpoint was allocated for. For example - if `ApplicationPort` had a 'local` scope then two endpoints will be allocated - (`host` and `local` and each of them will have `local` in `portScope`). -* `containerPort`: port number inside the container. -* `protocol`: `TCP` or `UDP`. There can be two endpoints with the same port - number that differ only in protocol. - - -Tips on Docker applications development -======================================= - -* MuranoPL can automatically convert dictionaries to an instances of - appropriate class when passing it as an input to a function that has - proper class() contract on that value. Thus in most cases data structures - can be represented as a dictionaries of property name->value form rather - than as MuranoPL objects (thus no need to use new() function to construct - them) - -* Use `getConnectionTo` method of DockerApplication to get endpoint to - access one docker application from another. If application A wants to talk - to application B then this method is called on A with an information about - what port of B it requires. The method is smart enough to return the nearest - endpoint. This if both A and B are located on the same server returned - endpoint will likely to have 127.0.0.1 as an address. - -* Call deploy() on dependent applications before retrieving endpoints or - obtaining connections to it. diff --git a/Docker/DockerInterfacesLibrary/package/Classes/ApplicationPort.yaml b/Docker/DockerInterfacesLibrary/package/Classes/ApplicationPort.yaml deleted file mode 100644 index 1f299948..00000000 --- a/Docker/DockerInterfacesLibrary/package/Classes/ApplicationPort.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker - std: io.murano - -Name: ApplicationPort - -Properties: - port: - Contract: $.int().notNull().check($ > 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/Docker/DockerInterfacesLibrary/package/Classes/DockerApplication.yaml b/Docker/DockerInterfacesLibrary/package/Classes/DockerApplication.yaml deleted file mode 100644 index ae74c09a..00000000 --- a/Docker/DockerInterfacesLibrary/package/Classes/DockerApplication.yaml +++ /dev/null @@ -1,119 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.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: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - - deploy: - Body: - - $.host.deploy() - - $container: $.getContainer() - - $repr: $._getContainerRepresentation($container) - - If: $.getAttr(container, null) != $repr - Then: - - $.onInstallationStart() - - Try: - - $.applicationEndpoints: $.host.hostContainer($container) - - $.setAttr(container, $repr) - Catch: - - As: e - Do: - - $formatString: 'Error: {0}' - - $._environment.reporter.report_error($, $formatString.format($e.message)) - - Rethrow: - Else: - - $.onInstallationFinish() - - - .destroy: - Body: - - If: $.getAttr(container, null) != null - Then: - - $container: $.getContainer() - - $.host.deleteContainer($container.name) - - $.setAttr(container, null) - - - 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) + $scopes - - 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/Docker/DockerInterfacesLibrary/package/Classes/DockerContainer.yaml b/Docker/DockerInterfacesLibrary/package/Classes/DockerContainer.yaml deleted file mode 100644 index 9982270a..00000000 --- a/Docker/DockerInterfacesLibrary/package/Classes/DockerContainer.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.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: {} - - privileged: - Contract: $.bool().notNull() - Default: false - -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 - privileged: $.privileged diff --git a/Docker/DockerInterfacesLibrary/package/Classes/DockerContainerHost.yaml b/Docker/DockerInterfacesLibrary/package/Classes/DockerContainerHost.yaml deleted file mode 100644 index 6ec12b0f..00000000 --- a/Docker/DockerInterfacesLibrary/package/Classes/DockerContainerHost.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.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/Docker/DockerInterfacesLibrary/package/Classes/DockerHelpers.yaml b/Docker/DockerInterfacesLibrary/package/Classes/DockerHelpers.yaml deleted file mode 100644 index eb68d6e4..00000000 --- a/Docker/DockerInterfacesLibrary/package/Classes/DockerHelpers.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.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: $labelsMap.select(list($, $labelsMap.get($)).join('=')).join(';') diff --git a/Docker/DockerInterfacesLibrary/package/Classes/DockerHostVolume.yaml b/Docker/DockerInterfacesLibrary/package/Classes/DockerHostVolume.yaml deleted file mode 100644 index 8c33a0e8..00000000 --- a/Docker/DockerInterfacesLibrary/package/Classes/DockerHostVolume.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker - -Name: DockerHostVolume - -Extends: DockerVolume - -Properties: - path: - Contract: $.string().notNull() - -Methods: - getType: - Body: - Return: HostPath - - getParameters: - Body: - Return: $.path - diff --git a/Docker/DockerInterfacesLibrary/package/Classes/DockerTempVolume.yaml b/Docker/DockerInterfacesLibrary/package/Classes/DockerTempVolume.yaml deleted file mode 100644 index 7f263042..00000000 --- a/Docker/DockerInterfacesLibrary/package/Classes/DockerTempVolume.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker - -Name: DockerTempVolume - -Extends: DockerVolume - -Methods: - getType: - Body: - Return: TempVolume - - getParameters: - Body: - Return: null diff --git a/Docker/DockerInterfacesLibrary/package/Classes/DockerVolume.yaml b/Docker/DockerInterfacesLibrary/package/Classes/DockerVolume.yaml deleted file mode 100644 index ea71663f..00000000 --- a/Docker/DockerInterfacesLibrary/package/Classes/DockerVolume.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker - -Name: DockerVolume - -Properties: - name: - Contract: $.string().notNull() - -Methods: - getType: - - getParameters: - - getRepresentation: - Body: - Return: - type: $.getType() - parameters: $.getParameters() - diff --git a/Docker/DockerInterfacesLibrary/package/LICENSE b/Docker/DockerInterfacesLibrary/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/DockerInterfacesLibrary/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/DockerInterfacesLibrary/package/manifest.yaml b/Docker/DockerInterfacesLibrary/package/manifest.yaml deleted file mode 100644 index 1afc04d6..00000000 --- a/Docker/DockerInterfacesLibrary/package/manifest.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Library -FullName: com.mirantis.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: - com.mirantis.docker.DockerApplication: DockerApplication.yaml - com.mirantis.docker.DockerContainer: DockerContainer.yaml - com.mirantis.docker.DockerContainerHost: DockerContainerHost.yaml - com.mirantis.docker.DockerHelpers: DockerHelpers.yaml - com.mirantis.docker.DockerHostVolume: DockerHostVolume.yaml - com.mirantis.docker.DockerTempVolume: DockerTempVolume.yaml - com.mirantis.docker.DockerVolume: DockerVolume.yaml - com.mirantis.docker.ApplicationPort: ApplicationPort.yaml diff --git a/Docker/DockerStandaloneHost/elements/docker/install.d/56-docker b/Docker/DockerStandaloneHost/elements/docker/install.d/56-docker deleted file mode 100755 index f5f8003f..00000000 --- a/Docker/DockerStandaloneHost/elements/docker/install.d/56-docker +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -eu - -install-packages curl -curl -sSL https://get.docker.com/ | sh - -echo 'DOCKER_OPTS="--bip=172.31.0.1/16 --fixed-cidr=172.31.0.0/16 --mtu=1450"' >> /etc/default/docker \ No newline at end of file diff --git a/Docker/DockerStandaloneHost/elements/readme.rst b/Docker/DockerStandaloneHost/elements/readme.rst deleted file mode 100644 index c580c1f6..00000000 --- a/Docker/DockerStandaloneHost/elements/readme.rst +++ /dev/null @@ -1,52 +0,0 @@ -Docker Elements -=============== - -This folders contains necessary DIB elements to build Docker image -expected by "Docker Standalone Host" Murano application. - - -Prerequisites -------------- - -1. Install diskimage-builder - -.. sourcecode:: bash - - sudo pip install diskimage-builder - -2. Install qemu-utils and kpartx - - -On Ubuntu, Debian: - -.. sourcecode:: bash - - sudo apt-get install qemu-utils kpartx - -On Centos, Fedora: - -.. sourcecode:: bash - - sudo yum install qemu-utils kpartx - - -Image building --------------- - -To build Debian-based image - -.. sourcecode:: bash - - sudo ELEMENTS_PATH=${murano_agent_root}/contrib/elements:${murano_apps_root}/Docker/DockerStandaloneHost/elements \ - DIB_RELEASE=jessie DIB_CLOUD_INIT_DATASOURCES="Ec2, ConfigDrive, OpenStack" disk-image-create vm debian murano-agent-debian \ - docker -o debian8-x64-docker - -To build Ubuntu-based image - -.. sourcecode:: bash - - sudo ELEMENTS_PATH=${murano_agent_root}/contrib/elements:${murano_apps_root}/Docker/DockerStandaloneHost/elements disk-image-create \ - vm ubuntu murano-agent docker -o ubuntu14.04-x64-docker - -Where ${murano_agent_root} is a path to murano-agent files -and ${murano_apps_root} is a path to murano-apps files. \ No newline at end of file diff --git a/Docker/DockerStandaloneHost/package/Classes/DockerStandaloneHost.yaml b/Docker/DockerStandaloneHost/package/Classes/DockerStandaloneHost.yaml deleted file mode 100644 index 4bf40dda..00000000 --- a/Docker/DockerStandaloneHost/package/Classes/DockerStandaloneHost.yaml +++ /dev/null @@ -1,307 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.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() - - dockerMirror: - Contract: $.string() - - gcloudKey: - 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: - .init: - 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() - - $resources: new(sys:Resources) - - $template: $resources.yaml('StartDocker.template') - - $.instance.agent.call($template, $resources) - - If: $.dockerMirror != null and $.dockerMirror != '' - or $.dockerRegistry != null and $.dockerRegistry != '' - Then: - - $._environment.reporter.report($this, 'Configuring Docker options') - - $template: $resources.yaml('SetupDockerOptions.template').bind(dict( - dockerRegistry => $.dockerRegistry, - dockerMirror => $.dockerMirror - )) - - $.instance.agent.call($template, $resources) - - If: $.gcloudKey != null and $.gcloudKey != '' - Then: - - $._environment.reporter.report($this, 'Authenticating to Google Container Registry') - - $template: $resources.yaml('LoginToGoogleRegistry.template').bind(dict( - gcloudKey => $.gcloudKey - )) - - $.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: $applicationPort.protocol.toLower() - 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, - privileged => $container.privileged - )) - - $._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.keys() - Then: - - Return: $applicationPorts.get($key) - - - $port: str($applicationPort.port) - - If: $port in $portMap.keys() - Then: - - $port: '1025' - - While: $port in $portMap.keys() - Do: - - $port: str(int($port) + 1) - - - $portMap[$port]: $applicationName - - $applicationPorts[$key]: $port - - - $.setAttr(portMap, $portMap) - - $.setAttr(applicationPorts, $applicationPorts) - - Return: int($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($key) - - 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.where($.applicationName != $applicationName) - - - deleteContainer: - Arguments: - - name: - Contract: $.string().notNull() - Body: - - If: $name in $.containers and $.instance.isDeployed() - 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/Docker/DockerStandaloneHost/package/LICENSE b/Docker/DockerStandaloneHost/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/DockerStandaloneHost/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/DockerStandaloneHost/package/Resources/LoginToGoogleRegistry.template b/Docker/DockerStandaloneHost/package/Resources/LoginToGoogleRegistry.template deleted file mode 100644 index 8ae78590..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/LoginToGoogleRegistry.template +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Login to google registry - -Parameters: - gcloudKey: $gcloudKey - -Body: | - loginToGoogleRegistry("'{0}'".format(args.gcloudKey)) - -Scripts: - loginToGoogleRegistry: - Type: Application - Version: 1.0.0 - EntryPoint: loginToGoogleRegistry.sh - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/DockerStandaloneHost/package/Resources/PullImage.template b/Docker/DockerStandaloneHost/package/Resources/PullImage.template deleted file mode 100644 index 8f9d1749..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/PullImage.template +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/DockerStandaloneHost/package/Resources/RemoveContainer.template b/Docker/DockerStandaloneHost/package/Resources/RemoveContainer.template deleted file mode 100644 index 3ac513b7..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/RemoveContainer.template +++ /dev/null @@ -1,31 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/DockerStandaloneHost/package/Resources/RunContainer.template b/Docker/DockerStandaloneHost/package/Resources/RunContainer.template deleted file mode 100644 index 80f57523..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/RunContainer.template +++ /dev/null @@ -1,47 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Run container - -Parameters: - appName: $appName - portMap: $portMap - volumeMap: $volumeMap - env: $env - image: $image - commands: $commands - privileged: $privileged - -Body: | - options = ['-d', '--name ' + args.appName] - for host_port, container_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)) - if args.privileged: - options.append("--privileged") - 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/Docker/DockerStandaloneHost/package/Resources/SetupDockerOptions.template b/Docker/DockerStandaloneHost/package/Resources/SetupDockerOptions.template deleted file mode 100644 index e53df4e5..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/SetupDockerOptions.template +++ /dev/null @@ -1,53 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Setup Docker options - -Parameters: - dockerRegistry: $dockerRegistry - dockerMirror: $dockerMirror - -Body: | - if args.dockerRegistry: - setupRegistry(args.dockerRegistry) - if args.dockerMirror: - setupMirror(args.dockerMirror) - restartDocker() - -Scripts: - setupMirror: - Type: Application - Version: 1.0.0 - EntryPoint: setupDockerMirror.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - - setupRegistry: - Type: Application - Version: 1.0.0 - EntryPoint: setupDockerRegistry.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - - restartDocker: - Type: Application - Version: 1.0.0 - EntryPoint: restartDocker.sh - Options: - captureStdout: false - captureStderr: false \ No newline at end of file diff --git a/Docker/DockerStandaloneHost/package/Resources/StartDocker.template b/Docker/DockerStandaloneHost/package/Resources/StartDocker.template deleted file mode 100644 index ab99b362..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/StartDocker.template +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Start docker service - -Body: | - startDocker() - -Scripts: - startDocker: - Type: Application - Version: 1.0.0 - EntryPoint: startDocker.sh - Options: - captureStdout: false - captureStderr: false - verifyExitcode: false diff --git a/Docker/DockerStandaloneHost/package/Resources/scripts/loginToGoogleRegistry.sh b/Docker/DockerStandaloneHost/package/Resources/scripts/loginToGoogleRegistry.sh deleted file mode 100644 index 12580569..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/scripts/loginToGoogleRegistry.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -docker login -e unused@arg.com -u _json_key -p "$1" https://gcr.io diff --git a/Docker/DockerStandaloneHost/package/Resources/scripts/restartDocker.sh b/Docker/DockerStandaloneHost/package/Resources/scripts/restartDocker.sh deleted file mode 100644 index 1e143648..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/scripts/restartDocker.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -service docker restart \ No newline at end of file diff --git a/Docker/DockerStandaloneHost/package/Resources/scripts/runDockerCommand.sh b/Docker/DockerStandaloneHost/package/Resources/scripts/runDockerCommand.sh deleted file mode 100644 index bb93eda6..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/scripts/runDockerCommand.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -docker "$@" diff --git a/Docker/DockerStandaloneHost/package/Resources/scripts/setupDockerMirror.sh b/Docker/DockerStandaloneHost/package/Resources/scripts/setupDockerMirror.sh deleted file mode 100644 index 0b8ae403..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/scripts/setupDockerMirror.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -source /etc/default/docker -DOCKER_OPTS+=" --registry-mirror=$1" -echo "DOCKER_OPTS=${DOCKER_OPTS}" > /etc/default/docker diff --git a/Docker/DockerStandaloneHost/package/Resources/scripts/setupDockerRegistry.sh b/Docker/DockerStandaloneHost/package/Resources/scripts/setupDockerRegistry.sh deleted file mode 100644 index dba43370..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/scripts/setupDockerRegistry.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -source /etc/default/docker -DOCKER_OPTS+=" --insecure-registry $1" -echo "DOCKER_OPTS=${DOCKER_OPTS}" > /etc/default/docker diff --git a/Docker/DockerStandaloneHost/package/Resources/scripts/startDocker.sh b/Docker/DockerStandaloneHost/package/Resources/scripts/startDocker.sh deleted file mode 100644 index e64e325e..00000000 --- a/Docker/DockerStandaloneHost/package/Resources/scripts/startDocker.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -service docker start \ No newline at end of file diff --git a/Docker/DockerStandaloneHost/package/UI/ui.yaml b/Docker/DockerStandaloneHost/package/UI/ui.yaml deleted file mode 100644 index 549a7300..00000000 --- a/Docker/DockerStandaloneHost/package/UI/ui.yaml +++ /dev/null @@ -1,116 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.mirantis.docker.DockerStandaloneHost - name: $.appConfiguration.name - dockerRegistry: $.appConfiguration.dockerRegistry - dockerMirror: $.appConfiguration.dockerMirror - gcloudKey: $.appConfiguration.gcloudKey - instance: - ?: - type: io.murano.resources.LinuxMuranoInstance - name: generateHostname($.instanceConfiguration.unitNamingPattern, 1) - flavor: $.instanceConfiguration.flavor - image: $.instanceConfiguration.image - keyname: $.instanceConfiguration.keyPair - assignFloatingIp: $.appConfiguration.assignFloatingIP - availabilityZone: $.instanceConfiguration.availabilityZone - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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: >- - Host IP or domain name of custom Docker registry to use. Leave empty for Docker default - required: false - - name: dockerMirror - type: string - label: Docker registry mirror URL - description: >- - URL of Docker registry mirror to use. Leave empty to not use one - required: false - - name: gcloudKey - type: string - label: Google registry key - regexpValidator: '^{(\s*"(\\(["\\\/bfnrt]|u[a-fA-F0-9]{4})|[^"\\\0-\x1F\x7F]+)*"\s*:\s*"(\\(["\\\/bfnrt]|u[a-fA-F0-9]{4})|[^"\\\0-\x1F\x7F]+)*"\s*(,|\s*}$))*$' - errorMessages: - invalid: Text should be a valid JSON. - description: >- - Contents of JSON key file. Used to authenticate to the Google Container Registry - 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: image - type: image - imageType: linux.docker - label: Instance image - description: >- - Select valid image for the application. Image should already be prepared and - registered in glance. - - name: flavor - type: flavor - label: Instance flavor - description: >- - Select registered in Openstack flavor. Consider that application performance - depends on this parameter. - required: false - requirements: - min_disk: 10 - min_memory_mb: 1024 - min_vcpus: 1 - - 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/Docker/DockerStandaloneHost/package/logo.png b/Docker/DockerStandaloneHost/package/logo.png deleted file mode 100644 index 2062a931..00000000 Binary files a/Docker/DockerStandaloneHost/package/logo.png and /dev/null differ diff --git a/Docker/DockerStandaloneHost/package/manifest.yaml b/Docker/DockerStandaloneHost/package/manifest.yaml deleted file mode 100644 index 9282234e..00000000 --- a/Docker/DockerStandaloneHost/package/manifest.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.mirantis.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: - com.mirantis.docker.DockerStandaloneHost: DockerStandaloneHost.yaml -Require: - com.mirantis.docker.Interfaces: diff --git a/Docker/Kubernetes/KubernetesCluster/elements/docker/install.d/56-docker b/Docker/Kubernetes/KubernetesCluster/elements/docker/install.d/56-docker deleted file mode 100755 index f5f8003f..00000000 --- a/Docker/Kubernetes/KubernetesCluster/elements/docker/install.d/56-docker +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -eu - -install-packages curl -curl -sSL https://get.docker.com/ | sh - -echo 'DOCKER_OPTS="--bip=172.31.0.1/16 --fixed-cidr=172.31.0.0/16 --mtu=1450"' >> /etc/default/docker \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/elements/kubernetes/element-deps b/Docker/Kubernetes/KubernetesCluster/elements/kubernetes/element-deps deleted file mode 100644 index 6d0eac4b..00000000 --- a/Docker/Kubernetes/KubernetesCluster/elements/kubernetes/element-deps +++ /dev/null @@ -1 +0,0 @@ -docker \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/elements/kubernetes/install.d/57-kubernetes b/Docker/Kubernetes/KubernetesCluster/elements/kubernetes/install.d/57-kubernetes deleted file mode 100755 index c7582c8b..00000000 --- a/Docker/Kubernetes/KubernetesCluster/elements/kubernetes/install.d/57-kubernetes +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -install-packages curl wget linux-libc-dev git gcc libc6-dev bridge-utils haproxy ntp ntpdate - -SVC_ROOT=/opt/bin - -ETCD_LATEST_VERSION="v3.0.4" -KUBE_LATEST_VERSION="v1.3.0" -FLANNEL_LATEST_VERSION="v0.5.5" - -ETCD_LATEST_URL="https://github.com/coreos/etcd/releases/download/${ETCD_LATEST_VERSION}/etcd-${ETCD_LATEST_VERSION}-linux-amd64.tar.gz" -KUBE_LATEST_URL="https://github.com/GoogleCloudPlatform/kubernetes/releases/download/${KUBE_LATEST_VERSION}/kubernetes.tar.gz" -FLANNEL_LATEST_URL="https://github.com/coreos/flannel/archive/${FLANNEL_LATEST_VERSION}.tar.gz" - -mkdir -p ${SVC_ROOT} -pushd ${SVC_ROOT} - -# Install latest etcd -wget -O ${SVC_ROOT}/etcd-latest.tar.gz $ETCD_LATEST_URL -tar xzvf ${SVC_ROOT}/etcd-latest.tar.gz -rm -f ${SVC_ROOT}/etcd-latest.tar.gz - -mv ${SVC_ROOT}/etcd-${ETCD_LATEST_VERSION}-linux-amd64/etcd ${SVC_ROOT}/ -mv ${SVC_ROOT}/etcd-${ETCD_LATEST_VERSION}-linux-amd64/etcdctl ${SVC_ROOT}/ - -rm -rf ${SVC_ROOT}/etcd-${ETCD_LATEST_VERSION}-linux-amd64 - -# Install latest kubernetes -wget -O ${SVC_ROOT}/kubernetes-latest.tar.gz $KUBE_LATEST_URL -tar xzvf ${SVC_ROOT}/kubernetes-latest.tar.gz -rm -f ${SVC_ROOT}/kubernetes-latest.tar.gz - -tar xzvf ${SVC_ROOT}/kubernetes/server/kubernetes-server-linux-amd64.tar.gz -mv ${SVC_ROOT}/kubernetes ${SVC_ROOT}/kubernetes-latest - -cp ${SVC_ROOT}/kubernetes-latest/server/bin/* ${SVC_ROOT}/ - -# Install Go -wget -O go.tar.gz https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz -tar xzvf go.tar.gz -mv ${SVC_ROOT}/go /usr/local/go -export PATH=$PATH:/usr/local/go/bin - -# Build flannel -wget -O ${SVC_ROOT}/flannel-latest.tar.gz $FLANNEL_LATEST_URL -tar xzvf ${SVC_ROOT}/flannel-latest.tar.gz -rm -f ${SVC_ROOT}/flannel-latest.tar.gz - -mv ${SVC_ROOT}/flannel-* ${SVC_ROOT}/flannel - -pushd ${SVC_ROOT}/flannel -${SVC_ROOT}/flannel/build -popd - -cp ${SVC_ROOT}/flannel/bin/flanneld ${SVC_ROOT}/flanneld - -rm -rf ${SVC_ROOT}/flannel - - -# Update system PATH -sed -i 's/PATH="/PATH="\/opt\/bin:\/opt\/go\/bin:/g' /etc/environment - - -wget -O confd https://github.com/kelseyhightower/confd/releases/download/v0.7.1/confd-0.7.1-linux-amd64 -mv confd /usr/local/bin/confd -chmod +x /usr/local/bin/confd -mkdir -p /etc/confd/{conf.d,templates} - -popd - -if [[ $(lsb_release -c -s) == 'jessie' ]]; then - #Enable cgroup memory if Debian 8 is used. Required by k8s since 1.2 - echo 'GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"' >> /etc/default/grub - - #Do not start haproxy on vm boot - systemctl disable haproxy -fi diff --git a/Docker/Kubernetes/KubernetesCluster/elements/readme.rst b/Docker/Kubernetes/KubernetesCluster/elements/readme.rst deleted file mode 100644 index 3cf3351c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/elements/readme.rst +++ /dev/null @@ -1,57 +0,0 @@ -Kubernetes Elements -=================== - -This folders contains necessary DIB elements to build Kubernetes image -expected by "Kubernetes Cluster" Murano application. - - -Prerequisites -------------- - -1. Install diskimage-builder - -.. sourcecode:: bash - - sudo pip install diskimage-builder - -2. Install qemu-uils and kpartx - -On Ubuntu, Debian: - -.. sourcecode:: bash - - sudo apt-get install qemu-utils kpartx - - -On Centos, Fedora: - -.. sourcecode:: bash - - sudo yum install qemu-utils kpartx - - -Image building --------------- - -To build Debian-based image - -.. sourcecode:: bash - - sudo ELEMENTS_PATH=${murano_agent_root}/contrib/elements:${murano_apps_root}/Docker/Kubernetes/KubernetesCluster/elements \ - DIB_RELEASE=jessie DIB_CLOUD_INIT_DATASOURCES="Ec2, ConfigDrive, OpenStack" disk-image-create vm debian murano-agent-debian \ - docker kubernetes -o debian8-x64-kubernetes - -To build Ubuntu-based image - -.. sourcecode:: bash - - sudo ELEMENTS_PATH=${murano_agent_root}/contrib/elements:${murano_apps_root}/Docker/Kubernetes/KubernetesCluster/elements disk-image-create \ - vm ubuntu murano-agent docker kubernetes -o ubuntu14.04-x64-kubernetes - -Where ${murano_agent_root} is a path to murano-agent files -and ${murano_apps_root} is a path to murano-apps files. - -Please be careful that diskimage-builder uses tmpfs if 8 Gb memory or bigger is detected. -In case of 8 Gb tmpfs size is not enough to build kubernetes. -Use DIB_NO_TMPFS=1 in this case or hack diskimage-builder. - \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml b/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml deleted file mode 100644 index 721d2d1b..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml +++ /dev/null @@ -1,533 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker.kubernetes - std: io.murano - res: io.murano.resources - sys: io.murano.system - docker: com.mirantis.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().check($ > 0) - Usage: InOut - - gatewayNodes: - Contract: - - $.class(KubernetesGatewayNode).notNull() - - 1 - - dockerRegistry: - Contract: $.string() - - dockerMirror: - Contract: $.string() - - gcloudKey: - 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: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - isAvailable: - Body: - - Return: $.masterNode.isAvailable() - - - deploy: - Body: - - $.serviceEndpoints: $.getAttr(serviceEndpoints, list()) - - 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) - - - $prevNodeCount: $.getAttr(lastNodeCount, 0) - - $prevGatewayCount: $.getAttr(lastGatewayCount, 0) - - - If: $prevNodeCount != $.nodeCount or $prevGatewayCount != $.gatewayCount - Then: - - $._environment.reporter.report($this, 'Setting up Kubernetes cluster') - - Parallel: - - $.masterNode.deployInstance() - - $.minionNodes.take($.nodeCount).pselect($.deployInstance()) - - $.gatewayNodes.take($.gatewayCount).pselect($.deployInstance()) - - - $.masterNode.setupEtcd() - - $.minionNodes.skip($.nodeCount).select($.removeFromCluster()) - - $.gatewayNodes.skip($.gatewayCount).select($.removeFromCluster()) - - - $.minionNodes.take($.nodeCount).select($.setupEtcd()) - - $.gatewayNodes.take($.gatewayCount).select($.setupEtcd()) - - - $.masterNode.setupNode() - - - Parallel: - - $.minionNodes.take($.nodeCount).pselect($.setupNode()) - - $.gatewayNodes.take($.gatewayCount).pselect($.setupNode()) - - - $._environment.stack.push() - - $._updateServicePublicIps() - - $.setAttr(lastNodeCount, $.nodeCount) - - $.setAttr(lastGatewayCount, $.gatewayCount) - - $._environment.reporter.report($this, 'Kubernetes cluster is up and running') - - $.setAttr(serviceEndpoints, $.serviceEndpoints) - - - 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) - - - deleteReplicationController: - Arguments: - - id: - Contract: $.string().notNull() - Body: - - $.deploy() - - $resources: new(sys:Resources) - - $template: $resources.yaml('DeleteReplicationController.template').bind(dict(rcId => $id)) - - $.masterNode.instance.agent.call($template, $resources) - - - deletePods: - Arguments: - - labels: - Contract: - $.string().notNull(): $.string().notNull() - Body: - - $.deploy() - - $resources: new(sys:Resources) - - $template: $resources.yaml('DeletePods.template').bind(dict(labels => $labels)) - - $.masterNode.instance.agent.call($template, $resources) - - createService: - Arguments: - - applicationName: - Contract: $.string().notNull() - - applicationPorts: - Contract: - - $.class(docker:ApplicationPort) - - podId: - Contract: $.string().notNull() - Body: - - $.serviceEndpoints: $.getAttr(serviceEndpoints, list()) - - $currentEndpoints: $.serviceEndpoints.where($.applicationName = $applicationName and $.podId = $podId and $.scope = internal) - - $serviceName: format('{0}-{1}', randomName(), $applicationName).substring(0, 24).toLower() - - $endpointMap: {} - - For: endpoint - In: $currentEndpoints - Do: - - $serviceName: $endpoint.serviceName - - $key: format('{0}-{1}', $endpoint.containerPort, $endpoint.protocol) - - $endpointMap[$key]: $endpoint - - - $serviceChanged: len(list($applicationPorts.where($.scope != host))) != len($currentEndpoints) - - - $servicePorts: [] - - For: applicationPort - In: $applicationPorts.where($.scope != host) - Do: - - $key: format('{0}-{1}', $applicationPort.port, $applicationPort.protocol) - - $endpoint: $endpointMap.get($key) - - If: $endpoint != null - Then: - - $record: - - assignedPort: $endpoint.port - applicationPort: $applicationPort - Else: - - $port: $._findUnusedPort($applicationPort.port, $applicationPort.protocol) - - $record: - - assignedPort: $port - applicationPort: $applicationPort - - $serviceChanged: true - - - $securityGroupIngress: - - ToPort: $port - FromPort: $port - IpProtocol: $applicationPort.protocol.toLower() - External: $applicationPort.scope = public - - $._environment.securityGroupManager.addGroupIngress($securityGroupIngress) - - - $servicePorts: $servicePorts + $record - - - If: $serviceChanged - Then: - - $serviceIp: $._createOrUpdateService( - name => $serviceName, - ports => $servicePorts, - podId => $podId, - isNew => len($currentEndpoints) = 0 - ) - - $._updateEndpoints( - ports => $servicePorts, - applicationName => $applicationName, - podId => $podId, - serviceName => $serviceName, - serviceIp => $serviceIp - ) - - $._environment.stack.push() - - $.setAttr(serviceEndpoints, $.serviceEndpoints) - - - _createOrUpdateService: - Arguments: - - name: - Contract: $.string().notNull() - - ports: - Contract: - - assignedPort: $.int().notNull() - applicationPort: $.class(docker:ApplicationPort).notNull() - - podId: - Contract: $.string().notNull() - - isNew: - Contract: $.bool().notNull() - - Body: - - $serviceDefinition: - apiVersion: v1 - kind: Service - metadata: - labels: - name: $name - name: $name - spec: - ports: $ports.select(dict( - port => $.assignedPort, - targetPort => $.applicationPort.port, - protocol => $.applicationPort.protocol, - name => str($.assignedPort) - )) - selector: - id: $podId - - - If: $.gatewayCount = 0 - Then: - - $serviceDefinition.spec.publicIPs: $.minionNodes.take($.nodeCount).select($.getIp()) - - - $resources: new(sys:Resources) - - $template: $resources.yaml('UpdateService.template').bind(dict( - serviceDefinition => $serviceDefinition, - isNew => $isNew - )) - - Return: $.masterNode.instance.agent.call($template, $resources) - - - _updateEndpoints: - Arguments: - - ports: - Contract: - - assignedPort: $.int().notNull() - applicationPort: $.class(docker:ApplicationPort).notNull() - - applicationName: - Contract: $.string().notNull() - - podId: - Contract: $.string().notNull() - - serviceName: - Contract: $.string().notNull() - - serviceIp: - Contract: $.string().notNull() - Body: - - $.serviceEndpoints: $.serviceEndpoints.where($.applicationName != $applicationName or $.podId != $podId) - - For: port - In: $ports - Do: - - $newEndpoint: - port: $port.assignedPort - address: $serviceIp - scope: internal - portScope: $port.applicationPort.scope - applicationName: $applicationName - containerPort: $port.applicationPort.port - protocol: $port.applicationPort.protocol - podId: $podId - serviceName: $serviceName - - - $.serviceEndpoints: $.serviceEndpoints + list($newEndpoint) - - If: $port.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 $port.applicationPort.scope = public - Then: - - $newEndpoint.address: $t.instance.floatingIpAddress - - $newEndpoint.scope: public - - $.serviceEndpoints: $.serviceEndpoints + list($newEndpoint) - - $newEndpoint: - port: $port.applicationPort.port - address: '127.0.0.1' - scope: host - portScope: $port.applicationPort.scope - containerPort: $port.applicationPort.port - protocol: $port.applicationPort.protocol - applicationName: $applicationName - podId: $podId - serviceName: null - - $.serviceEndpoints: $.serviceEndpoints + list($newEndpoint) - - - _updateServicePublicIps: - Body: - - $prevNodeCount: $.getAttr(lastNodeCount, 0) - - $prevGatewayCount: $.getAttr(lastGatewayCount, 0) - - $gatewayModeChanged: $prevGatewayCount != $.gatewayCount and $prevGatewayCount * $.gatewayCount = 0 - - If: $prevGatewayCount > 0 and $.gatewayCount > 0 - Then: - - Return: - - If: $prevGatewayCount = 0 and $.gatewayCount = 0 and $prevNodeCount = $.nodeCount - Then: - - Return: - - $serviceNameMap: {} - - For: endpoint - In: $.serviceEndpoints - Do: - - $serviceName: $endpoint.serviceName - - If: $serviceName != null - Then: - - $serviceNameMap[$serviceName]: true - - $uniqueServiceNames: $serviceNameMap.keys() - - If: len($uniqueServiceNames) > 0 - Then: - - $publicIPs: $.minionNodes.take($.nodeCount).select($.getIp()) - - $resources: new(sys:Resources) - - $template: $resources.yaml('PatchServices.template').bind(dict( - services => $uniqueServiceNames, - publicIPs => $publicIPs - )) - - $.masterNode.instance.agent.call($template, $resources) - - - deleteServices: - Arguments: - - applicationName: - Contract: $.string().notNull() - - podId: - Contract: $.string().notNull() - Body: - - $.serviceEndpoints: $.getAttr(serviceEndpoints, list()) - - $resources: new(sys:Resources) - - $services: $.serviceEndpoints.where($.scope = internal and $.podId = $podId).select($.serviceName) - - $template: $resources.yaml('DeleteServices.template').bind(dict( - services => $services - )) - - $.masterNode.instance.agent.call($template, $resources) - - $.serviceEndpoints: $.serviceEndpoints.where($.podId != $podId) - - $.setAttr(serviceEndpoints, $.serviceEndpoints) - - - _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 - - - scaleNodesUp: - Usage: Action - Body: - - If: $.nodeCount < len($.minionNodes) - Then: - - $._environment.reporter.report($this, 'Scaling up Kubernetes cluster') - - $.nodeCount: $.nodeCount + 1 - - $.deploy() - Else: - - $._environment.reporter.report($this, 'The maximum number of nodes has been reached') - - - scaleNodesDown: - Usage: Action - Body: - - If: $.nodeCount > 1 - Then: - - $._environment.reporter.report($this, 'Scaling Kubernetes cluster down') - - $.nodeCount: $.nodeCount - 1 - - $.deploy() - Else: - - $._environment.reporter.report($this, 'At least one node must be in cluster') - - - scaleGatewaysUp: - Usage: Action - Body: - - If: $.gatewayCount < len($.gatewayNodes) - Then: - - $._environment.reporter.report($this, 'Adding new gateway node') - - $.gatewayCount: $.gatewayCount + 1 - - $.deploy() - Else: - - $._environment.reporter.report($this, 'The maximum number of nodes has been reached') - - - scaleGatewaysDown: - Usage: Action - Body: - - If: $.gatewayCount > 1 - Then: - - $._environment.reporter.report($this, 'Removing gateway node') - - $.gatewayCount: $.gatewayCount - 1 - - $.deploy() - Else: - - $._environment.reporter.report($this, 'No gateway nodes that can be removed') - - - - scaleRc: - Arguments: - - rcName: - Contract: $.string().notNull() - - newSize: - Contract: $.int().notNull() - Body: - - $resources: new(sys:Resources) - - $template: $resources.yaml('ScaleRc.template').bind(dict( - rcName => $rcName, - newSize => $newSize - )) - - $.masterNode.instance.agent.call($template, $resources) - - - restartContainers: - Arguments: - - podName: - Contract: $.string().notNull() - - Body: - - $.minionNodes.take($.nodeCount).pselect($.restartContainers(podName => $podName)) diff --git a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesGatewayNode.yaml b/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesGatewayNode.yaml deleted file mode 100644 index e888f4c3..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesGatewayNode.yaml +++ /dev/null @@ -1,92 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker.kubernetes - std: io.murano - res: io.murano.resources - sys: io.murano.system - -Name: KubernetesGatewayNode - -Extends: KubernetesNode - -Methods: - .init: - 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) - - $._environment.reporter.report( - $this, 'Gateway {0} is now available at {1}'.format($.instance.name, $.getIp(true))) - - $.setAttr(nodeConfigured, true) - - removeFromCluster: - Body: - - If: $.getAttr(nodeConfigured, false) - Then: - - $._environment.reporter.report($this, 'Deleting Gateway Node') - - $resources: new(sys:Resources) - - $template: $resources.yaml('EtcdRemoveMember.template').bind(dict( - nodeId => $.getIp() - )) - - $.instance.agent.call($template, $resources) - - $ip: $.getIp(true) - - $.instance.releaseResources() - - $._environment.reporter.report($this, 'Gateway {0} at {1} was deleted'.format($.instance.name, $ip)) - - $.setAttr(nodeConfigured, false) - - $.setAttr(etcdConfigured, false) - - $.setAttr(instanceDeployed, false) - diff --git a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesMasterNode.yaml b/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesMasterNode.yaml deleted file mode 100644 index 21353a43..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesMasterNode.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker.kubernetes - std: io.murano - res: io.murano.resources - sys: io.murano.system - -Name: KubernetesMasterNode - -Extends: KubernetesNode - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - - deployInstance: - Body: - - If: not $.getAttr(instanceDeployed, false) - Then: - - $._environment.reporter.report($this, 'Creating Kubernetes Master') - - super($, $.deployInstance()) - - $.setAttr(instanceDeployed, true) - - - setupEtcd: - Body: - - If: not $.getAttr(etcdConfigured, false) - Then: - - $._environment.reporter.report($, 'Configuring etcd master node') - - $resources: new(sys:Resources) - - $template: $resources.yaml('MasterEtcdSetup.template').bind(dict( - name => $.instance.name, - ip => $.getIp() - )) - - $.instance.agent.call($template, $resources) - - $.setAttr(etcdConfigured, true) - - - setupNode: - Body: - - If: not $.getAttr(nodeConfigured, false) - Then: - - $resources: new(sys:Resources) - - $._environment.reporter.report($this, 'Setup Flannel network on master node') - - $template: $resources.yaml('SetupFlannelMaster.template') - - $.instance.agent.call($template, $resources) - - - $._environment.reporter.report($this, 'Setup Kubernetes API host') - - $resources: new(sys:Resources) - - $template: $resources.yaml('KubeMasterSetup.template').bind(dict( - name => $.instance.name, - ip => $.getIp() - )) - - $.instance.agent.call($template, $resources) - - $.setAttr(nodeConfigured, true) - - $msg: 'Kubernetes API is now available at http://{0}:8080' - - $ip: coalesce($.instance.floatingIpAddress, $.getIp()) - - $._environment.reporter.report($this, $msg.format($ip)) - - isAvailable: - Body: - Return: $.instance.isDeployed() - diff --git a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesMinionNode.yaml b/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesMinionNode.yaml deleted file mode 100644 index 4e49eb2c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesMinionNode.yaml +++ /dev/null @@ -1,131 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker.kubernetes - std: io.murano - res: io.murano.resources - sys: io.murano.system - -Name: KubernetesMinionNode - -Extends: KubernetesNode - -Properties: - exposeCAdvisor: - Contract: $.bool().notNull() - Default: false - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._cluster: $.find(KubernetesCluster).require() - - - deployInstance: - Body: - - If: not $.getAttr(instanceDeployed, false) - Then: - - $._environment.reporter.report($this, 'Creating Kubernetes Node {0}'.format($.instance.name)) - - 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) - - - $securityGroupIngress: - - ToPort: 4194 - FromPort: 4194 - IpProtocol: tcp - External: $.exposeCAdvisor - - $._environment.securityGroupManager.addGroupIngress($securityGroupIngress) - - - $._environment.reporter.report($, 'Setup Kubernetes Node on {0}'.format($.instance.name)) - - $template: $resources.yaml('KubeMinionSetup.template').bind(dict( - name => $.instance.name, - ip => $.getIp(), - masterIp => $._cluster.masterNode.getIp(), - dockerRegistry => $._cluster.dockerRegistry, - dockerMirror => $._cluster.dockerMirror, - gcloudKey => $._cluster.gcloudKey - )) - - $.instance.agent.call($template, $resources) - - $.setAttr(nodeConfigured, true) - - $msg: 'cAdvisor monitoring for Node {0} is now available at http://{1}:4194' - - $ip: $.getIp($.exposeCAdvisor) - - $._environment.reporter.report($this, $msg.format($.instance.name, $ip)) - - - removeFromCluster: - Body: - - If: $.getAttr(nodeConfigured, false) - Then: - - $._environment.reporter.report($this, 'Deleting Kubernetes Node') - - $resources: new(sys:Resources) - - $template: $resources.yaml('EtcdRemoveMember.template').bind(dict( - nodeId => $.getIp() - )) - - $.instance.agent.call($template, $resources) - - $template: $resources.yaml('RemoveMinion.template').bind(dict( - nodeId => $.getIp() - )) - - $._cluster.masterNode.instance.agent.call($template, $resources) - - $.instance.releaseResources() - - $._environment.reporter.report($this, 'Node {0} was deleted'.format($.instance.name)) - - $.setAttr(nodeConfigured, false) - - $.setAttr(etcdConfigured, false) - - $.setAttr(instanceDeployed, false) - - - restartContainers: - Arguments: - - podName: - Contract: $.string().notNull() - - Body: - - $._environment.reporter.report($this, 'Restarting {0} containers on {1}'.format($podName, $.instance.name)) - - $resources: new(sys:Resources) - - $template: $resources.yaml('RestartContainers.template').bind(dict( - podName => $podName - )) - - $.instance.agent.call($template, $resources) - - $._environment.reporter.report($this, '{0} containers on {1} restarted'.format($podName, $.instance.name)) diff --git a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesNode.yaml b/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesNode.yaml deleted file mode 100644 index 9db8995e..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesNode.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker.kubernetes - std: io.murano - res: io.murano.resources - sys: io.murano.system - -Name: KubernetesNode - - -Properties: - instance: - Contract: $.class(res:LinuxMuranoInstance).notNull() - - -Methods: - getIp: - Arguments: - - preferFloatingIp: - Contract: $.bool().notNull() - Default: false - Body: - - $ip: $.instance.ipAddresses[0] - - If: $preferFloatingIp - Then: - - Return: coalesce($.instance.floatingIpAddress, $ip) - Else: - - Return: $.instance.ipAddresses[0] - - - deployInstance: - Body: - - $.instance.deploy() - - - setupEtcd: - setupNode: - removeFromCluster: diff --git a/Docker/Kubernetes/KubernetesCluster/package/LICENSE b/Docker/Kubernetes/KubernetesCluster/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/DeletePods.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/DeletePods.template deleted file mode 100644 index bbae970d..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/DeletePods.template +++ /dev/null @@ -1,33 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Delete Pods - -Parameters: - labels: $labels - -Body: | - labels_str = ','.join(map(lambda t: '='.join(t), args.labels.items())) - deletePods(labels_str) - -Scripts: - deletePods: - Type: Application - Version: 1.0.0 - EntryPoint: deletePods.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/DeleteReplicationController.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/DeleteReplicationController.template deleted file mode 100644 index 81f105ce..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/DeleteReplicationController.template +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Delete Replication Controller - -Parameters: - rcId: $rcId - -Body: | - return deleteReplicationController(args.rcId).stdout - -Scripts: - deleteReplicationController: - Type: Application - Version: 1.0.0 - EntryPoint: deleteReplicationController.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/DeleteServices.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/DeleteServices.template deleted file mode 100644 index 774588c8..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/DeleteServices.template +++ /dev/null @@ -1,34 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Delete Services - -Parameters: - services: $services - -Body: | - services = set(args.services) - for service in services: - deleteService(service) - -Scripts: - deleteService: - Type: Application - Version: 1.0.0 - EntryPoint: deleteService.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/EtcdAddMember.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/EtcdAddMember.template deleted file mode 100644 index 69f5c227..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/EtcdAddMember.template +++ /dev/null @@ -1,33 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/Kubernetes/KubernetesCluster/package/Resources/EtcdRemoveMember.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/EtcdRemoveMember.template deleted file mode 100644 index d6cebf13..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/EtcdRemoveMember.template +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Remove etcd member - -Parameters: - nodeId: $nodeId - -Body: | - removeMember(args.nodeId) - -Scripts: - removeMember: - Type: Application - Version: 1.0.0 - EntryPoint: removeEtcdMember.sh - Files: [] - Options: - captureStdout: false - captureStderr: false - verifyExitcode: false diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/HAProxySetup.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/HAProxySetup.template deleted file mode 100644 index 5a9b8249..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/HAProxySetup.template +++ /dev/null @@ -1,37 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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 - - systemd/confd.service - - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template deleted file mode 100644 index af5965ba..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template +++ /dev/null @@ -1,48 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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 - - environ/apiserver - - environ/kube-config - - systemd/kube-apiserver.service - - systemd/kube-scheduler.service - - systemd/kube-controller-manager.service - - - Options: - captureStdout: true - captureStderr: true \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/KubeMinionSetup.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/KubeMinionSetup.template deleted file mode 100644 index 0807b3ea..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/KubeMinionSetup.template +++ /dev/null @@ -1,89 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Setup Kubernetes Node - -Parameters: - name: $name - ip: $ip - masterIp: $masterIp - dockerRegistry: $dockerRegistry - dockerMirror: $dockerMirror - gcloudKey: $gcloudKey - -Body: | - if args.dockerRegistry: - setupRegistry(args.dockerRegistry) - if args.dockerMirror: - setupMirror(args.dockerMirror) - if args.gcloudKey: - loginToGoogleRegistry("'{0}'".format(args.gcloudKey)) - restartDocker() - setup('{0} {1} {2}'.format(args.name, args.ip, args.masterIp)) - -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 - - environ/kubelet - - environ/kube-config - - systemd/kube-proxy.service - - systemd/kubelet.service - - Options: - captureStdout: true - captureStderr: true - - setupRegistry: - Type: Application - Version: 1.0.0 - EntryPoint: setupDockerRegistry.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - - setupMirror: - Type: Application - Version: 1.0.0 - EntryPoint: setupDockerMirror.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - - loginToGoogleRegistry: - Type: Application - Version: 1.0.0 - EntryPoint: loginToGoogleRegistry.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - - restartDocker: - Type: Application - Version: 1.0.0 - EntryPoint: restartDocker.sh - Options: - captureStdout: false - captureStderr: false diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/MasterEtcdSetup.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/MasterEtcdSetup.template deleted file mode 100644 index 4aa7e466..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/MasterEtcdSetup.template +++ /dev/null @@ -1,37 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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 - - environ/etcd - - systemd/etcd.service - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/MemberEtcdSetup.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/MemberEtcdSetup.template deleted file mode 100644 index d4886146..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/MemberEtcdSetup.template +++ /dev/null @@ -1,38 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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 - - environ/etcd - - systemd/etcd.service - - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/PatchServices.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/PatchServices.template deleted file mode 100644 index 3fbad21e..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/PatchServices.template +++ /dev/null @@ -1,35 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Patch Service - -Parameters: - services: $services - publicIPs: $publicIPs - -Body: | - import json - patch = json.dumps({'apiVersion': 'v1', 'spec': {'publicIPs': args.publicIPs}}) - for service in args.services: - patchService("{0} '{1}'".format(service, patch)) - -Scripts: - patchService: - Type: Application - Version: 1.0.0 - EntryPoint: patchService.sh - Files: [] - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/RemoveMinion.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/RemoveMinion.template deleted file mode 100644 index 82851f1c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/RemoveMinion.template +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Remove Kubernetes Node - -Parameters: - nodeId: $nodeId - -Body: | - removeMinion(args.nodeId) - -Scripts: - removeMinion: - Type: Application - Version: 1.0.0 - EntryPoint: removeMinion.sh - Files: [] - Options: - captureStdout: true - captureStderr: true - diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/RestartContainers.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/RestartContainers.template deleted file mode 100644 index 5d711330..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/RestartContainers.template +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Restart Docker Containers - -Parameters: - podName: $podName - -Body: | - restartContainers(args.podName) - -Scripts: - restartContainers: - Type: Application - Version: 1.0.0 - EntryPoint: restartContainers.sh - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/ScaleRc.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/ScaleRc.template deleted file mode 100644 index 8dcaa56c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/ScaleRc.template +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 2.0.0 -Version: 1.0.0 -Name: Scale Pod - -Parameters: - rcName: $rcName - newSize: $newSize - -Body: | - return scaleRc('{0} {1}'.format(args.rcName, args.newSize)).stdout - -Scripts: - scaleRc: - Type: Application - Version: 1.0.0 - EntryPoint: scale-rc.sh - Files: [] - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelMaster.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelMaster.template deleted file mode 100644 index 8f88d510..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelMaster.template +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelNode.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelNode.template deleted file mode 100644 index ebc67ae5..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/SetupFlannelNode.template +++ /dev/null @@ -1,35 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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 - - systemd/flanneld.service - - systemd/docker.service - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdatePod.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdatePod.template deleted file mode 100644 index 50a08492..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdatePod.template +++ /dev/null @@ -1,38 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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}'.format(args.isNew, args.podDefinition['metadata']['name'], fileName)).stdout - -Scripts: - updatePod: - Type: Application - Version: 1.0.0 - EntryPoint: updatePod.sh - Files: [] - Options: - captureStdout: true - captureStderr: true diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdateReplicationController.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdateReplicationController.template deleted file mode 100644 index e50f2cfe..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdateReplicationController.template +++ /dev/null @@ -1,35 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdateService.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdateService.template deleted file mode 100644 index 42cf9f42..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/UpdateService.template +++ /dev/null @@ -1,48 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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}'.format(args.isNew, args.serviceDefinition['metadata']['name'], fileName)) - return getServiceIp(args.serviceDefinition['metadata']['name']).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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-master b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-master deleted file mode 100644 index 0b1aeff3..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-master +++ /dev/null @@ -1,2 +0,0 @@ -# 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-member b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-member deleted file mode 100644 index 9dd106aa..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-member +++ /dev/null @@ -1,11 +0,0 @@ -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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/flanneld b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/flanneld deleted file mode 100644 index 0e8cc345..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/flanneld +++ /dev/null @@ -1,7 +0,0 @@ -# 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/haproxy b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/haproxy deleted file mode 100644 index 9a2ee791..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/haproxy +++ /dev/null @@ -1,4 +0,0 @@ -# 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-apiserver b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-apiserver deleted file mode 100644 index 880235f9..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-apiserver +++ /dev/null @@ -1,14 +0,0 @@ -#Kube-Apiserver Upstart and SysVinit configuration file - -# Customize kube-apiserver binary location -KUBE_APISERVER="/opt/bin/hyperkube" - -# 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 \ - --allow_privileged=true" - -# Add more environment settings used by kube-apiserver here \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-controller-manager b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-controller-manager deleted file mode 100644 index 47900012..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-controller-manager +++ /dev/null @@ -1,10 +0,0 @@ - # Kube-Controller-Manager Upstart and SysVinit configuration file - - # Customize kube-controller-manager binary location - KUBE_CONTROLLER_MANAGER="/opt/bin/hyperkube" - - # Use KUBE_CONTROLLER_MANAGER_OPTS to modify the start/restart options - KUBE_CONTROLLER_MANAGER_OPTS="--master=127.0.0.1:8080 \ - --logtostderr=false --log_dir=/var/log/kubernetes" - - # Add more environment settings used by kube-controller-manager here \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-proxy b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-proxy deleted file mode 100644 index 2ca90532..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-proxy +++ /dev/null @@ -1,9 +0,0 @@ -# Kube-Proxy Upstart and SysVinit configuration file - -# Customize kube-proxy binary location -KUBE_PROXY="/opt/bin/hyperkube" - -# Use KUBE_PROXY_OPTS to modify the start/restart options -KUBE_PROXY_OPTS="--logtostderr=false --master=http://%%MASTER_IP%%:8080 --log_dir=/var/log/kubernetes" - -# Add more environment settings used by kube-apiserver here \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-scheduler b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-scheduler deleted file mode 100644 index 2667d46c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kube-scheduler +++ /dev/null @@ -1,10 +0,0 @@ -# Kube-Scheduler Upstart and SysVinit configuration file - -# Customize kube-apiserver binary location -KUBE_SCHEDULER="/opt/bin/hyperkube" - -# 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=127.0.0.1" - -# Add more environment settings used by kube-scheduler here \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kubelet b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kubelet deleted file mode 100644 index 057bf75a..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/kubelet +++ /dev/null @@ -1,15 +0,0 @@ -# Kubelet Upstart and SysVinit configuration file - -# Customize kubelet binary location -KUBELET="/opt/bin/hyperkube" - -# 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 \ - --allow_privileged=true" - -# Add more environment settings used by kube-scheduler here \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deletePods.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deletePods.sh deleted file mode 100644 index 3dcbd088..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deletePods.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Deleting Pods" >> /tmp/murano-kube.log -/opt/bin/kubectl delete pod -l "$1" >> /tmp/murano-kube.log diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deleteReplicationController.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deleteReplicationController.sh deleted file mode 100644 index 57ec72ae..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deleteReplicationController.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Deleting a replication controller" >> /tmp/murano-kube.log -/opt/bin/kubectl delete replicationcontrollers "$1" >> /tmp/murano-kube.log diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deleteService.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deleteService.sh deleted file mode 100644 index ef429926..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/deleteService.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Deleting a Service" >> /tmp/murano-kube.log -/opt/bin/kubectl delete service "$1" >> /tmp/murano-kube.log diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/apiserver b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/apiserver deleted file mode 100644 index d081d3c1..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/apiserver +++ /dev/null @@ -1,26 +0,0 @@ -### -# kubernetes system config -# -# The following values are used to configure the kube-apiserver -# - -# The address on the local server to listen to. -KUBE_API_ADDRESS="--address=0.0.0.0" - -# The port on the local server to listen on. -# KUBE_API_PORT="--port=8080" - -# Port minions listen on -# KUBELET_PORT="--kubelet-port=10250" - -# Comma separated list of nodes in the etcd cluster -KUBE_ETCD_SERVERS="--etcd-servers=http://127.0.0.1:4001" - -# Address range to use for services -KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16" - -# default admission control policies -KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ResourceQuota" - -# Add your own! -KUBE_API_ARGS="--portal_net=11.1.0.0/16" \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/etcd b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/etcd deleted file mode 100644 index 34579c5f..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/etcd +++ /dev/null @@ -1,12 +0,0 @@ -### -# etcd system config -# - -NAME="-name %%NAME%%" -LISTEN_PEER_URLS="-listen-peer-urls http://%%IP%%:7001,http://127.0.0.1:7001" -LISTEN_CLIENT_URLS="-listen-client-urls http://%%IP%%:4001,http://127.0.0.1:4001" -INITIAL_ADV_PEER_URLS="-initial-advertise-peer-urls http://%%IP%%:7001" -INITIAL_CLUSTER_STATE="-initial-cluster-state %%STATE%%" -INITIAL_CLUSTER="-initial-cluster %%CLUSTER_CONFIG%%" -ADV_CLIENT_URLS="-advertise-client-urls http://%%IP%%:4001,http://127.0.0.1:4001" -ETCD_OPTS="-snapshot-count 1000" diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/kube-config b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/kube-config deleted file mode 100644 index 0819c4fe..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/kube-config +++ /dev/null @@ -1,22 +0,0 @@ -### -# kubernetes system config -# -# The following values are used to configure various aspects of all -# kubernetes services, including -# -# kube-apiserver.service -# kube-controller-manager.service -# kube-scheduler.service -# kubelet.service -# kube-proxy.service -# logging to stderr means we get it in the systemd journal -KUBE_LOGTOSTDERR="--logtostderr=true" - -# journal message level, 0 is debug -KUBE_LOG_LEVEL="--v=0" - -# Should this cluster be allowed to run privileged docker containers -KUBE_ALLOW_PRIV="--allow-privileged" - -# How the controller-manager, scheduler, and proxy find the apiserver -KUBE_MASTER="--master=http://%%MASTER_IP%%:8080" \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/kubelet b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/kubelet deleted file mode 100644 index cbeb2b99..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/environ/kubelet +++ /dev/null @@ -1,17 +0,0 @@ -### -# kubernetes kubelet (minion) config - -# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces) -KUBELET_ADDRESS="--address=%%IP%%" - -# The port for the info server to serve on -# KUBELET_PORT="--port=10250" - -# You may leave this blank to use the actual hostname -KUBELET_HOSTNAME="--hostname-override=%%IP%%" - -# location of the api-server -KUBELET_API_SERVER="--api-servers=http://%%MASTER_IP%%:8080" - -# Add your own! -KUBELET_ARGS="" \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/getServiceIp.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/getServiceIp.sh deleted file mode 100644 index 778263d2..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/getServiceIp.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -/opt/bin/kubectl get service "$1" --template '{{.spec.clusterIP}}' -o template diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy-setup.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy-setup.sh deleted file mode 100644 index d5fd1bf1..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy-setup.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/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/ - -if [[ $(which systemctl) ]]; then - sed -i.bak "s/%%MASTER_NODE%%/$1/g" systemd/confd.service - cp -f systemd/confd.service /etc/systemd/system/ - systemctl enable confd - systemctl start confd - systemctl enable haproxy - systemctl start haproxy -else - sed -i.bak "s/%%MASTER_NODE%%/$1/g" init_conf/confd.conf - cp -f init_conf/confd.conf /etc/init/ - service confd start - service haproxy start -fi - -sleep 1 diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.tmpl b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.tmpl deleted file mode 100644 index 178cb853..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.tmpl +++ /dev/null @@ -1,20 +0,0 @@ -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}}{{$baseSvc := base $svc}} -{{if and (ne "kubernetes" $baseSvc) (ne "kubernetes-ro" $baseSvc)}}{{range $port := $ssJson.spec.ports}} -listen {{$baseSvc}}-{{$port.port}} 0.0.0.0:{{$port.port}} - mode tcp - balance leastconn -{{range $subset := $seJson.subsets}}{{range $index, $endpoint := $subset.addresses}} - server srv{{$index}} {{$endpoint.ip}}:{{$port.targetPort}}{{end}}{{end}} - -{{end}}{{end}}{{end}} diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.toml b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.toml deleted file mode 100644 index 944bf4ab..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/haproxy.toml +++ /dev/null @@ -1,7 +0,0 @@ -[template] -src = "haproxy.tmpl" -dest = "/etc/haproxy/haproxy.cfg" -keys = [ - "/registry/services" -] -reload_cmd = "/usr/sbin/service haproxy restart" diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/confd.conf b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/confd.conf deleted file mode 100644 index fb06b093..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/confd.conf +++ /dev/null @@ -1,11 +0,0 @@ -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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/etcd.conf b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/etcd.conf deleted file mode 100644 index c4721428..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/etcd.conf +++ /dev/null @@ -1,34 +0,0 @@ -description "Etcd service" -author "@jainvipin" - -start on (net-device-up - and local-filesystems - and runlevel [2345]) - -respawn - -# set max open files -limit nofile 2048 4096 - -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 \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/flanneld.conf b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/flanneld.conf deleted file mode 100644 index d84491a4..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/flanneld.conf +++ /dev/null @@ -1,32 +0,0 @@ -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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-apiserver.conf b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-apiserver.conf deleted file mode 100644 index 7702b5bd..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-apiserver.conf +++ /dev/null @@ -1,33 +0,0 @@ -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 apiserver $KUBE_APISERVER_OPTS -end script - -start on runlevel [235] -stop on runlevel [016] \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-controller-manager.conf b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-controller-manager.conf deleted file mode 100644 index c7295471..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-controller-manager.conf +++ /dev/null @@ -1,33 +0,0 @@ -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 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-proxy.conf b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-proxy.conf deleted file mode 100644 index 1a4c1a80..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-proxy.conf +++ /dev/null @@ -1,33 +0,0 @@ -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 proxy $KUBE_PROXY_OPTS -end script - -start on runlevel [235] -stop on runlevel [016] \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-scheduler.conf b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-scheduler.conf deleted file mode 100644 index d8fa70b3..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kube-scheduler.conf +++ /dev/null @@ -1,33 +0,0 @@ -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 scheduler $KUBE_SCHEDULER_OPTS -end script - -start on runlevel [235] -stop on runlevel [016] \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kubelet.conf b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kubelet.conf deleted file mode 100644 index 1ed11e08..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/init_conf/kubelet.conf +++ /dev/null @@ -1,33 +0,0 @@ -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 $KUBELET_OPTS -end script - -start on runlevel [235] -stop on runlevel [016] \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/etcd b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/etcd deleted file mode 100644 index 65bc898e..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/etcd +++ /dev/null @@ -1,100 +0,0 @@ -#!/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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/flanneld b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/flanneld deleted file mode 100644 index d7414887..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/flanneld +++ /dev/null @@ -1,99 +0,0 @@ -#!/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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-apiserver b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-apiserver deleted file mode 100644 index 3baedb8c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-apiserver +++ /dev/null @@ -1,99 +0,0 @@ -#!/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/hyperkube apiserver" -# 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-controller-manager b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-controller-manager deleted file mode 100644 index d9743e64..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-controller-manager +++ /dev/null @@ -1,99 +0,0 @@ -#!/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/hyperkube controller-manager" -# 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-proxy b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-proxy deleted file mode 100644 index c9691e58..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-proxy +++ /dev/null @@ -1,99 +0,0 @@ -#!/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/hyperkube proxy" -# 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-scheduler b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-scheduler deleted file mode 100644 index 75254351..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kube-scheduler +++ /dev/null @@ -1,99 +0,0 @@ -#!/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/hyperkube scheduler" -# 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kubelet b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kubelet deleted file mode 100644 index 952490dc..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/initd_scripts/kubelet +++ /dev/null @@ -1,99 +0,0 @@ -#!/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/hyperkube kubelet" -# 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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/loginToGoogleRegistry.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/loginToGoogleRegistry.sh deleted file mode 100644 index 37d5786c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/loginToGoogleRegistry.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker login -e unused@arg.com -u _json_key -p "$1" https://gcr.io diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-add-member.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-add-member.sh deleted file mode 100644 index c9aa9667..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-add-member.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# $1 - NAME -# $2 - IP - -count=30 -echo "Adding member $1 to etcd cluster" >> /tmp/etcd.log - -while [ $count -gt 0 ]; do - /opt/bin/etcdctl cluster-health >> /tmp/etcd.log - if [ $? -eq 0 ]; then - out=$( (/opt/bin/etcdctl member add "$1" "http://$2:7001") 2>&1) - if [ $? -ne 0 ]; then - echo "Member $1 not added. Reason: $out" >> /tmp/etcd.log - break - fi - echo -e "Member $1 has been added\n" >> /tmp/etcd.log - echo "$out" | grep ETCD_INITIAL_CLUSTER= | cut -f 2 -d '"' - exit 0 - fi - echo "Member $1 not added" >> /tmp/etcd.log - ((count-- )) - sleep 2 -done - -cat /tmp/etcd.log -exit 1 diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-etcd-setup.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-etcd-setup.sh deleted file mode 100644 index d19c637a..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-etcd-setup.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# $1 - NAME -# $2 - IP -# - -if [[ $(which systemctl) ]]; then - systemctl stop etcd - mkdir -p /var/lib/etcd - - sed -i.bak "s/%%NAME%%/$1/g" environ/etcd - sed -i.bak "s/%%IP%%/$2/g" environ/etcd - sed -i.bak "s/%%STATE%%/new/g" environ/etcd - sed -i.bak "s/%%CLUSTER_CONFIG%%/$1=http:\/\/$2:7001/g" environ/etcd - - echo 'INITIAL_CLUSTER_TOKEN="--initial-cluster-token new-token"' >> environ/etcd - - cp -f environ/etcd /etc/default/ - cp -f systemd/etcd.service /etc/systemd/system/ - - systemctl daemon-reload - systemctl enable etcd - systemctl start etcd - -else - service etcd stop - mkdir /var/lib/etcd - - sed -i.bak "s/%%NAME%%/$1/g" default_scripts/etcd-master - sed -i.bak "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 -fi - -sleep 5 \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh deleted file mode 100644 index 74e35967..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -# $1 - NAME -# $2 - IP - -#Create log folder for Kubernetes services -mkdir -p /var/run/murano-kubernetes - -if [[ $(which systemctl) ]]; then - systemctl stop kube* - sed -i.bak "s/%%MASTER_IP%%/$2/g" environ/kube-config - - mkdir -p /etc/kubernetes/ - - cp -f environ/apiserver /etc/kubernetes/apiserver - cp -f environ/kube-config /etc/kubernetes/config - - cp -f systemd/kube-apiserver.service /etc/systemd/system/ - cp -f systemd/kube-scheduler.service /etc/systemd/system/ - cp -f systemd/kube-controller-manager.service /etc/systemd/system/ - - systemctl daemon-reload - - systemctl enable kube-apiserver - systemctl enable kube-scheduler - systemctl enable kube-controller-manager - - systemctl start kube-apiserver - systemctl start kube-scheduler - systemctl start kube-controller-manager - -else - 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 - - sed -i.bak "s/%%MASTER_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 -fi - -mkdir /var/log/kubernetes -/opt/bin/kubectl delete node 127.0.0.1 -sleep 1 \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/member-etcd-setup.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/member-etcd-setup.sh deleted file mode 100644 index b9eaaafd..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/member-etcd-setup.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -# $1 - NAME -# $2 - IP -# $3 - ETCD_INITIAL_CLUSTER - -mkdir /var/lib/etcd - -if [[ $(which systemctl) ]]; then - systemctl stop etcd - - sed -i.bak "s/%%NAME%%/$1/g" environ/etcd - sed -i.bak "s/%%IP%%/$2/g" environ/etcd - sed -i.bak "s/%%STATE%%/existing/g" environ/etcd - sed -i.bak "s#%%CLUSTER_CONFIG%%#$3#g" environ/etcd - - cp -f environ/etcd /etc/default/ - cp -f systemd/etcd.service /etc/systemd/system/ - - systemctl daemon-reload - systemctl enable etcd - systemctl start etcd - -else - service etcd stop - - sed -i.bak "s/%%NAME%%/$1/g" default_scripts/etcd-member - sed -i.bak "s/%%IP%%/$2/g" default_scripts/etcd-member - sed -i.bak "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 -fi - -#check if cluster works well after member adding -count=30 - -echo "Registration member $1 in etcd cluster" >> /tmp/etcd.log -while [ $count -gt 0 ]; do - /opt/bin/etcdctl cluster-health >> /tmp/etcd.log - if [ $? -eq 0 ]; then - echo "Member $1 started" >> /tmp/etcd.log - sleep 10 - exit 0 - fi - ((count-- )) - sleep 5 -done -echo "Member $1 is not started" >> /tmp/etcd.log -exit 1 \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-kube-setup.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-kube-setup.sh deleted file mode 100644 index 08511219..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/minion-kube-setup.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -# $1 - NAME -# $2 - IP -# $3 - MASTER_IP - -mkdir -p /var/run/murano-kubernetes - -if [[ $(which systemctl) ]]; then - - sed -i.bak "s/%%MASTER_IP%%/$3/g" environ/kube-config - sed -i.bak "s/%%MASTER_IP%%/$3/g" environ/kubelet - sed -i.bak "s/%%IP%%/$2/g" environ/kubelet - - mkdir -p /etc/kubernetes/ - - cp -f environ/kubelet /etc/kubernetes/ - cp -f environ/kube-config /etc/kubernetes/config - - cp -f systemd/kube-proxy.service /etc/systemd/system/ - cp -f systemd/kubelet.service /etc/systemd/system/ - - systemctl daemon-reload - - systemctl enable kubelet - systemctl enable kube-proxy - - systemctl start kubelet - systemctl start kube-proxy - -else - mkdir /var/log/kubernetes - - sed -i.bak "s/%%MASTER_IP%%/$3/g" default_scripts/kube-proxy - sed -i.bak "s/%%MASTER_IP%%/$3/g" default_scripts/kubelet - sed -i.bak "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/ - - service kubelet start - service kube-proxy start -fi - -sleep 1 \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/patchService.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/patchService.sh deleted file mode 100644 index 4ad64b21..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/patchService.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# $1 - service name -# $2 - publicIPs JSON - -/opt/bin/kubectl patch service "$1" --patch="$2" diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/removeEtcdMember.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/removeEtcdMember.sh deleted file mode 100644 index 440ba2ac..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/removeEtcdMember.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -NODE_ID=$(/opt/bin/etcdctl member list | grep "$1" | cut -d':' -f1) -/opt/bin/etcdctl member remove "${NODE_ID}" diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/removeMinion.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/removeMinion.sh deleted file mode 100644 index 4659850c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/removeMinion.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Deleting Kubernetes Node" >> /tmp/murano-kube.log -/opt/bin/kubectl delete node "$1" >> /tmp/murano-kube.log diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/restartContainers.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/restartContainers.sh deleted file mode 100644 index 36f5a392..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/restartContainers.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# $1 - POD NAME AS A PART OF CONTAINER NAME - -CONTAINERS=$(docker ps -q --filter "name=_$1-") -if (( ${#CONTAINERS} > 0 )); then - docker restart "${CONTAINERS}" -fi diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/restartDocker.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/restartDocker.sh deleted file mode 100644 index 006b9ec5..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/restartDocker.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -service docker restart \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/scale-rc.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/scale-rc.sh deleted file mode 100644 index d78a46c0..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/scale-rc.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# $1 - RC name -# $2 - new size - -/opt/bin/kubectl scale rc "${1}" --replicas="${2}" diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerMirror.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerMirror.sh deleted file mode 100644 index 749d9fc2..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerMirror.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source /etc/default/docker -DOCKER_OPTS+=" --registry-mirror=$1" -echo "DOCKER_OPTS=${DOCKER_OPTS}" > /etc/default/docker diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerRegistry.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerRegistry.sh deleted file mode 100644 index 4c7def29..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupDockerRegistry.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source /etc/default/docker -DOCKER_OPTS+=" --insecure-registry $1" -echo "DOCKER_OPTS=${DOCKER_OPTS}" > /etc/default/docker diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelMaster.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelMaster.sh deleted file mode 100644 index 2974bbb2..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelMaster.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -count=30 - -echo "Adding flannel configuration to etcd" - -command=$( (/opt/bin/etcdctl set /coreos.com/network/config '{"Network":"10.200.0.0/16"}') 2>&1) - -while [ $count -gt 0 ]; do - if [ "${command}" ]; then - echo "Flannel is configured on master node" >> /tmp/etcd.log - exit 0 - fi - echo "Flannel configuration was not added. Reason: $command" - ((count-- )) - sleep 5 -done -exit 1 diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelNode.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelNode.sh deleted file mode 100644 index 51139847..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/setupFlannelNode.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -if [[ $(which systemctl) ]]; then - cp -f systemd/docker.service /lib/systemd/system/ - cp -f systemd/flanneld.service /etc/systemd/system/ - - systemctl daemon-reload - systemctl enable flanneld - systemctl start flanneld - -else - 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 -fi - -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/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/confd.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/confd.service deleted file mode 100644 index b7b25cf5..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/confd.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Configuration Service -Requires=etcd.service - -[Service] -Restart=always -ExecStart=/usr/local/bin/confd \ - -backend etcd \ - -node %%MASTER_NODE%%:4001 \ - -interval 15 - -[Install] -WantedBy=basic.target diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/docker.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/docker.service deleted file mode 100644 index b6c45606..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/docker.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=Docker Application Container Engine -Documentation=https://docs.docker.com -After=network.target docker.socket -Requires=docker.socket - -[Service] -Type=notify -EnvironmentFile=-/etc/default/docker -ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS -MountFlags=slave -LimitNOFILE=1048576 -LimitNPROC=1048576 -LimitCORE=infinity -TimeoutStartSec=0 -Delegate=yes - -[Install] -WantedBy=multi-user.target diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/etcd.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/etcd.service deleted file mode 100644 index 7f168c78..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/etcd.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=etcd key-value store -Documentation=https://github.com/coreos/etcd - -[Service] -Type=notify -Environment=ETCD_DATA_DIR=/var/lib/etcd -EnvironmentFile=-/etc/default/etcd -ExecStart=/opt/bin/etcd \ - $NAME \ - $LISTEN_PEER_URLS \ - $LISTEN_CLIENT_URLS \ - $INITIAL_ADV_PEER_URLS \ - $INITIAL_CLUSTER_STATE \ - $INITIAL_CLUSTER \ - $ADV_CLIENT_URLS \ - $INITIAL_CLUSTER_TOKEN \ - $ETCD_OPTS -Restart=always -RestartSec=10s -LimitNOFILE=40000 -StandardOutput=null - -[Install] -WantedBy=multi-user.target diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/flanneld.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/flanneld.service deleted file mode 100644 index 92142eae..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/flanneld.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Flanneld overlay address etcd agent -After=network.target -After=network-online.target -Wants=network-online.target -After=etcd.service -Before=docker.service - -[Service] -Type=notify -ExecStart=/opt/bin/flanneld -Restart=on-failure - -[Install] -WantedBy=multi-user.target -RequiredBy=docker.service \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-apiserver.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-apiserver.service deleted file mode 100644 index 33b85e74..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-apiserver.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=Kubernetes API Server -Documentation=https://github.com/GoogleCloudPlatform/kubernetes -After=network.target -After=etcd.service - -[Service] -EnvironmentFile=-/etc/kubernetes/config -EnvironmentFile=-/etc/kubernetes/apiserver -ExecStart=/opt/bin/hyperkube apiserver \ - $KUBE_LOGTOSTDERR \ - $KUBE_LOG_LEVEL \ - $KUBE_ETCD_SERVERS \ - $KUBE_API_ADDRESS \ - $KUBE_API_PORT \ - $KUBELET_PORT \ - $KUBE_ALLOW_PRIV \ - $KUBE_SERVICE_ADDRESSES \ - $KUBE_ADMISSION_CONTROL \ - $KUBE_API_ARGS -Restart=on-failure -Type=notify -LimitNOFILE=65536 - -[Install] -WantedBy=multi-user.target diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-controller-manager.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-controller-manager.service deleted file mode 100644 index 9959e59d..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-controller-manager.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Kubernetes Controller Manager -Documentation=https://github.com/GoogleCloudPlatform/kubernetes - -[Service] -EnvironmentFile=-/etc/kubernetes/config -ExecStart=/opt/bin/hyperkube controller-manager \ - $KUBE_LOGTOSTDERR \ - $KUBE_LOG_LEVEL \ - $KUBE_MASTER \ - $KUBE_CONTROLLER_MANAGER_ARGS -Restart=on-failure -LimitNOFILE=65536 - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-proxy.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-proxy.service deleted file mode 100644 index 0951bfd2..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-proxy.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Kubernetes Kube-Proxy Server -Documentation=https://github.com/GoogleCloudPlatform/kubernetes -After=network.target - -[Service] -EnvironmentFile=-/etc/kubernetes/config -EnvironmentFile=-/etc/kubernetes/proxy -ExecStart=/opt/bin/hyperkube proxy \ - $KUBE_LOGTOSTDERR \ - $KUBE_LOG_LEVEL \ - $KUBE_MASTER \ - $KUBE_PROXY_ARGS -Restart=on-failure -LimitNOFILE=65536 - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-scheduler.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-scheduler.service deleted file mode 100644 index 5dd02a86..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kube-scheduler.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Kubernetes Scheduler Plugin -Documentation=https://github.com/GoogleCloudPlatform/kubernetes - -[Service] -EnvironmentFile=-/etc/kubernetes/config -ExecStart=/opt/bin/hyperkube scheduler \ - $KUBE_LOGTOSTDERR \ - $KUBE_LOG_LEVEL \ - $KUBE_MASTER \ - $KUBE_SCHEDULER_ARGS -Restart=on-failure -LimitNOFILE=65536 - -[Install] -WantedBy=multi-user.target diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kubelet.service b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kubelet.service deleted file mode 100644 index 5b1e291e..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/systemd/kubelet.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=Kubernetes Kubelet Server -Documentation=https://github.com/GoogleCloudPlatform/kubernetes -After=docker.service -Requires=docker.service - -[Service] -EnvironmentFile=-/etc/kubernetes/config -EnvironmentFile=-/etc/kubernetes/kubelet -ExecStart=/opt/bin/hyperkube kubelet \ - $KUBE_LOGTOSTDERR \ - $KUBE_LOG_LEVEL \ - $KUBELET_API_SERVER \ - $KUBELET_ADDRESS \ - $KUBELET_PORT \ - $KUBELET_HOSTNAME \ - $KUBE_ALLOW_PRIV \ - $KUBELET_ARGS -Restart=on-failure -KillMode=process - -[Install] -WantedBy=multi-user.target diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updatePod.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updatePod.sh deleted file mode 100644 index ef3441b3..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updatePod.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/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 -fileName=$3 -echo "$podId Pod $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 replace -f "${fileName}" >> /tmp/murano-kube.log -fi diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updateReplicationController.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updateReplicationController.sh deleted file mode 100644 index f636182c..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updateReplicationController.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 "Replacing a Replication Controller" >> /tmp/murano-kube.log - /opt/bin/kubectl replace -f /tmp/controller.json >> /tmp/murano-kube.log -fi diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updateService.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updateService.sh deleted file mode 100644 index df5b3b2b..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/updateService.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/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 -fileName=$3 - -echo "$serviceId Service $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 replace -f "${fileName}" >> /tmp/murano-kube.log -fi diff --git a/Docker/Kubernetes/KubernetesCluster/package/UI/ui.yaml b/Docker/Kubernetes/KubernetesCluster/package/UI/ui.yaml deleted file mode 100644 index 2612276b..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/UI/ui.yaml +++ /dev/null @@ -1,226 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 -Templates: - masterNode: - ?: - type: com.mirantis.docker.kubernetes.KubernetesMasterNode - instance: - ?: - type: io.murano.resources.LinuxMuranoInstance - name: generateHostname($.appConfiguration.unitNamingPattern, 1) - flavor: $.instanceConfiguration.flavor - image: $.instanceConfiguration.image - assignFloatingIp: $.appConfiguration.assignFloatingIP - keyname: $.instanceConfiguration.keyPair - availabilityZone: $.instanceConfiguration.availabilityZone - - minionNode: - ?: - type: com.mirantis.docker.kubernetes.KubernetesMinionNode - instance: - ?: - type: io.murano.resources.LinuxMuranoInstance - name: generateHostname($.appConfiguration.unitNamingPattern, $index + 1) - flavor: $.instanceConfiguration.flavor - image: $.instanceConfiguration.image - assignFloatingIp: $.appConfiguration.assignFloatingIP - keyname: $.instanceConfiguration.keyPair - availabilityZone: $.instanceConfiguration.availabilityZone - exposeCAdvisor: $.appConfiguration.exposeCAdvisor - - - gatewayNode: - ?: - type: com.mirantis.docker.kubernetes.KubernetesGatewayNode - instance: - ?: - type: io.murano.resources.LinuxMuranoInstance - name: generateHostname($.appConfiguration.gatewayNamingPattern, $index) - flavor: $.instanceConfiguration.flavor - image: $.instanceConfiguration.image - assignFloatingIp: $.appConfiguration.assignGatewayFloatingIP - keyname: $.instanceConfiguration.keyPair - availabilityZone: $.instanceConfiguration.availabilityZone - -Application: - ?: - type: com.mirantis.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 - dockerMirror: $.appConfiguration.dockerMirror - gcloudKey: $.appConfiguration.gcloudKey - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - 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 Kubernetes nodes - initial: 2 - minValue: 1 - required: true - description: >- - Select number of Kubernetes nodes - - name: maxMinionCount - type: integer - label: Maximum number of Kubernetes nodes - initial: 3 - required: true - minValue: 1 - description: >- - Select maximum number of Kubernetes nodes - - 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-z][-_\w#]*$' - maxLength: 64 - errorMessages: - invalid: Just letters, numbers, underscores, sharps and hyphens are allowed. - label: Kubernetes node hostname pattern - - name: exposeCAdvisor - type: boolean - initial: true - required: false - label: Expose cAdvisor UI - description: >- - Opens external access to cAdvisor interface - - name: gatewayCount - type: integer - label: Initial/current number of gateway nodes - initial: 1 - minValue: 1 - 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 - maxLength: 64 - regexpValidator: '^[a-zA-z][-_\w#]*$' - errorMessages: - invalid: Just letters, numbers, underscores, sharps and hyphens are allowed. - 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: >- - Host IP or domain name of custom Docker registry to use. - Leave empty to use Docker default. - required: false - - name: dockerMirror - type: string - label: Docker registry mirror URL - description: >- - URL of Docker registry mirror to use. - Leave empty to not use one. - required: false - - name: gcloudKey - type: string - label: Google registry key - regexpValidator: '^{(\s*"(\\(["\\\/bfnrt]|u[a-fA-F0-9]{4})|[^"\\\0-\x1F\x7F]+)*"\s*:\s*"(\\(["\\\/bfnrt]|u[a-fA-F0-9]{4})|[^"\\\0-\x1F\x7F]+)*"\s*(,|\s*}$))*$' - errorMessages: - invalid: Text should be a valid JSON. - description: >- - Contents of JSON key file. - Used to authenticate to the Google Container Registry - 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 - requirements: - min_disk: 10 - min_memory_mb: 1024 - min_vcpus: 1 - - name: image - type: image - imageType: linux.kubernetes - label: Instance image - description: >- - Select valid image for the application. Image should already be prepared and - registered in glance. - - 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/Docker/Kubernetes/KubernetesCluster/package/logo.png b/Docker/Kubernetes/KubernetesCluster/package/logo.png deleted file mode 100644 index bf09f0df..00000000 Binary files a/Docker/Kubernetes/KubernetesCluster/package/logo.png and /dev/null differ diff --git a/Docker/Kubernetes/KubernetesCluster/package/manifest.yaml b/Docker/Kubernetes/KubernetesCluster/package/manifest.yaml deleted file mode 100644 index 29c72a5f..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/manifest.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.mirantis.docker.kubernetes.KubernetesCluster -Name: Kubernetes Cluster -Description: | - Kubernetes is an open source system for managing containerized applications across multiple hosts, - providing basic mechanisms for deployment, maintenance, and scaling of applications. -Author: 'Mirantis, Inc' -Tags: [Docker, Kubernetes] -Classes: - com.mirantis.docker.kubernetes.KubernetesCluster: KubernetesCluster.yaml - com.mirantis.docker.kubernetes.KubernetesMasterNode: KubernetesMasterNode.yaml - com.mirantis.docker.kubernetes.KubernetesMinionNode: KubernetesMinionNode.yaml - com.mirantis.docker.kubernetes.KubernetesGatewayNode: KubernetesGatewayNode.yaml - com.mirantis.docker.kubernetes.KubernetesNode: KubernetesNode.yaml -Require: - com.mirantis.docker.Interfaces: diff --git a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Pod.yaml b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Pod.yaml deleted file mode 100644 index 4a09cbef..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Pod.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -Namespaces: - =: com.mirantis.docker.kubernetes.static - std: io.murano - sys: io.murano.system - -Name: Pod - -Properties: - kubernetesCluster: - Contract: $.class(KubernetesCluster).notNull() - - podDefinition: - Contract: {} - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - deploy: - Body: - - $.kubernetesCluster.deploy() - - If: not $.getAttr(deployed, false) - Then: - - $.deployPod() - - $.setAttr(deployed, true) - - deployPod: - Body: - - $resources: new(sys:Resources) - - $template: $resources.yaml('UpdatePod.template').bind(dict( - podDefinition => $.podDefinition, - isNew => true - )) - - $.kubernetesCluster.masterNode.instance.agent.call($template, $resources) diff --git a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/ReplicationController.yaml b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/ReplicationController.yaml deleted file mode 100644 index bda2d29f..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/ReplicationController.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker.kubernetes.static - std: io.murano - sys: io.murano.system - -Name: ReplicationController - -Properties: - kubernetesCluster: - Contract: $.class(KubernetesCluster).notNull() - - replicationControllerDefinition: - Contract: {} - -Methods: - .init: - 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/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Service.yaml b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Service.yaml deleted file mode 100644 index 7692e7cd..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Classes/Service.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker.kubernetes.static - std: io.murano - sys: io.murano.system - -Name: Service - -Properties: - kubernetesCluster: - Contract: $.class(KubernetesCluster).notNull() - - serviceDefinition: - Contract: {} - -Methods: - .init: - 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/Docker/Kubernetes/KubernetesEntitiesLibrary/package/LICENSE b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyReplicationController.template b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyReplicationController.template deleted file mode 100644 index 12c6da29..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyReplicationController.template +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -FormatVersion: 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/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyService.template b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyService.template deleted file mode 100644 index 30970bda..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/DestroyService.template +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdatePod.template b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdatePod.template deleted file mode 100644 index 8b8da07d..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdatePod.template +++ /dev/null @@ -1,35 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateReplicationController.template b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateReplicationController.template deleted file mode 100644 index e50f2cfe..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateReplicationController.template +++ /dev/null @@ -1,35 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateService.template b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateService.template deleted file mode 100644 index f2bfd641..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/UpdateService.template +++ /dev/null @@ -1,35 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyReplicationController.sh b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyReplicationController.sh deleted file mode 100644 index d17efcf6..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyReplicationController.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -echo "Deleting a replication controller" >> /tmp/murano-kube.log -/opt/bin/kubectl delete replicationcontrollers "$1" >> /tmp/murano-kube.log diff --git a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyService.sh b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyService.sh deleted file mode 100644 index 910d8129..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/destroyService.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -echo "Deleting a Service" >> /tmp/murano-kube.log -/opt/bin/kubectl delete services "$1" >> /tmp/murano-kube.log diff --git a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updatePod.sh b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updatePod.sh deleted file mode 100644 index 1b936d0f..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updatePod.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# 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 replace -f /tmp/pod.json >> /tmp/murano-kube.log -fi diff --git a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateReplicationController.sh b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateReplicationController.sh deleted file mode 100644 index e1fb4e93..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateReplicationController.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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 replace -f /tmp/controller.json >> /tmp/murano-kube.log -fi diff --git a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateService.sh b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateService.sh deleted file mode 100644 index 3a1dd386..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/Resources/scripts/updateService.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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 replace -f /tmp/service.json >> /tmp/murano-kube.log -fi diff --git a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/manifest.yaml b/Docker/Kubernetes/KubernetesEntitiesLibrary/package/manifest.yaml deleted file mode 100644 index bef4d653..00000000 --- a/Docker/Kubernetes/KubernetesEntitiesLibrary/package/manifest.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Library -FullName: com.mirantis.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: - com.mirantis.docker.kubernetes.static.Pod: Pod.yaml - com.mirantis.docker.kubernetes.static.Service: Service.yaml - com.mirantis.docker.kubernetes.static.ReplicationController: ReplicationController.yaml -Require: - com.mirantis.docker.kubernetes.KubernetesCluster: diff --git a/Docker/Kubernetes/KubernetesPod/package/Classes/KubernetesPod.yaml b/Docker/Kubernetes/KubernetesPod/package/Classes/KubernetesPod.yaml deleted file mode 100644 index fe267588..00000000 --- a/Docker/Kubernetes/KubernetesPod/package/Classes/KubernetesPod.yaml +++ /dev/null @@ -1,355 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Namespaces: - =: com.mirantis.docker.kubernetes - docker: com.mirantis.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) - Usage: InOut - - -Methods: - .init: - Body: - - $._environment: $.find(std:Environment).require() - - $._podDefinition: null - - - # this is a workaround for early initialization. If docker application was deleted - # its destroy method will call deleteContainer method that will change _podDefinition - # on KubernetesPod loaded from ObjectsCopy - # but ininitialize method on a KubernetesPod from Objects is called before destruction - # and because we have 2 different KubernetesPod objects that share attributes but - # not private variables _podDefinition of real object will still contain outdated data - _loadCurrentPodDefinition: - Body: - - If: $._podDefinition = null - Then: - - $podName: $._getPodName() - - $podDefinition: $.getAttr(lastPodDeployed, null) - - If: $podDefinition = null - Then: - - $podDefinition: - apiVersion: v1 - kind: Pod - metadata: - name: $podName - labels: $._getPodLabels($podName) - spec: - containers: [] - volumes: [] - - - $.setAttr(lastPodDeployed, $podDefinition) - - $._podDefinition: $podDefinition - - Return: $._podDefinition - - - _getPodName: - Body: - - Return: $.name.toLower() - - _getPodLabels: - Arguments: - - podName: - Contract: $.string().notNull() - Body: - Return: $.labels2Map($.labels.toLower()).mergeWith(dict(id => $podName)) - - hostContainer: - Arguments: - - container: - Contract: $.class(docker:DockerContainer) - Body: - - $._loadCurrentPodDefinition() - - $podName: $._getPodName() - - For: port - In: $container.ports - Do: - - $endpoints: $.kubernetesCluster.serviceEndpoints.where( - $.containerPort = $port.port and $.protocol = $port.protocol and $.podId = $podName) - - If: len($endpoints) > 0 - Then: - - $msg: format('Port {0} is already used in the Pod {1}', $port.port, $.name) - - Throw: PortConflictException - Message: $msg - - $._deleteContainer($container.name) - - - $containerDef: - name: $container.name.toLower() - image: $container.image - args: $container.commands - ports: $container.ports.select($this._getPortDefinition($)) - volumeMounts: $container.volumes.keys().select( - dict( - name => $this._generateVolumeName($container.name, $container.volumes.get($)), - mountPath => $ - )) - env: $container.env.keys().select(dict(name => $, value => $container.env.get($))) - securityContext: - privileged: $container.privileged - - - $newVolumes: $container.volumes.values().select( - $this._buildVolumeEntry($container.name, $)) - - - $diff: - spec: - containers: [$containerDef] - volumes: $newVolumes - - $._podDefinition: $._podDefinition.mergeWith($diff) - - $.deploy() - - $._environment.reporter.report($, 'Creating services for Pod {0}'.format($.name)) - - $.kubernetesCluster.createService( - applicationName => $container.name, - applicationPorts => $container.ports, - podId => $podName) - - Return: $.getEndpoints($container.name) - - - getEndpoints: - Arguments: - - applicationName: - Contract: $.string().notNull() - Body: - - Return: $.kubernetesCluster.serviceEndpoints.where( - $.applicationName = $applicationName - and $.podId = $this._getPodName() - ) - - - _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: - - name: - Contract: $.string().notNull() - - volume: - Contract: $.class(docker:DockerVolume).notNull() - Body: - - $type: $volume.getType() - - Value: $type - Match: - HostPath: - - $spec: - hostPath: - path: $volume.getParameters() - TempVolume: - - $spec: - emptyDir: {} - Default: - - Throw: UnknownDockerVolumeType - Message: format('Unknown docker volume type {0}', $type) - - $result: - name: $._generateVolumeName($name, $volume) - - - Return: $result.mergeWith($spec) - - - _deleteContainer: - Arguments: - - name: - Contract: $.string().notNull() - Body: - - $lenBefore: len($._podDefinition.spec.containers) + len($._podDefinition.spec.volumes) - - $containerName: $name.toLower() - - $newContainers: $._podDefinition.spec.containers.where($.name != $containerName) - - $volumeNameMap: $.getAttr(volumeNameMap, dict()) - - $newVolumeNameMap: {} - - $volumesToDelete: [] - - $prefix: format('{0}/'.format($name)) - - For: key - In: $volumeNameMap.keys() - Do: - - $volumeName: $volumeNameMap.get($key) - - If: $key.startsWith($prefix) - Then: - - $volumesToDelete: $volumesToDelete + list($volumeName) - Else: - - $newVolumeNameMap[$key]: $volumeName - - $.setAttr(volumeNameMap, $newVolumeNameMap) - - - $newVolumes: $._podDefinition.spec.volumes.where( - not ($.name in $volumesToDelete)) - - If: len($newContainers) + len($newVolumes) != $lenBefore - Then: - - $._podDefinition.spec.containers: $newContainers - - $._podDefinition.spec.volumes: $newVolumes - - - deleteContainer: - Arguments: - - name: - Contract: $.string().notNull() - Body: - - If: $.kubernetesCluster.isAvailable() - Then: - - $._loadCurrentPodDefinition() - - $._deleteContainer($name) - - $.kubernetesCluster.deleteServices( - applicationName => $name, - podId => $._getPodName()) - - $.deploy() - - - _generateVolumeName: - Arguments: - - name: - Contract: $.string().notNull() - - volume: - Contract: $.class(docker:DockerVolume).notNull() - Body: - - $key: format('{0}/{1}', $name, $volume.name) - - $map: $.getAttr(volumeNameMap, dict()) - - $volumeName: $map.get($key) - - If: $volumeName = null - Then: - - $volumeName: randomName() - - $map[$key]: $volumeName - - $.setAttr(volumeNameMap, $map) - - Return: $volumeName - - - deploy: - Body: - - $._loadCurrentPodDefinition() - - $prevPod: $.getAttr(lastPodDeployed, null) - - $prevReplicas: $.getAttr(lastReplicas, 0) - - - $podDefinition: $._podDefinition - - $replicas: $.replicas - - If: len($podDefinition.spec.containers) = 0 - Then: - - $replicas: 0 - - $.setAttr(lastReplicas, $replicas) - - 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.deleteReplicationController($._getReplicationControllerId()) - - If: $prevPod != $podDefinition and len($prevPod.spec.containers) > 0 - Then: - - $.kubernetesCluster.deletePods(dict(id => $._getPodName())) - - If: $.replicas = 0 and len($podDefinition.spec.containers) > 0 - Then: - - $.kubernetesCluster.createPod(definition => $podDefinition, isNew => true) - - - $._environment.reporter.report($, 'Pod {0} is ready'.format($.name)) - - $.setAttr(lastPodDeployed, $podDefinition) - - - _buildReplicationControllerDefinition: - Arguments: - - podDefinition: - Contract: {} - Body: - Return: - apiVersion: v1 - kind: ReplicationController - metadata: - name: $._getReplicationControllerId() - labels: $podDefinition.metadata.labels - spec: - replicas: $.replicas - selector: - id: $._getPodName() - template: - metadata: - labels: $podDefinition.metadata.labels - spec: $podDefinition.spec - - - _getReplicationControllerId: - Body: - - Return: $._getPodName() - - - getInternalScopeId: - Body: - Return: id($.kubernetesCluster) - - scalePodDown: - Usage: Action - Body: - - If: $.replicas > 1 - Then: - - $._environment.reporter.report($this, 'Scaling Pod down') - - $.replicas: $.replicas - 1 - - $.kubernetesCluster.scaleRc(rcName => $._getReplicationControllerId(), newSize => $.replicas) - Else: - - $._environment.reporter.report($this, 'Cannot scale Pod down') - - - scalePodUp: - Usage: Action - Body: - - If: $.replicas > 0 - Then: - - $._environment.reporter.report($this, 'Scaling Pod up') - - $.replicas: $.replicas + 1 - - $.kubernetesCluster.scaleRc(rcName => $._getReplicationControllerId(), newSize => $.replicas) - Else: - - $._environment.reporter.report($this, 'Cannot scale Pod up') - - - recreatePod: - Usage: Action - Body: - - $._environment.reporter.report($this, 'Recreating Pod {0}'.format($.name)) - - $.kubernetesCluster.deletePods(dict(id => $._getPodName())) - - If: $.replicas = 0 - Then: - - $._loadCurrentPodDefinition() - - $.kubernetesCluster.createPod(definition => $._podDefinition, isNew => true) - - $._environment.reporter.report($this, 'Pod {0} recreated'.format($.name)) - - - restartContainers: - Usage: Action - Body: - - $.kubernetesCluster.restartContainers(podName => $._getPodName()) diff --git a/Docker/Kubernetes/KubernetesPod/package/LICENSE b/Docker/Kubernetes/KubernetesPod/package/LICENSE deleted file mode 100644 index 67db8588..00000000 --- a/Docker/Kubernetes/KubernetesPod/package/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Docker/Kubernetes/KubernetesPod/package/UI/ui.yaml b/Docker/Kubernetes/KubernetesPod/package/UI/ui.yaml deleted file mode 100644 index e72b1e96..00000000 --- a/Docker/Kubernetes/KubernetesPod/package/UI/ui.yaml +++ /dev/null @@ -1,66 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Version: 2 - -Application: - ?: - type: com.mirantis.docker.kubernetes.KubernetesPod - name: $.appConfiguration.name - labels: $.appConfiguration.labels - kubernetesCluster: $.appConfiguration.kubernetesCluster - replicas: $.appConfiguration.replicas - - -Forms: - - appConfiguration: - fields: - - name: license - type: string - description: Apache License, Version 2.0 - hidden: true - required: false - - name: name - type: string - regexpValidator: '^[a-z0-9]([a-z0-9.-]{0,251})?[a-z0-9]$' - maxLength: 253 - label: Pod Name - description: >- - Name of the pod to create. - This name must be unique throughout the cluster. The name should be up to maximum - length of 253 characters and consist of lower case alphanumeric characters, hyphens, and dots. - - name: labels - type: string - #NOTE(ddovbii): this regexp is used here because of k8s restrictions: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/labels.md#syntax-and-character-set - regexpValidator: '^(([a-zA-Z0-9]([a-zA-Z0-9\.]{0,251}[a-zA-Z0-9])?\/)?([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)=[A-Za-z0-9][-\w.]{0,63})?(,([a-zA-Z0-9]([a-zA-Z0-9\.]{0,251}[a-zA-Z0-9])?\/)?([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)=[A-Za-z0-9][-\w.]{0,63})*$' - label: Labels - required: false - description: >- - Comma separated list of labels. Allows easy selecting in the future. - Valid label keys have two segments - prefix and name - separated by a slash. - The name segment is required and must be a DNS label 63 characters or less, all lowercase, - beginning and ending with an alphanumeric character, with dashes and alphanumerics between. - The prefix and slash are optional. If specified, the prefix must be a DNS subdomain. - Valid label values must be shorter than 64 characters, accepted characters are ([-A-Za-z0-9_.]) - but the first character must be ([A-Za-z0-9]). - - name: kubernetesCluster - type: com.mirantis.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/Docker/Kubernetes/KubernetesPod/package/logo.png b/Docker/Kubernetes/KubernetesPod/package/logo.png deleted file mode 100644 index c4dec09e..00000000 Binary files a/Docker/Kubernetes/KubernetesPod/package/logo.png and /dev/null differ diff --git a/Docker/Kubernetes/KubernetesPod/package/manifest.yaml b/Docker/Kubernetes/KubernetesPod/package/manifest.yaml deleted file mode 100644 index f18de16b..00000000 --- a/Docker/Kubernetes/KubernetesPod/package/manifest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -Format: 1.3 -Type: Application -FullName: com.mirantis.docker.kubernetes.KubernetesPod -Name: Kubernetes Pod -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: - com.mirantis.docker.kubernetes.KubernetesPod: KubernetesPod.yaml -Require: - com.mirantis.docker.Interfaces: - com.mirantis.docker.kubernetes.KubernetesCluster: diff --git a/Docker/Kubernetes/README.rst b/Docker/Kubernetes/README.rst deleted file mode 100644 index 2575fdc0..00000000 --- a/Docker/Kubernetes/README.rst +++ /dev/null @@ -1,296 +0,0 @@ -Google Kubernetes for Murano -============================ - -Packages in this folder are required to deploy both Google Kubernetes and -applications on top of it. - -Contents of each folder need to be zipped and uploaded to Murano Catalog. - -You will also need to build a proper Ubuntu-based image for Kubernetes. -This can be done using `diskimage-builder `_ -and `DIB elements -`_. -The image has to be named *ubuntu14.04-x64-kubernetes.qcow2* - - -Overview of Kubernetes ----------------------- - -Kubernetes is an open-source container manager by Google. It is responsible to -schedule, run and manage docker containers into its own clustered setup. - -Kubernetes consists of one or more master nodes running Kubernetes API and -one or more worker nodes (aka minions) that are used to schedule containers. -Containers are aggregated into pods. All containers in single pod are -guaranteed to be scheduled to a single node and share common port space. -Thus it can be considered as a container co-location. - -Pods can be replicated. This is achieved by creation of Replication Controller -which creates and maintain fixed number of pod clones. In Murano replica -count is a property of KubernetesPod. - -For a more in-depth review of Kubernetes please refer to official -`documentation `_. - - -How murano installs Kubernetes ------------------------------- - -Currently Murano supports setups with only single API node and at least one -worker node. API node cannot be used as a worker node. - -To establish required network connectivity model for the Kubernetes Murano -sets up an overlay network between Kubernetes nodes using Flannel networking. -See `flannel `_ for more information. - -Because IP addresses of containers are in that internal network and not -accessible from outside in order to provide public endpoints Murano sets up -a third type of nodes: Gateway nodes. - -Gateway nodes are connected to both Flannel and OpenStack Neutron networks -and serves as a gateway between them. Each gateway node runs HAProxy. -When an application deploys all its public endpoints are automatically registered -on all gateway nodes. Thus if user chose to have more than one gateway -it will usually get several endpoints for the application. Then those endpoints -can be registered in physical load balancer or DNS. - - -KubernetesCluster -================= - -This is the main application representing Kubernetes Cluster. -It is responsible for deployment of the Kubernetes and its nodes. - -The procedure is: - -#. Create VMs for all node types - 1 for Kubernetes API and requested number - for worker and gateway nodes. -#. Join them into etcd cluster. etcd is a distributed key-value storage - used by the Kubernetes to store and synchronize cluster state. -#. Setup Flannel network over etcd cluster. Flannel uses etcd to track - network and nodes. -#. Configure required services on master node. -#. Configure worker nodes. They will register themselves in master nodes using - etcd. -#. Setup HAProxy on each gateway node. Configure confd to watch etcd to - register public ports in HAProxy config file. Each time new Kubernetes - service is created it regenerates HAProxy config. - - -Internally KubernetesCluster contains separate classes for all node types. -They all inherit from `KubernetesNode` that defines the common interface -for all nodes. The deployment of each node is split into several methods: -`deployInstance` -> `setupEtcd` -> `setupNode` -> `removeFromCluster` as -described above. - - -KubernetesPod -============= - -KubernetesPod represents a single Kubernetes pod with its containers and -associated volumes. KubernetesPod provides an implementation of -`DockerContainerHost` interface defined in `DockerInterfacesLibrary`. -Thus each pod can be used as a drop-in replacement for regular Docker -host implementation (DockerStandaloneHost). - -All pods must have a unique name within single `KubernetesCluster` -(which is selected for each pod). - -Thus KubernetesCluster is an aggregation of Docker hosts (pods) which also -handles all inter-pod entities (services, endpoints). - -KubernetesPod creates Replication Controllers rather than pods. Replication -Controller with replica count equal to 1 will result in single pod being -created while it is always possible to increase/decrease replica count after -deployment. Replica count is specified using `replicas` input property. - -Pods also may have labels to group them (for example into layers etc.) - - -Kubernetes actions -================== - -Both KubernetesCluster and KubernetesPod expose number of actions that can -be used by both user (through the dashboard) and automation systems (through -API) to perform actions on the deployed applications. - -See http://docs.openstack.org/developer/murano/draft/appdev-guide/murano_pl.html#murano-actions -and http://docs.openstack.org/developer/murano/specification/index.html#actions-api -for more details on actions API. - -KubernetesCluster provides the following actions: - -* `scaleNodesUp`: increase the number of worker nodes by 1. -* `scaleNodesDown`: decrease the number of worker nodes by 1. -* `scaleGatewaysUp`: increase the number of gateway nodes by 1. -* `scaleGatewaysDown`: decrease the number of gateway nodes by 1. - -KubernetesPod has the following actions: - -* `scalePodUp`: increase the number of pod replicas by 1. -* `scalePodDown`: decrease the number of pod replicas by 1. - - -Applications documentation -========================== - -Documentation for KubernetesCluster application classes -------------------------------------------------------- - -KubernetesCluster -~~~~~~~~~~~~~~~~~ -Represents Kubernetes Cluster and is the main class responsible for -deploying both Kubernetes and it's nodes. - -`isAvailable()` - Return whether masterNode.isAvailable() or not. - -`deploy()` - Deploy Kubernetes Cluster. - -`getIp()` - Return IP of the masterNode. - -`createPod(definition, isNew)` - Create new Kubernetes Pod. `definition` is a dict of parameters, defining - the pod. `isNew` is a boolean parameter, telling if the pod should be - created or updated. - -`createReplicationController(definition, isNew)` - Create new Replication Controller. `definition` is a dict of parameters, - definition of the pod. `isNew` is a boolean parameter, - telling if the pod should be created or updated. - -`deleteReplicationController(id)` - Calls `kubectl delete replicationcontrollers` with given id on master node. - -`deletePods(labels)` - Accepts a dict of `labels` with string-keys and string-values, that would - be passed to `kubectl delete pod` on master node. - -`createService(applicationName, applicationPorts, podId)` - * `applicationName` a string holding application's name. - * `applicationPorts` list of instances of - `com.mirantis.docker.ApplicationPort` class. - * `podId` a string holding a name of the pod. - - Check each port in applicationPorts and creates or updates it if the port - differs from what it was before (or did not exist). Calls - `kubectl replace` or `kubectl create` on master node. - -`deleteServices(applicationName, podId)` - * `applicationName` a string holding application's name, - * `podId` a string holding a name of the pod. - - Delete all of the services of a given pod, calling - `kubectl delete service` for each one of them. - -`scaleRc(rcName, newSize)` - * `rnName` string holding the name of the RC - * `newSize` integer holding the number of replicas. - - Call `kubectl scale rc` on master node, setting number of replicas for a - given RC. - -`scaleNodesUp()` - Increase the number of nodes by one (`$.nodeCount` up to the - `len($.minionNodes)`) and call `.deploy()`. - Can be used as an Action. - -`scaleGatewaysUp()` - Increase the number of gateways by one (`$.gatewayCount` up to the - `len($.gatewayNodes)`) and call `.deploy()`. - Can be used as an Action. - -`scaleNodesDown()` - Decrease the number of nodes by one (`$.nodeCount` up to 1) - and call `.deploy()`. - Can be used as an Action. - -`scaleGatewaysUp()` - Decrease the number of gateways by one (`$.gatewayCount` up to 1) - and call `.deploy()`. - Can be used as an Action. - -KubernetesNode -~~~~~~~~~~~~~~ -Base class for all Kubernetes nodes. - -`getIp(preferFloatingIp)` - Return IP address of the instance. If preferFloatingIp is False (default) - return first IP address found. Otherwise give preference to floating IP. - -`deployInstance()` - Call `.deploy()` method of underlying instance. - -KubernetesGatewayNode -~~~~~~~~~~~~~~~~~~~~~ -Kubernetes Gateway Node. Extends `KubernetesNode` class. -All methods in this class are idempotent. This is achieved by memoizing the -fact that the function has been called. - -`deployInstance()` - Deploy underlying instance. - -`setupEtcd()` - Add current node to etcd config (by calling `etcdctl member add`) on - master node and start etcd member service on underlying instance. - -`setupNode()` - Set up the node, by first setting up Flannel and - then setting up HAProxy load balancer on underlying instance. - -`removeFromCluster()` - Remove current node from etcd cluster and call - `$.instance.releaseResources()`. Also clear up memoized values for - `deployInstance`, `setupEtcd`, `setupNode`, allowing you to call these - functions again. - -KubernetesMasterNode -~~~~~~~~~~~~~~~~~~~~ -Kubernetes Master Node. Extends `KubernetesNode` class. -Most methods in this class are idempotent. This is achieved by memoizing the -fact that the function has been called. - -`deployInstance()` - Deploy underlying instance. - -`setupEtcd()` - Set up etcd master node config and launch etcd service on master node. - -`setupNode()` - Set up the node. This includes setting up Flannel for master and - configuring and launching `kube-apiserver`, `kube-scheduler` and - `kube-controller-manager` services - on the underlying instance. - -`isAvailable()` - Return whether underlying instance has been deployed. - -KubernetesMinionNode -~~~~~~~~~~~~~~~~~~~~ -Kubernetes Minion Node. Extends `KubernetesNode` class. -All methods in this class are idempotent. This is achieved by memoizing the -fact that the function has been called. - -`deployInstance()` - Deploy underlying instance. - -`setupEtcd()` - Add current node to etcd config (by calling `etcdctl member add`) on - master node and start etcd member service on underlying instance. - -`setupNode()` - Set up the node, by first setting up Flannel and - then joining the minion into the cluster. If `dockerRegistry` or - `dockerMirror` are supplied for underlying cluster, those are appended to - the list of docker parameters. If gcloudKey is supplied for underlying - cluster, then current node attempts to login to google cloud registry. - Afterwards restart docker and configure and launch `kubelet` and - `kube-proxy` services - -`removeFromCluster()` - Remove current node from etcd cluster and call - `$.instance.releaseResources()`. Also clear up memoized values for - `deployInstance`, `setupEtcd`, `setupNode`, allowing you to call these - functions again. diff --git a/Docker/README.rst b/Docker/README.rst index 145d3da1..6e3f1529 100644 --- a/Docker/README.rst +++ b/Docker/README.rst @@ -1,30 +1,7 @@ -Docker support for Murano -========================= +Deprecate Docker repo +===================== -Docker is an open-source project that automates the deployment of applications -inside software containers. Docker containers could be run either by the -Docker itself or by container management platforms that built on top of the -Docker and provide extra value to schedule and manage containers on multiple -hosts. +Current repository is deprecated and moved to new project: +https://github.com/openstack/k8s-docker-suite-app-murano - -This folder contains needed abstractions and applications to develop and -run Docker applications: - -* DockerInterfaceLibrary: library that defines a framework for building Docker - applications. It provides set of common interfaces and data structures - that are used by all Docker applications and Docker hosting services. - If you want to develop your own Docker application this is a good place to - start. See DockerInterfaceLibrary/README.rst for more details. - -* DockerStandaloneHost: a regular Docker host. Docker containers are run on - a dedicated VM running docker software (require pre-built image with - docker and murano-agent). - -* Kubernetes: an open source container cluster manager by Google. It allows - to schedule and run Docker applications on multiple clustered nodes. - Application both installs Kubernetes and provides capabilities to run - Docker applications similar to DockerStandaloneHost. See - Kubernetes/README.rst for more details. - -* Applications: Examples of some of the most popular Docker applications. +So please propose all new patches to new repository. diff --git a/README.rst b/README.rst deleted file mode 100644 index af358d9b..00000000 --- a/README.rst +++ /dev/null @@ -1,40 +0,0 @@ -============================== -Murano Applications Repository -============================== - -Contains Murano Application packages source code. -All current applications supposed to work on Ubuntu Trusty with murano-agent installed. -Other Ubuntu versions are not tested. - -Composing an application package --------------------------------- - -Murano Applications are imported as zip archives, so -to make an application ready to use in Murano, it should be zipped first. - -To make a valid murano package take *package* folder located under -application directory and zip it's content. Make sure new archive -doesn't contain *package* folder itself. For more information, refer to -`Murano documentation `_. - -Importing application package ------------------------------ - -* Use murano dashboard to import packages. - Go to *Murano > Manage > Package Definitions* - and press *Import Package* - -* Use murano CLI ``murano package-import`` - -* Local zip file, URL or package name, located in Murano repository can be provided - -Building DIB elements for application image -------------------------------------------- - -Please, refer to *readme.rst* file located at application -folder to find out how to build image for a specific application. - -DIB elements with which image should be build are located at *elements* folder -at the same level with *package* folder. -If application folder doesn't contain *elements* inside - it means, -that no other preparation except murano-agent is needed. \ No newline at end of file