kubes 0.7.9 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/docs/.gitignore +1 -0
- data/docs/Gemfile +2 -0
- data/docs/_config.yml +8 -0
- data/docs/_docs/config/app-overrides.md +7 -0
- data/docs/_docs/config/boot.md +46 -0
- data/docs/_docs/config/env.md +29 -2
- data/docs/_docs/config/hooks/docker.md +2 -0
- data/docs/_docs/config/hooks/generator.md +16 -0
- data/docs/_docs/config/hooks/kubectl.md +2 -0
- data/docs/_docs/config/hooks/kubes.md +2 -0
- data/docs/_docs/config/reference.md +2 -2
- data/docs/_docs/config/skip.md +22 -0
- data/docs/_docs/helpers/aws/iam-role.md +1 -0
- data/docs/_docs/install/dependencies.md +18 -0
- data/docs/_docs/install/gem/custom-version.md +70 -0
- data/docs/_docs/install/gem.md +6 -0
- data/docs/_docs/install/standalone/centos.md +70 -0
- data/docs/_docs/install/standalone/details/permissions.md +44 -0
- data/docs/_docs/install/standalone/details/uninstall.md +16 -0
- data/docs/_docs/install/standalone/details.md +20 -0
- data/docs/_docs/install/standalone/macosx.md +45 -0
- data/docs/_docs/install/standalone/ubuntu.md +48 -0
- data/docs/_docs/install/standalone.md +43 -0
- data/docs/_docs/install.md +8 -0
- data/docs/_docs/learn/dsl/install.md +1 -1
- data/docs/_docs/learn/yaml/install.md +1 -1
- data/docs/_docs/patterns/central-deployer.md +38 -0
- data/docs/_docs/variables/advanced.md +32 -1
- data/docs/_docs/variables/basic.md +1 -0
- data/docs/_docs/vs/custom.md +2 -0
- data/docs/_docs/vs/helm.md +2 -0
- data/docs/_docs/vs/kustomize.md +3 -1
- data/docs/_docs/vs.md +2 -0
- data/docs/_docs/yaml/erb-comment.md +89 -0
- data/docs/_includes/banner/foot.html +2 -0
- data/docs/_includes/banner/head.html +5 -0
- data/docs/_includes/config/app-overrides-cheatsheet.md +44 -0
- data/docs/_includes/config/hooks/generator.md +6 -0
- data/docs/_includes/content.html +1 -1
- data/docs/_includes/install/gem.md +7 -0
- data/docs/_includes/install/wrapper.md +9 -0
- data/docs/_includes/layering/layers.md +3 -0
- data/docs/_includes/learn/next-steps.md +11 -0
- data/docs/_includes/sidebar.html +33 -4
- data/docs/_includes/videos/learn/vs.md +4 -0
- data/docs/_includes/videos/learn.md +12 -0
- data/docs/_includes/videos/youtube.md +1 -0
- data/docs/_layouts/default.html +3 -0
- data/docs/_reference/kubes-new-hook.md +30 -0
- data/docs/_reference/kubes-new-variable.md +7 -0
- data/docs/_reference/kubes-new.md +1 -0
- data/docs/_sass/theme.scss +11 -0
- data/docs/bin/web +1 -1
- data/docs/js/scripts.js +7 -0
- data/kubes.gemspec +3 -2
- data/lib/kubes/booter.rb +26 -0
- data/lib/kubes/cli/help/new/hook.md +9 -0
- data/lib/kubes/cli/help/new/variable.md +6 -0
- data/lib/kubes/cli/init.rb +0 -1
- data/lib/kubes/cli/new/hook.rb +18 -0
- data/lib/kubes/cli/new.rb +4 -0
- data/lib/kubes/command.rb +1 -1
- data/lib/kubes/compiler/layering.rb +9 -0
- data/lib/kubes/compiler/shared/runtime_helpers.rb +7 -0
- data/lib/kubes/compiler/strategy/erb/comment.rb +46 -0
- data/lib/kubes/compiler/strategy/erb.rb +4 -0
- data/lib/kubes/compiler/strategy/result.rb +13 -1
- data/lib/kubes/compiler.rb +2 -0
- data/lib/kubes/config.rb +6 -2
- data/lib/kubes/core.rb +4 -0
- data/lib/kubes/kubectl/ordering.rb +9 -6
- data/lib/kubes/version.rb +1 -1
- data/lib/kubes.rb +3 -0
- data/lib/templates/new/hooks/docker.rb +9 -0
- data/lib/templates/new/hooks/kubectl.rb +11 -0
- data/lib/templates/new/hooks/kubes.rb +9 -0
- data/lib/templates/yaml/.kubes/resources/base/deployment.yaml.tt +2 -0
- metadata +58 -11
- data/docs/_docs/intro/install.md +0 -6
- data/docs/_includes/intro/install.md +0 -19
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
title: Installation
|
3
|
+
---
|
4
|
+
|
5
|
+
Here are the ways to install Kubes.
|
6
|
+
|
7
|
+
1. [Gem]({% link _docs/install/gem.md %}): This is a great way if you already have Ruby on your system.
|
8
|
+
2. [Standalone Installer]({% link _docs/install/standalone.md %}): This is a great way if you don't yet have Ruby installed, and want a quick and easy way to install Kubes. There are installers for [Mac OSX]({% link _docs/install/standalone/macosx.md %}), [CentOS]({% link _docs/install/standalone/centos.md %}), [Ubuntu]({% link _docs/install/standalone/ubuntu.md %}), etc.
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
title: Central Deployer Pattern
|
3
|
+
nav_text: Central Deployer
|
4
|
+
categories: patterns
|
5
|
+
---
|
6
|
+
|
7
|
+
Kubes can be use as either an app-centric or ops-centric tool.
|
8
|
+
|
9
|
+
* **app-centric**: Each app repo has it's own `.kubes` settings files. This is useful if your applications are very differently setup.
|
10
|
+
* **ops-centric**: Each app repo has pretty much the same `.kubes` settings files. This is useful if your applications are very similarly set up.
|
11
|
+
|
12
|
+
## Setup
|
13
|
+
|
14
|
+
With an ops-centric approach, you use the same `.kubes` settings files for the app repos you want to use. For example:
|
15
|
+
|
16
|
+
https://github.com/org/app1
|
17
|
+
https://github.com/org/app2
|
18
|
+
|
19
|
+
You then also have a
|
20
|
+
|
21
|
+
https://github.com/org/.kubes
|
22
|
+
|
23
|
+
You can simply copy the `.kubes` folder into the app repo folder or even add the `repo/.kubes` as a submodule.
|
24
|
+
|
25
|
+
You'll end up with something like this:
|
26
|
+
|
27
|
+
app1/.kubes
|
28
|
+
app2/.kubes
|
29
|
+
|
30
|
+
Then to deploy different app level settings.
|
31
|
+
|
32
|
+
{% include config/app-overrides-cheatsheet.md %}
|
33
|
+
|
34
|
+
Also check out: [App Overrides Docs]({% link _docs/config/app-overrides.md %}).
|
35
|
+
|
36
|
+
The central deployer approach is removes duplication of the kubes config files between projects. Leveraging app-level overrides gives provides a great degree of control.
|
37
|
+
|
38
|
+
If the settings start to diverge too much, then it probably makes sense to use separate .kubes files in that app specific repo.
|
@@ -2,6 +2,7 @@
|
|
2
2
|
title: Advanced Variables
|
3
3
|
nav_text: Advanced
|
4
4
|
categories: variables
|
5
|
+
order: 2
|
5
6
|
---
|
6
7
|
|
7
8
|
Basic variables layering should provides enough flexibility and is generally recommended. This page covers more advanced variables layering.
|
@@ -44,12 +45,26 @@ And when `KUBES_ENV=prod`:
|
|
44
45
|
|
45
46
|
With advanced layering you can target a specific role and kind. So variables are only scoped to the resources you want.
|
46
47
|
|
48
|
+
## App-Level Overrides
|
49
|
+
|
50
|
+
If KUBES_APP is set, then app level layer overrides will also be processed. Example:
|
51
|
+
|
52
|
+
KUBES_APP=app1 kubes deploy
|
53
|
+
|
54
|
+
Here's an example with some of the additional files that get layered:
|
55
|
+
|
56
|
+
.kubes/variables/app1.rb
|
57
|
+
.kubes/variables/app1/base.rb
|
58
|
+
.kubes/variables/app1/dev.rb
|
59
|
+
|
60
|
+
This is useful if you're using kubes as part of a central deployer pattern. For the full list of layers refer to the table below:
|
61
|
+
|
47
62
|
## Full Layering Table
|
48
63
|
|
49
64
|
Here's a table showing the the full layering.
|
50
65
|
|
51
66
|
Folder/Pattern | Example
|
52
|
-
|
67
|
+
------------------|----------------------------
|
53
68
|
base.rb | base.rb
|
54
69
|
ENV.rb | dev.rb
|
55
70
|
base/all.rb | base/all.rb
|
@@ -61,4 +76,20 @@ ROLE/KIND.rb | web/deployment.rb
|
|
61
76
|
ROLE/KIND/base.rb | web/deployment/base.rb
|
62
77
|
ROLE/KIND/ENV.rb | web/deployment/dev.rb
|
63
78
|
|
79
|
+
If KUBES_APP is set then these additional layers are also processed:
|
80
|
+
|
81
|
+
Folder/Pattern | Example
|
82
|
+
------------------|----------------------------
|
83
|
+
APP.rb | app1.rb
|
84
|
+
APP/base.rb | app1/base.rb
|
85
|
+
APP/ENV.rb | app1/dev.rb
|
86
|
+
APP/base/all.rb | app1/base/all.rb
|
87
|
+
APP/base/all/ENV.rb | app1/base/all/dev.rb
|
88
|
+
APP/base/KIND.rb | app1/base/deployment.rb
|
89
|
+
APP/base/KIND/base.rb | app1/base/deployment/base.rb
|
90
|
+
APP/base/KIND/ENV.rb | app1/base/deployment/dev.rb
|
91
|
+
APP/ROLE/KIND.rb | app1/web/deployment.rb
|
92
|
+
APP/ROLE/KIND/base.rb | app1/web/deployment/base.rb
|
93
|
+
APP/ROLE/KIND/ENV.rb | app1/web/deployment/dev.rb
|
94
|
+
|
64
95
|
{% include variables/generator.md %}
|
data/docs/_docs/vs/custom.md
CHANGED
@@ -4,6 +4,8 @@ nav_text: Custom Solutions
|
|
4
4
|
categories: vs
|
5
5
|
---
|
6
6
|
|
7
|
+
{% include videos/learn/vs.md %}
|
8
|
+
|
7
9
|
Kubernetes provides a great platform to run and manage Docker containers. The `kubectl` command is usually how you interact with a Kubernetes cluster. It does its job well and is quite a powerful tool.
|
8
10
|
|
9
11
|
{% include vs/article.md %}
|
data/docs/_docs/vs/helm.md
CHANGED
@@ -4,6 +4,8 @@ nav_text: Helm
|
|
4
4
|
categories: vs
|
5
5
|
---
|
6
6
|
|
7
|
+
{% include videos/learn/vs.md %}
|
8
|
+
|
7
9
|
Kubes and Helm are quite different. Helm is a package manager tool. In contrast, Kubernetes is focused on deploying your application. While you can use package manager tools like Helm to deploy your application, application-focused deploy tools are better for the job. For example, apt-get and yum are also package manager tools. But few companies use `apt-get install` or `yum install` to deploy their application code. Instead, people usually use application-specific tools to deploy their web app.
|
8
10
|
|
9
11
|
{% include vs/article.md %}
|
data/docs/_docs/vs/kustomize.md
CHANGED
@@ -4,6 +4,8 @@ nav_text: Kustomize
|
|
4
4
|
categories: vs
|
5
5
|
---
|
6
6
|
|
7
|
+
{% include videos/learn/vs.md %}
|
8
|
+
|
7
9
|
Though both Kubes and Kustomize build YAML files, they are quite different beasts. Kustomize is more like a `kubectl` feature that decorates YAML. Kubes is more like a tool. Kubes also builds YAML, but it also provides additional features.
|
8
10
|
|
9
11
|
Kustomize lets you customize your Kubernetes YAML files with additional `kustomization.yaml` files. The kustomization.yaml files contain configs that tell `kubectl` how to decorate existing Kubernetes YAML files in a template-free way.
|
@@ -135,7 +137,7 @@ You can even define your own custom helpers for even more control. See: [Helpers
|
|
135
137
|
|
136
138
|
## Kubes Features
|
137
139
|
|
138
|
-
Kubes does a lot more than
|
140
|
+
Kubes does a lot more than building YAML files. Here's a list of features:
|
139
141
|
|
140
142
|
{% include intro/features.md %}
|
141
143
|
|
data/docs/_docs/vs.md
CHANGED
@@ -0,0 +1,89 @@
|
|
1
|
+
---
|
2
|
+
title: ERB Comment Syntax PreProcessor
|
3
|
+
---
|
4
|
+
|
5
|
+
Kubes allows you build kubernetes resources by compiling down `.kubes/resources` files with ERB. This is a powerful ability, but it can get in the way of IDE kubernetes autocompletion tools.
|
6
|
+
|
7
|
+
## Pre-Processing Before ERB
|
8
|
+
|
9
|
+
To work with IDE kubernetes autocompletion tools, kubes supports a lighter ERB comment-based syntax. It looks like this:
|
10
|
+
|
11
|
+
.kubes/resources/web/service.yaml
|
12
|
+
|
13
|
+
```yaml
|
14
|
+
apiVersion: v1
|
15
|
+
kind: Service
|
16
|
+
metadata:
|
17
|
+
name: web
|
18
|
+
labels:
|
19
|
+
name: web
|
20
|
+
#ERB if @role_label
|
21
|
+
role: #ERB= @role_label
|
22
|
+
#ERB end
|
23
|
+
spec:
|
24
|
+
ports:
|
25
|
+
- port: 80
|
26
|
+
protocol: TCP
|
27
|
+
targetPort: <%= dockerfile_port %>
|
28
|
+
selector:
|
29
|
+
role: web
|
30
|
+
type: ClusterIP
|
31
|
+
```
|
32
|
+
|
33
|
+
This allows IDE kubernetes autocompletion plugins and tools to work because the `.kubes/resources/web/service.yaml` source code itself is perfectly valid YAML.
|
34
|
+
|
35
|
+
The `#ERB` comments are essentially replaced by `<% ... %>` tags before ERB processing happens. Example:
|
36
|
+
|
37
|
+
.kubes/resources/web/service.yaml.erb
|
38
|
+
|
39
|
+
```yaml
|
40
|
+
apiVersion: v1
|
41
|
+
kind: Service
|
42
|
+
metadata:
|
43
|
+
name: web
|
44
|
+
labels:
|
45
|
+
name: web
|
46
|
+
<% if @role_label %>
|
47
|
+
role: <%= @role_label %>
|
48
|
+
<% end %>
|
49
|
+
spec:
|
50
|
+
ports:
|
51
|
+
- port: 80
|
52
|
+
protocol: TCP
|
53
|
+
targetPort: <%= dockerfile_port %>
|
54
|
+
selector:
|
55
|
+
role: web
|
56
|
+
type: ClusterIP
|
57
|
+
```
|
58
|
+
|
59
|
+
If you need to keep around the generated `.erb` file for debugging, use the `KUBES_KEEP_ERB` env var. Example:
|
60
|
+
|
61
|
+
$ KUBES_KEEP_ERB=1 kubes compile
|
62
|
+
.kubes/resources/web/service.yaml.erb # kept around
|
63
|
+
|
64
|
+
## Multiple Line ERB Comment Syntax
|
65
|
+
|
66
|
+
The ERB Comment syntax works because kubes simply replaces each line with actual ERB. For multiple line ERB syntax:
|
67
|
+
|
68
|
+
.kubes/resources/web/service.yaml
|
69
|
+
|
70
|
+
```yaml
|
71
|
+
#ERB if Kubes.env == "dev"
|
72
|
+
#ERB env_label = "development"
|
73
|
+
#ERB end
|
74
|
+
apiVersion: v1
|
75
|
+
kind: Service
|
76
|
+
metadata:
|
77
|
+
name: web
|
78
|
+
labels:
|
79
|
+
name: web
|
80
|
+
env: #ERB= env_label
|
81
|
+
spec:
|
82
|
+
ports:
|
83
|
+
- port: 80
|
84
|
+
protocol: TCP
|
85
|
+
targetPort: <%= dockerfile_port %>
|
86
|
+
selector:
|
87
|
+
role: web
|
88
|
+
type: ClusterIP
|
89
|
+
```
|
@@ -0,0 +1,5 @@
|
|
1
|
+
{% assign buildtime = "now" | date: "%Y%m%d%H%M%S" %}
|
2
|
+
<link rel="preload" href="{{ site.ads_url }}/ads/{{ site.time | date: '%s' }}.js" as="script" />
|
3
|
+
<script data-cfasync="false" async src="{{ site.ads_url }}/ads/{{ site.time | date: '%s' }}.js"></script>
|
4
|
+
|
5
|
+
<div id="head-banner" class="head-banner"></div>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
## App-Level Specific Settings
|
2
|
+
|
3
|
+
You can override all the different settings at the app-level when KUBES_APP is set.
|
4
|
+
|
5
|
+
For app1:
|
6
|
+
|
7
|
+
cd app1
|
8
|
+
KUBES_APP=app1 kubes deploy
|
9
|
+
|
10
|
+
And for app2:
|
11
|
+
|
12
|
+
cd app2
|
13
|
+
KUBES_APP=app2 kubes deploy
|
14
|
+
|
15
|
+
## Config Env
|
16
|
+
|
17
|
+
Override `config/app.rb` with app-level settings like so:
|
18
|
+
|
19
|
+
.kubes/config/env/app1/base.rb
|
20
|
+
.kubes/config/env/app1/dev.rb
|
21
|
+
.kubes/config/env/app1/prod.rb
|
22
|
+
.kubes/config/env/app2/base.rb
|
23
|
+
.kubes/config/env/app2/dev.rb
|
24
|
+
.kubes/config/env/app2/prod.rb
|
25
|
+
|
26
|
+
## Variables
|
27
|
+
|
28
|
+
Override `.kubes/variables/base.rb`, `.kubes/variables/dev.rb` etc like so:
|
29
|
+
|
30
|
+
.kubes/variables/app1/base.rb
|
31
|
+
.kubes/variables/app1/dev.rb
|
32
|
+
.kubes/variables/app1/prod.rb
|
33
|
+
.kubes/variables/app2/base.rb
|
34
|
+
.kubes/variables/app2/dev.rb
|
35
|
+
.kubes/variables/app2/prod.rb
|
36
|
+
|
37
|
+
## Resources
|
38
|
+
|
39
|
+
Override resources like so:
|
40
|
+
|
41
|
+
.kubes/resources/shared/config_map/app1.yaml
|
42
|
+
.kubes/resources/shared/config_map/app2.yaml
|
43
|
+
.kubes/resources/shared/secret/app1.yaml
|
44
|
+
.kubes/resources/shared/secret/app2.yaml
|
data/docs/_includes/content.html
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
## Generated Wrapper
|
2
|
+
|
3
|
+
The standalone installer creates a wrapper script in `/usr/local/bin`.
|
4
|
+
|
5
|
+
/usr/local/bin/kubes
|
6
|
+
|
7
|
+
Most users have `/usr/local/bin` configured in their PATH. So this wrapper should work immediately.
|
8
|
+
|
9
|
+
Important: If you have a wrapper in `/usr/local/bin` already, the installer will overwrite it.
|
@@ -46,6 +46,9 @@ pre | ROLE/all.{{ include.ext }} | web/all.{{ include.ext }}
|
|
46
46
|
main | ROLE/KIND.{{ include.ext }} | web/deployment.{{ include.ext }}
|
47
47
|
post | ROLE/KIND/base.{{ include.ext }} | web/deployment/base.{{ include.ext }}
|
48
48
|
post | ROLE/KIND/ENV.{{ include.ext }} | web/deployment/dev.{{ include.ext }}
|
49
|
+
post | ROLE/KIND/APP.{{ include.ext }} | web/deployment/app1.{{ include.ext }}
|
50
|
+
post | ROLE/KIND/APP/base.{{ include.ext }} | web/deployment/app1/base.{{ include.ext }}
|
51
|
+
post | ROLE/KIND/APP/ENV.{{ include.ext }} | web/deployment/app1/dev.{{ include.ext }}
|
49
52
|
|
50
53
|
## Real-World Uses
|
51
54
|
|
@@ -4,3 +4,14 @@ You've seen how to get started with Kubes. From here, you can check out the Docs
|
|
4
4
|
* [Layering]({% link _docs/layering.md %}): Use the same Kubernetes YAML to build multiple environments like dev and prod with [layering]({% link _docs/layering.md %}).
|
5
5
|
* [CLI Customizations]({% link _docs/config.md %}): You can customize the [cli args]({% link _docs/config/kubectl.md %}). You can also run hooks before and after kubectl commands.
|
6
6
|
* [Extra Env]({% link _docs/extra-env.md %}): Create additional envs with little effort.
|
7
|
+
|
8
|
+
## Learn Videos
|
9
|
+
|
10
|
+
Watch BoltOps Learn Kubes videos:
|
11
|
+
|
12
|
+
* [BoltOps Learn Kubes Videos](https://learn.boltops.com/tagged/kubes)
|
13
|
+
|
14
|
+
|
15
|
+
## Kubes Features
|
16
|
+
|
17
|
+
{% include intro/features.md %}
|
data/docs/_includes/sidebar.html
CHANGED
@@ -49,10 +49,36 @@
|
|
49
49
|
<li><a href="{% link _docs/intro/ordering/custom.md %}">Custom Order</a></li>
|
50
50
|
</ul>
|
51
51
|
</li>
|
52
|
-
<li><a href="{% link _docs/intro/install.md %}">Install</a></li>
|
53
52
|
<li><a href="{% link _docs/intro/docker-image.md %}">Docker Image</a></li>
|
54
53
|
</ul>
|
55
54
|
</li>
|
55
|
+
<li><a href="{% link _docs/install.md %}">Install</a>
|
56
|
+
<ul>
|
57
|
+
<li><a href="{% link _docs/install/gem.md %}">Gem</a>
|
58
|
+
<ul>
|
59
|
+
<li><a href="{% link _docs/install/gem/custom-version.md %}">Custom Version</a></li>
|
60
|
+
</ul>
|
61
|
+
</li>
|
62
|
+
<li><a href="{% link _docs/install/standalone.md %}">Standalone</a>
|
63
|
+
<ul>
|
64
|
+
{% assign docs = site.docs | where: "categories","standalone" | sort:"order" %}
|
65
|
+
{% for doc in docs -%}
|
66
|
+
{% if doc.nav_text == "Details" %}
|
67
|
+
<li><a href="{{ doc.url }}">{{ doc.nav_text }}</a>
|
68
|
+
<ul>
|
69
|
+
<li><a href="{% link _docs/install/standalone/details/permissions.md %}">Permissions</a></li>
|
70
|
+
<li><a href="{% link _docs/install/standalone/details/uninstall.md %}">Uninstall</a></li>
|
71
|
+
</ul>
|
72
|
+
</li>
|
73
|
+
{% else %}
|
74
|
+
<li><a href="{{ doc.url }}">{{ doc.nav_text }}</a></li>
|
75
|
+
{% endif %}
|
76
|
+
{% endfor %}
|
77
|
+
</ul>
|
78
|
+
</li>
|
79
|
+
<li><a href="{% link _docs/install/dependencies.md %}">Dependencies</a>
|
80
|
+
</ul>
|
81
|
+
</li>
|
56
82
|
<li><a href="{% link _docs/resources.md %}">Resources</a>
|
57
83
|
<ul>
|
58
84
|
<li><a href="{% link _docs/resources/role.md %}">Role</a></li>
|
@@ -72,16 +98,18 @@
|
|
72
98
|
</li>
|
73
99
|
<li><a href="{% link _docs/config/hooks.md %}">Hooks</a>
|
74
100
|
<ul>
|
75
|
-
{% assign docs = site.docs | where: "categories","hooks" %}
|
101
|
+
{% assign docs = site.docs | where: "categories","hooks" | sort: "order" %}
|
76
102
|
{% for doc in docs -%}
|
77
103
|
<li><a href="{{ doc.url }}">{{ doc.nav_text }}</a></li>
|
78
104
|
{% endfor %}
|
79
105
|
</ul>
|
80
106
|
</li>
|
107
|
+
<li><a href="{% link _docs/config/boot.md %}">Boot Hooks</a></li>
|
81
108
|
<li><a href="{% link _docs/config/docker.md %}">Docker</a></li>
|
82
109
|
<li><a href="{% link _docs/config/env.md %}">Env</a></li>
|
83
110
|
<li><a href="{% link _docs/config/builder.md %}">Builder</a></li>
|
84
111
|
<li><a href="{% link _docs/config/skip.md %}">Skip Option</a></li>
|
112
|
+
<li><a href="{% link _docs/config/app-overrides.md %}">App Overrides</a></li>
|
85
113
|
<li><a href="{% link _docs/config/reference.md %}">Reference</a></li>
|
86
114
|
</ul>
|
87
115
|
</li>
|
@@ -90,6 +118,7 @@
|
|
90
118
|
<ul>
|
91
119
|
<li><a href="{% link _docs/yaml/multiple-resources.md %}">Multiple Resources</a></li>
|
92
120
|
<li><a href="{% link _docs/yaml/multiple-files.md %}">Multiple Files</a></li>
|
121
|
+
<li><a href="{% link _docs/yaml/erb-comment.md %}">ERB Comment Syntax</a></li>
|
93
122
|
</ul>
|
94
123
|
</li>
|
95
124
|
<li><a href="{% link _docs/layering.md %}">Layering</a>
|
@@ -116,7 +145,7 @@
|
|
116
145
|
</li>
|
117
146
|
<li><a href="{% link _docs/variables.md %}">Variables</a>
|
118
147
|
<ul>
|
119
|
-
{% assign docs = site.docs | where: "categories","variables" %}
|
148
|
+
{% assign docs = site.docs | where: "categories","variables" | sort:"order" %}
|
120
149
|
{% for doc in docs -%}
|
121
150
|
<li><a href="{{ doc.url }}">{{ doc.nav_text }}</a></li>
|
122
151
|
{% endfor %}
|
@@ -210,7 +239,7 @@
|
|
210
239
|
<h2>sidebar options:</h2>
|
211
240
|
<ul class="list-unstyled">
|
212
241
|
<li><a href="#" id="expand-all">expand all</a></li>
|
213
|
-
<li><a href="{{ site.gh_url }}/blob/master/docs/
|
242
|
+
<li><a href="{{ site.gh_url }}/blob/master/docs/" id="edit-page" target="_blank">edit page</a></li>
|
214
243
|
</ul>
|
215
244
|
</div>
|
216
245
|
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="learn">
|
2
|
+
<a href="https://learn.boltops.com/courses/{{ include.url }}">
|
3
|
+
{% if include.img %}
|
4
|
+
<img src="{{ include.img }}" />
|
5
|
+
{% else %}
|
6
|
+
<img src="https://learn.boltops.com/courses/{{ include.url }}/thumbnail.png" />
|
7
|
+
{% endif %}
|
8
|
+
</a>
|
9
|
+
{% unless include.premium == false %}
|
10
|
+
<div class="note">Note: Premium video content requires a subscription.</div>
|
11
|
+
{% endunless %}
|
12
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div class="video-box"><div class="video-container"><iframe src="https://www.youtube.com/embed/{{ include.video_id }}" frameborder="0" allowfullscreen=""></iframe></div></div>
|
data/docs/_layouts/default.html
CHANGED
@@ -24,12 +24,15 @@
|
|
24
24
|
<script src="/vendor/jquery/jquery.min.js"></script>
|
25
25
|
<script src="/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
26
26
|
<script src="/js/app.js"></script>
|
27
|
+
<script src="/js/scripts.js"></script>
|
27
28
|
</head>
|
28
29
|
|
29
30
|
<body>
|
31
|
+
{% include banner/head.html %}
|
30
32
|
{% include header.html %}
|
31
33
|
{% include content.html %}
|
32
34
|
{% include footer.html %}
|
35
|
+
{% include banner/foot.html %}
|
33
36
|
{% include js.html %}
|
34
37
|
</body>
|
35
38
|
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
title: kubes new hook
|
3
|
+
reference: true
|
4
|
+
---
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
kubes new hook
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
Generates kubes hook file.
|
13
|
+
|
14
|
+
## Examples
|
15
|
+
|
16
|
+
$ kubes new hook docker
|
17
|
+
create .kubes/config/hooks/docker.rb
|
18
|
+
$ kubes new hook kubectl
|
19
|
+
create .kubes/config/hooks/kubectl.rb
|
20
|
+
$ kubes new hook kubes
|
21
|
+
create .kubes/config/hooks/kubes.rb
|
22
|
+
$
|
23
|
+
|
24
|
+
|
25
|
+
## Options
|
26
|
+
|
27
|
+
```
|
28
|
+
y, [--force] # Bypass overwrite are you sure prompt for existing files
|
29
|
+
```
|
30
|
+
|
@@ -14,6 +14,7 @@ Generates new resource.
|
|
14
14
|
## Subcommands
|
15
15
|
|
16
16
|
* [kubes new helper]({% link _reference/kubes-new-helper.md %}) - Generates kubes helper file.
|
17
|
+
* [kubes new hook]({% link _reference/kubes-new-hook.md %}) - Generates kubes hook file.
|
17
18
|
* [kubes new resource]({% link _reference/kubes-new-resource.md %}) - Generates Kubes Kubernetes resource definition.
|
18
19
|
* [kubes new variable]({% link _reference/kubes-new-variable.md %}) - Generates kubes variable file.
|
19
20
|
|
data/docs/_sass/theme.scss
CHANGED
data/docs/bin/web
CHANGED
data/docs/js/scripts.js
ADDED
data/kubes.gemspec
CHANGED
@@ -23,14 +23,15 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency "dsl_evaluator"
|
24
24
|
spec.add_dependency "hash_squeezer"
|
25
25
|
spec.add_dependency "memoist"
|
26
|
+
spec.add_dependency "nokogiri"
|
26
27
|
spec.add_dependency "rainbow"
|
27
28
|
spec.add_dependency "render_me_pretty"
|
28
29
|
spec.add_dependency "thor"
|
29
30
|
spec.add_dependency "zeitwerk"
|
30
31
|
|
31
32
|
# core helper libs
|
32
|
-
spec.add_dependency "kubes_aws", "
|
33
|
-
spec.add_dependency "kubes_google", "
|
33
|
+
spec.add_dependency "kubes_aws", ">= 0.3.1"
|
34
|
+
spec.add_dependency "kubes_google", ">= 0.3.8"
|
34
35
|
|
35
36
|
spec.add_development_dependency "bundler"
|
36
37
|
spec.add_development_dependency "byebug"
|
data/lib/kubes/booter.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
module Kubes
|
2
|
+
module Booter
|
3
|
+
def boot
|
4
|
+
run_hooks
|
5
|
+
end
|
6
|
+
|
7
|
+
# Special boot hooks run super early, even before plugins are loaded.
|
8
|
+
# Useful for setting env vars and other early things.
|
9
|
+
#
|
10
|
+
# config/boot.rb
|
11
|
+
# config/boot/dev.rb
|
12
|
+
#
|
13
|
+
def run_hooks
|
14
|
+
run_hook
|
15
|
+
run_hook(Kubes.env)
|
16
|
+
end
|
17
|
+
|
18
|
+
def run_hook(env=nil)
|
19
|
+
name = env ? "boot/#{env}" : "boot"
|
20
|
+
path = "#{Kubes.root}/.kubes/#{name}.rb"
|
21
|
+
require path if File.exist?(path)
|
22
|
+
end
|
23
|
+
|
24
|
+
extend self
|
25
|
+
end
|
26
|
+
end
|