hetzner-k3s 0.6.0.rc1 → 0.6.2.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/Gemfile +2 -13
- data/Gemfile.lock +20 -3
- data/README.md +88 -18
- data/cluster_config.yaml.example +29 -0
- data/hetzner-k3s.gemspec +7 -5
- data/lib/hetzner/k3s/version.rb +1 -1
- data/lib/hetzner/utils.rb +0 -6
- data/spec/k3s_spec.rb +11 -0
- data/spec/spec_helper.rb +16 -0
- metadata +25 -33
- data/.github/workflows/release.yml +0 -32
- data/.gitignore +0 -15
- data/.rspec +0 -3
- data/.rubocop.yml +0 -135
- data/.ruby-version +0 -1
- data/.travis.yml +0 -6
- data/bin/build.sh +0 -18
- data/bin/console.sh +0 -14
- data/bin/setup.sh +0 -8
- data/config/warble.rb +0 -182
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a97992a61bdf146f57c09744881d926bde5c808b6a82bd330ff244c4e27e3f8e
|
4
|
+
data.tar.gz: b03fbb20e031b39169aab50875581eeebc9ccd038587687b0df603e6bde81d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f9f1267f70b726032d950f77304525e23d8fbc64104786eb90d14f2f961f5e41305b73703489b73e0363b67b58031a2f28d60f50a6a93d2c40070fe8ec9ea09
|
7
|
+
data.tar.gz: 96bd346cdc5a14f7794d23d2e043612b70b1d329a883c25a6eef09e926cf549a37725b8878dfb85ee71a5cea870739da9f7d21d3a21fa2077ba2e78f7c99007a
|
data/Dockerfile
CHANGED
data/Gemfile
CHANGED
@@ -5,16 +5,5 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in k3s.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
# gem 'rspec', '~> 3.0'
|
11
|
-
|
12
|
-
# gem 'childprocess'
|
13
|
-
# gem 'ed25519'
|
14
|
-
# gem 'http'
|
15
|
-
# gem 'jruby-openssl'
|
16
|
-
# gem 'net-ssh'
|
17
|
-
# gem 'sshkey'
|
18
|
-
# gem 'thor'
|
19
|
-
# gem 'http-parser'
|
20
|
-
# end
|
8
|
+
gem 'rake', '~> 12.0'
|
9
|
+
gem 'rspec', '~> 3.0'
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
hetzner-k3s (0.
|
4
|
+
hetzner-k3s (0.6.2.pre1)
|
5
5
|
bcrypt_pbkdf
|
6
6
|
childprocess
|
7
7
|
ed25519
|
8
8
|
httparty
|
9
|
-
net-ssh
|
9
|
+
net-ssh (= 6.0.2)
|
10
10
|
sshkey
|
11
11
|
thor
|
12
12
|
|
@@ -16,6 +16,7 @@ GEM
|
|
16
16
|
ast (2.4.2)
|
17
17
|
bcrypt_pbkdf (1.1.0)
|
18
18
|
childprocess (4.1.0)
|
19
|
+
diff-lcs (1.5.0)
|
19
20
|
ed25519 (1.3.0)
|
20
21
|
httparty (0.20.0)
|
21
22
|
mime-types (~> 3.0)
|
@@ -24,13 +25,27 @@ GEM
|
|
24
25
|
mime-types-data (~> 3.2015)
|
25
26
|
mime-types-data (3.2022.0105)
|
26
27
|
multi_xml (0.6.0)
|
27
|
-
net-ssh (6.
|
28
|
+
net-ssh (6.0.2)
|
28
29
|
parallel (1.20.1)
|
29
30
|
parser (3.1.2.1)
|
30
31
|
ast (~> 2.4.1)
|
31
32
|
rainbow (3.1.1)
|
33
|
+
rake (12.3.3)
|
32
34
|
regexp_parser (2.5.0)
|
33
35
|
rexml (3.2.5)
|
36
|
+
rspec (3.11.0)
|
37
|
+
rspec-core (~> 3.11.0)
|
38
|
+
rspec-expectations (~> 3.11.0)
|
39
|
+
rspec-mocks (~> 3.11.0)
|
40
|
+
rspec-core (3.11.0)
|
41
|
+
rspec-support (~> 3.11.0)
|
42
|
+
rspec-expectations (3.11.0)
|
43
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
+
rspec-support (~> 3.11.0)
|
45
|
+
rspec-mocks (3.11.1)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.11.0)
|
48
|
+
rspec-support (3.11.0)
|
34
49
|
rubocop (1.12.1)
|
35
50
|
parallel (~> 1.10)
|
36
51
|
parser (>= 3.0.0.0)
|
@@ -53,6 +68,8 @@ PLATFORMS
|
|
53
68
|
|
54
69
|
DEPENDENCIES
|
55
70
|
hetzner-k3s!
|
71
|
+
rake (~> 12.0)
|
72
|
+
rspec (~> 3.0)
|
56
73
|
rubocop
|
57
74
|
|
58
75
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# Create production grade Kubernetes clusters in Hetzner Cloud in a couple of minutes or less
|
2
2
|
|
3
|
-
|
3
|
+

|
4
|
+

|
5
|
+

|
6
|
+

|
7
|
+

|
8
|
+

|
9
|
+

|
10
|
+

|
11
|
+

|
12
|
+
|
13
|
+

|
14
|
+

|
15
|
+
## What is this?
|
16
|
+
|
17
|
+
This is a CLI tool to quickly create and manage Kubernetes clusters in [Hetzner Cloud](https://www.hetzner.com/cloud) using the lightweight Kubernetes distribution [k3s](https://k3s.io/) from [Rancher](https://rancher.com/).
|
4
18
|
|
5
19
|
Hetzner Cloud is an awesome cloud provider which offers a truly great service with the best performance/cost ratio in the market. With Hetzner's Cloud Controller Manager and CSI driver you can provision load balancers and persistent volumes very easily.
|
6
20
|
|
@@ -8,7 +22,7 @@ k3s is my favorite Kubernetes distribution now because it uses much less memory
|
|
8
22
|
|
9
23
|
Using this tool, creating a highly available k3s cluster with 3 masters for the control plane and 3 worker nodes takes about **a couple of minutes** only. This includes
|
10
24
|
|
11
|
-
- creating the
|
25
|
+
- creating the infrastructure resources (servers, private network, firewall, load balancer for the API server for HA clusters)
|
12
26
|
- deploying k3s to the nodes
|
13
27
|
- installing the [Hetzner Cloud Controller Manager](https://github.com/hetznercloud/hcloud-cloud-controller-manager) to provision load balancers right away
|
14
28
|
- installing the [Hetzner CSI Driver](https://github.com/hetznercloud/csi-driver) to provision persistent volumes using Hetzner's block storage
|
@@ -18,17 +32,66 @@ See roadmap [here](https://github.com/vitobotta/hetzner-k3s/projects/1) for the
|
|
18
32
|
|
19
33
|
Also see this [wiki page](https://github.com/vitobotta/hetzner-k3s/wiki/Tutorial:---Setting-up-a-cluster) for a tutorial on how to set up a cluster with the most common setup to get you started.
|
20
34
|
|
21
|
-
|
35
|
+
___
|
36
|
+
## Who am I?
|
37
|
+
|
38
|
+
I'm a Senior Backend Engineer and DevOps based in Finland and working for event management platform [Brella](https://www.brella.io/).
|
39
|
+
|
40
|
+
I also write a [technical blog](https://vitobotta.com/) on programming, DevOps and related technologies.
|
41
|
+
|
42
|
+
___
|
43
|
+
## Prerequisites
|
22
44
|
|
23
45
|
All that is needed to use this tool is
|
24
46
|
|
25
47
|
- an Hetzner Cloud account
|
26
|
-
- an Hetzner Cloud token: for this you need to create a project from the cloud console, and then an API token with **both read and write permissions** (sidebar > Security > API Tokens); you will see the token only once, so
|
27
|
-
- a recent Ruby runtime installed (see [this page](https://www.ruby-lang.org/en/documentation/installation/) for instructions if you are not familiar with Ruby). I
|
48
|
+
- an Hetzner Cloud token: for this you need to create a project from the cloud console, and then an API token with **both read and write permissions** (sidebar > Security > API Tokens); you will see the token only once, so be sure to take note of it somewhere safe
|
49
|
+
- a recent Ruby runtime installed if you install the tool as Ruby gem (see [this page](https://www.ruby-lang.org/en/documentation/installation/) for instructions if you are not familiar with Ruby). I recommend you use the standalone binaries either downloaded directly or installed with Homebrew though, since it's easier and you don't have to set up Ruby.
|
50
|
+
|
51
|
+
___
|
52
|
+
## Getting Started - Installation
|
53
|
+
|
54
|
+
Before using the tool, be sure to have kubectl installed as it's required to install some software in the cluster to provision load balancers/persistent volumes and perform k3s upgrades.
|
55
|
+
|
56
|
+
### macOS
|
57
|
+
|
58
|
+
#### With Homebrew
|
59
|
+
|
60
|
+
```bash
|
61
|
+
brew install vitobotta/tap/hetzner-k3s
|
62
|
+
```
|
28
63
|
|
29
|
-
|
64
|
+
#### Binary installation (Intel)
|
65
|
+
|
66
|
+
```bash
|
67
|
+
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.1/hetzner-k3s-mac-amd64
|
68
|
+
chmod +x hetzner-k3s-mac-x64
|
69
|
+
sudo mv hetzner-k3s-mac-x64 /usr/local/bin/hetzner-k3s
|
70
|
+
```
|
30
71
|
|
31
|
-
|
72
|
+
#### Binary installation (Apple Silicon/M1)
|
73
|
+
|
74
|
+
```bash
|
75
|
+
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.1/hetzner-k3s-mac-arm64
|
76
|
+
chmod +x hetzner-k3s-mac-arm
|
77
|
+
sudo mv hetzner-k3s-mac-arm /usr/local/bin/hetzner-k3s
|
78
|
+
```
|
79
|
+
|
80
|
+
NOTE: currently the ARM version still requires [Rosetta](https://support.apple.com/en-us/HT211861) to function because it's not really an ARM-compiled version yet. It's a different build specifically for ARM Macs because of some differences in openssl between ARM and Intel Macs. A proper ARM version will be available in the future.
|
81
|
+
|
82
|
+
### Linux
|
83
|
+
|
84
|
+
```bash
|
85
|
+
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.1/hetzner-k3s-linux-x86_64
|
86
|
+
chmod +x hetzner-k3s-linux-x86_64
|
87
|
+
sudo mv hetzner-k3s-linux-x86_64 /usr/local/bin/hetzner-k3s
|
88
|
+
```
|
89
|
+
|
90
|
+
### macOS, Linux, Windows
|
91
|
+
|
92
|
+
#### As Ruby gem executable
|
93
|
+
|
94
|
+
Once you have the Ruby runtime up and running (2.7.1 required), you just need to install the gem:
|
32
95
|
|
33
96
|
```bash
|
34
97
|
gem install hetzner-k3s
|
@@ -36,7 +99,7 @@ gem install hetzner-k3s
|
|
36
99
|
|
37
100
|
This will install the `hetzner-k3s` executable in your PATH.
|
38
101
|
|
39
|
-
|
102
|
+
#### With Docker
|
40
103
|
|
41
104
|
Alternatively, if you don't want to set up a Ruby runtime but have Docker installed, you can use a container. Run the following from inside the directory where you have the config file for the cluster (described in the next section):
|
42
105
|
|
@@ -44,13 +107,15 @@ Alternatively, if you don't want to set up a Ruby runtime but have Docker instal
|
|
44
107
|
docker run --rm -it \
|
45
108
|
-v ${PWD}:/cluster \
|
46
109
|
-v ${HOME}/.ssh:/tmp/.ssh \
|
47
|
-
vitobotta/hetzner-k3s:v0.
|
110
|
+
vitobotta/hetzner-k3s:v0.6.1 \
|
48
111
|
create-cluster \
|
49
112
|
--config-file /cluster/test.yaml
|
50
113
|
```
|
51
114
|
|
52
115
|
Replace `test.yaml` with the name of your config file.
|
53
116
|
|
117
|
+
___
|
118
|
+
|
54
119
|
## Creating a cluster
|
55
120
|
|
56
121
|
The tool requires a simple configuration file in order to create/upgrade/delete clusters, in the YAML format like in the example below:
|
@@ -107,10 +172,9 @@ enable_encryption: true
|
|
107
172
|
# - arg1
|
108
173
|
# - ...
|
109
174
|
# existing_network: <specify if you want to use an existing network, otherwise one will be created for this cluster>
|
110
|
-
|
111
175
|
```
|
112
176
|
|
113
|
-
It should hopefully be self explanatory; you can run `hetzner-k3s releases` to see a list of the available releases
|
177
|
+
It should hopefully be self explanatory; you can run `hetzner-k3s releases` to see a list of the available k3s releases.
|
114
178
|
|
115
179
|
If you are using Docker, then set `kubeconfig_path` to `/cluster/kubeconfig` so that the kubeconfig is created in the same directory where your config file is. Also set the config file path to `/cluster/<filename>`.
|
116
180
|
|
@@ -119,7 +183,6 @@ If you don't want to specify the Hetzner token in the config file (for example i
|
|
119
183
|
**Important**: The tool assignes the label `cluster` to each server it creates, with the cluster name you specify in the config file, as the value. So please ensure you don't create unrelated servers in the same project having
|
120
184
|
the label `cluster=<cluster name>`, because otherwise they will be deleted if you delete the cluster. I recommend you create a separate Hetzner project for each cluster, see note at the end of this README for more details.
|
121
185
|
|
122
|
-
|
123
186
|
If you set `masters.instance_count` to 1 then the tool will create a non highly available control plane; for production clusters you may want to set it to a number greater than 1. This number must be odd to avoid split brain issues with etcd and the recommended number is 3.
|
124
187
|
|
125
188
|
You can specify any number of worker node pools for example to have mixed nodes with different specs for different workloads.
|
@@ -158,7 +221,7 @@ Finally, to create the cluster run:
|
|
158
221
|
hetzner-k3s create-cluster --config-file cluster_config.yaml
|
159
222
|
```
|
160
223
|
|
161
|
-
This will take a
|
224
|
+
This will take a few minutes depending on the number of masters and worker nodes.
|
162
225
|
|
163
226
|
If you are creating an HA cluster and see the following in the output you can safely ignore it - it happens when additional masters are joining the first one:
|
164
227
|
|
@@ -199,6 +262,7 @@ In a future relese I will add some automation for the cleanup.
|
|
199
262
|
|
200
263
|
It's easy to convert a non-HA with a single master cluster to HA with multiple masters. Just change the masters instance count and re-run the create command. This will create a load balancer for the API server and update the kubeconfig so that all the API requests go through the load balancer.
|
201
264
|
|
265
|
+
___
|
202
266
|
## Upgrading to a new version of k3s
|
203
267
|
|
204
268
|
If it's the first time you upgrade the cluster, all you need to do to upgrade it to a newer version of k3s is run the following command:
|
@@ -247,7 +311,7 @@ A final note about upgrades is that if for some reason the upgrade gets stuck af
|
|
247
311
|
```bash
|
248
312
|
kubectl label node <master1> <master2> <master2> plan.upgrade.cattle.io/k3s-server=upgraded
|
249
313
|
```
|
250
|
-
|
314
|
+
___
|
251
315
|
## Upgrading the OS on nodes
|
252
316
|
|
253
317
|
- consider adding a temporary node during the process if you don't have enough spare capacity in the cluster
|
@@ -257,6 +321,7 @@ kubectl label node <master1> <master2> <master2> plan.upgrade.cattle.io/k3s-serv
|
|
257
321
|
- uncordon
|
258
322
|
- proceed with the next node
|
259
323
|
|
324
|
+
___
|
260
325
|
## Deleting a cluster
|
261
326
|
|
262
327
|
To delete a cluster, running
|
@@ -267,7 +332,11 @@ hetzner-k3s delete-cluster --config-file cluster_config.yaml
|
|
267
332
|
|
268
333
|
This will delete all the resources in the Hetzner Cloud project for the cluster being deleted.
|
269
334
|
|
335
|
+
## Troubleshooting
|
270
336
|
|
337
|
+
See [this page](https://github.com/vitobotta/hetzner-k3s/wiki/Troubleshooting) for solutions to common issues.
|
338
|
+
|
339
|
+
___
|
271
340
|
## Additional info
|
272
341
|
|
273
342
|
### Load balancers
|
@@ -293,16 +362,15 @@ The annotation `load-balancer.hetzner.cloud/use-private-ip: "true"` ensures that
|
|
293
362
|
|
294
363
|
The other annotations should be self explanatory. You can find a list of the available annotations [here](https://pkg.go.dev/github.com/hetznercloud/hcloud-cloud-controller-manager/internal/annotation).
|
295
364
|
|
296
|
-
|
365
|
+
### Persistent volumes
|
297
366
|
|
298
367
|
Once the cluster is ready you can create persistent volumes out of the box with the default storage class `hcloud-volumes`, since the Hetzner CSI driver is installed automatically. This will use Hetzner's block storage (based on Ceph so it's replicated and highly available) for your persistent volumes. Note that the minimum size of a volume is 10Gi. If you specify a smaller size for a volume, the volume will be created with a capacity of 10Gi anyway.
|
299
368
|
|
300
|
-
|
301
|
-
## Keeping a project per cluster
|
369
|
+
### Keeping a project per cluster
|
302
370
|
|
303
371
|
I recommend that you create a separate Hetzner project for each cluster, because otherwise multiple clusters will attempt to create overlapping routes. I will make the pod cidr configurable in the future to avoid this, but I still recommend keeping clusters separated from each other. This way, if you want to delete a cluster with all the resources created for it, you can just delete the project.
|
304
372
|
|
305
|
-
|
373
|
+
___
|
306
374
|
## Contributing and support
|
307
375
|
|
308
376
|
Please create a PR if you want to propose any changes, or open an issue if you are having trouble with the tool - I will do my best to help if I can.
|
@@ -311,10 +379,12 @@ Contributors:
|
|
311
379
|
|
312
380
|
- [TitanFighter](https://github.com/TitanFighter) for [this awesome tutorial](https://github.com/vitobotta/hetzner-k3s/wiki/Tutorial:---Setting-up-a-cluster)
|
313
381
|
|
382
|
+
___
|
314
383
|
## License
|
315
384
|
|
316
385
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
317
386
|
|
387
|
+
___
|
318
388
|
## Code of Conduct
|
319
389
|
|
320
390
|
Everyone interacting in the hetzner-k3s project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/vitobotta/hetzner-k3s/blob/main/CODE_OF_CONDUCT.md).
|
data/cluster_config.yaml.example
CHANGED
@@ -7,6 +7,8 @@ public_ssh_key_path: "~/.ssh/id_rsa.pub"
|
|
7
7
|
private_ssh_key_path: "~/.ssh/id_rsa"
|
8
8
|
ssh_allowed_networks:
|
9
9
|
- 0.0.0.0/0
|
10
|
+
api_allowed_networks:
|
11
|
+
- 0.0.0.0/0
|
10
12
|
verify_host_key: false
|
11
13
|
location: nbg1
|
12
14
|
schedule_workloads_on_masters: false
|
@@ -20,3 +22,30 @@ worker_node_pools:
|
|
20
22
|
- name: big
|
21
23
|
instance_type: cpx31
|
22
24
|
instance_count: 2
|
25
|
+
additional_packages:
|
26
|
+
- somepackage
|
27
|
+
post_create_commands:
|
28
|
+
- apt update
|
29
|
+
- apt upgrade -y
|
30
|
+
- apt autoremove -y
|
31
|
+
- shutdown -r now
|
32
|
+
enable_encryption: true
|
33
|
+
# kube_api_server_args:
|
34
|
+
# - arg1
|
35
|
+
# - ...
|
36
|
+
# kube_scheduler_args:
|
37
|
+
# - arg1
|
38
|
+
# - ...
|
39
|
+
# kube_controller_manager_args:
|
40
|
+
# - arg1
|
41
|
+
# - ...
|
42
|
+
# kube_cloud_controller_manager_args:
|
43
|
+
# - arg1
|
44
|
+
# - ...
|
45
|
+
# kubelet_args:
|
46
|
+
# - arg1
|
47
|
+
# - ...
|
48
|
+
# kube_proxy_args:
|
49
|
+
# - arg1
|
50
|
+
# - ...
|
51
|
+
# existing_network: <specify if you want to use an existing network, otherwise one will be created for this cluster>
|
data/hetzner-k3s.gemspec
CHANGED
@@ -20,20 +20,22 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.metadata['source_code_uri'] = 'https://github.com/vitobotta/hetzner-k3s'
|
21
21
|
spec.metadata['changelog_uri'] = 'https://github.com/vitobotta/hetzner-k3s'
|
22
22
|
|
23
|
+
spec.add_dependency 'bcrypt_pbkdf'
|
23
24
|
spec.add_dependency 'childprocess'
|
24
25
|
spec.add_dependency 'ed25519'
|
25
26
|
spec.add_dependency 'httparty'
|
26
|
-
spec.add_dependency '
|
27
|
-
spec.add_dependency 'net-ssh'
|
27
|
+
spec.add_dependency 'net-ssh', '= 6.0.2'
|
28
28
|
spec.add_dependency 'sshkey'
|
29
29
|
spec.add_dependency 'thor'
|
30
30
|
spec.add_development_dependency 'rubocop'
|
31
31
|
|
32
32
|
# Specify which files should be added to the gem when it is released.
|
33
33
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
34
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
35
|
-
|
36
|
-
end
|
34
|
+
# spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
35
|
+
# `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
36
|
+
# end
|
37
|
+
|
38
|
+
spec.files = Dir['lib/**/*.rb'] + Dir['exe/*'] + Dir['[A-Z]*'] + Dir['spec/**/*']
|
37
39
|
spec.bindir = 'exe'
|
38
40
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
39
41
|
spec.require_paths = ['lib']
|
data/lib/hetzner/k3s/version.rb
CHANGED
data/lib/hetzner/utils.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
Net::SSH::Transport::Algorithms::ALGORITHMS.values.each { |algs| algs.reject! { |a| a =~ /^ecd(sa|h)-sha2/ } }
|
4
|
-
Net::SSH::KnownHosts::SUPPORTED_TYPE.reject! { |t| t =~ /^ecd(sa|h)-sha2/ }
|
5
|
-
|
6
3
|
require 'childprocess'
|
7
4
|
|
8
5
|
module Utils
|
@@ -92,9 +89,6 @@ module Utils
|
|
92
89
|
# p [e.class, e.message]
|
93
90
|
# retries += 1
|
94
91
|
# retry unless retries > 15 || e.message =~ /Bad file descriptor/
|
95
|
-
rescue Timeout::Error, IOError, Errno::EBADF
|
96
|
-
retries += 1
|
97
|
-
retry unless retries > 15
|
98
92
|
rescue Net::SSH::Disconnect => e
|
99
93
|
retries += 1
|
100
94
|
retry unless retries > 15 || e.message =~ /Too many authentication failures/
|
data/spec/k3s_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'k3s'
|
5
|
+
|
6
|
+
RSpec.configure do |config|
|
7
|
+
# Enable flags like --only-failures and --next-failure
|
8
|
+
config.example_status_persistence_file_path = '.rspec_status'
|
9
|
+
|
10
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
11
|
+
config.disable_monkey_patching!
|
12
|
+
|
13
|
+
config.expect_with :rspec do |c|
|
14
|
+
c.syntax = :expect
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,122 +1,122 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hetzner-k3s
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vito Botta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: bcrypt_pbkdf
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - ">="
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: '0'
|
19
|
-
name: childprocess
|
20
|
-
prerelease: false
|
21
20
|
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: childprocess
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
|
-
name: ed25519
|
34
|
-
prerelease: false
|
35
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
+
name: ed25519
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
45
|
- - ">="
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: '0'
|
47
|
-
name: httparty
|
48
|
-
prerelease: false
|
49
48
|
type: :runtime
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
+
name: httparty
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
57
58
|
requirements:
|
58
59
|
- - ">="
|
59
60
|
- !ruby/object:Gem::Version
|
60
61
|
version: '0'
|
61
|
-
name: bcrypt_pbkdf
|
62
|
-
prerelease: false
|
63
62
|
type: :runtime
|
63
|
+
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
+
name: net-ssh
|
70
71
|
requirement: !ruby/object:Gem::Requirement
|
71
72
|
requirements:
|
72
|
-
- -
|
73
|
+
- - '='
|
73
74
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
75
|
-
name: net-ssh
|
76
|
-
prerelease: false
|
75
|
+
version: 6.0.2
|
77
76
|
type: :runtime
|
77
|
+
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 6.0.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
+
name: sshkey
|
84
85
|
requirement: !ruby/object:Gem::Requirement
|
85
86
|
requirements:
|
86
87
|
- - ">="
|
87
88
|
- !ruby/object:Gem::Version
|
88
89
|
version: '0'
|
89
|
-
name: sshkey
|
90
|
-
prerelease: false
|
91
90
|
type: :runtime
|
91
|
+
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
+
name: thor
|
98
99
|
requirement: !ruby/object:Gem::Requirement
|
99
100
|
requirements:
|
100
101
|
- - ">="
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
103
|
-
name: thor
|
104
|
-
prerelease: false
|
105
104
|
type: :runtime
|
105
|
+
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
112
113
|
requirement: !ruby/object:Gem::Requirement
|
113
114
|
requirements:
|
114
115
|
- - ">="
|
115
116
|
- !ruby/object:Gem::Version
|
116
117
|
version: '0'
|
117
|
-
name: rubocop
|
118
|
-
prerelease: false
|
119
118
|
type: :development
|
119
|
+
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ">="
|
@@ -131,12 +131,6 @@ executables:
|
|
131
131
|
extensions: []
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
|
-
- ".github/workflows/release.yml"
|
135
|
-
- ".gitignore"
|
136
|
-
- ".rspec"
|
137
|
-
- ".rubocop.yml"
|
138
|
-
- ".ruby-version"
|
139
|
-
- ".travis.yml"
|
140
134
|
- CODE_OF_CONDUCT.md
|
141
135
|
- Dockerfile
|
142
136
|
- Gemfile
|
@@ -144,11 +138,7 @@ files:
|
|
144
138
|
- LICENSE.txt
|
145
139
|
- README.md
|
146
140
|
- Rakefile
|
147
|
-
- bin/build.sh
|
148
|
-
- bin/console.sh
|
149
|
-
- bin/setup.sh
|
150
141
|
- cluster_config.yaml.example
|
151
|
-
- config/warble.rb
|
152
142
|
- entrypoint.sh
|
153
143
|
- exe/hetzner-k3s
|
154
144
|
- hetzner-k3s.gemspec
|
@@ -166,6 +156,8 @@ files:
|
|
166
156
|
- lib/hetzner/k3s/configuration.rb
|
167
157
|
- lib/hetzner/k3s/version.rb
|
168
158
|
- lib/hetzner/utils.rb
|
159
|
+
- spec/k3s_spec.rb
|
160
|
+
- spec/spec_helper.rb
|
169
161
|
homepage: https://github.com/vitobotta/hetzner-k3s
|
170
162
|
licenses:
|
171
163
|
- MIT
|
@@ -189,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
181
|
- !ruby/object:Gem::Version
|
190
182
|
version: 1.3.1
|
191
183
|
requirements: []
|
192
|
-
rubygems_version: 3.2
|
184
|
+
rubygems_version: 3.1.2
|
193
185
|
signing_key:
|
194
186
|
specification_version: 4
|
195
187
|
summary: A CLI to create a Kubernetes cluster in Hetzner Cloud very quickly using
|
@@ -1,32 +0,0 @@
|
|
1
|
-
name: Release
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
tags:
|
6
|
-
- '*'
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
mcos:
|
10
|
-
runs-on: macos-12
|
11
|
-
steps:
|
12
|
-
- uses: actions/checkout@v3
|
13
|
-
|
14
|
-
- uses: ruby/setup-ruby@v1
|
15
|
-
with:
|
16
|
-
ruby-version: '2.7.1'
|
17
|
-
|
18
|
-
- name: Get ruby-packer
|
19
|
-
run: |
|
20
|
-
curl -o rubyc-macos https://github.com/pmq20/ruby-packer/releases/download/darwin-x64/rubyc
|
21
|
-
chmod +x rubyc-macos
|
22
|
-
|
23
|
-
- name: Build for macOS
|
24
|
-
run: |
|
25
|
-
env CC="xcrun clang -mmacosx-version-min=10.10 -Wno-implicit-function-declaration" time ./rubyc-macos -r ./ -o ./hetzner-k3s-macos exe/hetzner-k3s
|
26
|
-
chmod +x hetzner-k3s-macos
|
27
|
-
|
28
|
-
- uses: ncipollo/release-action@v1
|
29
|
-
with:
|
30
|
-
tag: v$(ruby -r ./lib/hetzner/k3s/version -e 'puts Hetzner::K3s::VERSION')
|
31
|
-
artifacts: "hetzner-k3s-macos"
|
32
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,135 +0,0 @@
|
|
1
|
-
Gemspec/DeprecatedAttributeAssignment: # new in 1.10
|
2
|
-
Enabled: true
|
3
|
-
Gemspec/RequireMFA: # new in 1.23
|
4
|
-
Enabled: true
|
5
|
-
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
6
|
-
Enabled: true
|
7
|
-
Layout/SpaceBeforeBrackets: # new in 1.7
|
8
|
-
Enabled: true
|
9
|
-
Lint/AmbiguousAssignment: # new in 1.7
|
10
|
-
Enabled: true
|
11
|
-
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
12
|
-
Enabled: true
|
13
|
-
Lint/AmbiguousRange: # new in 1.19
|
14
|
-
Enabled: true
|
15
|
-
Lint/DeprecatedConstants: # new in 1.8
|
16
|
-
Enabled: true
|
17
|
-
Lint/DuplicateBranch: # new in 1.3
|
18
|
-
Enabled: true
|
19
|
-
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
|
20
|
-
Enabled: true
|
21
|
-
Lint/EmptyBlock: # new in 1.1
|
22
|
-
Enabled: true
|
23
|
-
Lint/EmptyClass: # new in 1.3
|
24
|
-
Enabled: true
|
25
|
-
Lint/EmptyInPattern: # new in 1.16
|
26
|
-
Enabled: true
|
27
|
-
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
28
|
-
Enabled: true
|
29
|
-
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
30
|
-
Enabled: true
|
31
|
-
Lint/NoReturnInBeginEndBlocks: # new in 1.2
|
32
|
-
Enabled: true
|
33
|
-
Lint/NumberedParameterAssignment: # new in 1.9
|
34
|
-
Enabled: true
|
35
|
-
Lint/OrAssignmentToConstant: # new in 1.9
|
36
|
-
Enabled: true
|
37
|
-
Lint/RedundantDirGlobSort: # new in 1.8
|
38
|
-
Enabled: true
|
39
|
-
Lint/RequireRelativeSelfPath: # new in 1.22
|
40
|
-
Enabled: true
|
41
|
-
Lint/SymbolConversion: # new in 1.9
|
42
|
-
Enabled: true
|
43
|
-
Lint/ToEnumArguments: # new in 1.1
|
44
|
-
Enabled: true
|
45
|
-
Lint/TripleQuotes: # new in 1.9
|
46
|
-
Enabled: true
|
47
|
-
Lint/UnexpectedBlockArity: # new in 1.5
|
48
|
-
Enabled: true
|
49
|
-
Lint/UnmodifiedReduceAccumulator: # new in 1.1
|
50
|
-
Enabled: true
|
51
|
-
Lint/UselessRuby2Keywords: # new in 1.23
|
52
|
-
Enabled: true
|
53
|
-
Naming/BlockForwarding: # new in 1.24
|
54
|
-
Enabled: true
|
55
|
-
Security/IoMethods: # new in 1.22
|
56
|
-
Enabled: true
|
57
|
-
Style/ArgumentsForwarding: # new in 1.1
|
58
|
-
Enabled: true
|
59
|
-
Style/CollectionCompact: # new in 1.2
|
60
|
-
Enabled: true
|
61
|
-
Style/DocumentDynamicEvalDefinition: # new in 1.1
|
62
|
-
Enabled: true
|
63
|
-
Style/EndlessMethod: # new in 1.8
|
64
|
-
Enabled: true
|
65
|
-
Style/FileRead: # new in 1.24
|
66
|
-
Enabled: true
|
67
|
-
Style/FileWrite: # new in 1.24
|
68
|
-
Enabled: true
|
69
|
-
Style/HashConversion: # new in 1.10
|
70
|
-
Enabled: true
|
71
|
-
Style/HashExcept: # new in 1.7
|
72
|
-
Enabled: true
|
73
|
-
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
74
|
-
Enabled: true
|
75
|
-
Style/InPatternThen: # new in 1.16
|
76
|
-
Enabled: true
|
77
|
-
Style/MapToHash: # new in 1.24
|
78
|
-
Enabled: true
|
79
|
-
Style/MultilineInPatternThen: # new in 1.16
|
80
|
-
Enabled: true
|
81
|
-
Style/NegatedIfElseCondition: # new in 1.2
|
82
|
-
Enabled: true
|
83
|
-
Style/NilLambda: # new in 1.3
|
84
|
-
Enabled: true
|
85
|
-
Style/NumberedParameters: # new in 1.22
|
86
|
-
Enabled: true
|
87
|
-
Style/NumberedParametersLimit: # new in 1.22
|
88
|
-
Enabled: true
|
89
|
-
Style/OpenStructUse: # new in 1.23
|
90
|
-
Enabled: true
|
91
|
-
Style/QuotedSymbols: # new in 1.16
|
92
|
-
Enabled: true
|
93
|
-
Style/RedundantArgument: # new in 1.4
|
94
|
-
Enabled: true
|
95
|
-
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
96
|
-
Enabled: true
|
97
|
-
Style/SelectByRegexp: # new in 1.22
|
98
|
-
Enabled: true
|
99
|
-
Style/StringChars: # new in 1.12
|
100
|
-
Enabled: true
|
101
|
-
Style/SwapValues: # new in 1.1
|
102
|
-
Enabled: true
|
103
|
-
Style/Documentation:
|
104
|
-
Enabled: false
|
105
|
-
Metrics/MethodLength:
|
106
|
-
Enabled: false
|
107
|
-
Metrics/AbcSize:
|
108
|
-
Enabled: false
|
109
|
-
Metrics/CyclomaticComplexity:
|
110
|
-
Enabled: false
|
111
|
-
Metrics/ClassLength:
|
112
|
-
Enabled: false
|
113
|
-
Layout/LineLength:
|
114
|
-
Enabled: false
|
115
|
-
Metrics/PerceivedComplexity:
|
116
|
-
Enabled: false
|
117
|
-
Metrics/ParameterLists:
|
118
|
-
Max: 10
|
119
|
-
Style/FrozenStringLiteralComment:
|
120
|
-
Exclude:
|
121
|
-
- exe/hetzner-k3s
|
122
|
-
Lint/RefinementImportMethods: # new in 1.27
|
123
|
-
Enabled: true
|
124
|
-
Security/CompoundHash: # new in 1.28
|
125
|
-
Enabled: true
|
126
|
-
Style/EnvHome: # new in 1.29
|
127
|
-
Enabled: true
|
128
|
-
Style/FetchEnvVar: # new in 1.28
|
129
|
-
Enabled: true
|
130
|
-
Style/NestedFileDirname: # new in 1.26
|
131
|
-
Enabled: true
|
132
|
-
Style/ObjectThen: # new in 1.28
|
133
|
-
Enabled: true
|
134
|
-
Style/RedundantInitialize: # new in 1.27
|
135
|
-
Enabled: true
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.7.1
|
data/.travis.yml
DELETED
data/bin/build.sh
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
set -e
|
4
|
-
|
5
|
-
# IMAGE="vitobotta/hetzner-k3s"
|
6
|
-
|
7
|
-
# docker build -t ${IMAGE}:v0.5.9 \
|
8
|
-
# --platform=linux/amd64 \
|
9
|
-
# --cache-from ${IMAGE}:v0.5.8 \
|
10
|
-
# --build-arg BUILDKIT_INLINE_CACHE=1 .
|
11
|
-
|
12
|
-
# docker push vitobotta/hetzner-k3s:v0.5.9
|
13
|
-
|
14
|
-
warble
|
15
|
-
|
16
|
-
echo "#!/usr/bin/env java -jar" > dist/hetzner-k3s
|
17
|
-
cat dist/hetzner-k3s.jar >> dist/hetzner-k3s
|
18
|
-
chmod +x dist/hetzner-k3s
|
data/bin/console.sh
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'k3s'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup.sh
DELETED
data/config/warble.rb
DELETED
@@ -1,182 +0,0 @@
|
|
1
|
-
# Disable Rake-environment-task framework detection by uncommenting/setting to false
|
2
|
-
# Warbler.framework_detection = false
|
3
|
-
|
4
|
-
# Warbler web application assembly configuration file
|
5
|
-
Warbler::Config.new do |config|
|
6
|
-
# Features: additional options controlling how the jar is built.
|
7
|
-
# Currently the following features are supported:
|
8
|
-
# - *gemjar*: package the gem repository in a jar file in WEB-INF/lib
|
9
|
-
# - *executable*: embed a web server and make the war executable
|
10
|
-
# - *runnable*: allows to run bin scripts e.g. `java -jar my.war -S rake -T`
|
11
|
-
# - *compiled*: compile .rb files to .class files
|
12
|
-
config.features = %w(executable runnable compiled)
|
13
|
-
|
14
|
-
# Application directories to be included in the webapp.
|
15
|
-
config.dirs = %w(bin config exe lib)
|
16
|
-
|
17
|
-
# Additional files/directories to include, above those in config.dirs
|
18
|
-
# config.includes = FileList["db"]
|
19
|
-
|
20
|
-
# Additional files/directories to exclude
|
21
|
-
# config.excludes = FileList["lib/tasks/*"]
|
22
|
-
|
23
|
-
# Additional Java .jar files to include. Note that if .jar files are placed
|
24
|
-
# in lib (and not otherwise excluded) then they need not be mentioned here.
|
25
|
-
# JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
|
26
|
-
# own versions if you directly set the value
|
27
|
-
# config.java_libs += FileList["lib/java/*.jar"]
|
28
|
-
|
29
|
-
# Loose Java classes and miscellaneous files to be included.
|
30
|
-
# config.java_classes = FileList["target/classes/**.*"]
|
31
|
-
|
32
|
-
# One or more pathmaps defining how the java classes should be copied into
|
33
|
-
# the archive. The example pathmap below accompanies the java_classes
|
34
|
-
# configuration above. See http://rake.rubyforge.org/classes/String.html#M000017
|
35
|
-
# for details of how to specify a pathmap.
|
36
|
-
# config.pathmaps.java_classes << "%{target/classes/,}p"
|
37
|
-
|
38
|
-
# Bundler support is built-in. If Warbler finds a Gemfile in the
|
39
|
-
# project directory, it will be used to collect the gems to bundle
|
40
|
-
# in your application. If you wish to explicitly disable this
|
41
|
-
# functionality, uncomment here.
|
42
|
-
config.bundler = true
|
43
|
-
|
44
|
-
# An array of Bundler groups to avoid including in the war file.
|
45
|
-
# Defaults to ["development", "test", "assets"].
|
46
|
-
# config.bundle_without = []
|
47
|
-
|
48
|
-
# Other gems to be included. If you don't use Bundler or a gemspec
|
49
|
-
# file, you need to tell Warbler which gems your application needs
|
50
|
-
# so that they can be packaged in the archive.
|
51
|
-
# For Rails applications, the Rails gems are included by default
|
52
|
-
# unless the vendor/rails directory is present.
|
53
|
-
# config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"]
|
54
|
-
# config.gems << "tzinfo"
|
55
|
-
|
56
|
-
# Uncomment this if you don't want to package rails gem.
|
57
|
-
# config.gems -= ["rails"]
|
58
|
-
|
59
|
-
# The most recent versions of gems are used.
|
60
|
-
# You can specify versions of gems by using a hash assignment:
|
61
|
-
# config.gems["rails"] = "4.2.5"
|
62
|
-
|
63
|
-
# You can also use regexps or Gem::Dependency objects for flexibility or
|
64
|
-
# finer-grained control.
|
65
|
-
# config.gems << /^sinatra-/
|
66
|
-
# config.gems << Gem::Dependency.new("sinatra", "= 1.4.7")
|
67
|
-
|
68
|
-
# Include gem dependencies not mentioned specifically. Default is
|
69
|
-
# true, uncomment to turn off.
|
70
|
-
# config.gem_dependencies = false
|
71
|
-
|
72
|
-
# Array of regular expressions matching relative paths in gems to be
|
73
|
-
# excluded from the war. Defaults to empty, but you can set it like
|
74
|
-
# below, which excludes test files.
|
75
|
-
# config.gem_excludes = [/^(test|spec)\//]
|
76
|
-
|
77
|
-
# Pathmaps for controlling how application files are copied into the archive
|
78
|
-
# config.pathmaps.application = ["WEB-INF/%p"]
|
79
|
-
|
80
|
-
# Name of the archive (without the extension). Defaults to the basename
|
81
|
-
# of the project directory.
|
82
|
-
config.jar_name = "hetzner-k3s"
|
83
|
-
|
84
|
-
# File extension for the archive. Defaults to either 'jar' or 'war'.
|
85
|
-
config.jar_extension = "jar"
|
86
|
-
|
87
|
-
# Destionation for the created archive. Defaults to project's root directory.
|
88
|
-
config.autodeploy_dir = "dist/"
|
89
|
-
|
90
|
-
# Name of the MANIFEST.MF template for the war file. Defaults to a simple
|
91
|
-
# MANIFEST.MF that contains the version of Warbler used to create the war file.
|
92
|
-
# config.manifest_file = "config/MANIFEST.MF"
|
93
|
-
|
94
|
-
# When using the 'compiled' feature and specified, only these Ruby
|
95
|
-
# files will be compiled. Default is to compile all \.rb files in
|
96
|
-
# the application.
|
97
|
-
# config.compiled_ruby_files = FileList['app/**/*.rb']
|
98
|
-
|
99
|
-
# Determines if ruby files in supporting gems will be compiled.
|
100
|
-
# Ignored unless compile feature is used.
|
101
|
-
config.compile_gems = true
|
102
|
-
|
103
|
-
# When set it specify the bytecode version for compiled class files
|
104
|
-
# config.bytecode_version = "1.6"
|
105
|
-
|
106
|
-
# When set to true, Warbler will override the value of ENV['GEM_HOME'] even it
|
107
|
-
# has already been set. When set to false it will use any existing value of
|
108
|
-
# GEM_HOME if it is set.
|
109
|
-
# config.override_gem_home = true
|
110
|
-
|
111
|
-
# Allows for specifing custom executables
|
112
|
-
# config.executable = ["exe/hetzner-k3s"]
|
113
|
-
|
114
|
-
# Sets default (prefixed) parameters for the executables
|
115
|
-
# config.executable_params = "do:something"
|
116
|
-
|
117
|
-
# If set to true, moves jar files into WEB-INF/lib. Prior to version 1.4.2 of Warbler this was done
|
118
|
-
# by default. But since 1.4.2 this config defaults to false. It may need to be set to true for
|
119
|
-
# web servers that do not explode the WAR file.
|
120
|
-
# Alternatively, this option can be set to a regular expression, which will
|
121
|
-
# act as a jar selector -- only jar files that match the pattern will be
|
122
|
-
# included in the archive.
|
123
|
-
# config.move_jars_to_webinf_lib = false
|
124
|
-
|
125
|
-
# === War files only below here ===
|
126
|
-
|
127
|
-
# Embedded webserver to use with the 'executable' feature. Currently supported
|
128
|
-
# webservers are:
|
129
|
-
# - *jetty* - Embedded Jetty from Eclipse
|
130
|
-
# config.webserver = 'jetty'
|
131
|
-
|
132
|
-
# Path to the pre-bundled gem directory inside the war file. Default
|
133
|
-
# is 'WEB-INF/gems'. Specify path if gems are already bundled
|
134
|
-
# before running Warbler. This also sets 'gem.path' inside web.xml.
|
135
|
-
# config.gem_path = "WEB-INF/vendor/bundler_gems"
|
136
|
-
|
137
|
-
# Files for WEB-INF directory (next to web.xml). This contains
|
138
|
-
# web.xml by default. If there is an .erb-File it will be processed
|
139
|
-
# with webxml-config. You may want to exclude this file via
|
140
|
-
# config.excludes.
|
141
|
-
# config.webinf_files += FileList["jboss-web.xml"]
|
142
|
-
|
143
|
-
# Files to be included in the root of the webapp. Note that files in public
|
144
|
-
# will have the leading 'public/' part of the path stripped during staging.
|
145
|
-
# config.public_html = FileList["public/**/*", "doc/**/*"]
|
146
|
-
|
147
|
-
# Pathmaps for controlling how public HTML files are copied into the .war
|
148
|
-
# config.pathmaps.public_html = ["%{public/,}p"]
|
149
|
-
|
150
|
-
# Value of RAILS_ENV for the webapp -- default as shown below
|
151
|
-
# config.webxml.rails.env = ENV['RAILS_ENV'] || 'production'
|
152
|
-
|
153
|
-
# Public ROOT mapping, by default assets are copied into .war ROOT directory.
|
154
|
-
# config.public.root = ''
|
155
|
-
|
156
|
-
# Application booter to use, either :rack or :rails (autodetected by default)
|
157
|
-
# config.webxml.booter = :rails
|
158
|
-
|
159
|
-
# When using the :rack booter, "Rackup" script to use.
|
160
|
-
# - For 'rackup.path', the value points to the location of the rackup
|
161
|
-
# script in the web archive file. You need to make sure this file
|
162
|
-
# gets included in the war, possibly by adding it to config.includes
|
163
|
-
# or config.webinf_files above.
|
164
|
-
# - For 'rackup', the rackup script you provide as an inline string
|
165
|
-
# is simply embedded in web.xml.
|
166
|
-
# The script is evaluated in a Rack::Builder to load the application.
|
167
|
-
# Examples:
|
168
|
-
# config.webxml.rackup.path = 'WEB-INF/hello.ru'
|
169
|
-
# config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)}
|
170
|
-
# config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
|
171
|
-
|
172
|
-
# Control the pool of Rails runtimes. Leaving unspecified means
|
173
|
-
# the pool will grow as needed to service requests. It is recommended
|
174
|
-
# that you fix these values when running a production server!
|
175
|
-
# If you're using threadsafe! mode, you probably don't want to set these values,
|
176
|
-
# since 1 runtime(default for threadsafe mode) will be enough.
|
177
|
-
# config.webxml.jruby.min.runtimes = 2
|
178
|
-
# config.webxml.jruby.max.runtimes = 4
|
179
|
-
|
180
|
-
# JNDI data source name
|
181
|
-
# config.webxml.jndi = 'jdbc/rails'
|
182
|
-
end
|