diff --git a/README.md b/README.md index ef0832202..ba4418f40 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ The main variables to change are located in the directory ```environments/[env_n - hosts: kube-master roles: - { role: kubernetes/master, tags: master } - - { role: apps/k8s-skydns, tags: skydns } - - { role: apps/k8s-kube-ui, tags: kube-ui } + - { role: apps/k8s-skydns, tags: ['skydns', 'apps'] } + - { role: apps/k8s-fabric8, tags: ['fabric8', 'apps'] } - hosts: kube-node roles: @@ -111,27 +111,30 @@ iptables -nLv -t nat #### Available apps, installation procedure -Additionnal apps can be installed as git submodules. -These submodules install Ansible roles, one role per app. - -You can list available submodules with the following command: -``` -grep path .gitmodules | sed 's/.*= //' -``` +Additionnal apps can be installed with ```ansible-galaxy```. +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) 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 -git submodule update +- 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 ``` +**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 ``` ... - hosts: kube-master roles: - { 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. @@ -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. The insecure port is mainly used for calico. 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 +``` diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 000000000..1195993b4 --- /dev/null +++ b/requirements.yml @@ -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 diff --git a/roles/apps/k8s-common b/roles/apps/k8s-common deleted file mode 160000 index 8a1b65075..000000000 --- a/roles/apps/k8s-common +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8a1b65075407adcb1d2bcdfbdf5d7479bbf6ce71 diff --git a/roles/apps/k8s-fabric8 b/roles/apps/k8s-fabric8 deleted file mode 160000 index 354e2b33c..000000000 --- a/roles/apps/k8s-fabric8 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 354e2b33c83b8d02d01d0b842c321cb060e12d3d diff --git a/roles/apps/k8s-kube-ui b/roles/apps/k8s-kube-ui deleted file mode 160000 index 766ceeab4..000000000 --- a/roles/apps/k8s-kube-ui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 766ceeab47bb9122a11d066b0e95960a2ddc6fc1 diff --git a/roles/apps/k8s-postgres b/roles/apps/k8s-postgres deleted file mode 160000 index 62efba7e4..000000000 --- a/roles/apps/k8s-postgres +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62efba7e423a6b5cbd365a4f55d96c392e776e02 diff --git a/roles/apps/k8s-skydns b/roles/apps/k8s-skydns deleted file mode 160000 index b00d0ce5c..000000000 --- a/roles/apps/k8s-skydns +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b00d0ce5c952a9c0364f48babf95ad6357e82ccd