145 Commits

Author SHA1 Message Date
Davlet Panech
dfada74522 Fix zuul errors
Use common {linters,pylint} jobs from starlingx/zuul-jobs.

Add unique prefix to local jobs.

Story: 2011326
Task: 51547

Depends-On: https://review.opendev.org/c/starlingx/zuul-jobs/+/939669
Change-Id: Ic087c911fcd161f73784c6bed724631bee7744a0
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
vf/stx.trixie vf/trixie vf/portable-dc
2025-01-21 12:53:04 -05:00
Leonardo Fagundes Luz Serrano
77c6d3109b Tox: Remove upper bound on hacking version
This change is required in order to support
testing on python 3.12

Test Plan:
pass - Run tox -eflake8 in a ubuntu:noble
       container

Change-Id: I427a7cab6c67905e0496cbbe07d4367d080dfb58
Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
vr/stx.10.0
2024-11-12 18:36:32 -03:00
Scott Little
c169d68dbe cengn reference removal
mirror.starlingx.cengn.ca no longer exists. CENGN is kindly forwarding
requests to the new location mirror.starlingx.windriver.com for now, but
that will only last a few months. We need to replace all the references
with the new URL.

I will also remove as many 'cengn' references as possible, replacing
them with 'stx_mirror'

Partial-Bug: 2033555

Change-Id: Ib6c89b3ac7f00fefad27bbd1b218804d493d4afc
Signed-off-by: Scott Little <scott.little@windriver.com>
vf/caracal
2024-04-05 16:52:09 -04:00
Zuul
51645b5822 Merge "Implement workers configuration" vf/kernel-6.6 vf/bookworm vr/stx.9.0 2024-01-22 13:24:07 +00:00
Daniel Caires
5663c2cef1 Implement workers configuration
Implementation of the configuration of the workers nodes
for the STANDARD installation.

Test Case:
PASS - Workers are being properly configured
PASS - host_bulk_add file is being correctly generated

Story: 2005051
Task: 49183
Task: 49184

Change-Id: I46368655616a727f3900c4eb0b107ef79387d133
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-12-21 09:33:04 -03:00
Zuul
5e6e047ed1 Merge "Implment controller storage config" 2023-12-15 19:31:08 +00:00
Michel Thebeau
3eb7e6467e libvirt: include worker nodes in duplex configuration
Duplex configuration may include worker nodes, as described in
"Deployment Configurations" page of Starlingx docs.  Allow the
setup_configuration.sh and destroy_configuration.sh to include worker
nodes.

Test Plan:
PASS  setup/destroy configurations

Story: 2010816
Task: 49219

Change-Id: I276002255f42ca68228d179777e717fc84ea2e9a
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2023-12-07 10:40:14 -05:00
Michel Thebeau
4079553a32 libvirt: improve error msg for host key value
The error message is unclear, omitting the key for the data in host
definition.

Test Plan:
PASS  regresion
PASS  unit test of code path

Story: 2010816
Task: 48636

Change-Id: I90ca410c252f9ce14b8dd4c13affb592eac88d85
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2023-12-07 10:32:56 -05:00
Michel Thebeau
286f233a4b libvirt: move yaml files to a yaml subdirectory
The libvirt/ directory is a bit cluttered.  Move yaml files to a
subdirectory.

Also update the yaml file permissions to be not executable.

Test plan:
PASS: regression of default and madcloud examples
PASS: verify README examples are correct

Story: 2010816
Task: 48617

Change-Id: Iad0cf3bdae31f48c2ee54250a3ab411880bba06f
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2023-12-07 10:32:44 -05:00
Daniel Caires
7074eee6a0 Implment controller storage config
Implementation of the function that configures
the OSDs in controller-0 and controller-1

Test Plan:
PASS - OSDs are configured in both controllers
in the STANDARD installation.

Story: 2005051
Task: 49185

Change-Id: If0c5ef02da705165bc01f7db2236e8bf727eefb8
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-12-06 13:44:26 -03:00
Zuul
778b379768 Merge "Create NatNetwork if it doesn't exists" 2023-11-01 16:41:48 +00:00
Daniel Caires
132113d247 Create NatNetwork if it doesn't exists
Before creating the labs, the code tries
to create the NatNetwork, if it already exists
it skips, if it doesn't it creates the NatNet
using the subnet defined in the localhost.yaml as CIDR.

Test Plan:
PASS: If NatNetwork doesn't exists, it is successfully created
PASS: If NatNetwork exists with different IP for CIDR, installation
is terminated.

Story: 2005051
Task: 48920

Change-Id: I80e361e66c5a936da019aa55ff7aa26643819b6f
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-10-31 09:48:27 -03:00
Daniel Caires
90c8b451d0 Update repo README
Update information about how the VirtualBox script works.

Story: 2005051
Task: 49024

Change-Id: I632d1c1de6dcd8b111e7c6d52ffb4945e5d749be
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-10-30 17:09:37 +00:00
Felipe Freire
71318415e9 Reuse SSH Client
Allow the installer to re-use the paramiko SSH Client instead of creating a new one every time, resulting in slightly lower install time.

Regression: Tested by installing a AIO-SX system, PASS

Story: 2005051
Task: 48502

Change-Id: I1fcb0df2a0a04a2983c7f7f32bf12f3351c0e8d9
Signed-off-by: Felipe Freire <felipe.freire@encora.com>
2023-10-25 10:59:55 -03:00
Bruno Muniz
c827cf81e9 Remove unnecessary files and commands
These files might be helpful for some guide or
instructions, but currently are just serving as
an unnecessary noise in a repo that's already
complicated enough.

The commands removed have to do with the recent
memory allocation analysis (not necessary here
anymore).

Story: 2005051
Task: 48373

Change-Id: Ic710d56d0881b0c08ee81d3642dfb0017a97912c
2023-10-06 20:00:59 +00:00
Zuul
ff18e91f97 Merge "Review LOG levels" 2023-09-27 15:02:08 +00:00
Zuul
9c38c250e7 Merge "Remove username from Parser" 2023-09-27 15:02:07 +00:00
Daniel Caires
b5768ae359 Review LOG levels
Adjust LOG levels throughout the code.

Story: 2005051
Task: 48516

Change-Id: Ie54a0d6a50c373ebc8b1d272aa5b574d5821b399
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-09-25 12:24:55 +00:00
Daniel Caires
fc8508e97a Remove username from Parser
Removal of the --username argument from Parser and
pass V_BOX_OPTIONS.username value in the install_vbox.py

Closes-Bug: 2028861

Change-Id: I68422f5b436ea1d1f75a9272fb0ee3811453e846
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-09-25 09:01:18 -03:00
Zuul
a41fffdefc Merge "Fix worker VMs configurations" 2023-09-21 13:01:13 +00:00
Zuul
f0c9c0dfb6 Merge "Update mirror URL" 2023-09-21 12:52:02 +00:00
Zuul
f57a99f29c Merge "Automatized stx-openstack install for AIO-SX" 2023-09-08 18:08:07 +00:00
Bruno Muniz
0fd3ffeff5 Small parser argument fix
Additional changes were necessary. Now it's possible to use either
-y or --yes-to-all to get a 'y' answers on all yes/no questions.

The result of the parser is explicitly stored on a variable called
'y' on the namespace that the argparse returns.

Task: 48626
Story: 2005051
Change-Id: I4760ea2f1f77bee7c11cf7e0e76ee2566f383b19
2023-09-05 11:51:09 -03:00
Daniel Caires
1523b70ba2 Fix worker VMs configurations
Change throughout the code every mention of
"compute" as a node to "worker".

Test Plan:
PASS: worker nodes are being configurated as expected
PASS: worker nodes are being deleted when portion of
the code is executed

Story: 2005051
Task: 48726

Change-Id: I6dda10c3b188f14e03dba514cb2063c4c7d1dda4
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-09-05 12:45:37 +00:00
Tomás Barros
c56230011f Automatized stx-openstack install for AIO-SX
Users can now install stx-openstack in an automated manner
by using the --openstack-helm-location parameter when running
the script installation, and by increasing the node storage
to at least 360 GB.

Story: 2005051
Task: 48149
Change-Id: I2eade54dca3328fa5fe5282355e9a1b9f33b059f
Signed-off-by: Tomás Barros <tomas.barros@encora.com>
2023-09-04 18:48:05 -03:00
Daniel Caires
6eb3fe0a36 Update mirror URL
Update the ISO download URL in the README file from
mirror.starlingx.cengn.ca to mirror.starlingx.windriver.com
as StarlingX ISO images are no longer hosted in CENGN

Change-Id: I27998624fbafbbbbae961af93c54ef95e52e244c
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-09-04 08:38:48 -03:00
Tomás Barros
0c1a53cebd Small parser argument fix
This review aims to fix a little bug in the
"yes-to-all" argument in the parser file of
the installation script.

Task: 48626
Story: 2005051
Change-Id: Ib3e36a6735ec3a413b27a81c0039f2f03b978f3c
Signed-off-by: Tomás Barros <tomas.barros@encora.com>
2023-08-31 16:02:01 -03:00
Zuul
6fb9a120f3 Merge "Improves compatibility with VirtualBox 7.0" 2023-08-28 14:09:47 +00:00
CaioCorrea
d6d7180e57 Improves compatibility with VirtualBox 7.0
Fixes an issue with overwriting portfowarding rules.
Closes-Bug: 2031930
Task: 48624

Adds a new argument: --y
Automatically answers yes to all prompts improving the autonomy of the installation
Task: 48626

Story: 2005051
Change-Id: I426be7486c59f2163c32227da83924b61e40ea30
2023-08-28 10:40:40 -03:00
Zuul
fa4860c4c6 Merge "Script to show host's and lab's disk usage" 2023-08-25 14:12:21 +00:00
Bailey Henry
364c46f73e Script to show host's and lab's disk usage
Script that assists with supervising host's resources, in this case disk
usage. Lists usage per node and overall usage.

Test plan:
PASS: no tox errors
PASS: information displayed is valid
PASS: does not affect nodes

Story: 2010816
Task: 48637

Change-Id: If874ffc3f02faa26521d305b1b6f5fe62096f06c
Signed-off-by: Bailey Henry <Henry.Bailey@windriver.com>
2023-08-25 13:50:28 +00:00
Michel Thebeau
43de3e6910 libvirt: fix readconfig.sh usage and permissions
readconfig.sh intends to export variables to the current shell, and
should be sourced using the 'source' command.  It is ineffective when
run as a sub-process.

Fix the file permission, since the script should be sourced rather than
executed.

Test Plan:
PASS: regression of default and madcloud examples
PASS: documented usage is effective

Story: 2010816
Task: 48614

Change-Id: I7e35ccf253e27b8209f8bf17dca065c58b016e14
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2023-08-16 09:53:38 -04:00
Michel Thebeau
14279bfcba libvirt: move xml files to an xml subdirectory
The libvirt/ directory is a bit cluttered.  Move xml files to a
subdirectory.

Test plan:
PASS: Regression for default and mad examples
PASS: unit test of the affected replacement values for all
      configurations

Story: 2010816
Task: 48613

Change-Id: I7a8552616cce9ac4639d3c2c67d5a019f7f06bdc
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2023-08-16 09:52:28 -04:00
Michel Thebeau
5f1da7dbdc libvirt: standardize sed replacement strings
The original code inconsistently uses replacement strings either limited
to capital letters or with additional percentage symbols.  The use of
percentage symbols is preferred to mitigate the possibility of
accidental replacements.

Standardize the sed replacement strings to use percentage symbols.

Test plan:
PASS: Regression for default and mad examples
PASS: unit test the replacement values for all configurations

Story: 2010816
Task: 48611

Change-Id: I35959d7ae8cd46e613a1d0b3a1fcb44fc3f0b1d6
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2023-08-16 09:47:31 -04:00
Bailey Henry
2066a90fa5 Libvirt: CPU and Memory value configurable
Add the ability for the user to change how many cores and memory are
allocated per node. Each node may have any number of cores or memory
set, with which their values are used by sourcing the file:
'source readconfig.sh <yaml file>'

Test plan:
PASS: regression tests passed
PASS: sanity tests passed
PASS: no tox, flake8 or pylint errors
PASS: value succesfully set from config file
PASS: defaults used when no config file is sourced

Story: 2010816
Task: 48398
Task: 48586

Change-Id: Ia2f7df44c872fac41ac6376ef3fb00062624ac22
Signed-off-by: Bailey Henry <Henry.Bailey@windriver.com>
2023-08-16 08:54:23 -04:00
Michel Thebeau
8c64195f67 libvirt: update QCOW image detection
The script enforces the kind of file it will delete to prevent
accidents.  Update the detection of QCOW disk images for QCOW2.

On an updated Ubuntu the file type is "QCOW2" instead of "QCOW".

Change-Id: If6ab7113358f96749dadae53b52ae31e8f452777
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2023-08-14 14:18:19 +00:00
Zuul
dcef4d4bf9 Merge "Review lab-setup files" 2023-08-11 13:50:12 +00:00
Roger Ferraz
0389ebc90a Review lab-setup files
The lab-setup files are refactored, as detailed below.
In addition, recovery, administration and logging improvements are
implemented.

The following lab-setup files are removed:

- lab_setup1.sh
- lab_setup2.sh

The corresponding code, previously run locally in the VM, is now
integrated to the main Python code.

The files lab_setup.sh and lab_setup.conf are kept, because they
are useful to populate the stx-openStack application. These should be
reviewed by a new task under the context of stx-openStack.

Test Plan
  - AIO-SX Virtual Deployment (PASS)
  - AIO-DX Virtual Deployment (PASS)

Story: 2005051
Task: 48402

Change-Id: I940e5a16ea98a4325efe1ee0dd45127674d6b192
Signed-off-by: Roger Ferraz <rogerio.ferraz@encora.com>
2023-08-10 11:13:47 -03:00
Bailey Henry
02f67a5746 libvirt: Add override variable for DISK variables
Add an override variable for the DISK file location for each node in a
virtual lab. Introduced the ability to set disk file location for all
nodes in a config file. (was hardcoded to /var/lib/libvirt/images)

This enhancement enables better utilization of the host's disk
resources, allowing for more complex deployments such as
'Distributed Cloud'.

Test plan:
PASS: pylint, flake8, bashate
PASS: Regression for default and madcloud examples
PASS: Able to change what is storage and how many are applied
PASS: Copy default.yaml and modify values of disk directories for nodes
      and compare to default.yaml

Story: 2010816
Task: 48397

Change-Id: If19404ed151739c4abcbd5f2c3b9fb62132ed6fe
Signed-off-by: Bailey Henry <Henry.Bailey@windriver.com>
2023-08-09 12:04:03 -04:00
Zuul
2462c55035 Merge "Change TCP port value" vf/antelope 2023-08-08 14:13:11 +00:00
Daniel Caires
78497262e7 Change TCP port value
TCP port is being uptaded to a value based on the
ssh port of controller-0

Test Plan:
PASS: VMs created with TCP port based on the ssh port
of controller-0

Story: 2005051
Task: 48375

Change-Id: I67d284a4e41a42de641670eb3bc7326bdcc432c9
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-08-04 11:56:30 -03:00
Bailey Henry
2d8e2fbaae libvirt: Yaml validator
Test plan:
    PASS: No pylint errors
    PASS: No pep8 errors
    PASS: All data validation accurate
    PASS: Misc Fixes relating to efficiency

Story: 2010816
Task: 48424

Change-Id: I54b48ca0f05c48989c5ae8fb7d18c7ae12d2faad
Signed-off-by: Bailey Henry <Henry.Bailey@windriver.com>
2023-07-25 14:42:20 +00:00
Michel Thebeau
7ff7e09392 libvirt: add pep8/flake8 to tox job
Using config/sysinv/sysinv/sysinv as example of setup for pep8/flake8.

Fix reported errors for config.py.

Story: 2010816
Task: 48450

Change-Id: Ia0e511fd827b5d697a6b41b7064d13ab64efb779
Signed-off-by: Michel Thebeau <Michel.Thebeau@windriver.com>
2023-07-24 17:15:45 -04:00
Zuul
f5407b51a7 Merge "Changes to make AIO-DX setup work" 2023-07-21 13:08:28 +00:00
Daniel Caires
d3f4d23f59 Changes to make AIO-DX setup work
-Minimal changes so the script works for the
installation of a AIO-DX setup type.
-Addition of a lab_setup2 for the configuration
of the controller-1.
-Change of serial port configuration so VMs can boot
without the need of a socat connection.

Regression: AIO-SX successfully provisioned using
modified code.

Test Plan:
PASS: StarlingX is succesful deployed in a AIO Duplex
configuration.
PASS: Both controllers are set with TCP as Port Mode
in serial ports configuration.

Story: 2005051
Task: 48261
Task: 48275

Change-Id: I5fd5c6d413270867424a30768b0ad7ff91d296b8
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-07-20 14:15:40 -03:00
Zuul
af03b857e1 Merge "Lock Kubernetes Dashboard version to 2.7.0" 2023-07-19 20:05:40 +00:00
Bailey Henry
92d5562f6d libvirt: Add configuration files for mad and default
yaml files for mad and default

Test plan:
    PASS: Create configuration files with all needed data
    PASS: Ensure all data is usable
    PASS: No Pylint/Bashate errors
    PASS: Regression test succeeded

Story: 2010816
Task: 48350

Change-Id: Id7a380a64348501396b139ebb57ff0f42825ffce
Signed-off-by: Bailey Henry <Henry.Bailey@windriver.com>
2023-07-18 14:46:57 +00:00
Michel Thebeau
4eba315b7e add libvirt to tox.ini pylint
Story: 2010816
Task: 48394

Test Plan:
PASS: add errors in libvirt bash and py files and observe tox output

Change-Id: Ie8baba41075360044859dc3c60f44d9411f5cb10
Signed-off-by: Michel Thebeau <Michel.Thebeau@windriver.com>
2023-07-14 17:18:36 -04:00
Bruno Muniz
557b083e09 Lock Kubernetes Dashboard version to 2.7.0
- Lock Kubernetes Dashboard version in automated install
- Lock StarlingX ISO version to download on the README instructions

The new Kubernetes Dashboard version (3.0.0) has a breaking change
which is related to its dependencies of nginx and cert-manager.

This commit locks the Kubernetes Dashboard version to 2.7.0, which
corresponds to the Helm Chart version 6.0.8. There's a new Task,
number 48393, to investigate all the changes necessary to allow a
new version of the Kubernetes Dashboard to be used.

Test Plan:

PASS: Verify end-to-end installation for AIO-SX

Closes-Bug: 2027722
Change-Id: I1330a133f344746b791067b1b12c29029be238f5
Signed-off-by: Bruno Muniz <bruno.muniz@encora.com>
2023-07-14 16:32:05 -03:00
Zuul
84e1231f06 Merge "libvirt: Add DOMAIN_DIRECTORY" 2023-07-14 13:38:33 +00:00