Commit Graph

420 Commits (e83010b73963ec31f15058f929750cc494b06ece)

Author SHA1 Message Date
Bogdan Dobrelya a70c3b661e Add HA/LB endpoints for kube-apiserver
* Add auto-evaluated internal endpoints and clarify the loadbalancer_apiserver
vars and usecases.
* Add loadbalancer_apiserver_localhost (default false). If enabled, override
the external LB and expect localhost:443/8080 to be new internal only frontends.
* Add kube_apiserver_multiaccess to ignore loadbalancers, and make clients
to access the apiservers as a comma-separated list of access_ip/ip/ansible ip
(a default mode). When disabled, allow clients to use the given loadbalancers.
* Define connections security mode for kube controllers, schedulers, proxies.
It is insecure be default, which is the current deployment choice.
* Rework the groups['kube-master'][0] hardcode defining the apiserver
endpoints.
* Improve grouping of vars and add facts for kube_apiserver.
* Define kube_apiserver_insecure_bind_address as a fact, add more
facts for ease of use.

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-07-21 11:05:03 +02:00
mattymo 8141b72d5e Merge branch 'master' into etcddockerdefault 2016-07-20 19:16:47 +03:00
Antoine Legrand 277c5d74cc Merge pull request #367 from bogdando/set_facts
Fix set_facts visibility
2016-07-20 18:00:15 +02:00
Matthew Mosesohn 7a86b6c73e Set default etcd deployment to docker
Improved docker reload command to wait for etcd to be
up before proceeding. Switched reload to run restart
because it can't reload if it is not guaranteed to be
in running state.
2016-07-20 18:26:16 +03:00
Bogdan Dobrelya a76e5dbb11 Fix set_facts visibility
Move set_facts to the preinstall scope, so every role
may see it. For example, network plugins to see the etcd_endpoint.

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-07-20 11:41:09 +02:00
Matthew Mosesohn c3e5aac18e Add variable kube_resolv_conf
Allow configuration of a custom /etc/resolv.conf for kubelet.
2016-07-20 11:57:47 +03:00
Bogdan Dobrelya 32cd6e99b2 Add etcd proxy support
* Enforce a etcd-proxy role to a k8s-cluster group members. This
provides an HA layout for all of the k8s cluster internal clients.
* Proxies to be run on each node in the group as a separate etcd
instances with a readwrite proxy mode and listen the given endpoint,
which is either the access_ip:2379 or the localhost:2379.
* A notion for the 'kube_etcd_multiaccess' is: ignore endpoints and
loadbalancers and use the etcd members IPs as a comma-separated
list. Otherwise, clients shall use the local endpoint provided by a
etcd-proxy instances on each etcd node. A Netwroking plugins always
use that access mode.
* Fix apiserver's etcd servers args to use the etcd_access_endpoint.
* Fix networking plugins flannel/calico to use the etcd_endpoint.
* Fix name env var for non masters to be set as well.
* Fix etcd_client_url was not used anywhere and other etcd_* facts
evaluation was duplicated in a few places.
* Define proxy modes only in the env file, if not a master. Del
an automatic proxy mode decisions for etcd nodes in init/unit scripts.
* Use Wants= instead of Requires= as "This is the recommended way to
hook start-up of one unit to the start-up of another unit"
* Make apiserver/calico Wants= etcd-proxy to keep it always up

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
Co-authored-by: Matthew Mosesohn <mmosesohn@mirantis.com>
2016-07-19 14:09:40 +02:00
Bogdan Dobrelya 0b874e8db2 Fix systemd service unit for etcd
See https://github.com/coreos/etcd/issues/4308

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-07-15 16:22:17 +02:00
Smaine Kahlouch 192136df20 Merge pull request #359 from kubespray/fix_351
deployment idempotent
2016-07-14 21:34:21 +02:00
Smana ab8fdba484 deployment idempotent 2016-07-14 21:33:24 +02:00
Smana dfe7bfd127 use hyperkube coreos image 2016-07-14 21:20:41 +02:00
Smana a709cd9aa1 use iptables as default proxy mode 2016-07-12 10:20:43 +02:00
Jonathan Beckman d4dfdf68a6 Add settable flannel image tag & image repo
New settings with defaults:
flannel_server_helper_image_repo: "gcr.io/google_containers/"
flannel_server_helper_image_tag: "0.1"
flannel_image_repo: "quay.io/coreos/flannel"
flannel_image_tag: "0.5.5"
2016-07-11 13:18:20 +08:00
Smaine Kahlouch a5c21ab2e8 Merge pull request #346 from bogdando/issues/345
Add hostpath dynamic provisioner for PetSets
2016-07-09 22:43:09 +02:00
Spencer Smith c9cff5c845 updated admission controllers for >1.2 Kubernetes 2016-07-08 10:04:14 -07:00
Bogdan Dobrelya da20d9eda4 Add hostpath dynamic provisioner for PetSets
Defaults to false. Use with v1.3 only.

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-07-08 16:52:39 +02:00
Smaine Kahlouch 83da5d7657 Merge pull request #335 from mattymo/calicoctl
Change calicoctl deployment to use container
2016-07-07 21:47:40 +02:00
Matthew Mosesohn b3282cd0bb Add optional deployment mode for Docker etcd_deployment_type
Running etcd in Docker reduces the number of individual file
downloads and services running on the host.

Note: etcd container v3.0.1 moves bindir to /usr/local/bin

Fixes: #298
2016-07-07 19:31:28 +03:00
Smaine Kahlouch bcd912e854 Merge pull request #337 from blasphemy/add-kubelet-ip
Add kubelet ip
2016-07-07 08:05:03 +02:00
Alexandre Bourget 3b7eaf66b6 flanneld: don't redirect logs to an unreadable location, let docker/k8s see
and aggregate them.
2016-07-06 16:25:11 -04:00
Daniel Leining 1d148e9755 fix kubelet ip with quotes 2016-07-05 17:23:08 -04:00
Daniel Leining d84ed1b4b3 make kubelet use "ip" as bind address 2016-07-05 17:14:12 -04:00
Matthew Mosesohn baf80b7d7e Change calicoctl deployment to use container
Improves upgradability of calicoctl by leveraging docker tags.
2016-07-05 13:49:03 +03:00
Matthew Mosesohn d2151500b6 Fix kube-apiserver log level syntax 2016-07-05 13:11:45 +03:00
Matthew Mosesohn b847a43c61 Set hyperkube version to kube_version 2016-07-05 12:43:27 +03:00
Smana f1ba247844 upgrade to k8s v1.3.0 2016-07-03 14:14:09 +02:00
Smaine Kahlouch 2fa7ee0cf9 Merge pull request #326 from kubespray/upgrade_etcd_v3
upgrade to etcd v3.0.1
2016-07-02 14:26:13 +02:00
Smana 40fbb3691d uprade to etcd v3.0.1 2016-07-02 14:14:32 +02:00
Daniel Leining 72ab34f210 Add --bind-address to kube-apiserver 2016-07-01 18:33:59 -04:00
Smana 85fa3efc06 upgrade kubernetes to v1.2.5 2016-06-29 15:38:33 +02:00
Smana c4beee38f6 include variables from a distinct file 2016-06-29 14:08:14 +02:00
Smana 247a1a6e6e change hyperkube repository 2016-06-29 14:07:05 +02:00
Smana a4396cfca0 use python script to update sha256 sum in the vars 2016-06-29 14:07:01 +02:00
Smana 536454b079 upgrade etcd version to 2.3.7 2016-06-28 12:31:57 +02:00
mattymo 708d2fbd61 Add KUBE_API_INSECURE_BIND to systemd unit file
This was missing from commit c4c312c2e6
2016-06-27 13:01:22 +04:00
Matthew Mosesohn c4c312c2e6 Add configurable option for kube_apiserver_insecure_bind_address 2016-06-24 18:10:01 +03:00
Chris Bell 9e59c74c24 Maintain backwards compatibility with EL6 2016-06-22 09:51:49 -04:00
Chris Bell d94253ff6a Modify calico docker.service 2016-06-22 09:44:31 -04:00
Smana 094c2c75f3 upgrade pypy version 2016-06-21 12:11:10 +02:00
Matthew Mosesohn 33d897bcb6 Force install of specified docker version, fixes #295
This allows Ubuntu/Debian to downgrade Docker version if
a newer version is installed, instead of failing.
2016-06-17 12:31:55 +03:00
Matthew Mosesohn 153b82a803 Add docker_options to calico networking 2016-06-14 19:33:44 +03:00
Smana 922c6897d1 Install python-pip on first master 2016-06-12 20:44:12 +02:00
ant31 eb6025a184 Add kubedns as default package to install 2016-06-12 18:08:53 +02:00
ant31 c43f9bc705 Add variables to kpm module 2016-06-12 18:02:44 +02:00
ant31 cd2847c1b9 Add kpm role 2016-06-12 18:02:44 +02:00
Smana 8281b98e19 install kpm in order to deploy addons 2016-06-11 21:08:05 +02:00
Smana 7c7adc7198 upgrade calico to v0.20 and calico-cni to v1.3.1 2016-06-09 19:55:12 +02:00
Smana 4a7d8c6fea clean conditions into docker templates 2016-06-02 21:01:41 +02:00
Smaine Kahlouch 722aacb633 Merge pull request #272 from rustyrobot/fix-etcd-scale-up
Add scale-up for etcd cluster
2016-06-01 17:20:04 +02:00
mattymo 68808534b3 Fix order in restart kubelet to fix systemd reload
Systemd reload before reload kubelet was failing because its definition was before "restart kubelet". Its definition should be after the notify hook.
2016-05-31 20:09:49 +04:00
Evgeny L 0500f27db8 Scale-up functionality for etcd cluster
* Set ETCD_INITIAL_CLUSTER_STATE from `new` to `existing`,
because parameter `new` makes sense only on cluster assembly
stage.
* If cluster exists and current node is not a part
of the cluster, add it with command `etcdctl add member name url`.

Closes kubespray/kargo/#270
2016-05-31 18:23:46 +03:00
Smaine Kahlouch 96a2439c38 Merge pull request #264 from rsmitty/issue-255
resolves coreos nodes not setting up docker proxies
2016-05-26 21:55:53 +02:00
Spencer Smith 87757d4fcf provides initial docker options support 2016-05-25 12:56:45 -04:00
Spencer Smith 492218a3e1 resolves coreos nodes not setting up docker proxies 2016-05-24 12:11:24 -04:00
Spencer Smith a740e521d2 removed os restriction for coreos 2016-05-24 12:03:16 -04:00
Smaine Kahlouch bdc183114a Merge pull request #261 from paulczar/meta_roles_yo
turn adduser/download roles into meta roles
2016-05-23 17:29:37 +02:00
Paul Czarkowski 7de87d958e turn adduser/download roles into meta roles
This should make things a little more composable,
by making these roles meta roles that perform no
actions by default we allow each role to own its own
resources.
2016-05-22 17:25:52 -05:00
Paul Czarkowski c226b4e5cb fixes issue #258
Kubernetes API server has an option:

```
--advertise-address=<nil>: The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used.
```

kargo does not set --bind-address, thus it binds to eth0, in vagrant and similar
environments this causes issues because nodes cannot talk to eachother over eth0.

This sets `--advertise-address` to `ip` if its set, otherwise the default behavior
of is persisted by using `ansible_default_ipv4.address`.
2016-05-22 13:48:16 -05:00
Paul Czarkowski ba615ff94e race condition in download role under vagrant
using a shared folder can cause race conditions for the download
role as it tries to download files on all the nodes to the same
shared path.  This adds a flag to run the tasks in the download
role on just one node.
2016-05-20 17:04:38 -05:00
Paul Czarkowski d8bebcd201 Fix issue with check_certs playbook
check_certs task "Check_certs | Set 'sync_certs' to true" was failing
due to the dict not existing, this sets defaults that allows the
correct behavior of the conditionals.
2016-05-15 17:15:59 -05:00
Smaine Kahlouch f576d70b3c Merge pull request #245 from kubespray/fix_flannel_deploy_213
fix flannel deployment, remove docker bridge before restarting
2016-05-13 19:54:07 +02:00
Smana ae5ff890d4 fix flannel deployment, remove docker bridge before restarting 2016-05-13 18:10:00 +02:00
Spencer Smith f949bfd46c remove need for baking image to get writeable /opt/bin 2016-05-13 02:48:13 -07:00
Spencer Smith 66d9a6ebbc updated to use handlers 2016-05-12 12:18:38 -07:00
Spencer Smith 9b8a757526 missed a name update :) 2016-05-12 09:30:11 -07:00
Spencer Smith a894a8c7bc Merge branch 'master' into issue-229 2016-05-12 09:10:57 -07:00
Spencer Smith 962155e463 updated names and removed checks for rhel, as we already know we have systemd inside that play 2016-05-12 09:06:31 -07:00
Spencer Smith c90c981bb2 updated to support all OSes using systemd 2016-05-12 09:03:11 -07:00
Smana 608e7dfab2 upgrade k8s vers, and add a script for future upgrades 2016-05-12 15:56:30 +02:00
Smana 1884d89d3b fixes the certs issue when masters or not in the kube-node group 2016-05-12 10:07:34 +02:00
Smaine Kahlouch ed95f9ab81 Merge pull request #232 from rsmitty/issue-231
Issue 231: ensure ca.pem makes it to multi-masters
2016-05-11 21:24:04 +02:00
Spencer Smith 9f8466a186 ensure ALL certs are synced between masters 2016-05-11 10:09:13 -07:00
Spencer Smith 743ad0eb5c s/sync_certs/sync_tokens 2016-05-11 09:38:26 -07:00
Spencer Smith 5253b3ec13 ensure ca.pem makes it to multi-masters 2016-05-11 09:06:08 -07:00
Spencer Smith ebf8231c9a only run if proxy variables are added 2016-05-10 15:53:32 -07:00
Spencer Smith adceaf60e1 support proxies with docker on rhel 2016-05-10 15:49:27 -07:00
Smaine Kahlouch 96c63cc0b6 Merge pull request #227 from paulczar/vagrant
Add native Vagrant support
2016-05-09 11:47:07 +02:00
Paul Czarkowski 5f2fa6d76f revert .gitignore for secrets 2016-05-08 23:46:35 -05:00
Paul Czarkowski bd064e8094 fix flannel's cross vm networking for vagrant
* set flannel backend type to `host-gw`
* set flannel interface to be eth1 ip
2016-05-08 23:42:42 -05:00
Paul Czarkowski 8f4e879ca7 Add native Vagrant support
This allows you to simply run `vagrant up` to get a 3 node HA cluster.

* Creates a dynamic inventory and uses the inventory/group_vars/all.yml
* commented lines in inventory.example so that ansible doesn't try to use it.
* added requirements.txt to give easy way to install ansible/ipaddr
* added gitignore files to stop attempts to save unwated files
* changed `Check if kube-system exists` to `failed_when: false` instead of
`ignore_errors`
2016-05-08 10:17:11 -05:00
Smana 4f627baf71 generate secrets on first master 2016-05-07 21:08:29 +02:00
David Reuss 180f2d1fde Pull correct variable for etcd initial variable
This shouldn't use the `inventory_hostname` variable, as that will just yield the same variable, but rather use the `host` which we're looping over.
2016-04-29 14:37:01 +02:00
Antoine Legrand 391b155a98 Merge pull request #216 from cmluciano/cml/fixubuntu
Fix ansible dict error on Ubuntu 14.04
2016-04-25 14:54:17 +02:00
Christopher M Luciano 47982ea21c Use ansible array format instead of dot-notation.
This fixes the ansible error ```'dict object' has no attribute
'ansible_default_ipv4'"}```. Closes #215
2016-04-25 08:45:58 -04:00
Smana 97de82bbcc upgrade weave to v1.5.0 with cni 2016-04-20 17:09:09 +02:00
Smana 928bbeaf0f upgrade calico v0.19.0, calico-cni v1.2.1 2016-04-19 18:28:45 +02:00
Rob Hirschfeld 107da007b1 Merge branch 'master' into flagfixes12 2016-04-12 18:44:06 -07:00
Rob Hirschfeld fb980e4542 missed tick in message
cosmetic
2016-04-12 18:43:31 -07:00
Rob Hirschfeld f12ad6a56f consolidate EPEL change into a single task
as per @smana request
2016-04-12 18:41:46 -07:00
Smaine Kahlouch 5691086ba2 Merge pull request #164 from oneswig/master
Provide a non-default hostname for CoreOS systems.
2016-04-12 17:18:33 +02:00
Rob Hirschfeld 831a54e9b7 add code to detect if epel is already installed and skip it if it is
add option for generic
2016-04-11 16:44:56 -05:00
Smana 3cd89bed45 Kubernetes upgrade to 1.2.2 2016-04-11 12:19:09 +02:00
Smana 48a85ce8f8 use docker repository to install on CentOS 2016-04-11 11:17:14 +02:00
Smana 936927a54f Fix docker install on rhel7 2016-04-10 22:08:13 +02:00
Smana 5c22133492 fix add nodes to the cluster 2016-04-08 07:45:39 +02:00
Smana b03093be73 update kubectl bash completion
change hyperkube image repository
2016-04-05 15:27:06 +02:00
Smana bc44d5deb3 upgrade to kubernetes v1.2.1 2016-04-05 12:59:18 +02:00
Smana 850b7466cd remove deprecation warns and update doc 2016-04-04 10:14:56 +02:00
Stig Telfer bf96b92def Merge branch 'master' into coreos-fixes 2016-04-02 21:01:28 +01:00
Stig Telfer ab21f4d169 Define empty default objects for docker package management.
On CoreOS where there is no package management, perform zero-trip
loops instead of throwing an exception for iterating over a member
of an undefined variable.
2016-04-02 20:55:17 +01:00