Yuriy Taraday | 131227e | 2017-06-22 15:09:34 +0400 | [diff] [blame] | 1 | |
| 2 | ================================== |
Yuriy Taraday | 06c1920 | 2017-08-25 14:48:19 +0400 | [diff] [blame] | 3 | Helm Formula README |
Yuriy Taraday | 131227e | 2017-06-22 15:09:34 +0400 | [diff] [blame] | 4 | ================================== |
| 5 | |
Yuriy Taraday | 434490c | 2017-08-22 17:40:01 +0400 | [diff] [blame] | 6 | This formula installs Helm client, installs Tiller on Kubernetes cluster and |
| 7 | creates releases in it. |
Yuriy Taraday | 131227e | 2017-06-22 15:09:34 +0400 | [diff] [blame] | 8 | |
| 9 | Sample pillars |
| 10 | ============== |
| 11 | |
Yuriy Taraday | 434490c | 2017-08-22 17:40:01 +0400 | [diff] [blame] | 12 | Enable formula, install helm client on node and tiller on Kubernetes (assuming |
| 13 | already configured kubectl config or local cluster endpoint): |
Yuriy Taraday | 131227e | 2017-06-22 15:09:34 +0400 | [diff] [blame] | 14 | |
| 15 | .. code-block:: yaml |
| 16 | |
| 17 | helm: |
| 18 | client: |
| 19 | enabled: true |
Yuriy Taraday | 434490c | 2017-08-22 17:40:01 +0400 | [diff] [blame] | 20 | |
| 21 | Change version of helm being downloaded and installed: |
| 22 | |
| 23 | .. code-block:: yaml |
| 24 | |
| 25 | helm: |
| 26 | client: |
| 27 | version: 2.6.0 # defaults to 2.4.2 currently |
| 28 | download_hash: sha256=youneedtocalculatehashandputithere |
| 29 | |
| 30 | Don't install tiller and use existing one exposed on some well-known address: |
| 31 | |
| 32 | .. code-block:: yaml |
| 33 | |
| 34 | helm: |
| 35 | client: |
| 36 | tiller: |
| 37 | install: false |
| 38 | host: 10.11.12.13:14151 |
| 39 | |
| 40 | Change namespace where tiller is isntalled and looked for: |
| 41 | |
| 42 | .. code-block:: yaml |
| 43 | |
| 44 | helm: |
| 45 | client: |
| 46 | tiller: |
| 47 | namespace: not-kube-system # kube-system is default |
| 48 | |
| 49 | Install Mirantis repository and deploy zookeper chart from it: |
| 50 | |
| 51 | .. code-block:: yaml |
| 52 | |
| 53 | helm: |
| 54 | client: |
| 55 | repos: |
| 56 | mirantisworkloads: https://mirantisworkloads.storage.googleapis.com/ |
| 57 | releases: |
| 58 | zoo1: |
| 59 | name: my-zookeeper |
| 60 | chart: mirantisworkloads/zookeeper # we reference installed repo |
| 61 | version: 1.2.0 # select any available version |
| 62 | values: |
| 63 | logLevel: INFO # any values used by chart can specified here |
| 64 | |
| 65 | Delete that release: |
| 66 | |
| 67 | .. code-block:: yaml |
| 68 | |
| 69 | helm: |
| 70 | client: |
| 71 | repos: |
| 72 | mirantisworkloads: https://mirantisworkloads.storage.googleapis.com/ |
| 73 | releases: |
| 74 | zoo1: |
| 75 | enabled: false |
| 76 | |
| 77 | Install kubectl and manage remote cluster: |
| 78 | |
| 79 | .. code-block:: yaml |
| 80 | |
| 81 | helm: |
| 82 | client: |
| 83 | kubectl: |
| 84 | install: true # installs kubectl 1.6.7 by default |
| 85 | config: |
| 86 | cluster: # directly translated to cluster definition in kubeconfig |
| 87 | server: https://kubernetes.example.com |
| 88 | certificate-authority-data: base64_of_ca_certificate |
| 89 | user: # same for user |
| 90 | username: admin |
| 91 | password: uberadminpass |
| 92 | |
| 93 | Change kubectl download URL and use it with GKE-based cluster: |
| 94 | |
| 95 | .. code-block:: yaml |
| 96 | |
| 97 | helm: |
| 98 | client: |
| 99 | kubectl: |
| 100 | install: true |
| 101 | download_url: https://dl.k8s.io/v1.6.7/kubernetes-client-linux-amd64.tar.gz |
| 102 | download_hash: sha256=calculate_hash_here |
| 103 | config: |
| 104 | cluster: # directly translated to cluster definition in kubeconfig |
| 105 | server: https://3.141.59.265 |
| 106 | certificate-authority-data: base64_of_ca_certificate |
| 107 | user: |
| 108 | auth-provider: |
| 109 | name: gcp |
| 110 | gce_service_token: base64_of_json_token_downloaded_from_cloud_console |
Yuriy Taraday | 131227e | 2017-06-22 15:09:34 +0400 | [diff] [blame] | 111 | |
| 112 | |
| 113 | Development and testing |
| 114 | ======================= |
| 115 | |
| 116 | Development and test workflow with `Test Kitchen <http://kitchen.ci>`_ and |
| 117 | `kitchen-salt <https://github.com/simonmcc/kitchen-salt>`_ provisioner plugin. |
| 118 | |
| 119 | Test Kitchen is a test harness tool to execute your configured code on one or more platforms in isolation. |
| 120 | There is a ``.kitchen.yml`` in main directory that defines *platforms* to be tested and *suites* to execute on them. |
| 121 | |
| 122 | Kitchen CI can spin instances locally or remote, based on used *driver*. |
| 123 | For local development ``.kitchen.yml`` defines a `vagrant <https://github.com/test-kitchen/kitchen-vagrant>`_ or |
| 124 | `docker <https://github.com/test-kitchen/kitchen-docker>`_ driver. |
| 125 | |
| 126 | To use backend drivers or implement your CI follow the section `INTEGRATION.rst#Continuous Integration`__. |
| 127 | |
| 128 | The `Busser <https://github.com/test-kitchen/busser>`_ *Verifier* is used to setup and run tests |
| 129 | implementated in `<repo>/test/integration`. It installs the particular driver to tested instance |
| 130 | (`Serverspec <https://github.com/neillturner/kitchen-verifier-serverspec>`_, |
| 131 | `InSpec <https://github.com/chef/kitchen-inspec>`_, Shell, Bats, ...) prior the verification is executed. |
| 132 | |
| 133 | Usage: |
| 134 | |
| 135 | .. code-block:: shell |
| 136 | |
| 137 | # list instances and status |
| 138 | kitchen list |
| 139 | |
| 140 | # manually execute integration tests |
| 141 | kitchen [test || [create|converge|verify|exec|login|destroy|...]] [instance] -t tests/integration |
| 142 | |
| 143 | # use with provided Makefile (ie: within CI pipeline) |
| 144 | make kitchen |
| 145 | |
| 146 | |
| 147 | |
| 148 | Read more |
| 149 | ========= |
| 150 | |
| 151 | * links |