Commit Graph

40 Commits

Author SHA1 Message Date
Michal Nasiadka bc79012f46 Drop Swarm support
Label validator function has been left behind, although it's not
checking for anything right now - might be useful in future.

Change-Id: I74c744dc957d73aef7556aff00837611dadbada7
2024-01-24 13:20:21 +13:00
Peter Pouliot 7dc4c7d904 Fixing typos and spelling errors in driver template files
* Changing the reference to 'Atomic' in the k8s_coreos_v1 driver
  to 'Container Linux'
* Changing a misspelled 'mater' to 'master'
  in swarm_fedora_atomic_v1/templates/swarmmaster.yaml description
* Changing a misspelled 'mater' to 'master' in
  swarm_fedora_atomic_v1/templates/swarmmaster.yaml description

Change-Id: I69a31d2b91fed48f07f649fa876e208e268fb339
2019-10-10 22:18:58 -04:00
Feilong Wang be0609ce88 Support soft-anti-affinity policy for nodes
Currently, there is no guarantee to make sure all nodes of one cluster are
created on different compute hosts. So it would be nice if we can create
a server group and set it with anti-affinity policy to get a better HA
for cluster. This patch is proposing to create a server group for master
and minion nodes with soft-anti-affinity policy by default.

Closes-Bug: #1737802

Change-Id: Icc7a73ef55296a58bf00719ca4d1cdcc304fab86
2018-01-24 07:13:48 +13:00
Spyros Trigazis 65dfb2009f Add openstack_ca_file configuration option
In the drivers section of magnum.conf add openstack_ca_file.
This file is expected to be a CA Certificate OR CA bundle
which will be passed on every node and it will be installed
on the host's CA bundle.

Update devstack plugin to use the ssl bundle if tls-proxy is
enabled.

Install the CA for drivers:
k8s_coreos_v1
k8s_fedora_atomic_v1
k8s_fedora_ironic_v1
mesos_ubuntu_v1
swarm_fedora_atomic_v1
swarm_fedora_atomic_v2

Add doc in troubleshooting-guide.

Add release notes.

Closes-Bug: #1580704
Partially-Implements: blueprint heat-agent
Change-Id: Id48fbea187da667a5e7334694c3ec17c8e2504db
2018-01-17 14:58:56 +00:00
Ricardo Rocha 28fff8006a Make docker_storage_driver a str instead of enum
Allow any value to be passed on the docker_storage_driver field by turning it
into a StringField (was EnumField), and remove the constraints limiting the
values to 'devicemapper' and 'overlay'.

Change the docker storage setup to have a generic setup for all drivers with
the exception of 'devicemapper', which keeps its own specific storage config
function. For all others, do the same we already did for overlay (with two
cases for usage of a cinder volume or not) and simply set the storage driver
in the docker configuration to the value provided in the cluster template.

Change-Id: I9aa8f232ce64ece4d439c0a476f463820a499617
Closes-Bug: #1722522
2017-12-14 14:41:09 +00:00
Kirsten G b07b6f34d5 Add verify_ca configuration parameter
Added configuration parameter, verify_ca, to magnum.conf with default
value of True. This parameter is passed to the heat templates to
indicate whether the cluster nodes validate the Certificate Authority
when making requests to the OpenStack APIs (Keystone, Magnum, Heat).
This configuration parameter can be set to False to disable CA
validation.

Co-Authored-By: Vijendar Komalla <vijendar.komalla@rackspace.com>

Change-Id: Iab02cb1338b811dac0c147378dbd0e63c83f0413
Partial-Bug: #1663757
2017-11-21 10:25:32 -08:00
Jenkins 62afc249d1 Merge "Clean-up server names in drivers" 2017-08-28 09:49:55 +00:00
Michael Tupitsyn 35dc923d66 Fix no_proxy evaluation for Swarm clusters
At the moment, no_proxy variable is evaluated separately for docker
daemon and for swarm-manager container running in docker. Evaluated
value for swarm-manager is not getting into cloud-init script, because
$NODE_PROXY token is getting replaced by Heat str_replace function.
This commit is intended to unify NO_PROXY evaluation and also fix the
issue with swarm-manager.

Related-Bug: #1647815
Related-Bug: #1632698
Related-Bug: #1660562
Change-Id: I336024265008b6cae308bf7b614476b71b81fa01
2017-08-23 08:26:19 +00:00
Mohammed Naser 5153d912b2
Clean-up server names in drivers
The instance type of servers at the moment can become quite long
due to the Heat autogenerated names.  This patch cleans up the names
so that they are shorter yet contain all the info needed to be able
to know where they belong to.

Change-Id: I5bcbe73f08844242d049b8408221da40d22cd3dc
2017-08-13 14:03:55 -04:00
Mark Goddard e4d691f48f Swarm: simplify heat WC signalling with $WAIT_CURL
This change uses the curl_cli attribute of heat's waitconditions in
the swarm driver which provides a preconstructed curl command which
can be used for signalling the waitcondition. This pattern has been
used elsewhere in magnum and simplifies the process of using wait
conditions.

Change-Id: I8e5f63e6d905266cc43d4957ce95e53659d01321
2017-06-19 12:19:57 +00:00
Spyros Trigazis 295ef945f6 swarm: Add docker_volume_type label
* add docker_volume_type for the cinder volumes which are
  used for docker storage.
* add default_docker_volume_type configuration option

Related-Bug: #1678153
Change-Id: Ie18096acf24873ef91a904df4f1a84694a2bb644
2017-06-01 16:17:54 +00:00
Spyros Trigazis d2532a3af2 Upgrade to Fedora 25
Atomic image contains:
kubernetes-1.5.2-2.fc25.x86_64
docker-1.12.6-5.git037a2f5.fc25.x86_64
flannel-0.5.5-8.fc25.x86_64
etcd-3.0.15-1.fc25.x86_64

The ironic image contains exactly the same packages.

* For this upgrade the upstream image is used, which is
  uploaded here [1].
* Minor changes for flannel and docker-storage-setup
  were needed.
* The image will be built in the CI and uploaded to
  tarballs.openstack.org as soon as possible.
* Ironic image [2].

Notes:
* docker-storage-setup config changes were needed because in
  the previous images it was disabled and it was started by us.
* We can have selinux enables in containers since the images
  have kernel 4.9.x.

[1] https://fedorapeople.org/groups/magnum/fedora-atomic-25-latest.qcow2
[2] https://fedorapeople.org/groups/magnum/fedora-25-kubernetes-ironic.tar.gz

Change-Id: Iac6e30c530821a49a5c3978e335e0b1d56a576e0
2017-01-26 15:40:34 +01:00
Spyros Trigazis 4dd178e7ca Add docker-d options in sysconfig/docker
Remove custom docker unit file and pass the necessary options
through /etc/sysconfig/docker file.

Change-Id: I6bf91843b9120b700d13aad54cef38342ae1f8bd
Closes-Bug: #1646123
2016-12-12 17:55:35 +01:00
Mathieu Velten 9c34f928e6 Add a SELinux policy to relabel files in /usr/local/bin as bin_t
There is a default policy for that in Fedora, however it doesn't
work in Atomic since /usr/local is a symlink to /var/usrlocal

Closes-Bug: 1646421
Change-Id: I4c5b836f4f76ff93a2c55f85ff6ff0cbe990bcff
2016-12-07 11:49:46 +01:00
Mathieu Velten 004e0cd742 Remove underscores from Nova server names
It creates a mismatch between the generated Nova name
and its hostname which can lead to weird problems.

Closes-Bug: 1645730
Change-Id: I1c7dd459caefacaf41dd77e59c1a6e1df3ef0d42
2016-11-29 16:54:30 +01:00
Spyros Trigazis f82749457c Make cinder volume optional
In the swarm_atomic and k8s_atomic drivers container images are
stored in a dedicated cinder volume per cluster node. It is
proven that this architecture can be a scalability bottleneck.

Make the use of cinder volumes for container images and opt-in
option.  If docker-volume-size is not specified no cinder
volumes will be created. Before, if docker-volume-size wasn't
specified the default value was 25.

To use cinder volumes for container storage the user will
interact with magnum as before, (meaning the valid values are
integers starting from 1).

Closes-Bug: #1638006
Change-Id: I3394c62a43bbf950b7cf0b86a71b1d9b0481d68f
2016-11-10 11:13:09 +01:00
yatin 2d160ecfcb Support scheduler strategy for swarm cluster
Swarm cluster can be created by specifying any of the scheduler
strategy supported by swarm. The strategy can be specified
while creating cluster template using labels parameter, Ex:-
--labels swarm_strategy=spread
Supported values for swarm_strategy=spread, binpack, random

Change-Id: If471f10a3b1f955638a77d5afe462aebdeb4277c
Implements: blueprint add-support-different-strategy-in-swarmbay
2016-11-03 12:00:57 +05:30
Madhuri Kumari 9493a81d4c Split swarm atomic template
This patch splits the swarm atomic template to support
both swarm vm and bm drivers.

Change-Id: Ib03e1d6cb441230a17df2c47e1ed79052f3394bf
Partially-Implements: blueprint magnum-baremetal-full-support
2016-09-21 14:17:25 +05:30
Hua Wang 77e6c3160f Add Support of LBaaS v2 API
LBaaS v1 api is completely removed by neutron, so it
cannot be used now. Added Support of LBaaS v2 API.
Now all COE's uses LBaaS v2.

Co-Authored-By: yatin karel <yatin.karel@nectechnologies.in>
Change-Id: Idbccbe1065857449fc8e158115b7833b68c2da9f
Partially-Implements: blueprint magnum-lbaasv2-support
2016-09-09 10:01:30 +05:30
Jaycen Grant 729c2d0ab4 Rename Bay DB, Object, and internal usage to Cluster
This is patch 3 of 3 to change the internal usage of the terms
Bay and BayModel.  This patch updates Bay to Cluster in DB and
Object as well as all the usages.  No functionality should be
changed by this patch, just naming and db updates.

Change-Id: Ife04b0f944ded03ca932d70e09e6766d09cf5d9f
Implements: blueprint rename-bay-to-cluster
2016-09-08 13:01:12 -07:00
Spyros Trigazis 1466f93b21 Add rexray volume driver to Swarm
* Volumes are created using the bay's trusstee user
  scoped by the bay's trustID.
* In volume-service.sh it is checked if rexray exists
  in the image, so if you have built an image with
  rexray it will configure and start rexray service.

This change replaces:
Ie5e78e6b9d06fd2c92915b8635b8062c008e9696

Change-Id: I11043d5edcf73a87220c86320f9938b9347c118f
Partially-Implements: blueprint magnum-integrate-with-cinder
2016-09-03 13:50:19 +02:00
Rajiv Kumar 0f6b3b6a38 Consolidate configure docker storage fragments
In this commit configure-docker-storage.sh file has been removed
from k8s coreos, fedora and swarm driver and put at the common
location to avoid duplicacy and redundancy of code.

Partial-bug: #1517218
Change-Id: Ie467c1691cc148435da47448d31c35e7a1865984
2016-09-02 17:31:51 +05:30
Jerome Caffet 802f137aee Revert "Use symlinks for common template files"
This reverts commit 748cf13182.
This commit breaks to setup.py install phase.

Closes-Bug: #1615026
Change-Id: Ie29a723319775e1becff5a6099cb58e3541e399c
2016-08-19 18:07:03 +00:00
Drago Rosson 748cf13182 Use symlinks for common template files
This patch establishes a convention of using a symlink named "common" in
drivers/{driver}/templates/ that points to drivers/common/templates/.
This has two benefits. First, it lowers the burden of forking a driver
by allowing drivers/common/templates/ to be copied over the symlink,
rather than having to update all of the paths in the templates and
driver code.  Second, it shortens the paths used, which makes things
cleaner.

Change-Id: I9176ec03905d0a87a43ba6bedf1f768b2b316125
Partially-implements: blueprint bay-drivers
2016-08-10 11:34:24 -05:00
Jenkins 2304c4babb Merge "Remove repeated WaitConditionHandle resource" 2016-07-26 11:37:32 +00:00
Drago Rosson 966e6d9885 Move common/fragments into templates directory
Moving common/fragments to common/templates/fragments makes the common
directory better match the structure of the bay drivers.

Change-Id: I4f9e88ab9943dff9d34626ad7c708570bead211c
2016-07-22 12:34:53 -05:00
Jenkins 7417dace8c Merge "Fix wrong COE name in template" 2016-07-20 10:24:03 +00:00
Jenkins 5f63bc3244 Merge "Update default version of heat template" 2016-07-20 02:48:42 +00:00
Madhuri Kumari 5f55ef6b15 Fix wrong COE name in template
This is a trivial fix that corrects the wrong COE name i.e 'kube'
used in swarmmaster.yaml template.

Change-Id: Idd8c952f951be429b0edb839764ef7ad68501fdd
2016-07-19 15:24:11 +05:30
PanFengyun 1b3ab819ef Remove repeated WaitConditionHandle resource
The master_wait_handle and cloud_init_wait_handle are the same,
the node_agent_wait_handle and  node_cloud_init_wait_handle are
the same. We just need only one. To converge more with k8s
templates, we should use master_wait_handle instead of
cloud_init_wait_handle and use node_agent_wait_handle instead of
node_cloud_init_wait_handle.

Change-Id: Icc07ef8407c05ef37a35c7f418c11c562572cab5
Closes-Bug: #1603999
2016-07-18 21:30:21 +08:00
Jenkins ec1274bfd1 Merge "Allow swarm cluster without LBaaS" 2016-07-15 23:49:00 +00:00
Drago Rosson 7df74392d5 Allow swarm cluster without LBaaS
This patch modifies the swarm bay driver/templates to allow its LBaaS
resources to be conditionally enabled/disabled.

Change-Id: Ic6ebec89514288837a7b540ce5517413e579f488
Partially-Implements: blueprint decouple-lbaas
2016-07-14 16:34:54 +00:00
yatin karel 21a3b21e77 Update default version of heat template
Make consistent default version of heat template across
kubernetes, swarm and mesos

Change-Id: I5f8231336a6832ae8ecd8f789ed0b51ba5062729
Closes-Bug: #1425368
2016-07-12 12:06:41 +05:30
PanFengyun dca691d629 Add "WAIT_CURL" parameter to the template of swarm
Currently the 'WAIT_CURL' parameter is not exist in the heat-params
of swarm templates, but the configure-docker-storage.sh uses it.

Change-Id: I3bea848e206c67dcb791446f88f3fe6924d21a90
Closed-Bug: #1600074
2016-07-11 10:25:14 +08:00
Jenkins f50ec2f546 Merge "Delete unused discovery_url for swarm" 2016-07-08 17:18:17 +00:00
Jenkins e0ae7d4b36 Merge "Change the type of flannel_network_subnetlen to 'number'" 2016-07-08 07:44:06 +00:00
Spyros Trigazis c93df2a19d Move common bay drivers fragments in common dir
Paritially-Implements: blueprint bay-drivers
Change-Id: I1e23fd793c6b5e3fbf7bd3ef4a8eb2e1356be09a
2016-07-07 17:42:42 +02:00
PanFengyun 20029b6a0a Change the type of flannel_network_subnetlen to 'number'
'flannel_network_subnetlen' is the size of subnet assigned to each
nodes. The value of 'flannel_network_subnetlen' will pass to SubnetLen.
So the type of flannel_network_subnetlen should be 'number' or int,
not string.

Change-Id: I49816fcfad7fcce7f77f6c0db20f82b630426512
2016-07-07 13:09:08 +08:00
PanFengyun 3ac87044dc Delete unused discovery_url for swarm
The swarmnode of Swarm bay don't need discovery_url, so let's
delete it from heat templates.

Change-Id: I48f775e795e1985ada9da7d7660f159df13da7ac
2016-07-07 13:03:58 +08:00
Murali Allada 4080d4a84c Bay driver implementation
Moved all the swarm templates and template_definition code
to the magnum/drivers folder.

Moved base template_definition classes to drivers/common
folder

Change-Id: Ieff57f0f47835c35d9f17c3d7d1b7e6a40907462
Partially-Implements: blueprint bay-drivers
Co-Authored-by: Spyros Trigazis <strigazi@gmail.com>
2016-07-05 22:30:31 +02:00