kubes 0.7.7 → 0.8.0
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/README.md +4 -4
- 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/dsl/resources.md +1 -1
- data/docs/_docs/dsl.md +2 -2
- data/docs/_docs/helpers/aws/iam-role.md +1 -0
- data/docs/_docs/helpers/google/gke.md +1 -1
- data/docs/_docs/install/dependencies.md +18 -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 +36 -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 +28 -3
- 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 +1 -0
- 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/compiler/decorator/hashable/field.rb +41 -22
- data/lib/kubes/compiler/decorator/hashable.rb +1 -1
- data/lib/kubes/compiler/decorator/post.rb +12 -12
- data/lib/kubes/compiler/layering.rb +9 -0
- data/lib/kubes/compiler/shared/runtime_helpers.rb +8 -1
- 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
- data/spec/fixtures/decorators/deployment/configMap/volumes-name-first.yaml +14 -0
- data/spec/fixtures/decorators/deployment/configMap/volumes-name-second.yaml +14 -0
- data/spec/fixtures/decorators/ingress/tls.yaml +12 -0
- data/spec/kubes/compiler/decorator/post/deployment_spec.rb +25 -0
- data/spec/kubes/compiler/decorator/post/ingress_spec.rb +22 -0
- metadata +59 -5
- data/docs/_docs/intro/install.md +0 -6
- data/docs/_includes/intro/install.md +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 242d998c0a7f9c86c4db5d79eef556f3d5cac56d7131eedfd9c14b9b96975ef6
|
4
|
+
data.tar.gz: f38ef641ff71c45c84335723b3f0b67abe2a3d26132a8a407738391724a4acf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 345a9b9bbf12abd164e7aaec68be929cb7d8d61a6f05334a749e987722e2992f828f322a77e6c31a904fa716f984943bd6d638a19830efdfbaa24e0969ab0e80
|
7
|
+
data.tar.gz: 47dc50264262dd94fd085426f99f1e138e61c0362a77c11a087bd9b3a99829897a30aadf52bde6603260386f606059326dbc6cb90bf15c51a5f51755dc6a88ba
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,23 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.8.0] - 2022-02-06
|
7
|
+
- [#58](https://github.com/boltops-tools/kubes/pull/58) standalone install docs
|
8
|
+
- [#59](https://github.com/boltops-tools/kubes/pull/59) central deployer support
|
9
|
+
|
10
|
+
## [0.7.10] - 2021-12-18
|
11
|
+
- [#56](https://github.com/boltops-tools/kubes/pull/56) New hook generator
|
12
|
+
- [#57](https://github.com/boltops-tools/kubes/pull/57) Fix activesupport require
|
13
|
+
- add nokogiri dependency. looks like aws-sdk removed it and its breaking specs
|
14
|
+
- hook generator docs
|
15
|
+
- new hook generator
|
16
|
+
|
17
|
+
## [0.7.9] - 2021-11-07
|
18
|
+
- [#55](https://github.com/boltops-tools/kubes/pull/55) make helper methods available in variables files
|
19
|
+
|
20
|
+
## [0.7.8] - 2021-10-29
|
21
|
+
- [#54](https://github.com/boltops-tools/kubes/pull/54) fix configMap and secret hash when not first element in Array
|
22
|
+
|
6
23
|
## [0.7.7] - 2021-10-21
|
7
24
|
- [#51](https://github.com/boltops-tools/kubes/pull/51) add hash checksum for tls secretName
|
8
25
|
- [#52](https://github.com/boltops-tools/kubes/pull/52) add role all layer to pre_layers
|
data/README.md
CHANGED
@@ -17,8 +17,8 @@ Official Docs Site: [kubes.guru](https://kubes.guru)
|
|
17
17
|
Kubes will:
|
18
18
|
|
19
19
|
1. Build the docker image and push it to repo
|
20
|
-
2. Compile Kubernetes YAML files from YAML/ERB or a DSL
|
21
|
-
3. Deploy via kubectl apply on the compiled Kubernetes YAML files
|
20
|
+
2. Compile Kubernetes YAML files from YAML/ERB or a DSL with built Docker image
|
21
|
+
3. Deploy via `kubectl apply` on the compiled Kubernetes YAML files
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
@@ -42,7 +42,7 @@ Now, use `kubectl` directly in the proper order:
|
|
42
42
|
kubectl apply -f .kubes/output/web/service.yaml
|
43
43
|
kubectl apply -f .kubes/output/web/deployment.yaml
|
44
44
|
|
45
|
-
You can also apply with kubes. This will compile the
|
45
|
+
You can also apply with kubes. This will automatically compile the files also.
|
46
46
|
|
47
47
|
kubes apply
|
48
48
|
|
@@ -50,7 +50,7 @@ The deploy command, does all 3 steps: builds the docker image, compiles the `.ku
|
|
50
50
|
|
51
51
|
kubes deploy
|
52
52
|
|
53
|
-
## Multiple
|
53
|
+
## Multiple Environments
|
54
54
|
|
55
55
|
You can easily create multiple environments with the same YAML configs. Example:
|
56
56
|
|
data/docs/.gitignore
CHANGED
data/docs/Gemfile
CHANGED
@@ -2,11 +2,13 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
gem "html-proofer"
|
4
4
|
gem "jekyll"
|
5
|
+
gem "jekyll-include-cache"
|
5
6
|
gem "opal"
|
6
7
|
gem "opal-browser"
|
7
8
|
gem "opal-jquery"
|
8
9
|
gem "rake"
|
9
10
|
gem "rerun"
|
11
|
+
gem "webrick"
|
10
12
|
|
11
13
|
# GitHub pages does not support this plugin.
|
12
14
|
# GitHub pages will not serve zipped assets even if we precompress them before hand.
|
data/docs/_config.yml
CHANGED
@@ -69,3 +69,11 @@ defaults:
|
|
69
69
|
|
70
70
|
plugins_dir:
|
71
71
|
# - jekyll-gzip - GitHub pages does not support this plugin.
|
72
|
+
|
73
|
+
# List of supported plugins:
|
74
|
+
# https://pages.github.com/versions.json
|
75
|
+
# https://github.com/github/pages-gem/issues/171
|
76
|
+
plugins:
|
77
|
+
- jekyll-include-cache # Supported by GitHub pages
|
78
|
+
|
79
|
+
ads_url: "https://ads.boltops.com"
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
title: Boot Hooks
|
3
|
+
---
|
4
|
+
|
5
|
+
If you need to hook into the Kubes boot process super-early on, Kubes boot hooks are designed for that.
|
6
|
+
|
7
|
+
* They run very early in the Kubes boot process.
|
8
|
+
* They are useful for setting shared global values like env vars.
|
9
|
+
* Boot hooks are ruby files that get required. It's nice and simple. There's no interface to learn.
|
10
|
+
|
11
|
+
## Hooks
|
12
|
+
|
13
|
+
Kubes will searches 2 files in the `config` folder. If the files exist, they will be ran in this order.
|
14
|
+
|
15
|
+
1. **.kubes/config/boot.rb**: Always runs.
|
16
|
+
2. **.kubes/config/boot/KUBES_ENV.rb**: Runs based on the env. IE: `KUBES_ENV=dev` => `.kubes/config/boot/dev.rb`
|
17
|
+
|
18
|
+
Both files are required and ran if they both exists. Since the `KUBES_ENV` one runs second, it can be used to override previously set values.
|
19
|
+
|
20
|
+
## Example: Default KUBES_ENV
|
21
|
+
|
22
|
+
If you prefer a different default than `KUBES_ENV=dev`.
|
23
|
+
|
24
|
+
config/boot.rb
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
ENV['KUBES_ENV'] ||= 'development'
|
28
|
+
```
|
29
|
+
|
30
|
+
This changes the default for everyone using the project, but still allows them to control the default by adding `export KUBES_ENV=development` to their `~/.bash_profile`.
|
31
|
+
|
32
|
+
## Example: Auto-Switch AWS_PROFILE
|
33
|
+
|
34
|
+
One useful example is switching `AWS_PROFILE` based on the `KUBES_ENV`. Example:
|
35
|
+
|
36
|
+
config/boot/dev.rb
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
ENV['AWS_PROFILE'] = 'dev'
|
40
|
+
```
|
41
|
+
|
42
|
+
This example is for AWS, but you can can do similiar switch logic with `GOOGLE_APPLICATION_CREDENTIALS`, etc.
|
43
|
+
|
44
|
+
## Boot Source
|
45
|
+
|
46
|
+
Please refer to the boot source code for more details: [kubes/booter.rb](https://github.com/boltops-tools/kubes/blob/master/lib/kubes/booter.rb)
|
data/docs/_docs/config/env.md
CHANGED
@@ -16,7 +16,9 @@ Kubes.configure do |config|
|
|
16
16
|
end
|
17
17
|
```
|
18
18
|
|
19
|
-
##
|
19
|
+
## Config Overrides
|
20
|
+
|
21
|
+
### Env Overrides
|
20
22
|
|
21
23
|
You can override configs on a per-env basis with `config/env` files. Examples:
|
22
24
|
|
@@ -38,7 +40,32 @@ Kubes.configure do |config|
|
|
38
40
|
end
|
39
41
|
```
|
40
42
|
|
41
|
-
|
43
|
+
### App Overrides
|
44
|
+
|
45
|
+
If KUBES_APP is set, app-scoped configs can be used to override settings further. Here are some with `config/env/app` example files:
|
46
|
+
|
47
|
+
.kubes/config/env/app1/dev.rb
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
Kubes.configure do |config|
|
51
|
+
config.repo = "222222222222.dkr.ecr.us-west-2.amazonaws.com/demo"
|
52
|
+
config.kubectl.context = "dev-cluster"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
.kubes/config/env/app2/prod.rb
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
Kubes.configure do |config|
|
60
|
+
config.repo = "333333333333.dkr.ecr.us-west-2.amazonaws.com/demo"
|
61
|
+
config.kubectl.context = "prod-cluster"
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
This allows you to set specific app-level settings with:
|
66
|
+
|
67
|
+
KUBES_APP=app1 kubes deploy
|
68
|
+
KUBES_APP=app2 kubes deploy
|
42
69
|
|
43
70
|
## Auto-Switching Context
|
44
71
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
title: Hook Generator
|
3
|
+
nav_text: Generator
|
4
|
+
categories: hooks
|
5
|
+
order: 9
|
6
|
+
---
|
7
|
+
|
8
|
+
## Examples
|
9
|
+
|
10
|
+
$ kubes new hook docker
|
11
|
+
create .kubes/config/hooks/docker.rb
|
12
|
+
$ kubes new hook kubectl
|
13
|
+
create .kubes/config/hooks/kubectl.rb
|
14
|
+
$ kubes new hook kubes
|
15
|
+
create .kubes/config/hooks/kubes.rb
|
16
|
+
$
|
@@ -4,6 +4,8 @@ nav_text: Kubectl
|
|
4
4
|
categories: hooks
|
5
5
|
---
|
6
6
|
|
7
|
+
{% include config/hooks/generator.md type="kubectl" %}
|
8
|
+
|
7
9
|
You can use hooks to run scripts at any part of the `kubectl` commands. Here's an example of running a script before and after the `kubectl apply` command for the `web/deployment` resource.
|
8
10
|
|
9
11
|
.kubes/config/hooks/kubectl.rb
|
@@ -8,7 +8,7 @@ auto_prune | Prune and delete old hashed resources like Secret and ConfigMap. |
|
|
8
8
|
builder | What docker build command to use. Can use `docker` or `gcloud` to build the Docker image. | docker
|
9
9
|
image | Set a prebuilt Docker image to use. This is optional. Usually, you want to build an image from the Dockerfile. Setting this will change the `docker_image` helper to use a predefined image. See: [Docker Image]({% link _docs/intro/docker-image.md %}) | nil
|
10
10
|
kubectl.context | What kubectl context to auto-switch to. | nil
|
11
|
-
kubectl.context_keep | Whether or not to keep the context switched |
|
11
|
+
kubectl.context_keep | Whether or not to keep the context switched | false
|
12
12
|
kubectl.exit_on_fail.apply | Whether or not continue if the `kubectl apply` fails. Note, can use `KUBES_EXIT_ON_FAIL=0` env var to set to false. | true
|
13
13
|
kubectl.exit_on_fail.delete | Whether or not continue if the `kubectl delete` fails. | false
|
14
14
|
kubectl.order.kinds | Change ordering for Kubernetes Kinds. | See [source code](https://github.com/boltops-tools/kubes/blob/master/lib/kubes/config.rb#L52)
|
@@ -18,6 +18,6 @@ logger.level | Logger level. Can also be set with `KUBES_LOG_LEVEL` env var | in
|
|
18
18
|
repo | The Docker repo to use. Required to be set. | nil
|
19
19
|
repo_auto_auth | Whether or not to try to auth authorize docker repo registry if not yet logged in. Can also be set with env var `KUBES_REPO_AUTO_AUTO` | true
|
20
20
|
skip | List of resources to skip. Can also be set with the `KUBES_SKIP` env var. `KUBES_SKIP` should be a list of strings separated by spaces. It adds onto the `config.skip` option. | []
|
21
|
-
state.path | Where to store the state file with the last build Docker image. | .kubes/state/KUBES_ENV/data.json
|
21
|
+
state.path | Where to store the state file with the last build Docker image. | .kubes/state/KUBES_APP/KUBES_ENV/data.json
|
22
22
|
suffix_hash | Whether or not to append suffix hash to ConfigMap and Secret | true
|
23
23
|
merger.options | Merger options that control how Hashes are merged. More info: [Merger Options]({% link _docs/layering/merge-options.md %}) | `{overwrite_arrays: true}`
|
data/docs/_docs/config/skip.md
CHANGED
@@ -56,3 +56,25 @@ You can also us ethe `KUBES_SKIP` env var. It takes list of strings separated by
|
|
56
56
|
KUBES_SKIP="cleanup/job" kubes delete
|
57
57
|
|
58
58
|
This can be useful for one-off use cases.
|
59
|
+
|
60
|
+
## Skip With kubes skip metdata
|
61
|
+
|
62
|
+
You can also skip a resource from being written by using `kubes.skip = true`. This is useful if you want to conditionally not create a resource with a variable. Example:
|
63
|
+
|
64
|
+
.kubes/resources/config_map.yaml
|
65
|
+
|
66
|
+
```yaml
|
67
|
+
<% if @skip %>
|
68
|
+
kubes:
|
69
|
+
skip: true
|
70
|
+
<% end %>
|
71
|
+
metadata:
|
72
|
+
namespace: demo-dev
|
73
|
+
labels:
|
74
|
+
app: demo-dev
|
75
|
+
name: demo-dev-configmap-495c18844b
|
76
|
+
apiVersion: v1
|
77
|
+
kind: ConfigMap
|
78
|
+
```
|
79
|
+
|
80
|
+
If the variable is set to `@skip = true`, then the config_map.yaml will not get created.
|
data/docs/_docs/dsl/resources.md
CHANGED
@@ -6,7 +6,7 @@ Here's a list of the resources supported by the Kubes DSL.
|
|
6
6
|
|
7
7
|
{% assign docs = site.docs | where: "categories","dsl" %}
|
8
8
|
{% for doc in docs -%}
|
9
|
-
* [{{ doc.
|
9
|
+
* [{{ doc.title }}]({{ doc.url }})
|
10
10
|
{% endfor %}
|
11
11
|
|
12
12
|
For resources, that are not supported, you can use the [Generic resource]({% link _docs/dsl/resources/generic.md %}) or use [YAML]({% link _docs/yaml.md %}) instead. You can use a mix of DSL and YAML definitions in the `.kubes/resources` folder.
|
data/docs/_docs/dsl.md
CHANGED
@@ -58,8 +58,8 @@ Notice how `port` and `targetPort` correspond to `spec.ports.port` and `spec.por
|
|
58
58
|
|
59
59
|
In general:
|
60
60
|
|
61
|
-
* The DSL methods behave as reader methods when no arguments are passed to it. IE: `name
|
62
|
-
* The DSL methods behave as writer methods when arguments are passed to it. IE: `name`
|
61
|
+
* The DSL methods behave as reader methods when no arguments are passed to it. IE: `name` returns the value.
|
62
|
+
* The DSL methods behave as writer methods when arguments are passed to it. IE: `name "demo-web"` sets the value.
|
63
63
|
|
64
64
|
## Merge Behavior
|
65
65
|
|
@@ -16,6 +16,7 @@ iam_role = KubesAws::IamRole.new(
|
|
16
16
|
namespace: "demo-#{Kubes.env}", # defaults to APP-ENV when not set. IE: demo-dev
|
17
17
|
managed_policies: ["AmazonS3ReadOnlyAccess", "AmazonSSMReadOnlyAccess"], # defaults to empty when not set
|
18
18
|
inline_policies: [:secrets_read_only], # See Secrets Read Only Inline Policy at the bottom
|
19
|
+
# cluster: "eks-cluster-name", # inferred with kubectl when not set
|
19
20
|
)
|
20
21
|
before("apply",
|
21
22
|
label: "create iam role",
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
title: Install Dependencies
|
3
|
+
---
|
4
|
+
|
5
|
+
These dependencies are not included with any of the installers. This allows you to install and run the versions you want to use.
|
6
|
+
|
7
|
+
|
8
|
+
## kubectl
|
9
|
+
|
10
|
+
Kubes calls kubectl. Kubes has been tested with kubectl v1.15+. Generally, it should work with most versions of kubectl.
|
11
|
+
|
12
|
+
## docker
|
13
|
+
|
14
|
+
Kubes calls docker. Kubes has been tested with docker 18.x-ce+. Generally, it should work with most versions of docker.
|
15
|
+
|
16
|
+
## gcloud
|
17
|
+
|
18
|
+
If you are using the [gcloud builder]({% link _docs/config/builder.md %}), set up and configure the [gcloud cli](https://cloud.google.com/sdk/install).
|
@@ -0,0 +1,70 @@
|
|
1
|
+
---
|
2
|
+
title: "Install: CentOS/RedHat/Fedora"
|
3
|
+
nav_text: CentOS
|
4
|
+
category: standalone
|
5
|
+
order: 2
|
6
|
+
---
|
7
|
+
|
8
|
+
This page shows you how to install kubes on CentOS, RedHat, Fedora and other Linux systems that use the yum-based package manager.
|
9
|
+
|
10
|
+
## CentOS/RedHat/Fedora
|
11
|
+
|
12
|
+
Configure repo
|
13
|
+
|
14
|
+
sudo su
|
15
|
+
curl -so /etc/yum.repos.d/boltops.repo https://yum.boltops.com/boltops.repo
|
16
|
+
rpm --import https://yum.boltops.com/boltops-key.public
|
17
|
+
|
18
|
+
Install
|
19
|
+
|
20
|
+
yum install -y kubes
|
21
|
+
|
22
|
+
Upgrade
|
23
|
+
|
24
|
+
yum makecache
|
25
|
+
yum update -y kubes
|
26
|
+
|
27
|
+
Uninstall
|
28
|
+
|
29
|
+
yum remove -y kubes
|
30
|
+
|
31
|
+
{% include install/wrapper.md %}
|
32
|
+
|
33
|
+
## Fedora Notes
|
34
|
+
|
35
|
+
For Fedora, you may also need the libxcrypt-compat package.
|
36
|
+
|
37
|
+
dnf install libxcrypt-compat -y
|
38
|
+
|
39
|
+
Or you'll get this error:
|
40
|
+
|
41
|
+
$ kubes -h
|
42
|
+
/opt/kubes/embedded/bin/ruby: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
|
43
|
+
$
|
44
|
+
|
45
|
+
Fedora is a bleeding edge distro and is quicker about upgrading their system. The `libcrypt.so` has been removed. The libxcrypt-compat package installs it back.
|
46
|
+
|
47
|
+
## Amazon Linux 2 Notes
|
48
|
+
|
49
|
+
The standalone installer does not support Amazon Linux 1. Please use Amazon Linux 2 instead.
|
50
|
+
|
51
|
+
## Rpm Install
|
52
|
+
|
53
|
+
You can also download the rpm package and install it directly. Here are the commands:
|
54
|
+
|
55
|
+
wget https://yum.boltops.com/packages/kubes/kubes-latest.rpm
|
56
|
+
sudo su
|
57
|
+
rpm -ivh kubes-latest.rpm
|
58
|
+
kubes -h
|
59
|
+
|
60
|
+
To upgrade an existing install also use the `-U` flag.
|
61
|
+
|
62
|
+
rpm -Uivh kubes-latest.rpm
|
63
|
+
|
64
|
+
You can check [kubes-latest.rpm.metadata.json](https://yum.boltops.com/packages/kubes/kubes-latest.rpm.metadata.json) to verify the package checksum. Here's the checksum command.
|
65
|
+
|
66
|
+
sha256sum kubes-latest.rpm
|
67
|
+
|
68
|
+
To uninstall
|
69
|
+
|
70
|
+
rpm -e kubes-latest.rpm
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
title: "Standalone Permissions"
|
3
|
+
nav_text: Permissions
|
4
|
+
category: standalone-details
|
5
|
+
---
|
6
|
+
|
7
|
+
The kubes standalone installer will make sure that the owner and permissions of the `/opt/kubes` folder is your user.
|
8
|
+
|
9
|
+
If the `/opt/kubes` folder is not owned by your user for whatever reason, here are the commands to change it:
|
10
|
+
|
11
|
+
For macosx:
|
12
|
+
|
13
|
+
sudo chown -R `whoami`:staff /opt/kubes
|
14
|
+
|
15
|
+
For other Linux OSes, this is generally:
|
16
|
+
|
17
|
+
sudo chown -R `whoami`:`whoami` /opt/kubes
|
18
|
+
|
19
|
+
## Why?
|
20
|
+
|
21
|
+
When the `/opt/kubes` folder is not owned by your user, you won't be able to write to it without sudo. This results in a sudo prompt when kubes calls `bundle` and tries to install new gems. You will see this:
|
22
|
+
|
23
|
+
=> Installing dependencies with: bundle install
|
24
|
+
Following files may not be writable, so sudo is needed:
|
25
|
+
/opt/kubes/embedded/bin
|
26
|
+
/opt/kubes/embedded/lib/ruby/gems/2.7.0
|
27
|
+
/opt/kubes/embedded/lib/ruby/gems/2.7.0/cache
|
28
|
+
/opt/kubes/embedded/lib/ruby/gems/2.7.0/extensions
|
29
|
+
/opt/kubes/embedded/lib/ruby/gems/2.7.0/gems
|
30
|
+
/opt/kubes/embedded/lib/ruby/gems/2.7.0/specifications
|
31
|
+
|
32
|
+
Your user account isn't allowed to install to the system RubyGems.
|
33
|
+
You can cancel this installation and run:
|
34
|
+
|
35
|
+
bundle install --path vendor/bundle
|
36
|
+
|
37
|
+
to install the gems into ./vendor/bundle/, or you can enter your password
|
38
|
+
and install the bundled gems to RubyGems using sudo.
|
39
|
+
|
40
|
+
Password:
|
41
|
+
|
42
|
+
To fix this issue, make sure `/opt/kubes` is owned by your user, instead of repeatedly having to type your password for sudo.
|
43
|
+
|
44
|
+
Also, running `sudo` means you're using bare shell with pretty much none of your environment settings or variables configured. Though there are ways to [preserve](https://stackoverflow.com/questions/8633461/how-to-keep-environment-variables-when-using-sudo) environment variables with `--preserve-env`, it's often better to avoid sudo as you'll run into different environmental differences and quirks.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
title: "Uninstall Cleanup"
|
3
|
+
nav_text: Uninstall
|
4
|
+
category: standalone-details
|
5
|
+
order: 4
|
6
|
+
---
|
7
|
+
|
8
|
+
Some packager managers will not clean up the installed files completely. The apt-get and yum package manager generally cleans up everything. Homebrew doesn't seem to clean up currently though.
|
9
|
+
|
10
|
+
To fully clean up and uninstall kubes. First, run the package manger uninstall command and then clean up with:
|
11
|
+
|
12
|
+
rm -rf /opt/kubes
|
13
|
+
|
14
|
+
Then remove the kubes wrappers in `/usr/local/bin`. You can remove them with this command:
|
15
|
+
|
16
|
+
grep -l /opt/kubes /usr/local/bin/* | xargs rm -f
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
title: "Standalone Details"
|
3
|
+
nav_text: Details
|
4
|
+
category: standalone
|
5
|
+
order: 9
|
6
|
+
---
|
7
|
+
|
8
|
+
The standalone installer packages are built within a few minutes of the kubes gem release. This page covers more details on how the standalone installation works.
|
9
|
+
|
10
|
+
## Isolated: /opt/kubes
|
11
|
+
|
12
|
+
The standalone kubes package installs kubes in `/opt/kubes`. This folder contains everything like system libraries, Ruby, and gems needed for kubes to work as a standalone package. Additionally, this also makes it easy to remove kubes.
|
13
|
+
|
14
|
+
## Wrapper: /usr/local/bin
|
15
|
+
|
16
|
+
The installer creates a wrapper script in `/usr/local/bin`.
|
17
|
+
|
18
|
+
/usr/local/bin/kubes
|
19
|
+
|
20
|
+
Most users have `/usr/local/bin` configured in there PATH. So this wrapper should work.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
title: "Install: Mac OSX"
|
3
|
+
nav_text: MacOSX
|
4
|
+
category: standalone
|
5
|
+
order: 1
|
6
|
+
---
|
7
|
+
|
8
|
+
This page shows you how to install kubes on Mac OSX.
|
9
|
+
|
10
|
+
Here's a "Mac OSX Homebrew Install" Video:
|
11
|
+
|
12
|
+
## Homebrew
|
13
|
+
|
14
|
+
You can install kubes via homebrew.
|
15
|
+
|
16
|
+
Install
|
17
|
+
|
18
|
+
brew tap boltops-tools/software
|
19
|
+
brew install kubes
|
20
|
+
|
21
|
+
Upgrade
|
22
|
+
|
23
|
+
brew update
|
24
|
+
brew install kubes
|
25
|
+
|
26
|
+
Uninstall
|
27
|
+
|
28
|
+
brew uninstall kubes
|
29
|
+
|
30
|
+
Cleanup
|
31
|
+
|
32
|
+
rm -rf /opt/kubes
|
33
|
+
grep -l /opt/kubes /usr/local/bin/* | xargs rm -f
|
34
|
+
|
35
|
+
{% include install/wrapper.md %}
|
36
|
+
|
37
|
+
## DMG
|
38
|
+
|
39
|
+
You can also download the dmg and install with the Mac OSX GUI installer.
|
40
|
+
|
41
|
+
Download link: [kubes DMG](https://tap.boltops.com/packages/kubes/kubes-latest.dmg)
|
42
|
+
|
43
|
+
You can check [kubes-latest.dmg.metadata.json](https://tap.boltops.com/packages/kubes/kubes-latest.dmg.metadata.json) to verify the package checksum. Here's the checksum command.
|
44
|
+
|
45
|
+
shasum -a 256 kubes-latest.dmg
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
title: "Install: Ubuntu/Debian"
|
3
|
+
nav_text: Ubuntu
|
4
|
+
category: standalone
|
5
|
+
order: 3
|
6
|
+
---
|
7
|
+
|
8
|
+
This page shows you how to install kubes on Ubuntu and Debian based linux systems that use the apt package manager.
|
9
|
+
|
10
|
+
## Ubuntu/Debian: apt-get install
|
11
|
+
|
12
|
+
Configure repo
|
13
|
+
|
14
|
+
sudo su
|
15
|
+
echo "deb https://apt.boltops.com stable main" > /etc/apt/sources.list.d/boltops.list
|
16
|
+
curl -s https://apt.boltops.com/boltops-key.public | apt-key add -
|
17
|
+
|
18
|
+
Install
|
19
|
+
|
20
|
+
apt-get update
|
21
|
+
apt-get install -y kubes
|
22
|
+
|
23
|
+
Upgrade
|
24
|
+
|
25
|
+
apt-get install -y kubes
|
26
|
+
|
27
|
+
Remove
|
28
|
+
|
29
|
+
apt-get remove -y kubes
|
30
|
+
|
31
|
+
{% include install/wrapper.md %}
|
32
|
+
|
33
|
+
## Deb Install
|
34
|
+
|
35
|
+
You can also download the deb package and install it directly. Here are the commands:
|
36
|
+
|
37
|
+
Install
|
38
|
+
|
39
|
+
wget https://apt.boltops.com/packages/kubes/kubes-latest.deb
|
40
|
+
dpkg -i kubes-latest.deb
|
41
|
+
|
42
|
+
You can check [kubes-latest.deb.metadata.json](https://apt.boltops.com/packages/kubes/kubes-latest.deb.metadata.json) to verify the package checksum. Here's the checksum command.
|
43
|
+
|
44
|
+
sha256sum kubes-latest.deb
|
45
|
+
|
46
|
+
Uninstall
|
47
|
+
|
48
|
+
dpkg -r kubes-latest.deb
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
title: Standalone Package Installation
|
3
|
+
---
|
4
|
+
|
5
|
+
You can install Kubes as a standalone package. The nice thing about this approach is that it is easy. You don't have to have Ruby installed. You don’t have to worry about compatible Ruby versions, gems, or conflicting system packages.
|
6
|
+
|
7
|
+
Kubes provides the pre-built binaries. Other tools such as [vagrant](https://www.vagrantup.com/), written in ruby, and the [aws cli](https://aws.amazon.com/cli/), written in python, also work the same way.
|
8
|
+
|
9
|
+
Important: If you're using rvm or rbenv and already have Ruby installed, you should [install kubes as a gem]({% link _docs/install/gem.md %}). Otherwise, different gem dependencies from the two installations can be used and cause all kinds of trouble.
|
10
|
+
|
11
|
+
Below are quickstart instructions for different OSes.
|
12
|
+
|
13
|
+
## Mac OSX
|
14
|
+
|
15
|
+
brew tap boltops-tools/software
|
16
|
+
brew install kubes
|
17
|
+
|
18
|
+
More info on [Mac OSX Install]({% link _docs/install/standalone/macosx.md %})
|
19
|
+
|
20
|
+
## CentOS/RedHat/Fedora
|
21
|
+
|
22
|
+
sudo su
|
23
|
+
curl -so /etc/yum.repos.d/boltops.repo https://yum.boltops.com/boltops.repo
|
24
|
+
rpm --import https://yum.boltops.com/boltops-key.public
|
25
|
+
yum install -y kubes
|
26
|
+
|
27
|
+
More info on [CentOS Install]({% link _docs/install/standalone/centos.md %})
|
28
|
+
|
29
|
+
## Ubuntu/Debian
|
30
|
+
|
31
|
+
sudo su
|
32
|
+
echo "deb https://apt.boltops.com stable main" > /etc/apt/sources.list.d/boltops.list
|
33
|
+
curl -s https://apt.boltops.com/boltops-key.public | apt-key add -
|
34
|
+
apt-get update
|
35
|
+
apt-get install -y kubes
|
36
|
+
|
37
|
+
More info on [Ubuntu Install]({% link _docs/install/standalone/ubuntu.md %})
|
38
|
+
|
39
|
+
{% include install/wrapper.md %}
|
40
|
+
|
41
|
+
## How It Works
|
42
|
+
|
43
|
+
The standalone installer packages are built within a few minutes of the kubes gem release. Here are also details on how the standalone installer works: [Standalone Details]({% link _docs/install/standalone/details.md %}).
|
@@ -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.
|