Commit Graph

80 Commits

Author SHA1 Message Date
Ghanshyam Mann c49552281f Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: I235b08d63bab01a94a41b29b40724f05c88a534f
2024-02-24 11:44:21 -08:00
Sandeep Yadav e6e56756f4 Expand /dev/sda4 if present
In the latest rhel9 image we have /dev/sda4, expand this
partition if exists.

Related-Bug: rhbz#2094257
Change-Id: Iecd11806d95ae73629a5116ef95835c24b7edc90
2022-06-07 15:27:51 +05:30
Ronelle Landy 9756e67765 Default whole_disk_images in tripleo-quickstart
whole_disk_images is defaulted in t-q-e
extras-common role however the libvirt role
as kicked in ci.centos jobs requires a default
in tripleo-quickstart.

Change-Id: I0d1e8fcb4df8559bd65ff0da88920bc0d07c143d
Closes-Bug: #1944775
2021-09-24 15:12:50 +05:30
Steve Baker 9308ca96c1 Refactor inject_images for whole disk images
When whole_disk_images is true, inject_images will contain 3 items
instead of 5. This kind of conditional value cannot be set in a
variables yaml file. This change moves inject_images to a set_fact in
the undercloud setup role.

It is still possible to disable image injection by setting variable
inject_images: []. This change also includes preparation so that any
master job can be switched to using whole-disk images by setting
whole_disk_images: true. This will be set in the next change in this
series.

Change-Id: I0bd84eaa74a05d361f66f2854547f434dfb5f931
Blueprint: whole-disk-default
2021-09-17 10:12:52 +12:00
Steve Baker e401b6bc9c Do not hard-code overcloud-full image name
The var overcloud_image defaults to overcloud-full, and will until the
switchover to the whole-disk overcloud.

Change-Id: I8037e8140e36ed0cd56e1654c4a8269dfbd4b5d1
Blueprint: whole-disk-default
2021-09-14 11:43:29 +00:00
Ronelle Landy 2b9bf6057f Allow resize for RHEL images with /dev/sda3 partition
Previously, only two partion options were dealt with:
/dev/sda and /dev/sda1.
This review adds the option for there to be
multiple partitions where the /dev/sda3 partition
needs to be resized.

This review also brings down the nmcli brovc
connection if it exists.

Change-Id: Iaede16e5a5099ffb95b9508fbfca6efb1c236537
2020-06-11 14:53:11 +00:00
Wes Hayutin 2de166c485 remove code block for ansible < 2.3
Old code, no need to support versions of
ansible under 2.3

Closed-Bug: #1860700
Change-Id: I26f65175b5013e8671a7c8e45389c8a82b668945
2020-01-23 10:37:16 -07:00
zhulingjie 8784f02be1 Make the playbook's yaml file start with "---"
Change-Id: Ib70d54d73ca3a2d39179aed4e1bc7d8ad553c4a5
2019-07-14 21:11:50 +08:00
Ronelle Landy 8c24a8c5b3 Add baseos settings for undercloud baseos testing
Baremetal deployments use a virt undercloud.
Baremetal deployments should follow OVB deployments
closely, as such, usea  baseos image for the
undercloud vm.

Change-Id: I324780334a6d4fab2234304dfc5e4f65b290622e
2019-05-10 16:21:42 -04:00
Sorin Sbarnea 3d02514778 Lint fixes for playbooks and roles
This normalizes the formatting of files from playbooks and roles
folders in order to allow further hardening of linting.

Fixing linting was too big to be made in a single commit as it would
involve too many files to review and could merge conflicts with
existing changes. Thus doing it in few chunks would makes it possible.

Original full change is at https://review.openstack.org/#/c/627545/ and
will be the one merging the last.

Change-Id: I73abb9ea78b8bea8d73eb95c52daacdb45f407b8
2019-01-08 15:27:54 +00:00
Natal Ngétal 8fc03e31a9 [Configuration] Remove mitaka file.
Remove the mitaka configuration file to fix 404 links. The mitaka
release is no longer supported by the community.

Change-Id: I5c7995afe49fd1f7d66b8df6790c8f5917220b7d
Closes-Bug: #1722602
2018-12-27 10:43:34 +01:00
Zuul 4dec5dc10f Merge "enable ansible-lint as pre-commit hook" 2018-12-20 05:24:55 +00:00
Natal Ngétal 5d513aa3f5 [Configuration] Remove liberty files.
Remove the liberty configuration. The liberty release is no longer
supported by the community.

Change-Id: Iea3faf0e048ec1ef7b6e0b963659c2ad6bb8d582
Closes-Bug: #1722602
2018-11-22 12:07:00 +01:00
Zuul 9b628f4438 Merge "Fix runtime Ansible warnings" 2018-11-10 04:16:10 +00:00
Wes Hayutin 3dd6587e57 standalone support for quickstart on libvirt
This patch adds the settings required to run the standalone tripleo
deployment on libvirt nodes in ci.centos.

This enables both centos7 and fedora28 based nodes.

For backwards compatibility reasons "standalone" points to centos7 and
standalone3 points to fedora28 (which will probably be replaced by
centos 8 once available).

Related-Bug: #1788270
Story: https://tree.taiga.io/project/tripleo-ci-board/task/149
Change-Id: I245f9341de8f4b9d2ac974d4757e811d17028886
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
Co-Authored-By: Sorin Sbarnea <ssbarnea@redhat.com>
Depends-On: https://review.openstack.org/#/c/610491/
2018-11-07 15:20:39 +00:00
Sorin Sbarnea 681ff01f8b enable ansible-lint as pre-commit hook
Enable auto linting on commit, for developers
that have pre-commit installed (pip install pre-commit)

Execution is extreamly fast (1-2s) due to caching and
because on commit only modified files are checked.

ci-scripts/ansible-lint.sh is now obsolete and removed,
as the same functionality is done via pre-commit.

Partial-Bug: #1786286
Change-Id: I6854145c71fd817d940c4b49b60b0853b2280cf0
2018-10-29 15:46:11 +00:00
Sorin Sbarnea 77406e3466 Fix runtime Ansible warnings
- deprecation of "static", using 'import_tasks' for static inclusions
or 'include_tasks' for dynamic inclusions.

- setup without value (ansbile yaml schema error)

Depends-On: https://review.openstack.org/611844
Change-Id: Idf2b3ec27d5c58d656b07a8b1274131281b7392c
2018-10-29 15:39:59 +00:00
Sorin Sbarnea 62e2164f86 include error info on resize failures
Adds two variables that enable more information
on resize failures as the default failure errors
are totally opaque and do give zero information
about failure reason.

virt-resize: error: libguestfs error: /usr/bin/supermin5 exited with error
status 1.
To see full error messages you may need to enable debugging.
Do:
  export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again.  For further information, read:
  http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You can also run 'libguestfs-test-tool' and post the *complete* output
into a bug report or message to the libguestfs mailing list.

If reporting bugs, run virt-resize with debugging enabled and include the
complete output:

  virt-resize -v -x [...]

Change-Id: I87ceb53f8ef8dfaa4e2696a346eecde468490886
2018-08-24 06:51:36 +00:00
Zuul 53596237ae Merge "Use sudo when working with root home as non root" 2018-08-22 02:15:13 +00:00
Zuul 563beae652 Merge "Fix Ansible Using tests as filters is deprecated" 2018-08-20 22:11:56 +00:00
Bogdan Dobrelya 0a3a909ca5 Use sudo when working with root home as non root
Change-Id: Idf3b739faf4cbe66a5bd1eb21d9cb538615f6688
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2018-08-17 18:49:34 +02:00
Sorin Sbarnea 328fb437b1
Fix Ansible Using tests as filters is deprecated
Avoids deprecation warnings like below by adopting recommended syntax.

[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of
using `result|failed` instead use `result is failed`. This feature will
be removed in version 2.9. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.

Change-Id: I84a630415d5aee653e07de0da9321f2fa59eee24
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2018-07-17 14:55:57 +01:00
yatin 3344423316 Use undercloud kernel when not overcloud_as_undercloud
Review [1] switched to virt-copy-out to get the overcloud
kernel and initramfs from the undercloud image. But in
case where overcloud_as_undercloud=false, running undercloud
with these old kernel and initramfs can create issues.
This patch will get the latest kernel from undercloud.qcow2
using virt-get-kernel and use those while running undercloud
vm.

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

Change-Id: I39b86887b58036462f805e22842ec585534cadfa
2018-07-13 14:44:44 +05:30
Sagi Shnaidman 7ad1921581 Don't trigger repo injection if nothing was built
Currently we have a few possible places for building package in
the job. It requires logic change in order to differentiate
between injection cases.
build-test-packages role can run and not to build anything bc of
various reasons, in this case we need to avoid running
install-built-repo role, that's why we set compressed_gating_repo
to empty string and check in every case if it's empty or not.
If compressed_gating_repo is emptry - we didn't built *last* time
anything, so nothing should run.
See also: https://review.openstack.org/#/c/576277/1

Change-Id: I7d768c5b550984cdd45d8a9cbbf89767e5e1c418
2018-07-05 21:49:31 +00:00
Martin André feb71c7685 Fix ansible warning with jinja2 delimiters
Ansible starting with version 2.3 warns about jinja2 delimiters used in
'when' statements:

  [WARNING]: when statements should not include jinja2 templating
  delimiters such as {{ }} or {% %}

Change-Id: Idccda187671a0454157b831fc7c6b0eadde173c9
2018-01-18 10:21:44 +01:00
Attila Darazs 7d32b55df7 Use cachable facts to allow multiple runs
* add "cachable: true" to every set_fact invocation to include them in
  the cached facts; most of these are not necessary as they are not used
  outside the roles, but it would be difficult to guess which ones are
  really necessary, so using the shotgun approach to avoid days or weeks
  of debugging
* disable the expiration of facts so that we can rely on them being
  there even if days pass between the reruns
* move the fact cache into the virtual environment directory (this is
  usually the local_working_dir if quickstart.sh is used to set things
  up); there can be some issues when no clean virtenv is created for new
  deployments and resulting in using stale facts

Change-Id: I987d51cc252b7ebc3972d60497234fa676864882
2017-12-05 15:22:11 +01:00
Zuul 1cfa0a1292 Merge "Make provision/remote role safe to include statically" 2017-12-01 08:15:00 +00:00
Bernard Cafarelli a7116ed3b5
Fix ssh tunnel systemd unit file permissions
File should not be marked as executable, as reported by journald:
systemd[1]: Configuration file /etc/systemd/system/ssh-tunnel.service is
marked executable. Please remove executable permission bits. Proceeding
anyway.

Change-Id: I779bbc2fb3b11fd7d8d1201a61e92543226fae57
2017-11-13 12:04:31 +01:00
John Trowbridge 6eefa304ad Make provision/remote role safe to include statically
Currently including the provision/remote role without intending to
actually use it will break if the {{ virt_host_key }}.pub file does
not exist.

Ideally, we would be able to include it dynamically so that the
tasks are not evaluated at compile time, but instead only if they
are run. This would require a pretty large refactor though, because
playbooks can not be included dynamically.

Instead, we can make sure to have a default for the lookup so that
it will not fail to evaluate. The task would still fail to run if
the lookup falls back to the default, so we wont hide issues with
the key not existing with this change.

Change-Id: I347de079ada7c7b82f2f7affafa97f95c8029a3f
2017-10-24 10:14:49 +00:00
Jenkins 3c2b0dd274 Merge "Handle undercloud autostart dependant on ansible version" 2017-09-21 10:55:24 +00:00
John Trowbridge 659eb4a0a1 Default update_images to false
When removing the hardcoded repo setup from devmode, we actually
changed the behavior of when we run repo setup on the overcloud
images.

Instead, we should keep the behavior the same as before. Rather than
adding "update_images: true" to all tripleo-ci configs, we just make
the behavior trigger on either devmode or update_images vars.

Change-Id: Ic08cad28d3f6d33c3aaa35903f8013f49886712b
2017-09-05 11:41:00 -04:00
John Trowbridge aaf88f4c00 Use repo-setup when injecting repos
We still have one-off code from when we first implemented
devmode in the task that injects repos into downloaded images.

This code works only for the master-tripleo-ci release we use
for gating. In order to allow using other releases (like
master-consistent for promote), we need to instead use the
generic repo-setup role.

Closes-Bug: 1674799
Change-Id: Id7f22e5e386df0b80f1a4abd104e644f47bd14d3
2017-08-24 20:46:21 +00:00
Juan Badia Payno 45e0321641 Handle undercloud autostart dependant on ansible version
On ansible version lower than 2.3:
 1.- Start undercloud vm
 2.- Make the vm automatically start

On ansible version equal or grater than 2.3:
 1.- Start the undercloud vm and make it automatically start

Change-Id: I57168f15d63f638bd0217955a3a3c245a986c541
Closes-bug: #1689620
2017-08-21 19:21:43 +02:00
Michael Chapman 326851695b qemu://system fixes
When a libvirt uri of qemu:///system is used, the root user must
be used to control power on VMs, since they are launched with
privilege. Adding the virt power key to root's authorized keys
gives the vbmc the ability to interact with privileged vms.

In addition, libguestfs requires the direct flag in order to
function when the root user is used (ssh_user: root).

Change-Id: If13befee037c76af896b14b7a085910c3d917bbe
2017-07-27 13:08:06 +00:00
Jason E. Rist 85800d0f9e Add ironic-inspector to iptables and ssh-tunnel for the UI
Change-Id: I64d996c36da7dc1f4b50534d1043bb6cb8fb1bdc
2017-06-26 21:15:52 -06:00
Christian Schwede f1178da112 Fix iptables chain name used for UI forwarding
The chain IN_public_allow does not exist, which breaks the undercloud
deployment. Therefore changing it to the default INPUT chain, and doing
an insert to make sure the rules are executed before a final DROP/REJECT
rule on systems running firewalld.

Closes-Bug: 1699453
Change-Id: I32ce9ab5d7d8a4aa113d5f4f9ad95ea76ea8fc61
2017-06-21 13:44:39 +02:00
Honza Pokorny 1071bf4066 Add ssh tunneling for TripleO-UI
Add a systemd service that tunnels traffic between the virthost and the
undercloud.  We forward ports for the UI itself, and a few other Openstack
services, like Keystone, Heat, Mistral, etc.

This requires a change that sets up the tripleo-ui javascript
config with the proper settings and restarts the httpd service
https://gist.github.com/weshayutin/0af348fafd70cb56c96d6856f073d79b
Completed this change in Ie9d3e7d12c420b9b65c25692435c0457f1233a27

Access to the TripleO-UI is available from http://virthost:3000

Author:    Honza Pokorny <honza@redhat.com>
Co-Authored-By: Wes Hayutin <weshayutin@gmail.com>

Change-Id: Id53c5bd7f199c64bc9cb37df7e63f27c4673f415
2017-06-20 16:48:28 -04:00
Attila Darazs 0f178ea13a Revert "Bump Ansible to 2.3"
Ansible 2.3 brings a couple of subtle errors that we did not anticipate
and we did not have the proper gating in place for it. We will try this
again later.

This reverts commit bd02c88e16.

Change-Id: Id931a9c6e26261706aa1a6107f63ddb7fe1d5484
2017-06-02 16:54:22 +02:00
John Trowbridge bd02c88e16 Bump Ansible to 2.3
List of changes needed by Ansible 2.3 release:

[virt.py module]:
- Since 2.3, autostart is now an indempotent VM attribute instead of a non
  indempotent forced autostart attribute set to True [1].
- We are now able to start the undercloud VM and configure it to be
  autostarted at virthost boot in one task instead of two.

[1] - 792efbe3b6

Change-Id: I096fb70faf0ec429e17047455bef9352d7995f34
2017-05-31 07:41:13 +00:00
Jenkins b553b7d0d9 Merge "Use dynamic include for conditional/tagged tasks" 2017-05-22 10:44:49 +00:00
Harry Rybacki 7d27a6ad72 Cleanup block level environment vars
As noted in another review[1], environment vars used in tasks may be
raised to the block level to avoid repetition and code clutter.
[1]- https://review.openstack.org/#/c/436198/

Change-Id: Ie80cb9eb612e634232f978fe58aaee447771f0f5
2017-05-17 12:06:41 -04:00
Bogdan Dobrelya cb640cbe1d Use dynamic include for conditional/tagged tasks
Ansible 2.1 tries to predict static/dynamic cases for
include. It sometimes fails to do so for tagged or conditional
include commands. This makes all included tags/tasks to be played,
but skipped anyway, even though it was asked to be omitted.

Help ansible to predict dynamic cases by explicit 'static: no'
directives put for 'when:/tags:' include commands. This speeds up
deployment a lot.

Change-Id: I3daf21e45223c5165abee74e92e1395dee5f6fe9
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2017-05-12 17:02:34 +02:00
Bogdan Dobrelya 0960fbaa28 Control injection of instackenv.json
Allow users to control if instackenv.json must be injected
for undercloud image or omitted. The latter may be the case
when installing only a virtual undercloud node w/o overcloud
nodes at all.

Related-bug: #1676373

Change-Id: Iac245daceab01302e7e4cb75458901a0c0af47df
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2017-04-26 16:49:16 +02:00
Jenkins be4e973a2c Merge "Instack.json for undercloud VM image" 2017-04-25 13:35:40 +00:00
Jenkins 1b22181187 Merge "Allow custom undercloud initrd/vmlinuz" 2017-04-25 13:35:28 +00:00
Jenkins 2f3c9bb11f Merge "Allow permissive access to non_root_user files" 2017-04-20 15:16:57 +00:00
Bogdan Dobrelya 34bd210a55 Instack.json for undercloud VM image
Do not try to copy the instackenv.json configuration
file to the undercloud VM image, if it wasn't generated
in the overcloud setup role.

This may be the case if there are no overcloud nodes
defined and the overcloud setup role is missing in
the play, f.e. the containerized undercloud use case.

Partial-bug: #1676373
Change-Id: I7a5a564aacdfa2153ad727baf0b5259cb723ec69
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2017-04-13 08:51:27 +00:00
Bogdan Dobrelya fdb2d5f142 Allow custom undercloud initrd/vmlinuz
Preserve default behavior, which is extract
those from the overcloud image.

The example use case is when running oooq from
a priv container. Like running in Centos container
on the Ubuntu virthost. The virt-copy-out may be
working fine on the host OS and failing within the
container with an error like:
"'/dev/urandom' is not a supported random source".
So those images may be prepared as well at the host
OS and reused as external ones.

Partial-bug: #1676373
Change-Id: I19db238b4966a59675e42983daccffe3c437019c
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2017-04-13 08:51:01 +00:00
Jenkins c43000fc7b Merge "Revert "Generate/inject instack.json if overcloud nodes"" 2017-04-04 11:36:57 +00:00
Ronelle Landy f6076f68ee Revert "Generate/inject instack.json if overcloud nodes"
This reverts commit 8d4c77328e.

The original commit breaks baremetal deployments using virt undercloud.
The instackenv.json is needed when overcloud_nodes is empty in the
baremetal case.

Change-Id: I50a5a7ccbacec3f9e0ae2ec00010e82626a60ab7
2017-04-04 09:19:01 +00:00