kubes 0.7.10 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/docs/Gemfile +1 -0
  4. data/docs/_config.yml +6 -0
  5. data/docs/_docs/config/app-overrides.md +7 -0
  6. data/docs/_docs/config/boot.md +46 -0
  7. data/docs/_docs/config/env.md +29 -2
  8. data/docs/_docs/config/reference.md +2 -2
  9. data/docs/_docs/config/skip.md +22 -0
  10. data/docs/{_includes/intro/install.md → _docs/install/dependencies.md} +4 -5
  11. data/docs/_docs/install/gem.md +6 -0
  12. data/docs/_docs/install/standalone/centos.md +70 -0
  13. data/docs/_docs/install/standalone/details/permissions.md +44 -0
  14. data/docs/_docs/install/standalone/details/uninstall.md +16 -0
  15. data/docs/_docs/install/standalone/details.md +20 -0
  16. data/docs/_docs/install/standalone/macosx.md +45 -0
  17. data/docs/_docs/install/standalone/ubuntu.md +48 -0
  18. data/docs/_docs/install/standalone.md +43 -0
  19. data/docs/_docs/install.md +8 -0
  20. data/docs/_docs/learn/dsl/install.md +1 -1
  21. data/docs/_docs/learn/yaml/install.md +1 -1
  22. data/docs/_docs/patterns/central-deployer.md +36 -0
  23. data/docs/_docs/variables/advanced.md +32 -1
  24. data/docs/_docs/variables/basic.md +1 -0
  25. data/docs/_docs/vs/custom.md +2 -0
  26. data/docs/_docs/vs/helm.md +2 -0
  27. data/docs/_docs/vs/kustomize.md +2 -0
  28. data/docs/_docs/vs.md +2 -0
  29. data/docs/_docs/yaml/erb-comment.md +89 -0
  30. data/docs/_includes/config/app-overrides-cheatsheet.md +44 -0
  31. data/docs/_includes/content.html +1 -1
  32. data/docs/_includes/install/gem.md +7 -0
  33. data/docs/_includes/install/wrapper.md +9 -0
  34. data/docs/_includes/layering/layers.md +3 -0
  35. data/docs/_includes/sidebar.html +27 -2
  36. data/docs/_includes/videos/learn/vs.md +4 -0
  37. data/docs/_includes/videos/learn.md +12 -0
  38. data/docs/_includes/videos/youtube.md +1 -0
  39. data/docs/_layouts/default.html +1 -0
  40. data/docs/_sass/theme.scss +11 -0
  41. data/docs/js/scripts.js +7 -0
  42. data/lib/kubes/booter.rb +26 -0
  43. data/lib/kubes/cli/init.rb +0 -1
  44. data/lib/kubes/compiler/layering.rb +9 -0
  45. data/lib/kubes/compiler/shared/runtime_helpers.rb +7 -0
  46. data/lib/kubes/compiler/strategy/erb/comment.rb +46 -0
  47. data/lib/kubes/compiler/strategy/erb.rb +4 -0
  48. data/lib/kubes/compiler/strategy/result.rb +13 -1
  49. data/lib/kubes/compiler.rb +2 -0
  50. data/lib/kubes/config.rb +6 -2
  51. data/lib/kubes/core.rb +4 -0
  52. data/lib/kubes/kubectl/ordering.rb +9 -6
  53. data/lib/kubes/version.rb +1 -1
  54. data/lib/kubes.rb +2 -0
  55. metadata +25 -4
  56. data/docs/_docs/intro/install.md +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6529d951f35f31cf105591f8d5ea0f3b8819e358f0b3388f22d17340af1f2bbf
4
- data.tar.gz: d1c6e87a899a75a8f7078046c4058c69c46328c3b7138b4a934dae7fe287be4d
3
+ metadata.gz: 242d998c0a7f9c86c4db5d79eef556f3d5cac56d7131eedfd9c14b9b96975ef6
4
+ data.tar.gz: f38ef641ff71c45c84335723b3f0b67abe2a3d26132a8a407738391724a4acf7
5
5
  SHA512:
6
- metadata.gz: 245ca41ceec0499da84ef056b19ad6f99e422f3c1013718d3e466128aeab6503fc1d0c3be19892633dab1acff1865816885fa6f7d1589c60d5ebe65cfaffab50
7
- data.tar.gz: 551a265282d0a6af874517382859492bbe27bcd201790e94f3f7a9540d6ffeb4b6dc678b0aa1cfeab4e5983a0a591625da21ef7ec59bb01fe8c33fdbf681e8c2
6
+ metadata.gz: 345a9b9bbf12abd164e7aaec68be929cb7d8d61a6f05334a749e987722e2992f828f322a77e6c31a904fa716f984943bd6d638a19830efdfbaa24e0969ab0e80
7
+ data.tar.gz: 47dc50264262dd94fd085426f99f1e138e61c0362a77c11a087bd9b3a99829897a30aadf52bde6603260386f606059326dbc6cb90bf15c51a5f51755dc6a88ba
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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
+
6
10
  ## [0.7.10] - 2021-12-18
7
11
  - [#56](https://github.com/boltops-tools/kubes/pull/56) New hook generator
8
12
  - [#57](https://github.com/boltops-tools/kubes/pull/57) Fix activesupport require
data/docs/Gemfile CHANGED
@@ -2,6 +2,7 @@ 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"
data/docs/_config.yml CHANGED
@@ -70,4 +70,10 @@ defaults:
70
70
  plugins_dir:
71
71
  # - jekyll-gzip - GitHub pages does not support this plugin.
72
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
+
73
79
  ads_url: "https://ads.boltops.com"
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: App Overrides Cheatsheet
3
+ ---
4
+
5
+ Kubes supports app-level overrides. This is especially useful for the [Central Deployer Pattern]({% link _docs/patterns/central-deployer.md %}).
6
+
7
+ {% include config/app-overrides-cheatsheet.md %}
@@ -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)
@@ -16,7 +16,9 @@ Kubes.configure do |config|
16
16
  end
17
17
  ```
18
18
 
19
- ## Layering
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
- For more details refer to the [Layering Docs]({% link _docs/layering.md %}).
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
 
@@ -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 | true
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}`
@@ -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.
@@ -1,10 +1,9 @@
1
- ## RubyGems
1
+ ---
2
+ title: Install Dependencies
3
+ ---
2
4
 
3
- Install kubes via RubyGems.
5
+ These dependencies are not included with any of the installers. This allows you to install and run the versions you want to use.
4
6
 
5
- gem install kubes
6
-
7
- Ruby 2.7 and above is recommended.
8
7
 
9
8
  ## kubectl
10
9
 
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: Gem Installation
3
+ ---
4
+
5
+ {% include install/gem.md %}
6
+
@@ -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.
@@ -2,4 +2,4 @@
2
2
  title: Install Kubes
3
3
  ---
4
4
 
5
- {% include intro/install.md %}
5
+ {% include install/gem.md %}
@@ -2,4 +2,4 @@
2
2
  title: Install Kubes
3
3
  ---
4
4
 
5
- {% include intro/install.md %}
5
+ {% include install/gem.md %}
@@ -0,0 +1,36 @@
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 setup.
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/repo/app1
17
+ https://github.com/repo/app2
18
+
19
+ You then also have a
20
+
21
+ https://github.com/repo/.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
+ 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.
35
+
36
+ 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 %}
@@ -2,6 +2,7 @@
2
2
  title: Basic Variables
3
3
  nav_text: Basic
4
4
  categories: variables
5
+ order: 1
5
6
  ---
6
7
 
7
8
  ## Basic Layering Example
@@ -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 %}
@@ -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 %}
@@ -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.