mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 22:04:43 +03:00
use ansible-galaxy
This commit is contained in:
48
README.md
48
README.md
@@ -50,8 +50,8 @@ The main variables to change are located in the directory ```environments/[env_n
|
|||||||
- hosts: kube-master
|
- hosts: kube-master
|
||||||
roles:
|
roles:
|
||||||
- { role: kubernetes/master, tags: master }
|
- { role: kubernetes/master, tags: master }
|
||||||
- { role: apps/k8s-skydns, tags: skydns }
|
- { role: apps/k8s-skydns, tags: ['skydns', 'apps'] }
|
||||||
- { role: apps/k8s-kube-ui, tags: kube-ui }
|
- { role: apps/k8s-fabric8, tags: ['fabric8', 'apps'] }
|
||||||
|
|
||||||
- hosts: kube-node
|
- hosts: kube-node
|
||||||
roles:
|
roles:
|
||||||
@@ -111,27 +111,30 @@ iptables -nLv -t nat
|
|||||||
|
|
||||||
|
|
||||||
#### Available apps, installation procedure
|
#### Available apps, installation procedure
|
||||||
Additionnal apps can be installed as git submodules.
|
Additionnal apps can be installed with ```ansible-galaxy```.
|
||||||
These submodules install Ansible roles, one role per app.
|
you'll need to edit the file '*requirements.yml*' in order to chose needed apps.
|
||||||
|
The list of available apps are available [there](https://github.com/ansibl8s)
|
||||||
You can list available submodules with the following command:
|
|
||||||
```
|
|
||||||
grep path .gitmodules | sed 's/.*= //'
|
|
||||||
```
|
|
||||||
|
|
||||||
For instance if you will probably want to install a [dns server](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns) as it is **strongly recommanded**.
|
For instance if you will probably want to install a [dns server](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns) as it is **strongly recommanded**.
|
||||||
In order to use this role you'll need to follow these steps
|
In order to use this role you'll need the following entries in the file '*requirements.yml*'
|
||||||
```
|
```
|
||||||
git submodule init roles/apps/k8s-common roles/apps/k8s-skydns
|
- src: https://github.com/ansibl8s/k8s-common.git
|
||||||
git submodule update
|
path: roles/apps
|
||||||
|
# version: v1.0
|
||||||
|
|
||||||
|
- src: https://github.com/ansibl8s/k8s-skydns.git
|
||||||
|
path: roles/apps
|
||||||
|
# version: v1.0
|
||||||
```
|
```
|
||||||
|
**Note**: the role common is required by all the apps and provides the tasks and libraries needed.
|
||||||
|
|
||||||
Then update your playbook with the chosen role
|
Then update your playbook with the chosen role
|
||||||
```
|
```
|
||||||
...
|
...
|
||||||
- hosts: kube-master
|
- hosts: kube-master
|
||||||
roles:
|
roles:
|
||||||
- { role: kubernetes/master, tags: master }
|
- { role: kubernetes/master, tags: master }
|
||||||
- { role: apps/k8s-skydns, tags: skydns }
|
- { role: apps/k8s-skydns, tags: ['skydns', 'apps'] }
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
Please refer to the [k8s-skydns readme](https://github.com/ansibl8s/k8s-skydns) for additionnal info.
|
Please refer to the [k8s-skydns readme](https://github.com/ansibl8s/k8s-skydns) for additionnal info.
|
||||||
@@ -175,3 +178,22 @@ Until now i didn't managed to get the monitoring addon working.
|
|||||||
Currently the api-server listens on both secure and insecure ports.
|
Currently the api-server listens on both secure and insecure ports.
|
||||||
The insecure port is mainly used for calico.
|
The insecure port is mainly used for calico.
|
||||||
Will be fixed soon.
|
Will be fixed soon.
|
||||||
|
|
||||||
|
How to contribute
|
||||||
|
------------------
|
||||||
|
|
||||||
|
### Update available roles
|
||||||
|
Alternatively the roles can be installed as git submodules.
|
||||||
|
That way is easier if you want to do some changes and commit them.
|
||||||
|
|
||||||
|
You can list available submodules with the following command:
|
||||||
|
```
|
||||||
|
grep path .gitmodules | sed 's/.*= //'
|
||||||
|
```
|
||||||
|
|
||||||
|
For instance if you will probably want to install a [dns server](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns) as it is **strongly recommanded**.
|
||||||
|
In order to use this role you'll need to follow these steps
|
||||||
|
```
|
||||||
|
git submodule init roles/apps/k8s-common roles/apps/k8s-skydns
|
||||||
|
git submodule update
|
||||||
|
```
|
||||||
|
|||||||
36
requirements.yml
Normal file
36
requirements.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
- src: https://github.com/ansibl8s/k8s-common.git
|
||||||
|
path: roles/apps
|
||||||
|
# version: v1.0
|
||||||
|
|
||||||
|
- src: https://github.com/ansibl8s/k8s-skydns.git
|
||||||
|
path: roles/apps
|
||||||
|
# version: v1.0
|
||||||
|
|
||||||
|
#- src: https://github.com/ansibl8s/k8s-kube-ui.git
|
||||||
|
# path: roles/apps
|
||||||
|
# # version: v1.0
|
||||||
|
#
|
||||||
|
#- src: https://github.com/ansibl8s/k8s-fabric8.git
|
||||||
|
# path: roles/apps
|
||||||
|
# # version: v1.0
|
||||||
|
#
|
||||||
|
#- src: https://github.com/ansibl8s/k8s-elasticsearch.git
|
||||||
|
# path: roles/apps
|
||||||
|
# # version: v1.0
|
||||||
|
#
|
||||||
|
#- src: https://github.com/ansibl8s/k8s-redis.git
|
||||||
|
# path: roles/apps
|
||||||
|
# # version: v1.0
|
||||||
|
#
|
||||||
|
#- src: https://github.com/ansibl8s/k8s-memcached.git
|
||||||
|
# path: roles/apps
|
||||||
|
# # version: v1.0
|
||||||
|
#
|
||||||
|
#- src: https://github.com/ansibl8s/k8s-haproxy.git
|
||||||
|
# path: roles/apps
|
||||||
|
# # version: v1.0
|
||||||
|
#
|
||||||
|
#- src: https://github.com/ansibl8s/k8s-postgres.git
|
||||||
|
# path: roles/apps
|
||||||
|
# # version: v1.0
|
||||||
Submodule roles/apps/k8s-common deleted from 8a1b650754
Submodule roles/apps/k8s-fabric8 deleted from 354e2b33c8
Submodule roles/apps/k8s-kube-ui deleted from 766ceeab47
Submodule roles/apps/k8s-postgres deleted from 62efba7e42
Submodule roles/apps/k8s-skydns deleted from b00d0ce5c9
Reference in New Issue
Block a user