600 Commits

Author SHA1 Message Date
Lingxian Kong
31c82625d6 [k8s-fedora-atomic] Security group definition for worker nodes
Defines more strict security group rules for kubernetes worker nodes. The
ports that are open by default: default port range(30000-32767) for
external service ports; kubelet healthcheck port; Calico BGP network ports;
flannel overlay network ports. The cluster admin should manually config the
security group on the nodes where Traefik is allowed.

Story: #2005082
Task: #29661
Change-Id: Idbc67cb95133d3a4029105e6d4dc92519c816288
2019-02-27 22:15:46 +00:00
Spyros Trigazis
0b5f4260d9 k8s_fedora: Deploy tiller
Add enable_tiller  label to install tiller in k8s_fedora_atomic
clusters. Defaults to false.

Add tiller_tag label to select the version of tiller. If the
tag is not set the tag that matches the helm client version in
the heat-agent will be picked.  The tiller image can be stored
in a private registry and the cluster can pull it using the
container_infra_prefix label.

Install tiller securely using helper container.

TODO:

*add instructions on how RBAC is designed
https://docs.helm.sh/using_helm/#example-deploy-tiller-in-a-namespace-restricted-to-deploying-resources-in-another-namespace
* add docs on how to install addon in the cluster using this tiller
* how users can get the creds to talk to tiller

NOTE:
The main goal of this tiller is internal usage!
Users can still deploy other tillers in other namespaces.

story: 2003902
task: 26780

Change-Id: I99d3a78085ba10030200f12bbfe58a72964e2326
Signed-off-by: dioguerra <dy090.guerra@gmail.com>
2019-02-11 11:18:08 +01:00
Lingxian Kong
87a743ad45 Fix typo in octavia-ingress-controller doc
Change-Id: I53eaab312fa1b3b3f5689aa0147a028ecaeb52f1
2019-02-11 11:51:55 +13:00
Zuul
f0b6d3e1fe Merge "Support octavia-ingress-controller" 2019-02-03 22:20:02 +00:00
Lingxian Kong
a941822c8e Support octavia-ingress-controller
- Add "octavia" as one of the "ingress_controller" options.
- Add label "octavia_ingress_controller_tag".
- Use external network ID in the heat templates.

Story: 2004838
Change-Id: I7d889a054cd5feb2eeef523b20607a6c7630d777
2019-01-31 14:49:32 +13:00
Zuul
77435e5797 Merge "Update kube cmd documentation links" 2019-01-28 09:32:44 +00:00
Ricardo Rocha
6a9c490bd8 Update kube cmd documentation links
Change-Id: I2f6aca27d0f640f01e8e031f759479c776b2523a
2019-01-28 10:10:15 +01:00
akhiljain23
2ccf639a39 Add framework for magnum-status upgrade check
This commit adds the functionality of magnum-status CLI for performing
upgrade checks as part of the Stein cycle upgrade-checkers goal.
It only includes a sample check which must be replaced by real checks in
future.

Change-Id: Ia8a74fd8bd5a804e71bb04eb0615fa114a517bc4
Story: 2003657
Task: 26138
2019-01-27 04:26:30 +00:00
Feilong Wang
59da4e25a6 Support Keystone AuthN and AuthZ for k8s
Now cloud-provider-openstack of Kubernetes has a webhook to support
Keystone authorization and authentication. With this feature, user
can use a new label 'keystone-auth-enabled' to enable the keystone
authN and authZ.

DocImpact
Task: 21637
Story: 1755770

Change-Id: I3d21ad8f55c0d7308a302f62db9e9af147a604f8
2019-01-14 13:46:42 +13:00
Jim Bach
6c61a1a949 k8s_fedora: Use external kubernetes/cloud-provider-openstack
* Use the external cloud-provider [0]
* Label master nodes
* Make the script the deploys the cloud-provider and clusterroles
  for the apiserver a SoftwareDeployment
* Rename kube_openstack_config to cloud-config,
  for cinder to workm the kubelet expects the cloud config name only
  like this. Keep a copy of kube_openstack_config for backwards
  compatibility.

Change-Id: Ife5558f1db4e581b64cc4a8ffead151f7b405702
Task: 22361
Story: 2002652
Co-Authored-By: Spyros Trigazis <spyridon.trigazis@cern.ch>
2018-12-19 10:56:47 +01:00
Mohammed Naser
d16479709a functional: bump atomic version to latest
This patch brings the Fedora Atomic version used in gating to
the latest one which includes some improvements alongside a newer
version of Docker (which seems to run things better overall).

Change-Id: Iad0a1f57b29aec9a0cdb2a104fdaa5970133cfb4
2018-12-08 22:16:42 -05:00
Spyros Trigazis
c98e9525c7 Add heat_container_agent_tag label
Add heat_container_agent_tag label to allow users select the
heat-agent tag. Stein default: stein-dev

story: 2003992
task: 26936

Change-Id: I6a8d8dbb2ec7bd4b7d01fa7cd790a8966ea88f73
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2018-10-24 10:40:55 +02:00
Zuul
813d149ebd Merge "Docs: Replace non-existing command" 2018-09-10 08:42:01 +00:00
Sergey Filatov
0cf61dfb74 Add prometheus & grafana container image tags
To upgrade cluster we need to be able to set image tags
so this change adds to labels for corresponding containers

Task: 23314
Story: 2003171

Change-Id: I4cd0270a69fb889c59bdb28966821adb11fd0292
2018-08-31 18:20:26 +03:00
Zuul
7b6415a5bc Merge "[k8s] Add new label service_cluster_ip_range" 2018-08-29 07:57:50 +00:00
zhang.lei
7d4d22b901 Remove -u root as mysql is executed with root user
As openstack installation guides suggest to run mysql with root shell
user, mysql will not ask for password, so the "-u root -p" is useless.

Change-Id: I5ffa77971ecbcc9210b185a39842140b3acd8147
Related-Bug: #1785025
2018-08-19 14:34:53 +00:00
Zuul
8a229ffc72 Merge "Fix doc format" 2018-08-16 12:37:33 +00:00
Feilong Wang
80fcf76d27 [k8s] Add new label service_cluster_ip_range
A new label `service_cluster_ip_range` is added for k8s so that
user can set the service portal ip range to avoid conflicts with
pod ip range.

Task: 22568
Story: 2002725

Change-Id: Ie6e95a953059cc4bd5cf15a44f8666b714defb13
2018-08-14 11:20:10 +12:00
David Rabel
a400ea7980 Fix doc format
Blank line broke formatting in doc/source/user/index.rst. I therefore
deleted it.

Use code blocks instead of indentation in admin/magnum-proxy.rst
Old indentation was wrongly formated as quotation.

contributor/api-microversion.rst : Note was wrongly indented and
therefore interpreted as a quotation.

Change-Id: I47797a05be22a3b38f7994432ed75b67b6a4962a
2018-08-13 13:43:28 +02:00
Feilong Wang
feed29d7ed Using cgroupfs as default cgroup-driver
This is a part of fixes for k8s v1.11.1 recently we're doing. When
testing the k8s v1.11.1, we just found some small but annoying issues:

1. cgroup-driver with systemd not working well with Fedora Atomic, so
   we're going to use cgroupfs as the default cgroup-driver.
2. The $ char need to be escaped wc-notify-master.sh

Task: 23223
Story: 2003103

Change-Id: I995f5b82abadfdb7f78f7c098ac7a7f1e5c34fd3
2018-08-08 09:27:33 +00:00
David Rabel
7e23ee6be0 Docs: Replace non-existing command
user/index.rst : openstack help coe does not exit. Use openstack coe
cluster list instead.

Change-Id: I667214f315c326932d3800764bfad599cacd8474
2018-07-30 15:03:33 +02:00
Spyros Trigazis
974399a912 k8s_fedora: Add cloud_provider_enabled label
Add 'cloud_provider_enabled' label for the k8s_fedora_atomic
driver. Defaults to true. For specific kubernetes versions if
'cinder' is selected as a 'volume_driver', it is implied that
the cloud provider will be enabled since they are combined.

The motivation for this change is that in environments with
high load to the OpenStack APIs, users might want to disable
the cloud provider.

story: 1775358
task: 1775358

Change-Id: I2920f699654af1f4ba45644ab60a04a3f70918fe
2018-07-13 09:39:08 +02:00
Zuul
1eb1f35a75 Merge "Add option to specify Cgroup driver for Kubelet" 2018-06-28 07:49:39 +00:00
Bharat Kunwar
ec58c23361 Add option to specify Cgroup driver for Kubelet
This patch allows specification of Cgroup driver for Kubelet service.
The necessity of this patch was realised after upgrading Docker to the
new community edition (17.3+) which defaults to  `cgroupfs` Cgroup
driver but on the other hand, Fedora Atomic (version 27) comes with
1.13. Cgroup drivers for Docker need to be identical for the two
services, Docker and Kubelet, need to be able to work together.

Story: 2002533
Task: 22079
Change-Id: Ia4b38a63ede59e18c8edb01e93acbb66f1e0b0e4
2018-06-12 12:31:14 +01:00
PanFengyun
9e97c8b8a7 Devicemapper storage driver need specified volume
For the 'devicemapper' storage driver, must specify volume and
the minimum value is 3GB.

Change-Id: I2b5ab83ac00b4a5bc6f113924e022f8952dd7766
Closes-Bug: #1772782
2018-06-05 11:00:05 +08:00
Daniel Abad
a015193025 Update ca related magnum comands to osc
After merging https://review.openstack.org/#/c/503952
update the according documentation to walk towards
deprecation of the magnum client
In addition, update old reference to bay in cluster commands.

Change-Id: Idf316f93dbc897ea0558da9b26a349644d4b98cf
Partially-Implements: blueprint deprecate-magnum-client
2018-05-11 10:35:09 +02:00
Zuul
f4267405cc Merge "[doc] Correct the non-existent link for the Fedora image" 2018-05-07 08:50:19 +00:00
Qian Min Chen
b319f720ad [doc] fix coredns correct image verison
queens coredns use 1.0.1 verison [1]

[1] https://github.com/openstack/magnum/blob/master/magnum/drivers/common/templates/kubernetes/fragments/core-dns-service.sh#L98

Change-Id: I553d3796993dcb90b8181b19c8e2f15f783af247
2018-04-28 09:44:10 +08:00
Qian Min Chen
b8fb70d610 [doc] Correct the non-existent link for the Fedora image
Change-Id: I7d94109d8917284bfed485c9ffb72b7b6dcb424d
2018-04-28 09:39:40 +08:00
Nguyen Hai
6215887bc1 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Remove the '[build_sphinx]' section as described in:
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: Ibd6c6e9cca238821099ce190784d077ffe4c2dee
2018-04-25 12:11:07 +00:00
Zuul
d1281d6130 Merge "Replace CentOS package mysql-devel > mariadb-devel" 2018-04-25 10:25:34 +00:00
Zuul
201ee76332 Merge "Make DNS pod autoscale" 2018-04-24 11:00:11 +00:00
Zuul
3975ca35bf Merge "fix a typo" 2018-04-22 18:44:39 +00:00
Feilong Wang
54a4ac9f84 Make DNS pod autoscale
DNS service is a very critical service in k8s world, though it's not
a part of k8s itself. So it would be nice to have it replicate more
than 1 and on differents nodes to have high availbility. Otherwise,
services running on k8s cluster will be broken if the node contains
DNS pod down. Another sample is, when user would like to do a cluster
upgrade, services will be borken when the node containers DNS pod
being replaced. You can find lots of discussion about this, please
refer [1],[2] and [3].

[1] https://github.com/kubernetes/kubeadm/issues/128
[2] https://github.com/kubernetes/kubernetes/issues/40063
[3] https://github.com/kubernetes/kops/issues/2693

Closes-Bug: #1757554

Change-Id: Ic64569d4bdcf367955398d5badef70e7afe33bbb
2018-04-19 23:09:55 +12:00
Zuul
283a27d69c Merge "Adding glossary.rst" 2018-04-18 12:43:36 +00:00
wangqi
1c0b97277c fix a typo
Change-Id: I070ed0cb6ebe44b895a0fea602d02f917bfe4e4a
2018-04-18 04:23:25 +00:00
sayalilunkad
d179c37ca2 Adding documentations about network in vms
This covers the possible network options for nodes in a magnum cluster.

Change-Id: I67b554889a7f21f0ce8c305717b6dad6b8a12ab3
2018-04-11 18:37:35 +02:00
sayalilunkad
16ce059e3e Adding glossary.rst
This patch attemps to take some of the content from the guides and make a
glossary which can then be referenced where needed.

Change-Id: Ifb360401556fb0aacd4136e7a08ee1440b7c9d62
Partially-Implements: blueprint docs-refactor
2018-04-10 11:31:27 +02:00
Kirsten G
57b9457006 Add minimum system requirements to docs
Added subsection in contributor quickstart guide with minimum system
resources required to use Magnum with DevStack.

Change-Id: Icd6b3ecd7011a75c0ad0a50943c1934eeeb7351a
2018-02-28 10:24:38 -08:00
Zuul
742014d8ea Merge "Corrected some misspellings in magnum" 2018-02-23 10:17:18 +00:00
Spyros Trigazis
30785acd3c Update kubernetes dashboard to v1.8.3
Add the RBAC enabled kubernetes-dashboard with
version v1.8.3.

Related-Bug: #1680900
Change-Id: I68a17d22dda9661c81f40bcc9db06f7456790958
2018-02-23 09:42:44 +13:00
Zuul
095b0146bb Merge "k8s: allow passing extra options to kube daemons" 2018-02-22 19:43:45 +00:00
Zuul
4be27a7c86 Merge "[kubernetes] add ingress controller" 2018-02-22 19:43:43 +00:00
Ricardo Rocha
4efb58b28d k8s: allow passing extra options to kube daemons
Define a set of new labels to pass additional options to the kubernetes
daemons - kubelet_options, kubeapi_options, kubescheduler_options,
kubecontroller_options, kubeproxy_options.

In all cases the default value is "", meaning no extra options are
passed to the daemons.

Change-Id: Idabe33b1365c7530edc53d1a81dee3c857a4ea47
Closes-Bug: #1701223
2018-02-22 15:54:46 +00:00
Ricardo Rocha
0b18989a50 [kubernetes] add ingress controller
Add ingress controller configuration and backend to kubernetes clusters.

A new label 'ingress_controller' defines which backend should serve
ingress, with traefik added as the only option for now.

It is defined as a DaemonSet, with instances on all nodes defined with a
certain role. This role is set as an additional cluster label
'ingress_controller_role', with a default value of 'ingress'.

For now no node is automatically set with this role, with users or operators
having to do this manually after cluster creation.

Change-Id: I5175cf91f37e2988dc3d33042558d994810842f3
Closes-Bug: #1738808
2018-02-22 15:54:46 +00:00
Spyros Trigazis
d95ba4d1ff Run etcd and flanneld in a system container
In Fedora Atomic 27 etcd and flanneld are removed from the base image.
Install them as a system containers.

* update docker-storage configuration
* add etcd and flannel tags as labels

Change-Id: I2103c7c3d50f4b68ddc11abff72bc9e3f22839f3
Closes-Bug: #1735381
2018-02-22 12:30:27 +00:00
Zuul
f61ef81ef1 Merge "Using v1.9.3 as default k8s version" 2018-02-21 11:10:32 +00:00
Feilong Wang
838b8daf6e Support calico as network driver
Adding calico as Kubernetes network driver to support network
policy of Kubernetes. Network policy is a very important feature
for k8s production use. See more information about k8s network
policy at [1] and [2], as for calico please refer [3] and [4].

[1] https://kubernetes.io/docs/concepts/services-networking/network-policies/
[2] http://blog.kubernetes.io/2017/10/enforcing-network-policies-in-kubernetes.html
[3] https://www.projectcalico.org/calico-network-policy-comes-to-kubernetes/
[4] https://cloudplatform.googleblog.com/2017/09/network-policy-support-for-kubernetes-with-calico.html

Closes-Bug: #1746379

Change-Id: I135a46cd32a67d73d8e64ac5bbc4debfae6c4568
2018-02-21 14:47:54 +13:00
Feilong Wang
1e36980cac Using v1.9.3 as default k8s version
Currently, the default k8s version in Magnum is v1.7.4, but based on the
deprecation policy of k8s. It will be deprecated at March 2018, see
https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
So it would be nice to change the default k8s version to latest.

Closes-Bug: #1750549

Change-Id: I053e50ac879b031c8438a2587a99de44e0360c47
2018-02-21 00:36:12 +13:00
Ricardo Rocha
faa9e90402 [k8s] allow enabling kubernetes cert manager api
Add a new label 'cert_manager_api' to kubernetes clusters controlling the
enable/disable of the kubernetes certificate manager api.

The same cluster cert/key pair is used by this api. The heat agent is used
to install the key in the master node(s), as this is required for kubernetes
to later sign new certificate requests.

The master template init order is changed so the heat agent is launched
previous to enabling the services - the controller manager requires the CA key
to be locally available before being launched.

Change-Id: Ibf85147316e3a194d8a3f92cbb4ae9ce8e16c98f
Partial-Bug: #1734318
2018-02-15 14:25:48 +00:00