Commit Graph

55 Commits

Author SHA1 Message Date
Davlet Panech 2d8c9bb317 Subdirectory 'deployment' relocated to own repo
Remove "deployment/", which is now in its own repo,
starlingx/virtual-deployment.

Story: 2010807
Task: 48291

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: I267e7b58e8a3b3c69c6a7122dbba5ab314275261
2023-06-29 09:57:12 -04:00
Virginia Martins Perozim 35f4ca8994 Updating breaking config and code for basic setup
This commit brings this script back to life. It does so by changing as little
as possible of the existing code, given how complex the code itself is but also
how complex the StarlingX setup can be.

The current working setup is AIO-SX, the most common setup among developers.

This commit also makes sure that not much of the design is changed because we
might reuse some of it in the subsequent commits (there's already a few changes
being worked on top of this one).

Apart from what's already being worked on, some follow-up commits might address
other installation setups.

The minimal changes were:

- Replacing old username from wrsroot to sysadmin
- Replacing old path from /etc/nova/openrc to /etc/platform/openrc
- Fixing menu_selector according to new options:
  - Selecting Controller Install
  - Selecting All-in-one Install
  - Selecting All-in-one (lowlatency) Install
- Fixing first login to change password
- Fixing lab-setup command to use Ansible's bootstrap playbook
- Adding Ansible 'localhost.yml' config file in 'stage_config_controller'
- Adds a bit of "boy scouting" that will help in a future task of enabling
pylint in /deployment/virtualbox/pybox
- Fixing PATH variables in install_vbox.py
- New separated lab_setup script for configuration of OAM interface extracted
from existing script.

Test Plan:
PASS: script install_vbox.py works for base option (--setup-type AIO-SX)
      with additional options according to new section in README.md

Closes-Bug: 2016035
Story: 2005051
Task: 47914

Change-Id: I77401bced509b547648fba6441ba586c3292251f
Signed-off-by: Virginia Martins Perozim <virginia.perozim@encora.com>
Signed-off-by: Bruno Muniz <bruno.muniz@encora.com>
Signed-off-by: Daniel Marques <daniel.caires@encora.com>
2023-05-23 15:48:15 -03:00
Davlet Panech 2f8f58e041 Fix bashate failure in zuul
Zuul jobs use a recently released version of bashate, which causes tox
errors. This patch fixes the whitespace errors to prevent Zuul jobs from
failing.

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: Icf46eb4cbff7f15392291f06e0628bc7c1798e17
2022-10-07 10:30:33 -04:00
Zuul 14b5dbcd2f Merge "Python-based installer for StarlingX" 2019-08-19 16:56:37 +00:00
Maria Yousaf 1846d3fcd6 Python-based installer for StarlingX
Initial submission for a Python-based virtualbox installer for StarlingX

Co-Authored-By: Ovidiu.Poncea <ovidiu.poncea@windriver.com>
Co-Authored-By: Wei Zhou <wei.zhou@windriver.com>
Co-Authored-By: William Jia <william.jia@windriver.com>
Co-Authored-By: Sebastien Papineau <sebastien.papineau@windriver.com>
Co-Authored-By: Timothy Mather <timothy.mather@windriver.com>
Co-Authored-By: Paul Buzuloiu <paul.buzuloiu@windriver.com>

DocImpact
Story: 2005051
Task: 29552
Signed-off-by: Maria Yousaf <maria.yousaf@windriver.com>

Change-Id: Iad5b6d8103886d7eeeab7bf2782eca4adb95e3e6
2019-05-10 12:48:49 -04:00
Zuul 18e5b737f1 Merge "Modify controller_allinone.xml for deploying simplex in AMD environment" 2019-04-18 14:55:33 +00:00
hutianhao 77c5b2f37d Modify install_packages.sh for system without apparmor model
Add apparmor model to install_packages.sh for deploying simplex
in system without apparmor model.

Closes-Bug: 1821699

Change-Id: Ia3dc596be53376822c6d9639ea9b506a9a5d178e
Signed-off-by: hutianhao <hu.tianhao@99cloud.net>
2019-03-26 08:46:03 +00:00
hutianhao 436ca8c17a Modify controller_allinone.xml for deploying simplex in AMD environment
Change cpu feature policy for vmx to start VM successfully in AMD environment.

Closes-Bug: 1821572

Change-Id: I9dfaf4cc05efa86e76e3ef53351b88c07529e114
Signed-off-by: hutianhao <hu.tianhao@99cloud.net>
2019-03-26 08:16:34 +00:00
Erich Cordoba e75bb2e7c3 Add notices on Intel authored files.
Story: 2005265
Task: 30095

Change-Id: I9eecbe7c0a15eec2ffe1e43964cd4253fc04b91c
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-03-20 10:21:32 -06:00
Zuul 116c6701b1 Merge "Worker Node Personality Libvirt" 2019-01-28 22:11:13 +00:00
Zuul e149c057e0 Merge "Standard Controller Configurations" 2019-01-28 22:11:11 +00:00
Zuul a2d1955870 Merge "All In One Configurations" 2019-01-28 22:11:09 +00:00
Zuul b2cb51b295 Merge "[Doc] Check and Include Configuration Names" 2019-01-28 22:07:45 +00:00
Abraham Arce 06248c2f1e Worker Node Personality Libvirt
Change for Libvirt the "compute" personality to "worker".

Story: 2004022
Task: 28799

Depends-On: https://review.openstack.org/#/c/628341

Change-Id: Icba19b252b22765c7f64990fd92af19cb748fd6a
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-01-21 04:28:02 -06:00
Abraham Arce 09c07804b7 Standard Controller Configurations
Standard Controller can be configured as:

  - Controller Storage
  - Dedicated Storage

This includes reusing same function to create and destroy
compute nodes for the added storage nodes, renamed to:

  - create_node
  - destroy_node

Story: 2004780
Task: 28996

Change-Id: I00745db16c936c11564dbc961728e86a541cc907
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-01-21 04:27:34 -06:00
Abraham Arce c2a1cc2930 All In One Configurations
All In One can be configured as:

- Simplex
- Duplex

Story: 2004780
Task: 28996

Change-Id: I8a1ec35a525babdc44fe0df65fa58d49257d83f4
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-01-21 04:27:17 -06:00
Abraham Arce ce407f198e [Doc] Check and Include Configuration Names
In preparation to support more configurations, use existing allinone
and standardcontroller configurations names to:

- check if configuration is available via a function before it is
  created.
- to identify what configuration the compute node belongs to.

Additional:

- Fix linters issues

Story: 2004780
Task: 28996

Change-Id: I94ca268760c2cf12072de676dbd19413ef96a1ab
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-01-21 04:26:38 -06:00
Abraham Arce 24a925328a [Installation] Controller Minimum Disk Size
Due to changes in docker-lv size the MINIMUM_DISK_SIZE for the
Controller has been increased.

Story: 2004520
Task: 28968

Depends-On: https://review.openstack.org/628053
Change-Id: I8fdc2e707405bcb35797e915ef71b506346905b2
Co-authored-by: Juan Carlos Alonso <juan.carlos.alonso@intel.com>
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-01-17 04:48:34 -06:00
Zuul 33faccc082 Merge "Setup Configurations Clean Up" 2019-01-11 15:50:14 +00:00
Zuul 71f1ddef54 Merge "Fix check for ISO file in deployment script." 2019-01-09 21:33:49 +00:00
Abraham Arce 3db9d36e85 Setup Configurations Clean Up
Combine setup_allinone.sh and setup_standard_controller.sh to have one
single setup script to configure via input parameter allinone and
standardcontroller configurations:

  - setup_configuration.sh
  - destroy_configuration.sh

Change-Id: Id29d3eeeff43f0c0f43ab710a1179eaacdfb330d
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-01-08 06:26:37 -06:00
Zuul ee8ca047f8 Merge "Update network command destroy_network.sh" 2018-12-21 01:09:10 +00:00
Felipe de Jesus Ruiz Garcia 6e0fbcfd89 Update network command setup_network.sh
ifconfig and brctl are deprecated commands.
They are replaced with ip command.

Story: 2004646
Task: 28598

Change-Id: I4a9b63f5437fc9372a169216ee62f239bce55b3c
Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe_57@live.com.mx>
Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
2018-12-20 02:46:04 -05:00
Felipe de Jesus Ruiz Garcia bb58b9e6d6 Update network command destroy_network.sh
ifconfig and brctl are deprecated commands.
They are replaced with ip command.

Story: 2004646
Task: 28597

Change-Id: I24e2d53ae7f8b866eef665a85d1785df0527c82a
Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe_57@live.com.mx>
Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
2018-12-20 02:30:48 -05:00
Erich Cordoba 3645b8517f Fix check for ISO file in deployment script.
The checking for ISO files was made through the mime type. However
this method can fail as the mime type can be set differently by the
browser or tool used to download the file. An example of this
behavior can be found on Fedora 28 where the file command returns
application/octect-stream.

The fix is to avoid using the mime type for checking and just verify
that if a DOS/MBR file.

Closes-Bug: 1804610
Change-Id: I69f09df66215d405720801fbcbe3d43aac668564
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2018-12-03 15:33:47 -06:00
Zuul ded5fc1218 Merge "[Doc] Compute Identity Nodes Common Code +" 2018-12-03 21:13:26 +00:00
Zuul 4e862350a6 Merge "[Doc] Controller Identity Nodes Common Code" 2018-12-03 21:13:25 +00:00
Zuul 0385914366 Merge "[Doc] Usage and ISO Check Common Code" 2018-12-03 21:07:50 +00:00
Zuul 6a9531828e Merge "repair readme in deployment/libvirt" 2018-11-29 17:42:58 +00:00
zhangkunpeng df4e64e6e0 repair readme in deployment/libvirt
The default name of the first controller is controller-0

Change-Id: I3dc2221d8ec062677f0d69f99916868d5180e24f
Story: 2004088
Task: 28135
Signed-off-by: zhangkunpeng <zhang.kunpeng@99cloud.net>
2018-11-29 10:37:04 +08:00
zhangkunpeng 0c28007574 repair script simplex_stage-1.sh for deployment
After config_controller is executed in simplex Starlingx, fail to execute
simplex_stage_1.sh in stx-tools/deployment/provision/ because that the
partition size to be created is not an integer.

Change-Id: I61947fe98950a9097632aedb9725b5ffd2685de0
Story: 2004088
Task: 28063
Signed-off-by: zhangkunpeng <zhang.kunpeng@99cloud.net>
2018-11-23 16:50:11 +08:00
Abraham Arce 1b534e77b0 [Doc] Compute Identity Nodes Common Code +
Compute identity nodes are required for Standard Controller configuration
setups. Move their creation and removal functions to common file:

  - create_compute
  - destroy_compute

Allow also to specify the number of Compute nodes to be created.

Change-Id: I5d687b4daf16745758c65ed0d44eec5307e0f7f4
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-11-20 08:54:09 -06:00
Abraham Arce 787d7f1f2e [Doc] Controller Identity Nodes Common Code
The creation and removal of the Controller identity nodes are common
between all-in-one and standard controller configuration setups:

  -  create_controller
  -  destroy_controller

Make both scripts shared same code located at a common functions
file.

Change-Id: I2ff7d43bd01a2a40264c442d8031a83e1dbbfadb
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-11-20 07:43:51 -06:00
Abraham Arce 3c0f9b11ea [Doc] Usage and ISO Check Common Code
Usage function and ISO file checking are common between all-in-one
and standard controller setups.

Make both scripts shared same code located at a functions file.

Change-Id: Ic47072be8f9d646ef1dcaf9193453dfcd4534783
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-11-20 07:34:06 -06:00
Dean Troyer 0411fecdb4 Remove working dir issues from deploy scripts
This lets the deployment scripts not care about the current working
dir.  It also puts the vms directory in wherever the current working
directory actually is, allowing more than one set of stx VMs to be
controlled at a time.

Change-Id: I21ae6f4e7ea327c62cf04fc877161032daf1223e
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-10-09 19:31:21 -05:00
Michel Thebeau be8542eeaa deployment: libvirt: add disk to all-in-one cluster
According to the wiki instructions for all-in-one, an extra disk is
required:
  StarlingX/Installation_Guide_Virtual_Environment/Duplex

Partial-Bug: #1793214

Change-Id: I146c601493db6eab8871796b67061132cc6f4f30
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-25 16:58:26 -04:00
Michel Thebeau 6108c459c9 deployment: libvirt: give all-in-one 18G of RAM
All-in-one with 18G will provide over 2G of RAM for instances. For
example, a test configuration with two instances each with 1G RAM.

This amount is less than the 24G listed in controller_allinone.xml,
however all-in-one had been setup to use controller.xml, which provides
16G, so technically the series of related commits is increasing the RAM
for all-in-one from 16 to 18G.

Partial-Bug: #1793214

Change-Id: Id6556da171f43ba52375c33b8ab85b6d6d60c74d
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-25 16:58:26 -04:00
Michel Thebeau ec295b37c8 deployment: libvirt: give all-in-one config six cores
The all-in-one configuration has both controller and compute function on
the controller nodes.  More cores are required to run instances.

Six cores allows 2 cores for instances.

Partial-Bug: #1793214

Change-Id: I1f2da957eb25eba1c488f58a6e94a74202b02a6b
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-25 16:58:26 -04:00
Michel Thebeau c7205a79b2 deployment: libvirt: remove mac addresses all-in-one xml
Listing the MACs in xml will cause both controllers to have the same MAC
addresses.

Libvirt will fill in mac addresses when the domains are defined.

Partial-Bug: #1793214

Change-Id: Ie8a5ea746dde61a2c8db7b8f48ff9948078de76f
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-25 16:58:26 -04:00
Michel Thebeau 96b8aa4226 deployment: libvirt: update machine type/model for all-in-one
Refer also to commit 7abcd94a, which applies the change to
controller.xml

Tests should run on a comparably newer model of CPU and should be fixed
for all tests under virtualization.

Nehalem cpu model is recommended as one that has been used for this
purpose for a few years.

Specifying 'forbid' for fallback and 'exact' for mode will ensure that
hosts the Qemu emulator is up-to-date on the host, capable of emulating
the expect model.  The consistency will make test results reliable
across host machines.

The newer machine type supports ACPI for example.

The feature "vmx" is required on computes to support nesting.

Related-Bug: #1793214

Change-Id: Ib3e72d8c9fc528978358a7054b337672284f2908
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-25 16:58:26 -04:00
Michel Thebeau 9a6396bca3 deployment: libvirt: remove pci, bus, controllers
Refer also to commit 10daff0c, which applies the change to
controller.xml

Some of the entries are invalid when changing the machine type, which is
the next commit to follow this one.

Libvirt will fill these things in correctly for the specified hardware.

Related-Bug: #1793214

Change-Id: I43593a7014713ab6ea9bfe73346fc0c6d0c41300
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-25 16:58:26 -04:00
Zuul 7c72039904 Merge "Libvirt: New Disk configuration added" 2018-09-25 20:57:31 +00:00
Juan Pablo Gomez d98b4a2a37 Libvirt: New Disk configuration added
File controller_allinone.xml was modified in order to add a new DISK
File setup_allinone.sh was modified for new Disk implementation

Partial-Bug: 1793214
Change-Id: I2953a74d3c78a87b4437bea550f645ec3838af38
Signed-off-by: Juan Pablo Gomez <juan.p.gomez@intel.com>
2018-09-24 15:31:44 +00:00
Felipe de Jesus Ruiz Garcia 3fd92f5c67 Fix typo and align line identation
Fix typo and align the line identation

Change-Id: I0acafb4638019b1301ffc1d4ce1b4ec6c74157fc
Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
2018-09-13 19:31:14 -05:00
Zuul d4e1bec3f1 Merge "deployment: libvirt: make use of rm command safer" 2018-09-11 18:11:15 +00:00
Zuul e7f1f67fd5 Merge "deployment: libvirt: refer to Starlingx wiki" 2018-09-11 16:15:23 +00:00
Zuul dd9909b411 Merge "deployment: libvirt: correct internal/external net" 2018-09-11 16:15:23 +00:00
Michel Thebeau 0a924bc76a deployment: libvirt: make use of rm command safer
Add sanity around the use of 'rm' in script.  Make sure the file to be
deleted is the correct type, and that its content also meets
expectation.

An example of dangerous outcome in this code from using "sudo rm -rf" is
that if the CONTROLLER or COMPUTE variables are preceded by a space
character then the directory /var/lib/libvirt/images/ will be deleted.

Refrain from using recursive and force options, and in this case because
they are not needed.

Related-Bug: #1790716

Change-Id: I76797133589d993dca2b2aac3c97184bac0457ca
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-11 11:49:50 -04:00
Michel Thebeau ce4806ed64 deployment: libvirt: refer to Starlingx wiki
In the event that someone clones the stx-tools repo without
fore-knowledge of the wiki, this is handy.  The author prepares this
commit from the experience doing just that.

Related-Bug: #1790716

Change-Id: If3d1e250e1c2c246ac894117fc649d6f145f22f1
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-10 10:33:06 -04:00
Michel Thebeau 503a9417de deployment: libvirt: correct internal/external net
The INTERNAL and EXTERNAL networks configured by destroy and setup
network scripts are inverted with reference to the default
config_controller selections as well as the wiki
StarlingX/Installation_Guide_Virtual_Environment/Controller_Storage.

The most pressing concern in this is that what was actually the internal
management network was being nat'd.

Also, under normal testing it is not recommended to address the internal
management network from the virtualization host.  There are unlikely to be
configurations that will have external devices addressing the management
network.

Delete what was "EXTERNAL", actually internal, and rename "INTERNAL" to
be EXTERNAL.

Related-Bug: #1790716

Change-Id: I08f9e7712fed120001c864903880e13e9478764d
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2018-09-10 10:30:28 -04:00