116 Commits

Author SHA1 Message Date
Takashi Kajinami
dff77df8fc Adapt to recent dependencies
This covers the following updates to fix CI currently broken.

* Fix compatibility with tox 4
* Update hacking to 6.1.0
* Clean up python 2 support and bump minimum supported version to 3.8
* Remove six because python 2 support is removed
* Update job template to use the recent tested python versions
* Replace items by prefixItems to fix schema error
* Build documentation by sphinx command
* Remove "Change Log" section from documentation
* Split requirements for documentation build
* Ensure tox is installed in functional tests
* Fix devstack job

Change-Id: I3b9c5b20aca55332c721d34fd4c41c5b886f60c5
2024-11-27 19:35:39 +01:00
Ilya Shakhat
113ba244f8 Fix extended plug/unplug commands
Service port configuration is not mandatory for extended plug/unplug
commands. 

Change-Id: I31d4be9d8c91109d01c3c67103edbd15e3db03d8
2020-05-04 20:47:14 +00:00
Ilya Shakhat
1e70f233f7 Extend network commands to operate with inter-service connectivity
Actions 'plug' and 'unplug' are extended to allow operating with
the connectivity between services.

Command format:
plug|unplug <service> service ingress|egress to|from <other service> service

Example:
`unplug nova service egress to db service' - this blocks the outgoing
traffic from nova service processes to port of db service.

Change-Id: Ia9717a76597da6aad408520e45f41fb25d3e0d49
2020-04-23 14:02:13 +04:00
Ilya Shakhat
cbab3865e8 Document how to use libvirt driver
Change-Id: I5cba6ee970b64f4a63317169c3ab90613fbe0bb6
Closes-Bug: #1836736
2019-07-22 10:54:27 +02:00
Ilya Shakhat
e55bd553aa Fix representation of signal.SIG* constants
Pass signals as strings instead of using python constants
which depend on host system and have different types on py27 vs py3.

Change-Id: Ib8d7136bb3aed125a987678672142ce72e33af6f
Closes-bug: #1836736
2019-07-22 09:44:25 +02:00
Ilya Shakhat
82cb432398 Re-implement network faults using standard iptables module
1. Switch from home-made iptables module to the one from Ansible.
2. Allow to choose the direction: ingress (default) or egress.
3. Refactor to use shared schema for ports.

Change-Id: I4904c4abd0dd23ceb48ba4f3c403fa8dc498926b
2019-07-05 12:22:48 +02:00
Ilya Shakhat
51de6802f1 Add integration test for devstack cloud management driver
Change-Id: Ia69a3e28d65289c561d240476514cf0536c39868
2019-01-02 16:50:13 +01:00
Ilya Shakhat
ff78b92048 Tests cleanup
* Remove dependency on ansible and libvirt libraries
* Bump python 3 version to 3.6
* Fix python warnings in the code

Change-Id: If7b495e9c3b2f5031d535954c3c3280e247871a6
2019-01-02 13:28:27 +01:00
Ilya Shakhat
87a80f6af5 Rename tcpcloud driver into saltcloud
TCPCloud was an internal name of a product owned by a company
acquired by Mirantis.

Change-Id: I6c5d6e7ee5c537c3b82f95abda63129594d3d9b4
2018-12-19 13:46:08 +00:00
Ilya Shakhat
601c49cca0 Unify auth parameters between drivers
Change-Id: I4b5f4f2920e1592459e8ffe6632c4c3cb007acc9
2018-12-19 12:50:43 +00:00
Ilya Shakhat
d544fae043 Simplify universal driver
Universal driver is a place-holder of cloud management.
Both services and nodes are configured separately.

Change-Id: Ie60ad757d07a0c96d8aec5516806fa0950748e3a
2018-12-17 14:18:14 +01:00
Ilya Shakhat
1c29ed3182 Remove old drivers
Remove Fuel, screen-based DevStack, Pacemaker and Linux service drivers.
Rename devstack_systemd into devstack.
Use common schema for auth parameters.

Change-Id: I38b5f82282b72e969fc08e0948109939c95cf948
2018-11-26 20:44:53 +04:00
Zuul
99d20e9bab Merge "Add docker containers support" 2018-08-17 08:35:35 +00:00
Maxim Babushkin
d2514e6993 Add docker containers support
A support for the containers is required for the current releases of
OpenStack.
Add the ability to 'start', 'terminate' and 'restart' the containers.

Change-Id: Ib2beebcfa7017a9b2bb8f16dea49beef6db79d43
2018-08-06 13:31:38 +03:00
Maxim Babushkin
1c9d02cb9d Typo fix in universal driver documantation
Change-Id: I3a46d76fabb9c889aab3664757fb91273fdff208
2018-07-30 11:53:31 +03:00
Nguyen Hung Phuong
d47e3cdd8a Replaces yaml.load() with yaml.safe_load()
Yaml.load() return Python object may be dangerous if you receive a YAML
document from an untrusted source such as the Internet. The function
yaml.safe_load() limits this ability to simple Python objects like integers or
lists.

Reference:
https://security.openstack.org/guidelines/ dg_avoid-dangerous-input-parsing-libraries.html

Change-Id: I4f5379e1e17129222a211ac6e6d285c40a0b9bfd
2018-02-13 13:36:37 +07:00
Ilya Shakhat
b8e4a30385 Update documentation and examples
Change-Id: Ia6943edb541ab80e8dc7c6f878179e36caeaf5dc
2017-11-03 11:40:32 +01:00
Alex_Kholkin
acdd04e4e0 Add glance-glare service to the tcpdriver
'glance-glare' service was missing in the tcpcloud.py

Change-Id: Ie09d820c858072d81ebdc345caae4c82af0077ac
2017-11-01 13:25:35 +04:00
Ilya Shakhat
cc582c38e2 Universal cloud management driver
A new driver is suitable for the most abstract case. It does not have any
built-in services, all services need to be specified explicitly in
a config file.

By default the Universal driver works with only one node. To specify
more nodes use `node_list` node discovery driver. Authentication
parameters are then overridden by corresponding parameters from node
discovery.

Change-Id: Id6ede38bcf82d121ccba2baaef928fe0e7071938
2017-10-04 11:30:45 +02:00
Ilya Shakhat
cd51cbae16 Universal driver for any system services (systemd, upstart, etc.)
This patch introduces `system_service` driver for services supported
by Ansible.

Change-Id: Ib22c7f2a83fb5acf3cb4b5e980ac798abdf54ae3
2017-10-04 10:50:13 +02:00
Ilya Shakhat
44b2593266 Move all service drivers under services/ package
Change-Id: I4e7d46b4a289508dbf35be4cef954bd73806efe7
2017-09-06 11:10:27 +02:00
Ilya Shakhat
4b49c49307 Refactor services module
Change-Id: Ib3ecebb3aa15124a179cb2d98c6dbbe6031fd6a1
2017-09-06 11:10:27 +02:00
Ilya Shakhat
da22323dfd Make privilege escalation password configurable
Add parameter `become_password` into node list discovery
and Ansible executor.

Change-Id: Ifa3dc7c84a08171792bb4a18794cf37c2c658d8d
2017-09-05 17:03:06 +02:00
Ilya Shakhat
8bdb893209 Group drivers modules by type
Change-Id: Id5fab5efa5dfbe155e559256faf465b7d0b76706
2017-09-05 11:06:38 +02:00
Ilya Shakhat
621515995e Fix process name patterns in DevStack driver
Change-Id: Ida042acea551f94d12f8581f3ff1c0c445d1e5a9
2017-08-31 14:27:18 +02:00
Jenkins
2c6f613055 Merge "Add Devstack Systemd driver" 2017-07-31 09:02:59 +00:00
Kyrylo Romanenko
f223fceec7 Add Devstack Systemd driver
Since Pike release by default DevStack is run with all the services
as systemd unit files (USE_SCREEN=False).

Changes done in patch:
add devstack_systemd driver;
add SystemdService;
add unit tests;
update documentation.

Co-Author: Kyrylo Romanenko <kromanenko@mirantis.com>
Co-Author: Ilya Shakhat <shakhat@gmail.com>

Change-Id: I136398e3d18bafa87689a97b22a5514f4831d56e
2017-07-20 15:40:12 +02:00
Kyrylo Romanenko
253b66e687 [trivial] Several typos fix in tcpcloud driver
Change-Id: Ibdf42bb104fcfb499dd0a4d42a557fc7e0d8c43f
2017-06-08 16:11:06 +03:00
Kyrylo Romanenko
19989b1625 [trivial] Several typo fixes in devstack driver.
Change-Id: I2b8e7308c06b335442b912ef3ea48f3f27d3d3d3
2017-06-02 18:10:27 +03:00
Kyrylo Romanenko
07a8afaf55 Skip checking of Devstack hosts
Screen is not used in Devstack anymore.

Change-Id: I7baf1af1d2951afe0fc0927e3f14b0c21b38ea4c
2017-05-29 15:50:22 +03:00
Anton Studenov
3beb80e0af Auth configuration for each node
This patch allows configuring separate ssh auth parameters
for each node.

Change-Id: Ib055c2f4f2eea0870ba546e873c8b544e0b29424
2017-04-25 15:32:19 +03:00
Anton Studenov
77ba7fd26f Allow adding libvirt name for node
This patch adds new field in node_list config that allows
specifying name of libvirt domain associated with a node.

* Now only 'ip' is required field for node.
* Host moved from namedtuple to custom class.

Change-Id: I47410d4e77c18a3874975812e09ea3bb7f3a574d
2017-04-25 08:49:36 +00:00
Anton Studenov
2fafe5f9b9 Add serial parameter to cloud drivers
'serial' parameter defines how many hosts Ansible should
manage at a single time.

Change-Id: I363ffda9cebd6533d58c23ba795b702b7431301d
2017-04-25 08:49:28 +00:00
Anton Studenov
a5945210c6 [Core] Services as drivers
This patch move service definitions from classes to
drivers with default configurations.

* Driver are now loaded from all os_faults modules
  except tests folder.
* Registry now skips drivers without NAME.
* Registry now checks name collision.
* Added documentation for service drivers.

Change-Id: I58723bbb01a04e61836415392cf43be3e5fffff0
2017-04-17 17:20:27 +03:00
Georgy Dyuldin
533654d951 Add 'slave_direct_ssh' parameter to fuel driver
Change-Id: I3c70fbfc8a05f6465919ca095479ca12ecf115f8
2017-04-05 09:40:48 +03:00
Anton Studenov
bbf5943ea5 Allow binding BMC by node fqdn in ipmi driver
This patch adds new parameter to ipmi driver called 'fqdn_to_bmc'
that allows specifying node fqdns instead of MAC addresses.

Change-Id: Icfcde469cb358cf7aaa283b3bc6264c17253d584
2017-03-02 08:02:53 +00:00
Anton Studenov
5c9665dfb8 Add shutdown method to all power drivers
* Added shutdown command to libvirt and impi drivers.

Change-Id: I984724ca582f8d000dff1afb5e0867eda42b7442
2017-03-02 08:02:34 +00:00
Anton Studenov
f42eba7522 Add monitoring services to tcpcloud driver
Added the following services:
* elasticsearch
* grafana-server
* influxdb
* kibana
* nagios3

Change-Id: I4b9e746f01ed24d9e867432a94ae89183393679e
2017-02-15 14:14:43 +03:00
Anton Studenov
7eb1f4a038 Remove brackets from Service.GREP variables
This patch makes content of GREP variables more readable
and clear. Also it helps to protect users/developers from
missing brackets in GREP variables.

* Use `grep -v grep` to to filter grep from ps output.

Change-Id: I8455a347912d853b5245e654781f8f117d340298
2017-02-01 10:45:34 +03:00
Anton Studenov
3ddf8dda85 Add password auth to devstack and tcpcloud
* Fixed password auth in ansible executor

Change-Id: I6f2f21b3c893dc42032dba537c21c8f4bd0521dc
2017-01-27 14:02:57 +03:00
Anton Studenov
66d394be2b Add docs for drivers
* Added docstrings for all drivers
* Added sphinx extension for generation of docs for drivers.

Change-Id: I7b8dfb21f9324b413174c910384b9ae8f458a8d2
2017-01-26 19:27:41 +03:00
Anton Studenov
abf60b09ca [tcpcloud] Additional configuration parameters
* Added get_ips_cmd parameter that specifies salt command
  that returns ip address of minion.
* Added slave_direct_ssh parameter that enables/disables
  using of salt master node as ssh proxy.

Change-Id: Ida4a2e0e7e549d7d9313a1c11188d38cdc49e475
Signed-off-by: Anton Studenov <astudenov@mirantis.com>
2017-01-25 16:09:57 +03:00
Anton Studenov
3954065549 Allow usage of multiple power drivers at once
* Deprecated power_management parameter.
* Added power_managements to configuration.
* Removed power_management variable from NodeCollection
  and Service.
* Added PowerManager class that controls running of
  power drivers.
* Updated docs.

Change-Id: Idabcb1fb907022f0d556667cbf3c36326f526a08
2017-01-25 12:58:36 +03:00
Anton Studenov
8bbbc75bdb Add node_list driver
* Added node_list driver that allows specifying list
  of nodes.
* Added default discovering to existing cloud drivers.
* Moved get_nodes to CloudManagment class
* Hid execute_on_master_node on tcpcloud and fuel drivers.

Change-Id: I5cd567b3afba12ad98a36474c739fa3b01ab2a8f
2017-01-23 17:20:19 +03:00
Anton Studenov
6c31641cfc Use filter in get_nodes
* Simplifies code of get_nodes for fuel and tcpcloud
  drivers.

Change-Id: I02569c55a01396cb82f13186e4f16a9daa651503
2017-01-19 17:28:38 +03:00
Anton Studenov
af67e544b3 Add ironic services to devstack driver
Added the following services:
* ironic-api
* ironic-conductor

Change-Id: Ib0d5f663d8eebcf72a5fec7d4f9c6f348ece029b
2017-01-12 12:03:41 +03:00
Anton Studenov
0ed49056d7 Support for multi-node devstack
* Added ServiceInScreen class.
* Added 'slaves' parameter to devstack driver.
  This parameter contains a list of ip addresses
  that will be included to ansible executor.
  Default: empty list
* Added 'iface' parameter to devstack driver.
  It specifies interface name that is used
  for communication between nodes.

Change-Id: Iad93ac301da3b2c8e9e9a30afcda091788546c56
2017-01-12 12:02:42 +03:00
Anton Studenov
fd7b82c7c6 Add neutron services to tcpcloud driver
Added the following services:
* neutron-dhcp-agent
* neutron-metadata-agent
* neutron-openvswitch-agent
* neutron-l3-agent

Change-Id: I0c4241b3bd8976ad49843e40ab00c4e993165cb4
2017-01-11 12:52:06 +03:00
Anton Studenov
d36e9fb103 Skip monitoring nodes in TcpCloud
Change-Id: Ia15a4b286466b974c36c1170e4a06351bebbc2f9
2016-12-14 15:29:57 +03:00
Anton Studenov
c7004ea52c New configuration parameters for TCPCloud driver
* Allow to configure domain names and network interface
  names for slaves on TcpCloud driver.
* Fixed test_utils.py

Change-Id: I12482e0d382c3c10427e26585277ffb454a0d9f7
2016-12-12 15:25:45 +03:00