Commit Graph

138 Commits

Author SHA1 Message Date
Jake Yip 34c82bdb96 Add feature flag for beta drivers
Change-Id: I9d0851e7f0c740f2a23c3ff935a21cff35769a78
2024-02-27 20:34:05 +11:00
Zuul c2567f202a Merge "Drop k8s_fedora_ironic_v1 driver" 2024-02-21 23:52:53 +00:00
Zuul 70bb9a64a1 Merge "Replace is_ssl_enabled_service" 2024-02-19 16:07:36 +00:00
Michal Nasiadka fa5aa8f625 Drop k8s_fedora_ironic_v1 driver
Change-Id: Ic7114e5923b74a4202a043388701826b4e47326e
2024-02-05 08:14:56 +00:00
Zuul f6baa6d1ff Merge "devstack: Install sonobuoy and kubectl" 2024-01-15 22:18:15 +00:00
Takashi Kajinami 3da07be83a Replace is_ssl_enabled_service
It was kept for backword compatibility but now returns the same value
as `is_service_enabled tls_proxy`[1].

[1] f3b2f4c85307b14f115a020f5eaf6c92026b55b4

Change-Id: I245b0ba9a81c934c808c0043a010f1ef82eee703
2023-12-20 20:49:50 +09:00
Jake Yip 4c22c5f2f1 Remove send_cluster_metrics devstack config
The code to for this was removed in Change
Ib9142ab17d562b1d7ccf1409a9e0d934585a094d

Change-Id: Ie75a794aacb720b62631b215c31c3b02729d7692
2023-10-30 11:57:49 +11:00
Michal Nasiadka 1793251293 devstack: Install sonobuoy and kubectl
Change-Id: I26aa7e7065913be987bc5b298809c918977ba753
2023-10-04 09:26:27 +00:00
ricolin 5971243169 Support enables rbac policies new defaults
The Magnum service allow enables policies (RBAC) new defaults and scope by
default. The Default value of config options ``[oslo_policy] enforce_scope``
and ``[oslo_policy] oslo_policy.enforce_new_defaults`` are both to
``False``, but will change to ``True`` in following cycles.

To enable them then modify the below config options value in
``magnum.conf`` file::

  [oslo_policy]
  enforce_new_defaults=True
  enforce_scope=True

reference tc goal for more detail:
https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html

Related blueprint secure-rbac

Change-Id: I249942a355577c4f1ef51b3988f0cc4979959d0b
2023-08-30 00:35:24 +08:00
Tobias Urdin 206a817cf7 devstack: use iniset_rpc_backend
Instead of calling get_transport_url directly.

Change-Id: Id6395be9da2c1074790115eeaf2fbeba0875cb38
2022-09-27 08:51:27 +00:00
Michal Nasiadka 61c7f7b34b devstack: Create only public endpoint
Just like other devstack services - create only public endpoint.

Change-Id: I375cc7fcba3962eed9c342c0476ecc372f064b47
2022-04-19 13:26:46 +00:00
Spyros c1c9942f8b fcos-k8s: Update to v1.22
* change rbac.authorization.k8s.io/v1beta1 to v1
  * update metrics-server
* change storage.k8s.io/v1beta1 to v1
* drop kubelet-https
* update to FCOS 35

story: 2009828
task: 44416

Signed-off-by: Spyros <strigazi@gmail.com>
Change-Id: I24b89366a4a8e8bc4c90f6a85ef6de2ac77dae1d
2022-02-03 13:59:32 +00:00
Bharat Kunwar b2e20a1143 Make code compatible with SQLAlchemy 1.4.18
Also, plugins do not need to enable any network service other than what
devstack is already doing [1].

Also, fix doc build:
- bump up tox minversion to 3.18
- set ignore_basepython_conflict to True [2]
- add tex-gyre to binddep.txt [3]

[1] https://review.opendev.org/c/openstack/devstack/+/791436
[2] a0ec2de968/tox.ini (L7)
[3] https://review.opendev.org/c/openstack/openstack-health/+/793984

Change-Id: Ib6e3ed40dc8b075c3cecb967b7417097e3cab60d
Co-authored-by: Ghanshyam Mann <gmann@ghanshyammann.com>
2021-06-28 12:26:19 +00:00
Erik Olof Gunnar Andersson fd79dd4fa6 Switch to uwsgi and enable named uri
This patch brings Magnum in line with other services
by using uwsgi for the api service and replaces the use
of a custom api port with /container-infra.

- Switch to using uwsgi for functional tests.
- Use /container-infra instead of a custom api port.

Change-Id: Iab5b23b3874a46ccb5c942e64dc167258712bd31
2021-02-03 17:30:40 +00:00
Spyros Trigazis bc051d522f CI: Install debianutils and vim
Both required for:
baf0392007/cmd2/utils.py (L201)

Change-Id: I2028a23678bf6ff7fa7a33a60317c5cbd8576b3b
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2020-11-27 12:45:59 +00:00
Bharat Kunwar 9fedb8fe43 [ci] Use Fedora CoreOS image for devstack plugin
Story: 2007561
Task: 39478

Depends-on: https://review.opendev.org/#/c/721213/

Change-Id: I05caa60fd0180e20003f876fd439b6f421e50ff3
2020-04-21 19:52:14 +00:00
Ian Wienand 41768e0ae1 Remove --os-url usage
The token end-point --os-url argument was removed in openstackclient
with I1b9fbb96e447889a41b705324725a2ffc8ecfd9f.

The plugin should be running as admin, I think we can remove all the
authentication arguments and just let it do it's thing.

Change-Id: I9b1dbc541c9fd6c0e3a894dd3a5dd9f2011f1e2a
2019-09-20 11:15:03 +10:00
Feilong Wang 703de97cd4 Using Fedora Atomic 29 as default image
Fedora Atomic 27 has end of life for a while, it's time to replace it
with Fedora Atomic 29 now.

Task: 36356
Story: 2006441

Change-Id: Iab131745854b0b908be17bd17c7510cd54dde1f5
2019-08-24 09:37:35 +12:00
Feilong Wang d8df9d0c36 [fedora-atomic][k8s] Support default Keystone auth policy file
With the new config option `keystone_auth_default_policy`, cloud admin
can set a default keystone auth policy for k8s cluster when the
keystone auth is enabled. As a result, user can use their current
keystone user to access k8s cluster as long as they're assigned
correct roles, and they will get the pre-defined permissions
set by the cloud provider.

The default policy now is based on the v2 format recently introduced
in k8s-keystone-auth which is getting more useful now. For example,
in v1 it doesn't support a policy for user to access resources from
all namespaces but kube-system, but v2 can do that.

NOTE: Now we're using openstackmagnum dockerhub repo until CPO
team fixing their image release issue.

Task: 30069
Story: 1755770

Change-Id: I2425e957bd99edc92482b6f11ca0b1f91fe59ff6
2019-06-11 11:57:15 +12:00
Erik Olof Gunnar Andersson ba1ca0e499 Removed admin_* from devstack config
The admin_* variables are a relic of the Keystone V2 api and
should no longer be used at all.

It's important to keep the devstack config clean, as it is often
used as a reference for configuring services.

* Removed deprecated admin_user, admin_password and admin_tenant.

Story: 2004272
Task: 27821

Change-Id: I132e670f446e5172dc4f1847be7779645060ca4d
2018-12-20 04:00:07 +00: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
Zuul b0e114d9d5 Merge "Add support for www_authentication_uri" 2018-11-08 11:52:33 +00:00
Erik Olof Gunnar Andersson daa7d04951 Cleaned up devstack logging
Switch to systemd logging to take advantage of some of the newer
logging features.

Story: 2004272
Task: 27820

Change-Id: I475bf26e24b3a725f68c7da355807374bf1e189b
2018-11-06 17:16:28 +00:00
Erik Olof Gunnar Andersson 718cb9c9b4 Add support for www_authentication_uri
We do currently not support www_authentication_uri at all, which
is the new standard, as auth_uri has long been deprecated.

* Make sure we support both auth_uri and www_authenticate_uri.
* Switched to www_authenticate_uri for devstack.
* Fixed a bug where a bad exception would be thrown if auth_uri
  was not set.
  
Story: 2004271
Task: 27819

Change-Id: Ibc932d35f3d6ba2ac7ffb6193aa37bd4a3d4422e
2018-11-06 17:13:10 +00:00
Erik Olof Gunnar Andersson 423d186312 Fixing gate failing due to bad AMQP virtual_host
We are currently hitting this error with the gate.
> NOT_ALLOWED - access to vhost 'None' refused for user 'stackrabbit'

This patch fixes this by using the inbuilt devstack construct
to create an appropriate transport_url.

Change-Id: I9aae96094b7bd8bc148ae3e42c118ba160eff8ae
2018-10-16 01:35:40 +00:00
Kirsten G d9e590bdc6 Cache barbican certs for periodic tasks
Added configuration parameter, temp_cache_dir, to magnum.conf with
default value of "/var/lib/magnum/certificate-cache". This local
directory will hold cached cluster TLS credentials that are generated
during periodic tasks, to reduce load as the number of clusters
increases. If the temp_cache_dir does not exist, the certificates
will be created as tempfiles.

Closes-Bug: #1659545

Change-Id: I8808c4098a7c8d22dbfc841142c9f9c8b976dde1
2018-04-03 06:15:58 +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 e644a20e81 Merge "Add send_cluster_metrics configuration parameter" 2018-02-07 14:54:33 +00:00
Kirsten G cf84683940 Add send_cluster_metrics configuration parameter
Added configuration parameter, send_cluster_metrics, to magnum.conf
with default value of True. If set to True, periodic tasks will pull
COE data and send to ceilometer. This parameter can be set to False to
disable periodic collection of data to avoid unnecessary load from the
cluster.

Closes-Bug: #1668330
Related-Bug: #1746510

Change-Id: I9945293e7b2b52731f6e220d0925c1f6ad097caa
2018-02-01 10:34:54 -08:00
Zuul 029242656d Merge "ci: Add redirection from /v2 to /identity/v2" 2018-01-31 13:50:32 +00:00
Spyros Trigazis 674b90548d ci: Add redirection from /v2 to /identity/v2
Until [1] is in kubernetes we need to redirect from /v2 to
/identity/v2 for the cloud provider to work.

[1] https://github.com/gophercloud/gophercloud/pull/423

Change-Id: I5206e75e9528ceb8428c70df67e6ba26d01c4772
2018-01-19 11:21:01 +05:30
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
chenlx c609524627 Fix: magnum devstack installation with tls-proxy
Fix wrongly used start_tls_proxy function and correctly set api port
when tls-proxy is enabled.

Also remove start_tls_proxy for ec2 which is not required.

Co-Authored-By: yatin <ykarel@redhat.com>
Change-Id: I71b85b5cb018dd790e13aaa1eeefcbb8ac0b3b85
Closes-Bug: #1727613
2017-11-14 10:49:37 +05:30
Hieu LE c77e0c709a Register default magnum service and stat policies in code
This commit uses the existing policy-in-code module to move all
default policies for magnum service and stat into code. This commit
also adds helpful documentation about each API those policies protect,
which will be generated in sample policy files and completely remove
usage of policy.json file.

Co-authored-By: Dai Dang-Van <daidv@vn.fujitsu.com>
Implements: blueprint policy-in-code

Change-Id: I01a8ce964bf8bd569d4aa4e899cbcd9855281835
2017-10-23 02:57:29 +00:00
rajat29 74677ad41a Remove SCREEN_LOGDIR from devstack setting
Screen support has been completely removed from devstack.
So we don't need anymore

Change-Id: I7d8b98926e0dae324995db1651d7c5344c275626
2017-09-21 11:03:33 +05:30
Spyros Trigazis 4fb91cc109 tests: Use swarm-mode for api tests
* Swarm-mode is the fastest cluster to deploy since it doesn't
  require to pull anything from outside.
* Add the output nodes for swarm-mode too.
* Disable copy logs (I think a better practice is to copy logs
  on demand).
* Don't run test_create_list_sign_delete_clusters, because it is
  very unstable on the CI.

Partially-Implements: blueprint swarm-mode-support

2nd commit message:

Update to Fedora Atomic 26

This patch moves the current master to test against Fedora Atomic 26,
in addition, it switches to downloading from Fedora mirrors.

2nd-Change-Id: I9a97c0eb78b2c9d10e8be1501babb19e73ee70c1

3rd commit message:

Set default iptables FORWARD policy to ACCEPT

With the release of Docker 1.13 which is available in Fedora
Atomic 26, it no longer sets the policy of the FORWARD chain
to ACCEPT[1].  Therefore, CNI networking such as Flannel will
cease to work.

This patch sets the policy to ACCEPT so that traffic can work
once again for deployments which are based on Docker versions
which are newer than 1.13

[1]: https://github.com/moby/moby/pull/28257

3rd-Change-Id: I1457602748619f38f87542fc01a2996ee80e58b7
Closes-Bug: #1708454

Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
Change-Id: I86d4dcc94fff622be4ee2acc8dd60ed81bc5d433
2017-08-21 05:30:09 +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
Jenkins 8ac9ce828a Merge "Ignore: Try pxe_ipmitool since vbmc is used" 2017-05-20 19:20:35 +00:00
yatin ecded75c32 Ignore: Try pxe_ipmitool since vbmc is used
k8s-ironic jobs are failing since long, pxe_ssh is deprecated,
so try pxe_ipmitool.

Change-Id: I48ba8ba4d10a616eb7b482e48ed4a83c3d0acf09
2017-05-19 17:15:17 +05:30
jinzhenguo dc6c91f00a fix the devstack_neutron's url
Change-Id: I860fa31f91351d7dfa37d9b31a342672faaa13c9
2017-05-19 16:43:52 +08:00
Kevin Lefevre 4c241a683f Enable custom keystone endpoint_type in templates
Allow to specify a custom AUTH_URL for the templates in case instances
cannot reach internalURL which is the case in mose deployment.

A new variable in trust section: trustee_keystone_interface which
default to public is introduced.

Change-Id: I2a908c0752387e4ff4ad2b0fdf0c1025a73ce806
Closes-Bug: #1643197
2017-05-01 18:15:58 +02:00
yatin 530d225fcd Fix keystone auth_uri and auth_url
Post [1] we cannot use auth_uri/auth_url containing :5000, :35357.

Update keystone auth_uri and auth_url in magnum.conf to connect
with keystone using /identity/v3 and /identity_admin/v3.

[1] https://review.openstack.org/#/c/456344/

Change-Id: I5d69e7454cf8a5e8c92ff23b6c932184d82e8a98

devstack: Allow access to ports 80 and 443

So far, we were allowing access to port 5000 for keystone.
When devstack siwtched to uwsgi we couldn't access keystone
anymore.

Co-Authored-By: Spyros Trigazis <strigazi@gmail.com>
Change-Id: I4d3d482889fd9f6119ceec81757abac9d1251a97
2017-04-27 04:22:55 +00:00
trilliams 3a9e8cfb40 Glance v1 is deprecated and removed in devstack [1]
With this patch we will use glance v2 api's for interacting
with glance.

[1] I7f962a07317cdad917ee896d79e49ee18938d074

Closes-Bug: 1672535

Change-Id: Iedc25b55ad2751e14d3794b1cb80f724f1a735c4
2017-03-14 16:51:08 +05:30
Johannes Grassler e93d82e8b3 Fix CVE-2016-7404
This commit addresses multiple potential vulnerabilities in
Magnum. It makes the following changes:

* Permissions for /etc/sysconfig/heat-params inside Magnum
  created instances are tightened to 0600 (used to be 0755).
* Certificate retrieval is modified to work without the need
  for a Keystone trust.
* The cluster's Keystone trust id is only passed into
  instances for clusters where that is actually needed. This
  prevents the trustee user from consuming the trust in cases
  where it is not needed.
* The configuration setting trust/cluster_user_trust (False by
  default) is introduced. It needs to be explicitely enabled
  by the cloud operator to allow clusters that need the
  trust_id to be passed into instances to work. Without this
  setting, attempts to create such clusters will fail.

Please note, that none of these changes apply to existing
clusters. They will have to be deleted and rebuilt to benefit
from these changes.

Change-Id: I643d408cde0d6e30812cf6429fb7118184793400
2017-02-09 16:44:27 +01:00
yatin 7e59f53b59 [devstack] Copy bash_completion script during magnum installation
Copy magnum.bash_completion script to /etc/bash_completion.d
so that users/developers can take advantage of auto completion
of magnum commands.

Change-Id: I8d0ba953e7eb963be1d9e459c4015e882231e2c8
Closes-Bug: #1657004
2017-01-17 11:38:39 +05:30
Jenkins f04c3ff657 Merge "Revert "devstack: Fix neutron configuration to run in OSIC"" 2016-12-16 17:56:06 +00:00
Monty Taylor ff6514f5bc
Disable horizon, ceilomter and swift in gate hook
If the services are disabled in the devstack/settings file, it disables
them for everyone who uses the magnum devstack plugin. Some people (like
shade) use both magnum and swift to test things. Putting this in the
gate hook means it's used in all of magnum's jobs, but not in other
people's jobs.

Change-Id: Icd82a4ab68533f39f967575c2125b0f61c70e0a6
2016-12-09 13:44:27 -06:00
Spyros Trigazis 67d71104bb Disable horizon, swift and ceilometer
Swift Ceilometer and horizon are not used. Disabling them
it will give us space.

Cleanup disabling of octavia and neutron/lbaas.

Closes-Bug: #1646870
Closes-Bug: #1648148
Change-Id: I4b177421f0eb0a058b8927b9d2dd12865d3c920e
2016-12-07 17:36:12 +01:00
yatin 9335b17c72 Remove KEYSTONE_CATALOG_BACKEND from magnum plugin
Devstack has removed KEYSTONE_CATALOG_BACKEND from it's
repo: https://review.openstack.org/#/c/391380

Due to above change gate tests are failing, we should
remove it from magnum plugin as well. Refer below for
it's deprecation and removal:-
http://lists.openstack.org/pipermail/openstack-dev/2016-February/086272.html

Change-Id: I9ad6e0577918e811e9dd051b56aa69bfe2c391a0
Closes-Bug: #1644085
2016-11-23 10:54:41 +05:30
yatin 821bacc4a7 Revert "devstack: Fix neutron configuration to run in OSIC"
This reverts commit 45f071e36e.

The Temporary fix can be reverted as devstack has released
the fix in following patch:-
https://review.openstack.org/398012

Change-Id: I837f4925cf4c797bd1b02a7bf244ca5742159971
Closes-Bug: #1628267
Closes-Bug: #1629133
2016-11-22 08:40:21 +05:30