staticpages-plugin-digitalocean 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 07c1078120cda604f9637241386f1381b2850c35da6c571feefe577b8723332c
4
+ data.tar.gz: 96799339c142b2616e6b22b6e9b0f8d6364046fae54c34091027acbc4398f61e
5
+ SHA512:
6
+ metadata.gz: 969dec1437709de58dbcf28b063a33a82108a8bab535122b107cf65fe98797fea37ad6a18ff727321625a472d84dc77673619459441b24c72adf9ecaa85c8f41
7
+ data.tar.gz: 5fa5f0e702f3718e75a656ef5795c3654531652cb2cdf313cc3dd092204932aae7afb89a28d5dd1d84fc3b43cca4885069b138d649c7eeb0cf7be2a19ec5cea8
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.gitmodules ADDED
File without changes
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in kontena-plugin-aws.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'rspec'
8
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,214 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Pavel Tsurbeleu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+
24
+
25
+ Apache License
26
+ Version 2.0, January 2004
27
+ http://www.apache.org/licenses/
28
+
29
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
30
+
31
+ 1. Definitions.
32
+
33
+ "License" shall mean the terms and conditions for use, reproduction,
34
+ and distribution as defined by Sections 1 through 9 of this document.
35
+
36
+ "Licensor" shall mean the copyright owner or entity authorized by
37
+ the copyright owner that is granting the License.
38
+
39
+ "Legal Entity" shall mean the union of the acting entity and all
40
+ other entities that control, are controlled by, or are under common
41
+ control with that entity. For the purposes of this definition,
42
+ "control" means (i) the power, direct or indirect, to cause the
43
+ direction or management of such entity, whether by contract or
44
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
45
+ outstanding shares, or (iii) beneficial ownership of such entity.
46
+
47
+ "You" (or "Your") shall mean an individual or Legal Entity
48
+ exercising permissions granted by this License.
49
+
50
+ "Source" form shall mean the preferred form for making modifications,
51
+ including but not limited to software source code, documentation
52
+ source, and configuration files.
53
+
54
+ "Object" form shall mean any form resulting from mechanical
55
+ transformation or translation of a Source form, including but
56
+ not limited to compiled object code, generated documentation,
57
+ and conversions to other media types.
58
+
59
+ "Work" shall mean the work of authorship, whether in Source or
60
+ Object form, made available under the License, as indicated by a
61
+ copyright notice that is included in or attached to the work
62
+ (an example is provided in the Appendix below).
63
+
64
+ "Derivative Works" shall mean any work, whether in Source or Object
65
+ form, that is based on (or derived from) the Work and for which the
66
+ editorial revisions, annotations, elaborations, or other modifications
67
+ represent, as a whole, an original work of authorship. For the purposes
68
+ of this License, Derivative Works shall not include works that remain
69
+ separable from, or merely link (or bind by name) to the interfaces of,
70
+ the Work and Derivative Works thereof.
71
+
72
+ "Contribution" shall mean any work of authorship, including
73
+ the original version of the Work and any modifications or additions
74
+ to that Work or Derivative Works thereof, that is intentionally
75
+ submitted to Licensor for inclusion in the Work by the copyright owner
76
+ or by an individual or Legal Entity authorized to submit on behalf of
77
+ the copyright owner. For the purposes of this definition, "submitted"
78
+ means any form of electronic, verbal, or written communication sent
79
+ to the Licensor or its representatives, including but not limited to
80
+ communication on electronic mailing lists, source code control systems,
81
+ and issue tracking systems that are managed by, or on behalf of, the
82
+ Licensor for the purpose of discussing and improving the Work, but
83
+ excluding communication that is conspicuously marked or otherwise
84
+ designated in writing by the copyright owner as "Not a Contribution."
85
+
86
+ "Contributor" shall mean Licensor and any individual or Legal Entity
87
+ on behalf of whom a Contribution has been received by Licensor and
88
+ subsequently incorporated within the Work.
89
+
90
+ 2. Grant of Copyright License. Subject to the terms and conditions of
91
+ this License, each Contributor hereby grants to You a perpetual,
92
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
93
+ copyright license to reproduce, prepare Derivative Works of,
94
+ publicly display, publicly perform, sublicense, and distribute the
95
+ Work and such Derivative Works in Source or Object form.
96
+
97
+ 3. Grant of Patent License. Subject to the terms and conditions of
98
+ this License, each Contributor hereby grants to You a perpetual,
99
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
100
+ (except as stated in this section) patent license to make, have made,
101
+ use, offer to sell, sell, import, and otherwise transfer the Work,
102
+ where such license applies only to those patent claims licensable
103
+ by such Contributor that are necessarily infringed by their
104
+ Contribution(s) alone or by combination of their Contribution(s)
105
+ with the Work to which such Contribution(s) was submitted. If You
106
+ institute patent litigation against any entity (including a
107
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
108
+ or a Contribution incorporated within the Work constitutes direct
109
+ or contributory patent infringement, then any patent licenses
110
+ granted to You under this License for that Work shall terminate
111
+ as of the date such litigation is filed.
112
+
113
+ 4. Redistribution. You may reproduce and distribute copies of the
114
+ Work or Derivative Works thereof in any medium, with or without
115
+ modifications, and in Source or Object form, provided that You
116
+ meet the following conditions:
117
+
118
+ (a) You must give any other recipients of the Work or
119
+ Derivative Works a copy of this License; and
120
+
121
+ (b) You must cause any modified files to carry prominent notices
122
+ stating that You changed the files; and
123
+
124
+ (c) You must retain, in the Source form of any Derivative Works
125
+ that You distribute, all copyright, patent, trademark, and
126
+ attribution notices from the Source form of the Work,
127
+ excluding those notices that do not pertain to any part of
128
+ the Derivative Works; and
129
+
130
+ (d) If the Work includes a "NOTICE" text file as part of its
131
+ distribution, then any Derivative Works that You distribute must
132
+ include a readable copy of the attribution notices contained
133
+ within such NOTICE file, excluding those notices that do not
134
+ pertain to any part of the Derivative Works, in at least one
135
+ of the following places: within a NOTICE text file distributed
136
+ as part of the Derivative Works; within the Source form or
137
+ documentation, if provided along with the Derivative Works; or,
138
+ within a display generated by the Derivative Works, if and
139
+ wherever such third-party notices normally appear. The contents
140
+ of the NOTICE file are for informational purposes only and
141
+ do not modify the License. You may add Your own attribution
142
+ notices within Derivative Works that You distribute, alongside
143
+ or as an addendum to the NOTICE text from the Work, provided
144
+ that such additional attribution notices cannot be construed
145
+ as modifying the License.
146
+
147
+ You may add Your own copyright statement to Your modifications and
148
+ may provide additional or different license terms and conditions
149
+ for use, reproduction, or distribution of Your modifications, or
150
+ for any such Derivative Works as a whole, provided Your use,
151
+ reproduction, and distribution of the Work otherwise complies with
152
+ the conditions stated in this License.
153
+
154
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
155
+ any Contribution intentionally submitted for inclusion in the Work
156
+ by You to the Licensor shall be under the terms and conditions of
157
+ this License, without any additional terms or conditions.
158
+ Notwithstanding the above, nothing herein shall supersede or modify
159
+ the terms of any separate license agreement you may have executed
160
+ with Licensor regarding such Contributions.
161
+
162
+ 6. Trademarks. This License does not grant permission to use the trade
163
+ names, trademarks, service marks, or product names of the Licensor,
164
+ except as required for reasonable and customary use in describing the
165
+ origin of the Work and reproducing the content of the NOTICE file.
166
+
167
+ 7. Disclaimer of Warranty. Unless required by applicable law or
168
+ agreed to in writing, Licensor provides the Work (and each
169
+ Contributor provides its Contributions) on an "AS IS" BASIS,
170
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
171
+ implied, including, without limitation, any warranties or conditions
172
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
173
+ PARTICULAR PURPOSE. You are solely responsible for determining the
174
+ appropriateness of using or redistributing the Work and assume any
175
+ risks associated with Your exercise of permissions under this License.
176
+
177
+ 8. Limitation of Liability. In no event and under no legal theory,
178
+ whether in tort (including negligence), contract, or otherwise,
179
+ unless required by applicable law (such as deliberate and grossly
180
+ negligent acts) or agreed to in writing, shall any Contributor be
181
+ liable to You for damages, including any direct, indirect, special,
182
+ incidental, or consequential damages of any character arising as a
183
+ result of this License or out of the use or inability to use the
184
+ Work (including but not limited to damages for loss of goodwill,
185
+ work stoppage, computer failure or malfunction, or any and all
186
+ other commercial damages or losses), even if such Contributor
187
+ has been advised of the possibility of such damages.
188
+
189
+ 9. Accepting Warranty or Additional Liability. While redistributing
190
+ the Work or Derivative Works thereof, You may choose to offer,
191
+ and charge a fee for, acceptance of support, warranty, indemnity,
192
+ or other liability obligations and/or rights consistent with this
193
+ License. However, in accepting such obligations, You may act only
194
+ on Your own behalf and on Your sole responsibility, not on behalf
195
+ of any other Contributor, and only if You agree to indemnify,
196
+ defend, and hold each Contributor harmless for any liability
197
+ incurred by, or claims asserted against, such Contributor by reason
198
+ of your accepting any such warranty or additional liability.
199
+
200
+ END OF TERMS AND CONDITIONS
201
+
202
+ Copyright 2015 Kontena, Inc.
203
+
204
+ Licensed under the Apache License, Version 2.0 (the "License");
205
+ you may not use this file except in compliance with the License.
206
+ You may obtain a copy of the License at
207
+
208
+ http://www.apache.org/licenses/LICENSE-2.0
209
+
210
+ Unless required by applicable law or agreed to in writing, software
211
+ distributed under the License is distributed on an "AS IS" BASIS,
212
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
213
+ See the License for the specific language governing permissions and
214
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # StaticPages DigitalOcean Plugin
2
+
3
+ This plugin provides support for DigitalOcean provisioning to Kontena CLI.
4
+
5
+
6
+ ## Contributing
7
+
8
+ 1. Fork it ( https://bitbucket.org/staticpagesio/staticpagesio-plugin-digitalocean )
9
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
10
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
11
+ 4. Push to the branch (`git push origin my-new-feature`)
12
+ 5. Create a new Pull Request
13
+
14
+ ## License
15
+
16
+ StaticPages.io plugin is licensed under the MIT License. See [LICENSE](LICENSE.txt) for full license text.
17
+
18
+ Kontena is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE.txt) for full license text.
@@ -0,0 +1,88 @@
1
+ #cloud-config
2
+ write_files:
3
+ - path: /etc/kontena-agent.env
4
+ permissions: 0600
5
+ owner: root
6
+ content: |
7
+ KONTENA_URI="<%= master_uri %>"
8
+ KONTENA_TOKEN="<%= grid_token %>"
9
+ KONTENA_PEER_INTERFACE=eth1
10
+ KONTENA_VERSION=<%= version %>
11
+ - path: /etc/systemd/system/docker.service.d/50-kontena.conf
12
+ content: |
13
+ [Service]
14
+ Environment='DOCKER_OPTS=--insecure-registry="10.81.0.0/16" --bip="172.17.43.1/16" -s overlay2'
15
+ Environment='DOCKER_CGROUPS=--exec-opt native.cgroupdriver=cgroupfs'
16
+ - path: /etc/sysctl.d/99-inotify.conf
17
+ owner: root
18
+ permissions: 0644
19
+ content: |
20
+ fs.inotify.max_user_instances = 8192
21
+ - path: /etc/resolv.conf
22
+ permissions: 0644
23
+ owner: root
24
+ content: |
25
+ nameserver 172.17.43.1
26
+ nameserver 8.8.8.8
27
+ nameserver 8.8.4.4
28
+ coreos:
29
+ units:
30
+ - name: etcd2.service
31
+ command: start
32
+ enable: true
33
+ content: |
34
+ [Unit]
35
+ Description=Kontena etcd 2.0
36
+ After=docker.service
37
+ After=kontena-agent.service
38
+ Requires=docker.service
39
+ [Service]
40
+ Restart=always
41
+ RestartSec=5
42
+ ExecStart=/usr/bin/docker logs --tail=10 -f kontena-etcd
43
+ - name: 50-docker.network
44
+ mask: true
45
+ - name: 50-docker-veth.network
46
+ mask: true
47
+ - name: zz-default.network
48
+ runtime: false
49
+ content: |
50
+ # default should only match real network interfaces
51
+ [Match]
52
+ Name=eth*
53
+
54
+ [Network]
55
+ DHCP=yes
56
+
57
+ [DHCP]
58
+ UseMTU=true
59
+ UseDomains=true
60
+ - name: kontena-agent.service
61
+ command: start
62
+ enable: true
63
+ content: |
64
+ [Unit]
65
+ Description=kontena-agent
66
+ After=network-online.target
67
+ After=docker.service
68
+ Description=Kontena Agent
69
+ Documentation=http://www.kontena.io/
70
+ Requires=network-online.target
71
+ Requires=docker.service
72
+
73
+ [Service]
74
+ Restart=always
75
+ RestartSec=5
76
+ EnvironmentFile=/etc/kontena-agent.env
77
+ ExecStartPre=-/usr/bin/docker stop kontena-agent
78
+ ExecStartPre=-/usr/bin/docker rm kontena-agent
79
+ ExecStartPre=/usr/bin/docker pull kontena/agent:${KONTENA_VERSION}
80
+ ExecStart=/usr/bin/docker run --name kontena-agent \
81
+ -e KONTENA_URI=${KONTENA_URI} \
82
+ -e KONTENA_TOKEN=${KONTENA_TOKEN} \
83
+ -e KONTENA_PEER_INTERFACE=${KONTENA_PEER_INTERFACE} \
84
+ -v=/var/run/docker.sock:/var/run/docker.sock \
85
+ -v=/etc/kontena-agent.env:/etc/kontena.env \
86
+ --net=host \
87
+ kontena/agent:${KONTENA_VERSION}
88
+ ExecStop=/usr/bin/docker stop kontena-agent
@@ -0,0 +1,126 @@
1
+ #cloud-config
2
+ write_files:
3
+ - path: /etc/kontena-server.env
4
+ permissions: 0600
5
+ owner: root
6
+ content: |
7
+ KONTENA_VERSION=<%= version %>
8
+ KONTENA_VAULT_KEY=<%= vault_secret %>
9
+ KONTENA_VAULT_IV=<%= vault_iv %>
10
+ <% if ssl_cert %>SSL_CERT="/etc/kontena-server.pem"
11
+
12
+ - path: /etc/kontena-server.pem
13
+ permissions: 0600
14
+ owner: root
15
+ content: | <% ssl_cert.split(/\n/).each do |row| %>
16
+ <%= row %><% end %><% end %>
17
+ - path: /opt/bin/kontena-haproxy.sh
18
+ permissions: 0755
19
+ owner: root
20
+ content: |
21
+ #!/bin/sh
22
+ if [ -n "$SSL_CERT" ]; then
23
+ SSL_CERT=$(awk 1 ORS='\\n' $SSL_CERT)
24
+ else
25
+ SSL_CERT="**None**"
26
+ fi
27
+ /usr/bin/docker run --name=kontena-server-haproxy \
28
+ --link kontena-server-api:kontena-server-api \
29
+ -e SSL_CERT="$SSL_CERT" \
30
+ -p 80:80 -p 443:443 kontena/haproxy:latest
31
+ coreos:
32
+ units:
33
+ <% unless mongodb_uri -%>
34
+ - name: kontena-server-mongo.service
35
+ command: start
36
+ enable: true
37
+ content: |
38
+ [Unit]
39
+ Description=kontena-server-mongo
40
+ After=network-online.target
41
+ After=docker.service
42
+ Description=Kontena Server MongoDB
43
+ Documentation=http://www.mongodb.org/
44
+ Requires=network-online.target
45
+ Requires=docker.service
46
+
47
+ [Service]
48
+ Restart=always
49
+ RestartSec=5
50
+ ExecStartPre=/usr/bin/docker pull mongo:3.0
51
+ ExecStartPre=-/usr/bin/docker create --name=kontena-server-mongo-data mongo:3.0
52
+ ExecStartPre=-/usr/bin/docker stop kontena-server-mongo
53
+ ExecStartPre=-/usr/bin/docker rm kontena-server-mongo
54
+ ExecStart=/usr/bin/docker run --name=kontena-server-mongo \
55
+ --volumes-from=kontena-server-mongo-data \
56
+ mongo:3.0 mongod --smallfiles
57
+ ExecStop=/usr/bin/docker stop kontena-server-mongo
58
+ <% end -%>
59
+ - name: kontena-server-api.service
60
+ command: start
61
+ enable: true
62
+ content: |
63
+ [Unit]
64
+ Description=kontena-server-api
65
+ After=network-online.target
66
+ After=docker.service
67
+ After=kontena-server-mongo.service
68
+ Description=Kontena Master
69
+ Documentation=http://www.kontena.io/
70
+ Before=kontena-server-haproxy.service
71
+ Wants=kontena-server-haproxy.service
72
+ Requires=network-online.target
73
+ Requires=docker.service
74
+ <% unless mongodb_uri -%>
75
+ Requires=kontena-server-mongo.service
76
+ <% end %>
77
+
78
+ [Service]
79
+ Restart=always
80
+ RestartSec=5
81
+ EnvironmentFile=/etc/kontena-server.env
82
+ EnvironmentFile=-/etc/kontena-server.custom.env
83
+ ExecStartPre=-/usr/bin/docker stop kontena-server-api
84
+ ExecStartPre=-/usr/bin/docker rm kontena-server-api
85
+ ExecStartPre=-/usr/bin/docker pull kontena/server:${KONTENA_VERSION}
86
+ ExecStart=/usr/bin/docker run --name kontena-server-api \
87
+ <% if mongodb_uri -%>
88
+ -e MONGODB_URI=<%= mongodb_uri %> \
89
+ <% else -%>
90
+ --link kontena-server-mongo:mongodb \
91
+ -e MONGODB_URI=mongodb://mongodb:27017/kontena_server \
92
+ <% end -%>
93
+ <% if server_name -%>
94
+ -e SERVER_NAME=<%= server_name %> \
95
+ <% end -%>
96
+ <% if initial_admin_code -%>
97
+ -e INITIAL_ADMIN_CODE=<%= initial_admin_code %> \
98
+ <% end -%>
99
+ -e VAULT_KEY=${KONTENA_VAULT_KEY} -e VAULT_IV=${KONTENA_VAULT_IV} \
100
+ kontena/server:${KONTENA_VERSION}
101
+ ExecStop=/usr/bin/docker stop kontena-server-api
102
+
103
+ - name: kontena-server-haproxy.service
104
+ command: start
105
+ enable: true
106
+ content: |
107
+ [Unit]
108
+ Description=kontena-server-haproxy
109
+ After=network-online.target
110
+ After=docker.service
111
+ Description=Kontena Server HAProxy
112
+ Documentation=http://www.kontena.io/
113
+ Requires=network-online.target
114
+ Requires=docker.service
115
+ Requires=kontena-server-api.service
116
+
117
+ [Service]
118
+ Restart=always
119
+ RestartSec=5
120
+ EnvironmentFile=/etc/kontena-server.env
121
+ EnvironmentFile=-/etc/kontena-server.custom.env
122
+ ExecStartPre=-/usr/bin/docker stop kontena-server-haproxy
123
+ ExecStartPre=-/usr/bin/docker rm kontena-server-haproxy
124
+ ExecStartPre=-/usr/bin/docker pull kontena/haproxy:latest
125
+ ExecStart=/opt/bin/kontena-haproxy.sh
126
+ ExecStop=/usr/bin/docker stop kontena-server-haproxy