Code Monkey home page Code Monkey logo

quads's Introduction

QUADS (quick and dirty scheduler)

QUADS automates the future scheduling, end-to-end provisioning and delivery of bare-metal servers and networks.

quads

quads-rpm-build

What does it do?

  • Create and manage unlimited future scheduling for automated slicing & dicing of systems and network infrastructure
  • Drive automated systems provisioning and network switch changes to deliver isolated, multi-tenant bare-metal environments
  • Automated network and provisioning validation prior to delivering sets of machines/networks to tenants
  • Automated allocation of optional, publicly routable VLANs
  • Generates/maintains user-configurable instackenv.json to accomodate OpenStack deployment.
  • Generates/maintains user-configurable ocpinventory.json for OpenShift on Baremetal Deployments
  • Automatically generate/maintain documentation to illustrate current status, published to a Wordpress instance
    • Current system details, infrastructure fleet inventory
    • Current system group ownership (cloud), workloads and assignments
    • Total duration and time remaining in system assignments
    • Dynamic provisioning & system/network validation status per assignment
    • Currently allocated/free optional publicly routable VLAN status
  • Query scheduling data to determine future availability
  • Generates a per-month visualization map for per-machine allocations to assignments.
  • JIRA integration.
  • Webhook and IRC notifications (via supybot/notify plugin) for system releases.
  • Email notifications to users for new future assignments, releases and expirations.
  • Flask-based Web UI for searching for available bare-metal systems in the future based on model.

Design

  • QUADS 1.1 series main components: Python3, CherryPy, Mongoengine, MongoDB, Jinja2 (Current)
  • QUADS 2.0 and APIv3 is currently in-progress to feature Flask (replacing CherryPy) and SQLAlchemy and PostgreSQL (replacing MongoEngine / MongoDB)
  • Installation via RPM for Fedora Linux.
  • We use Badfish for managing bare-metal IPMI
  • We use Foreman for the systems provisioning backend.
  • We use Wordpress for auto-generating wiki and documentation.
  • A typical container-based QUADS deployment might look like this:

quadsarchitecture

Requirements

  • In QUADS 1.1+ we are using Python3, Cherrypy and Jinja2 with MongoDB as the database backend.
  • The scheduling functionality can be used standalone, but you'll want a provisioning backend like Foreman to take full advantage of QUADS scheduling, automation and provisioning capabilities.
  • To utilize the automatic wiki/docs generation we use Wordpress but anything that accepts markdown via an API should work.
  • Switch/VLAN automation is done on Juniper Switches in Q-in-Q VLANs, but command sets can easily be extended to support other network switch models.
  • We use badfish for Dell systems to manage boot order to accomodate OpenStack deployments via Ironic/Triple-O as well as to control power actions via the Redfish API.

Setup Overview

  • Documentation for setting up and using QUADS is available in detail within this repository.
  • Below is a high-level overview of a greenfield setup, some of this may exist already for you.
Step Documentation Details
General Architecture Overview docs Architecture overview
Install and Setup Foreman/Satellite docs Not covered here
Setup Foreman/Satellite Validation Templates examples Templates for internal interface configs
Prepare Host and Network Environment docs Covers Juniper Environments, IPMI, Foreman
Install QUADS docs Install via RPM
Install MongoDB docs Install MongoDB separately
Install Wiki docs Use Ansible to Deploy Wordpress
Configure Wiki docs Configure Wordpress Pages and Plugins
Configure your QUADS Move Command docs Configure your provisioning and move actions
Configure QUADS Crons docs Tell QUADS how to manage your infrastructure
Add Clouds and Hosts docs Configure your hosts and environments in QUADS
Host Metadata Model and Search docs Host metadata info and filtering
Using JIRA with QUADS docs Optional JIRA tools and library for QUADS

QUADS Workflow

You can read about QUADS architecture, provisioning, visuals and workflow in our documentation examples and screenshots

QUADS Switch and Host Setup

Installing QUADS

  • We support modern Fedora OS distributions using RPM packages.
  • While we will provide Docker/container files this is more for CI testing and isn't recommended or properly maintained for production deployments.

Installing QUADS from RPM

  • We build RPM packages for the Fedora distribution.
  • On Fedora 30 and above you'll need to manually install mongodb first, see installing mongodb for QUADS
  • On Fedora 30 and above it is necessary to install python3-wordpress-xmlrpc as it is not included anymore
    • On Fedora versions greater than 36 you'll need a Python workaround below after installing python3-wordpress-xmlrpc
rpm -ivh --nodeps https://funcamp.net/w/python3-wordpress-xmlrpc-2.3-14.noarch.rpm

This package is also available via pip via pip install python-wordpress-xmlrpc

  • As this package was not rebuilt for Fedora38+ you'll need to employ a workaround for newer versions of Python for this to function.
  • If python --version is anything other than Python 3.10 you'll need:
mypythonversion=$(python --version | sed 's/Python //' | sed 's/..$//')
cd /usr/lib
rsync -avH python3.10/site-packages/wordpress_xmlrpc python$mypythonversion/site-packages/

In QUADS 2.0 this package dependency is no longer needed

  • Once you have mongodb installed and running you can install/upgrade QUADS via RPM.
dnf copr enable quadsdev/python3-quads  -y
dnf install quads -y
  • Note: If you want the latest development RPM based on the master branch instead:
dnf install quads-dev -y
vi /opt/quads/conf/quads.yml
  • Enable and Start dependent services
  • haveged is a replacement entropy service for VM's, it's optional so turn it off if you want to use /dev/random - this solves certain performance issues known to occur with lack of entropy when running QUADS in a VM.
systemctl enable httpd
systemctl enable haveged
systemctl start haveged
systemctl start httpd
systemctl start mongod
  • Enable and start the QUADS systemd service (daemon)
  • Note: You can change QUADS quads_base_url listening port in conf/quads.yml and use the --port option
systemctl enable quads-server
systemctl start quads-server
  • Source quads binaries in your $PATH (or login with another shell)
source /etc/profile.d/quads.sh
  • Now you're ready to go.
quads-cli --help
  • For full functionality with Foreman you'll also need to have hammer cli installed and setup on your QUADS host.

  • Note: RPM installations will have quads-cli and tools in your system $PATH but you will need to login to a new shell to pick it up. We typically place this as an alias in /root/.bashrc.

echo 'alias quads="quads-cli"' >> /root/.bashrc

Installing other QUADS Components

QUADS Wiki

  • The Wiki component for QUADS is currently Wordpress, though in 2.x we'll be moving everything to Flask.
  • Please use Red Hat, CentOS Stream or Rocky 8 for the below Wordpress component.
  • Wordpress needs to be on it's own VM/server as a standalone component.
  • Wordpress provides a place to automate documentation and inventory/server status via the Wordpress Python RPC API.
Installing Wordpress via Ansible
  • You can use our Ansible playbook for installing Wordpress / PHP / PHP-FPM / nginx on a Rocky8, RHEL8 or CentOS8 Stream standalone virtual machine.
  • First, clone the repository
git clone https://github.com/redhat-performance/ops-tools
cd ansible/wiki-wordpress-nginx-mariadb
  • Second, add the hostname or IP address of your intended Wiki/Wordpress host replacing wiki.example.com with your host in the hosts file.
# cat hosts
[wordpress_server]
wiki.example.com
  • Third, run Ansible to deploy. You might take a look at group_vars/all for any configuration settings you want to change first.
ansible-playbook -i hosts site.yml
  • If you get an error about seboolean usage you'll also need to install the ansible.posix collection then re-run the playbook.
dnf install ansible-collection-ansible-posix
  • Alternatively you can install this via ansible-galaxy without RPM.
ansible-galaxy collection install ansible.posix
Setup of Wordpress
  • You'll then simply need to create an infrastructure page and assignments page and denote their page id for use in automation. This is set in conf/quads.yml
  • We also provide the krusze theme which does a great job of rendering Markdown-based tables, and the JP Markdown plugin which is required to upload Markdown to the Wordpress XMLRPC Python API. The Classic Editor plugin is also useful. All themes and plugins can be activated from settings.
Limit Page Revisions in Wordpress
  • It's advised to set the following parameter in your wp-config.php file to limit the amount of page revisions that are kept in the database.
    • Before the first reference to ABSPATH in wp-config.php add:
define('WP_POST_REVISIONS', 100);
  • You can always clear out your old page revisions via the wp-cli utility as well, QUADS regenerates all content as it changes so there is no need to keep around old revisions of pages unless you want to.
yum install wp-cli -y
su - wordpress -s /bin/bash
wp post delete --force $(wp post list --post_type='revision' --format=ids)

QUADS Move Command

  • QUADS relies on calling an external script, trigger or workflow to enact the actual provisioning of machines. You can look at and modify our move-and-rebuild-hosts tool to suit your environment for this purpose. Read more about this in the move-host-command section below.

  • Note: RPM installations will have quads-cli and tools in your system $PATH but you will need to login to a new shell to pick it up.

Making QUADS Run

  • QUADS is a passive service and does not do anything you do not tell it to do. We control QUADS with cron, please copy and modify our example cron commands to your liking, adjust as needed.

  • Below are the major components run out of cron that makes everything work.

Service Command Category Purpose
quads-cli --move-hosts provisioning checks for hosts to move/reclaim as scheduled
validate_env.py validation checks clouds pending to be released for all enabled validation checks
regenerate_wiki.py documentation keeps your infra wiki updated based on current state of environment
simple_table_web.py visualization keeps your systems availability and usage visualization up to date
make_instackenv_json.py openstack keeps optional openstack triple-o installation files up-to-date

QUADS Usage Documentation

Adding New Hosts to QUADS

Define Initial Cloud Environments

  • Define the various cloud environments
  • These are the isolated environments QUADS will use and provision into for you.
quads-cli --define-cloud --cloud cloud01 --description "Primary Cloud Environment"
quads-cli --define-cloud --cloud cloud02 --description "02 Cloud Environment"
quads-cli --define-cloud --cloud cloud03 --description "03 Cloud Environment"

Define Host in QUADS and Foreman

  • Define the hosts in the environment (Foreman Example)
    • Note the --host-type parameter, this is a mandatory, free-form label that can be anything. It will be used later for post-config automation and categorization.
    • If you don't want systems to be reprovisioned when they move into a cloud environment append --no-wipe to the define command.
    • We are excluding anything starting with mgmt- and including servers with the name r630.
for h in $(hammer host list --per-page 1000 | egrep -v "mgmt|c08-h30"| grep r630 | awk '{ print $3 }') ; do quads-cli --define-host $h --default-cloud cloud01 --host-type general; done
  • The command without Foreman would be simply:
quads-cli --define-host --host <hostname> --default-cloud cloud01 --host-type general

Define Host Interfaces in QUADS

  • Define the host interfaces, these are the internal interfaces you want QUADS to manage for VLAN automation
  • Do this for every interface you want QUADS to manage per host (we are working on auto-discovery of this step).
  • The variable default_pxe_interface on the quads.yml will set the default value of pxe_boot=True for that interface while any other interface will have a default value of False unless specified via --pxe-boot or --no-pxe-boot. This can be later modified via --mod-interface.
quads-cli --add-interface --interface-name em1 --interface-mac 52:54:00:d9:5d:df --interface-switch-ip 10.12.22.201 --interface-port xe-0/0/1:0 --interface-vendor "Intel" --interface-speed 1000 --host <hostname>
quads-cli --add-interface --interface-name em2 --interface-mac 52:54:00:d9:5d:dg --interface-switch-ip 10.12.22.201 --interface-port xe-0/0/1:1 --interface-vendor "Intel" --interface-speed 1000 --pxe-boot --host <hostname>
quads-cli --add-interface --interface-name em3 --interface-mac 52:54:00:d9:5d:dh --interface-switch-ip 10.12.22.201 --interface-port xe-0/0/1:2 --interface-vendor "Intel" --interface-speed 1000 --host <hostname>
quads-cli --add-interface --interface-name em4 --interface-mac 52:54:00:d9:5d:d1 --interface-switch-ip 10.12.22.201 --interface-port xe-0/0/1:3 --interface-vendor "Intel" --interface-speed 1000 --host <hostname>
  • To list the hosts:
quads-cli --ls-hosts

You will now see the list of full hosts.

c08-h21-r630.example.com
c08-h22-r630.example.com
c08-h23-r630.example.com
c08-h24-r630.example.com
c08-h25-r630.example.com
c08-h26-r630.example.com
c08-h27-r630.example.com
c08-h28-r630.example.com
c08-h29-r630.example.com
c09-h01-r630.example.com
c09-h02-r630.example.com
c09-h03-r630.example.com
  • To list a hosts interface and switch information:
quads --ls-interface --host c08-h21-r630.example.com

{"name": "em1", "mac_address": "52:54:00:d9:5d:df", "switch_ip": "10.12.22.201", "switch_port": "xe-0/0/1:0"}
{"name": "em2", "mac_address": "52:54:00:d9:5d:dg", "switch_ip": "10.12.22.201", "switch_port": "xe-0/0/1:1"}
{"name": "em3", "mac_address": "52:54:00:d9:5d:dh", "switch_ip": "10.12.22.201", "switch_port": "xe-0/0/1:2"}
{"name": "em4", "mac_address": "52:54:00:d9:5d:d1", "switch_ip": "10.12.22.201", "switch_port": "xe-0/0/1:3"}
  • To see the current system allocations:
quads-cli --summary
cloud01 : 45 (Primary Cloud Environment)
cloud02 : 22 (02 Cloud Environment)
  • For a more detailed summary of current system allocations use --detail
quads-cli --summary --detail
cloud01 (quads): 45 (Primary Cloud Environment) - 451
cloud02 (jdoe): 22 (02 Cloud Environment) - 462
  • For including clouds with no active assignments use --all
quads-cli --summary --detail --all
cloud01 (quads): 45 (Primary Cloud Environment) - 451
cloud02 (jdoe): 22 (02 Cloud Environment) - 462
cloud03 (jhoffa): 0 (03 Cloud Environment) - 367

NOTE:

The format here is based on the following: {cloud_name} ({owner}): {count} ({description}) - {ticket_number}

  • Define a custom schedule for a host
    • Example: assign host c08-h21 to the workload/cloud cloud02
quads-cli --add-schedule --host c08-h21-r630.example.com --schedule-start "2016-07-11 08:00" --schedule-end "2016-07-12 08:00" --schedule-cloud cloud02
  • List the schedule for a specific host:
quads-cli --ls-schedule --host c08-h21-r630.example.com

You'll see the schedule output below

Default cloud: cloud01
Current cloud: cloud02
Defined schedules:
  0:
    start: 2016-07-11 08:00
    end: 2016-07-12 08:00
    cloud: cloud02
  • Move any hosts that need to be re-allocated based on the current schedule
quads-cli --move-hosts

You should see the following verbosity from a move operation

INFO: Moving c08-h21-r630.example.com from cloud01 to cloud02 c08-h21-r630.example.com cloud01 cloud02

How Provisioning Works

QUADS move host command

In QUADS, a move-command is the actionable call that provisions and moves a set of systems from one cloud environment to the other. Via cron, QUADS routinely queries the existing schedules and when it comes time for a set of systems to move to a new environment or be reclaimed and moved back to the spare pool it will run the appropriate varation of your move-command.

In the above example the default move command called /bin/echo for illustration purposes. In order for this to do something more meaningful you should invoke a script with the --move-command option, which should be the path to a valid command or provisioning script/workflow.

  • Define your move command by pointing QUADS to an external command, trigger or script.
  • This expects three arguments hostname current-cloud new-cloud.
  • Runs against all hosts according to the QUADS schedule.
quads-cli --move-hosts --move-command quads/tools/move_and_rebuild_hosts.py
  • You can modify the default settings via the default_move_command setting in quads-cli.

  • You can look at the move-and-rebuild-hosts script as an example. It's useful to note that with quads/tools/ move_and_rebuild_hosts.py passing a fourth argument will result in only the network automation running and the actual host provisioning will be skipped. You should review this script and adapt it to your needs, we try to make variables for everything but some assumptions are made to fit our running environments.

QUADS Reporting

Future Assignment Reporting

As of QUADS 1.1.6 we now have the --report-detailed command which will list all upcoming future assignments that are scheduled. You can also specify custom start and end dates via --schedule-start "YYYY-MM-DD HH:MM" and --schedule-stop "YYYY-MM-DD HH:MM"

quads-cli --report-detailed

Example Output

Owner    |    Ticket|    Cloud| Description| Systems|  Scheduled| Duration|
tcruise  |      1034|  cloud20|   Openshift|       6| 2022-02-06|       14|
cwalken  |      1031|  cloud19|   Openstack|       6| 2022-02-06|       14|
bhicks   |      1029|  cloud18| Openstack-B|       4| 2022-02-06|       14|
nreeves  |      1028|  cloud11| Openshift-P|       2| 2022-02-06|       14|
gcarlin  |      1026|  cloud08|        Ceph|       4| 2022-02-06|       14|

Server Availability Overview Report

Generate a report with a list of server types with total count of systems and their current and future availability plus an average build time delta overall

quads-cli --report-available

Example output

Quads report for 2019-12-01 to 2019-12-31:
Percentage Utilized: 60%
Average build delta: 0:00:26.703556
Server Type | Total|  Free| Scheduled| 2 weeks| 4 weeks
r620        |     5|     0|      100%|       0|       0
1029p       |     3|     3|        0%|       3|       3

Additionally, you can pass --schedule-start and --schedule-end dates for reports in the past. 2 weeks and 4 weeks free calculate starting days from the first Sunday following when the command was run, or return current day at 22:01 if run on Sunday.

Assignment Scheduling Statistics

Generate a report detailing systems and scheduling utilization over the course of months or years.

quads-cli --report-scheduled --months 6

Example Output

Month   | Scheduled|  Systems|  % Utilized|
2022-02 |         1|     1268|         42%|
2022-01 |         9|     1268|         66%|
2022-02 |         1|     1268|         42%|
2021-09 |        10|     1226|         83%|
2021-08 |        14|     1215|         77%|
2021-07 |         3|     1215|         87%|

Upcoming Scheduled Assignments Report

Generate statistics on the number of assigned clouds in quads over a period of months in the past starting today or on a specific year.

quads-cli --report-scheduled --months 6

Example output

Month   | Scheduled|  Systems|  % Utilized|
2019-12 |         0|        8|         58%|
2019-11 |         2|        8|         62%|
2019-10 |        15|        8|         20%|
2019-09 |         0|        0|          0%|
2019-08 |         0|        0|          0%|

Additionally, you can pass --year instead for a report for every month in that year.

Common Administration Tasks

Creating a New Cloud Assignment and Schedule

Creating a new schedule and assigning machines is currently done through the QUADS CLI. There are a few options you'll want to utilize. Mandatory options are in bold and optional are in italics.

  • description (this will appear on the assignments dynamic wiki)
  • cloud-owner (for associating ownership and usage notifications)
  • force (needed for re-using an existing cloud)
  • cc-users (Add additional people to the notifications)
  • cloud-ticket (RT ticket used for the work, also appears in the assignments dynamic wiki)
  • wipe (whether to reprovision machines going into this cloud, default is 1 or wipe.

QUADS VLAN Options

This pertains to the internal interfaces that QUADS will manage for you to move sets of hosts between environments based on a schedule. For setting up optional publicly routable VLANS please see the QUADS public vlan setup steps

  • VLAN design (optional, will default to qinq: 0 below)

  • qinq: 0 (default) qinq VLAN separation by interface: primary, secondary and beyond QUADS-managed interfaces all match the same VLAN membership across other hosts in the same cloud allocation. Each interface per host is in its own VLAN, and these match across the rest of your allocated hosts by interface (all nic1, all nic2, all nic3, all nic4 etc).

  • qinq: 1 all QUADS-managed interfaces in the same qinq VLAN. For this to take effect you need to pass the optional argument of --qinq 1 to the --define-cloud command.

  • You can use the command quads-cli --ls-qinq to view your current assignment VLAN configuration:

quads-cli --ls-qinq
cloud01: 0 (Isolated)
cloud02: 1 (Combined)
cloud03: 0 (Isolated)
cloud04: 1 (Combined)

Optional QUADS Public VLAN

If you need to associate a public vlan (routable) with your cloud, quads currently supports associating your last NIC per host with one of your defined public VLANs (see the QUADS public vlan setup steps).

To define your cloud with a public VLAN, use the following syntax:

quads-cli --define-cloud --cloud cloud03 [ other define-cloud options ] --vlan 601

If you need to clear the vlan association with your cloud, you can pass any string to the --vlan argument in --mod-cloud

quads-cli --mod-cloud --cloud cloud03 --vlan none

Defining a New Cloud

quads-cli --define-cloud --cloud cloud03 --description "Messaging AMQ" --force --cloud-owner epresley --cc-users "jdoe jhoffa" --cloud-ticket 423625 --qinq 1
  • Note: in QUADS 1.1.4 you can change any of these values selectively via the --mod-cloud command described below.
  • Now that you've defined your new cloud you'll want to allocate machines and a schedule.
    • We're going to find the first 20 Dell r620's and assign them as an example.

Adding New Hosts to your Cloud

quads-cli --cloud-only cloud01 | grep r620 | head -20 > /tmp/RT423624
  • Now we'll allocate all of these hosts with a schedule, by default our system times use UTC.
for h in $(cat /tmp/RT423624) ; do quads-cli --host $h --add-schedule --schedule-start "2016-10-17 00:00" --schedule-end "2016-11-14 17:00" --schedule-cloud cloud03 ; done

Adding New Hosts to your Cloud with JIRA Integration

  • NOTE If you are using JIRA integration features with QUADS 1.1.5 and higher you can utilize --host-list along with a list of hosts and it will take care of updating your --cloud-ticket in JIRA for you in one swoop.
quads-cli --add-schedule --host-list /tmp/hosts --schedule-start "2021-04-20 22:00" --schedule-end "2021-05-02 22:00" --schedule-cloud cloud20

That's it. At this point your hosts will be queued for provision and move operations, we check once a minute if there are any pending provisioning tasks. To check manually:

quads-cli --move-hosts --dry-run

After your hosts are provisioned and moved you should see them populate under the cloud list.

quads-cli --cloud-only cloud03

Managing Faulty Hosts

Starting with 1.1.4 QUADS can manage broken or faulty hosts for you and ensure they are ommitted from being added to a future schedule or listed as available. Prior to 1.1.4 this is managed via the Foreman host parameter broken_state (true/false).

  • Listing all broken systems.
# quads-cli --ls-broken
f18-h22-000-r620.stage.example.com
  • Marking a system as faulty
# quads-cli --mark-broken --host f18-h23-000-r620.example.com
Host f18-h23-000-r620.example.com is now marked as broken
  • Marking a system as repaired or no longer faulty.
# quads-cli --mark-repaired --host f18-h23-000-r620.example.com
Host f18-h23-000-r620.example.com is now marked as repaired.
  • Hosts marked as faulty will be ommitted from --ls-available
  • Hosts marked as faulty are not able to be scheduled until they are marked as repaired again.

Migrating to QUADS-managed Host Health

  • If you previously used the broken_state Foreman host parameter to manage your broken or out-of-service systems within your fleet you'll want to migrate to using the new methodology of the QUADS database handling this for you for versions 1.1.4 and higher.
  • You can use the following command to query Foreman and convert broken_state host parameters and status into QUADS:
for h in $(hammer host list --per-page 1000 --search params.broken_state=true | grep $(egrep ^domain /opt/quads/conf/quads.yml | awk '{ print $NF }') | awk '{ print $3 }') ; do quads-cli --mark-broken --host $h ; done

Managing Retired Hosts

  • With QUADS 1.1.5 and higher we now have the --retire, --unretire and --ls-retire features to manage decomissioning or reviving hosts.
  • Hosts marked as retired will still retain their scheduling history and data, but will not show as available unless filtered.
    • To list retired hosts:
quads-cli --ls-retire
  • To retire a host:
quads-cli --retire --host host01.example.com
  • To unretire a host:
quads-cli --unretire --host host01.example.com

Retiring Hosts

  • Before retiring a host you should move it back to your resource pool first, in our case this is cloud01.
  • This requires shrinking any active schedules on the host.
  • The below command will shrink any active schedules on those hosts without prompting to terminate immediately.
for host in $(cat /tmp/retired_hosts); do yes | quads-cli --shrink --host $host --now; done
  • After this the defined --move-host command will want to move these back to your resource pool and power them off.
  • retired hosts will remain officially in your resource pool but not show up in any visualizations or usage reporting, however their past usage history will all be available for record keeping and data requirements.

Extending the Schedule of an Existing Cloud

Occasionally you'll want to extend the lifetime of a particular assignment. QUADS lets you do this with one command but you'll want to double-check things first. In this example we'll be extending the assignment end date for cloud02

In QUADS version 1.1.4 or higher or the current master branch you can extend a cloud environment with a simple command.

quads-cli --extend --cloud cloud02 --weeks 2 --check

This will check whether or not the environment can be extended without conflicts.

To go ahead and extend it remove the --check

quads-cli --extend --cloud cloud02 --weeks 2

Extending the Schedule of a Specific Host

You might also want to extend the lifetime of a specific host. In this example we'll be extending the assignment end date for host01.

quads-cli --extend --host host01 --weeks 2 --check

This will check whether or not the environment can be extended without conflicts.

To go ahead and extend it remove the --check

quads-cli --extend --host host01 --weeks 2

Shrinking the Schedule of an Existing Cloud

Occasionally you'll want to shrink the lifetime of a particular assignment. In this example we'll be shrinking the assignment end date for cloud02

quads-cli --shrink --cloud cloud02 --weeks 2 --check

This will check whether or not the environment can be shrunk without conflicts.

To go ahead and shrink it remove the --check

quads-cli --shrink --cloud cloud02 --weeks 2

Shrinking the Schedule of a Specific Host

You might also want to shrink the lifetime of a specific host. In this example we'll be shrinking the assignment end date for host01.

quads-cli --shrink --host host01 --weeks 2 --check

This will check whether or not the host schedule can be shrunk without conflicts.

To go ahead and shrink it remove the --check

quads-cli --shrink --host host01 --weeks 2

Terminating a Schedule

If you would like to terminate the lifetime of a schedule at either a host or cloud level, you can pass the --now argument instead of --weeks which will set the schedules end date to now. In this example we'll be terminating the assignment end date for cloud02.

quads-cli --shrink --cloud cloud02 --now --check

This will check whether or not the environment can be terminated without conflicts.

To go ahead and terminate it remove the --check

quads-cli --shrink --cloud cloud02 --now

Adding Hosts to an existing Cloud

QUADS also supports adding new machines into an existing workload (cloud).

  • Search Availability Pool for Free Servers
    • Let's look for any 5 x servers from 2019-03-11 22:00 until 2019-04-22 22:00
quads-cli --ls-available --schedule-start "2016-12-05 08:00" --schedule-end "2016-12-15 08:00"

c03-h11-r620.rdu.openstack.example.com
c03-h13-r620.rdu.openstack.example.com
c03-h14-r620.rdu.openstack.example.com
c03-h15-r620.rdu.openstack.example.com
  • Move New Hosts into Existing Cloud

Above we see all the free servers during our timeframe, let's move them into cloud10

quads-cli --host c03-h11-r620.rdu.openstack.example.com --add-schedule --schedule-start "2016-12-05 08:00" --schedule-end "2016-12-15 08:00" --schedule-cloud cloud10
quads-cli --host c03-h13-r620.rdu.openstack.example.com --add-schedule --schedule-start "2016-12-05 08:00" --schedule-end "2016-12-15 08:00" --schedule-cloud cloud10
quads-cli --host c03-h14-r620.rdu.openstack.example.com --add-schedule --schedule-start "2016-12-05 08:00" --schedule-end "2016-12-15 08:00" --schedule-cloud cloud10
quads-cli --host c03-h15-r620.rdu.openstack.example.com --add-schedule --schedule-start "2016-12-05 08:00" --schedule-end "2016-12-15 08:00" --schedule-cloud cloud10

Removing a Schedule

You can remove an existing schedule across a set of hosts using the --rm-schedule flag against the schedule ID for each particular machine of that assignment.

  • Example: removing the schedule for three machines in cloud
  • Obtain the schedule ID via quads-cli --ls-schedule --host
  • These machines would happen to have the same cloud assignment as schedule id 2.
quads-cli --rm-schedule --schedule-id 2 --host c08-h01-r930.rdu.openstack.example.com
quads-cli --rm-schedule --schedule-id 3 --host c08-h01-r930.rdu.openstack.example.com
quads-cli --rm-schedule --schedule-id 2 --host c08-h01-r930.rdu.openstack.example.com

Removing a Schedule across a large set of hosts

You should search for either the start or end dates to select the right schedule ID to remove when performing schedule removals across a large set of hosts.

  • If you are using QUADS in any serious capacity always pick this option.
  • Example: removing schedule by searching for start date.
  • Often machine schedule ID's are different for the same schedule across a set of machines, this ensures you remove the right one.
for host in $(cat /tmp/452851); do quads-cli --rm-schedule --schedule-id $(quads-cli --ls-schedule --host $host | grep cloud08 | grep "start=2017-08-06" | tail -1 | awk -F\| '{ print $1 }') --host $host ; echo Done. ; done

Removing a Host from QUADS

To remove a host entirely from QUADS management you can use the --rm-host command.

quads-cli --rm-host f03-h30-000-r720xd.rdu2.example.com
Removed: {'host': 'f03-h30-000-r720xd.rdu2.example.com'}

Modifying a Host Schedule

  • Host schedules are managed by unique schedule ID's which can be viewed via the --ls-schedule command.
  • To modify a host schedule use the --mod-schedule --schedule-id command and either --schedule-start or --schedule-end or both as needed.
  • Before using this, make sure it's not easier to simply use --shrink or --extend and sub-commands across the entire cloud/environments or even per-host first.
quads-cli --mod-schedule --host host01.example.com --mod-schedule --schedule-id 31 --schedule-start "2023-05-22 22:00" --schedule-end "2023-06-22 22:00"

Modifying a Host Schedule across a large set of hosts

  • You may often need to modify the same schedule ID across a large set of hosts, in this scenario you can use the following one-liner:
  • You will want to filter for the specific cloudname and at least one schedule start or stop identifier (since environments are re-used).
    • In this example we use cloud06 and start=2023-03-13 to make sure our --mod-schedule command is unique.
  • It's also a good idea to do this first by prepending echo to quads-cli to ensure that the schedule-id are matched.
for host in $(cat /tmp/2491); do quads-cli --mod-schedule --schedule-id $(quads-cli --ls-schedule --host $host | grep cloud06 | grep "start=2023-03-13" | tail -1 | awk -F\| '{ print $1 }') --host $host --schedule-start "2023-03-12 22:00" ; done

Modify a Host Interface

To remove a host entirely from QUADS management you can use the --rm-host command.

quads-cli --mod-interface --interface-name em1 --host f03-h30-000-r720xd.rdu2.example.com --no-pxe-boot
Interface successfully updated

Remove a Host Interface

To remove a host entirely from QUADS management you can use the --rm-host command.

quads-cli --rm-interface --interface-name em1 --host f03-h30-000-r720xd.rdu2.example.com
Resource properly removed

Using the QUADS JSON API

  • All QUADS actions under the covers uses the JSON API v2
  • This is an optional local systemd service you can start and interact with and listens on localhost TCP/8080

Additional Tools and Commands

Verify or Correct Cloud and Host Network Switch Settings

  • The tool /opt/quads/quads/verify_switchconf.py can be used to both validate and correct network switch configs.
  • This can be run at a cloud level (and with 1.1.5+ also at the per-host level).
  • It's advised to run it first without --change to see if it would fix something.
  • This will also check/correct optional routable VLANs if those are in use.
  • To validate a clouds network config:
/opt/quads/quads/tools/verify_switchconf.py --cloud cloud10
  • To validate and fix a clouds network config use --change
/opt/quads/quads/tools/verify_switchconf.py --cloud cloud10 --change
  • To validate a singular hosts network switch configuration:
/opt/quads/quads/tools/verify_switchconf.py --host host01.example.com
  • To validate and fix a single hosts network config use --change
/opt/quads/quads/tools/verify_switchconf.py --host host01.example.com --change
  • To straddle clouds and place a single host into a cloud it does not belong in (rare use case):
/opt/quads/quads/tools/verify_switchconf.py --host host01.example.com --cloud cloud10

Note, if host01.example.com is not in cloud10, but rather cloud20, you will see the following output:

WARNING - Both --cloud and --host have been specified.
WARNING -
WARNING - Host: host01.example.com
WARNING - Cloud: cloud10
WARNING -
WARNING - However, host01.example.com is a member of cloud20
WARNING -
WARNING - !!!!! Be certain this is what you want to do. !!!!!
WARNING -

Modify or check a specific Host Network Switch Settings

  • With the modify_switch_conf.py tool you can set up each individual network interface to a specific vlan id.
  • Passing the --change argument will make the changes effective in the switch. Not passing this will only verify the configuration is set to the desired.
/opt/quads/quads/tools/modify_switch_conf.py --host host01.example.com --nic1 1400 --nic2 1401 --nic3 1400 --nic4 1402 --nic5 1400
  • All --nic* arguments are optional so this can be also done individually for all nics.

Mapping Interface to VLAN ID

  • An easy way to figure out what VLAN corresponds to what generic em interface in the QUADS --ls-interfaces information we now include the following tool:
./opt/quads/quads/tools/ls_switch_conf.py --cloud cloud32
INFO - Cloud qinq: 1
INFO - Interface em1 appears to be a member of VLAN 1410
INFO - Interface em2 appears to be a member of VLAN 1410

This tool also accepts the --all argument which will list a detail for all hosts in the cloud.

Additional you can achieve the same with the following shell one-liner, setting cloud=XX for the cloud and adjusting $(seq 1 4) for your interface ranges available on the host.

cloud=32 ; origin=1100 ; offset=$(expr $(expr $cloud - 1) \* 10); vl=$(expr $origin + $offset) ;for i in $(seq 1 4) ; do vlan=$(expr $vl + $i - 1) ; echo "em$i is interface VLAN $vlan in cloud$cloud" ; done
em1 is interface VLAN 1400 in cloud32
em2 is interface VLAN 1401 in cloud32
em3 is interface VLAN 1402 in cloud32
em4 is interface VLAN 1403 in cloud32
  • You can then use this information to map specific interfaces into other VLAN/clouds as required for more one-off or ad-hoc requirements beyond the standard VLAN modes that QUADS currently supports.
  • Note that this would be an example for the default Q-in-Q 0 (isolated) VLAN configuration. The Q-in-Q 1 (combined) configuration would simple be VLAN1400 for all interfaces above respectively.

Modifying Cloud-level Attributes

  • You can redefine or change any aspects of an already-defined cloud starting in 1.1.4 with the --mod-cloud command.
  • This can be done a per-parameter or combined basis:
quads-cli --mod-cloud --cloud cloud02 --cloud-owner jhoffa
quads-cli --mod-cloud --cloud cloud04 --cc-users "tpetty fmercury"
quads-cli --mod-cloud --cloud cloud06 --vlan 604 --wipe
quads-cli --mod-cloud --cloud cloud50 --no-wipe
quads-cli --mod-cloud --cloud cloud50 --vlan none

Looking into the Future

  • Because QUADS knows about all future schedules you can display what your environment will look like at any point in time using the --date command.

  • Looking into a specific environment by date

quads-cli --cloud-only cloud08 --date "2019-06-04 22:00"
f16-h01-000-1029u.rdu2.example.com
f16-h02-000-1029u.rdu2.example.com
f16-h03-000-1029u.rdu2.example.com
f16-h05-000-1029u.rdu2.example.com
f16-h06-000-1029u.rdu2.example.com
  • Looking at all schedules by date
quads-cli --ls-schedule --date "2020-06-04 22:00"

Dry Run for Pending Actions

  • You can see what's in progress or set to provision via the --dry-run sub-flag of --move-hosts
quads-cli --move-hosts --dry-run
INFO: Moving b10-h27-r620.rdu.openstack.example.com from cloud01 to cloud03
INFO: Moving c02-h18-r620.rdu.openstack.example.com from cloud01 to cloud03
INFO: Moving c02-h19-r620.rdu.openstack.example.com from cloud01 to cloud03
INFO: Moving c02-h21-r620.rdu.openstack.example.com from cloud01 to cloud03
INFO: Moving c02-h25-r620.rdu.openstack.example.com from cloud01 to cloud03
INFO: Moving c02-h26-r620.rdu.openstack.example.com from cloud01 to cloud03

Find Free Cloud Environment

  • You can use quads-cli --find-free-cloud to suggest a cloud environment to use that does not have any future hosts scheduled to use it.
quads-cli --find-free-cloud
cloud12
cloud16
cloud17
cloud18

Find Available Hosts

  • The --ls-available functionality lets you search for available hosts in the future based on a date range or other criteria.

    • Find based on a date range:
quads-cli --ls-available --schedule-start "2019-12-05 08:00" --schedule-end "2019-12-15 08:00"
  • Find based on starting now with an end range:
quads --ls-available --schedule-end "2019-06-02 22:00"

Find Available Hosts based on Hardware or Model

  • In QUADS 1.1.4 and higher you can now filter your availability search based on hardware capabilities or model type.
  • Using this feature requires importing hardware metadata
  • Example below using --filter "model==1029U-TRTP"
quads-cli --ls-available --schedule-start "2020-08-02 22:00" --schedule-end "2020-08-16 22:00" --filter "model==1029U-TRTP"
  • Listing retired hosts can now use the --filter feature:
quads-cli --ls-hosts --filter "retired==True"
  • Listing specific hosts from a certain cloud:
quads-cli --cloud-only --cloud cloud13 --filter "model==FC640"

Find Available Web Interface

  • We now have a Flask-based --ls-available web interface available on quadshost:5001 if your firewall rules are open for TCP/5001.
  • Available in QUADS 1.1.4 or above as a tech preview (when we migrate fully to Flask this will be supplanted with a full UI).
  • This is provided via the quads-web systemd service or you can run it manually via cd /opt/quads/web ; python3 main.py
  • You will need to seed the models data for your systems using the new host metadata feature

quads-available-web

  • Control + click can select more than one model
  • Not selecting a model assumes a search for anything available.

Find a System by MAC Address

  • You can utilize the new metadata model and --filter command in 1.1.4 and above along with --ls-hosts to search for a system by MAC Address.
quads-cli --ls-hosts --filter "interfaces.mac_address==ac:1f:6b:2d:19:48"

Find Systems by Switch IP Address

  • You can list what systems are connected to a switch by querying the ip_address (soon to be switch_ip in 1.1.7) information from the interfaces datasource.
quads-cli --ls-hosts --filter "interfaces.ip_address==10.1.34.210"

Interacting with MongoDB

  • In some scenarios you may wish to interrogate or modify values within MongoDB. You should be careful doing this and have good backups in place. Generally, we will try to implement data, object and document modification needs through quads-cli so you don't need to do this but sometimes it's useful for troubleshooting or other reasons.

Using JIRA with QUADS

  • We utilize the JIRA ticketing system internally for R&D infrastructure requests managed by QUADS.

  • We do provide some best-effort tooling and a JIRA library to bridge automation gaps.

Backing up QUADS

  • We do not implement backups for QUADS for you, but it's really easy to do on your own via mongodump
  • Refer to our docs on installing mongodb tools
  • Implement mongodump to backup your database, we recommend using a git repository as it will take care of revisioning and updates for you.
  • Below is an example script we use for this purpose, this assumes you have a git repository already setup you can push to with ssh access.
#!/bin/bash
# script to call mongodump and dump quads db, push to git.

backup_database() {
    mongodump --out /opt/quads/backups/
}

sync_git() {
    cd /opt/quads/backups
    git add quads/*
    git add admin/*
    git commit -m "$(date) content commit"
    git push
}

backup_database
sync_git

Restoring QUADS DB from Backup

  • If you have a valid mongodump directory structure you can restore the QUADS database via the following command.

  • This will drop the current database and replace it with your mongodump copy

    • First, cd to the parent directory of where your mongorestore is kept
[root@host-04 rdu2-quads-backup-mongo]# ls
admin  mongodump  mongodump-quads.sh  quads  README.md
  • quads is the directory containing our database dump files
  • Use mongorestore to drop the current quads database and replace with your backup
mongorestore --drop -d quads quads
  • You will see some messages and all should be good.
2019-05-05T01:23:01.257+0100	building a list of collections to restore from quads dir
2019-05-05T01:23:01.270+0100	reading metadata for quads.vlan from quads/vlan.metadata.json
2019-05-05T01:23:01.282+0100	reading metadata for quads.host from quads/host.metadata.json
2019-05-05T01:23:01.288+0100	reading metadata for quads.counters from quads/counters.metadata.json
2019-05-05T01:23:01.294+0100	reading metadata for quads.schedule from quads/schedule.metadata.json
2019-05-05T01:23:01.329+0100	restoring quads.vlan from quads/vlan.bson
2019-05-05T01:23:01.361+0100	restoring quads.host from quads/host.bson
2019-05-05T01:23:01.396+0100	restoring quads.counters from quads/counters.bson
2019-05-05T01:23:01.426+0100	restoring quads.schedule from quads/schedule.bson
2019-05-05T01:23:01.434+0100	restoring indexes for collection quads.vlan from metadata
2019-05-05T01:23:01.434+0100	restoring indexes for collection quads.host from metadata
2019-05-05T01:23:01.524+0100	finished restoring quads.host (494 documents)
2019-05-05T01:23:01.549+0100	finished restoring quads.vlan (148 documents)
2019-05-05T01:23:01.549+0100	reading metadata for quads.notification from quads/notification.metadata.json
2019-05-05T01:23:01.567+0100	reading metadata for quads.cloud_history from quads/cloud_history.metadata.json
2019-05-05T01:23:01.568+0100	no indexes to restore
2019-05-05T01:23:01.568+0100	finished restoring quads.counters (334 documents)
2019-05-05T01:23:01.602+0100	restoring quads.notification from quads/notification.bson
2019-05-05T01:23:01.643+0100	restoring quads.cloud_history from quads/cloud_history.bson
2019-05-05T01:23:01.659+0100	reading metadata for quads.cloud from quads/cloud.metadata.json
2019-05-05T01:23:01.661+0100	no indexes to restore
2019-05-05T01:23:01.661+0100	finished restoring quads.notification (41 documents)
2019-05-05T01:23:01.699+0100	restoring quads.cloud from quads/cloud.bson
2019-05-05T01:23:01.717+0100	restoring indexes for collection quads.cloud_history from metadata
2019-05-05T01:23:01.718+0100	no indexes to restore
2019-05-05T01:23:01.718+0100	finished restoring quads.schedule (433 documents)
2019-05-05T01:23:01.742+0100	restoring indexes for collection quads.cloud from metadata
2019-05-05T01:23:01.743+0100	finished restoring quads.cloud_history (94 documents)
2019-05-05T01:23:01.792+0100	finished restoring quads.cloud (32 documents)
2019-05-05T01:23:01.792+0100	done

Troubleshooting Validation Failures

A useful part of QUADS is the functionality for automated systems/network validation. Below you'll find some steps to help understand why systems/networks might not pass validation so you can address any issues.

Understanding Validation Structure

There are two main validation tests that occur before a cloud environment is automatically released:

  • Foreman Systems Validation ensures that no target systems in your environment are marked for build.
  • VLAN Network Validation ensures that all the backend interfaces in your isolated VLANs are reachable via fping

All of these validations are run from /opt/quads/quads/tools/validate_env.py and we also ship a few useful tools to help you figure out validation failures.

/opt/quads/quads/tools/validate_env.py is run from cron, see our example cron entry

Troubleshooting Steps

You should run through each of these steps manually to determine what systems/networks might need attention of automated validation does not pass in a reasonable timeframe. Typically, admin_cc: will receieve email notifications of trouble hosts as well.

  • General Availability can be checked via a simple fping command, this should be run first.
quads-cli --cloud-only cloud23 > /tmp/cloud23
fping -u -f /tmp/cloud23
  • Foreman Systems Validation can be run via the hammer cli command provided by gem install hammer_cli_foreman_admin hammer_cli
for host in $(quads-cli --cloud-only cloud15) ; do echo $host $(hammer host info --name $host | grep -i build); done

No systems should be left marked for build.

Validation using Debug Mode

  • NOTE Automated validation will not start until 2 hours after the assignment is scheduled to go out, until this point /opt/quads/quads/tools/validate_env.py will not attempt to validate any systems if run and they have started less than 2 hours ago.

    • This can be set via the validation_grace_period: setting in /opt/quads/conf/quads.yml
  • /opt/quads/quads/tools/validate_env.py now has a --debug option which tells you what's happening during validation.

  • This will test the backend network connectivity part and the entire set of checks.

  • Successful Validation looks like this:

/opt/quads/quads/tools/validate_env.py --debug
Validating cloud23
Using selector: EpollSelector
:Initializing Foreman object:
GET: /status
GET: /hosts?search=build=true
Command executed successfully: fping -u f12-h01-000-1029u.rdu2.scalelab.example.com f12-h02-000-1029u.rdu2.scalelab.example.com f12-h03-000-1029u.rdu2.scalelab.example.com
Command executed successfully: fping -u 172.16.38.126 172.20.38.126 172.16.36.206
Command executed successfully: fping -u 172.17.38.126 172.21.38.126 172.17.36.206
Command executed successfully: fping -u 172.18.38.126 172.22.38.126 172.18.36.206
Command executed successfully: fping -u 172.19.38.126 172.23.38.126 172.19.36.206
Subject: Validation check succeeded for cloud23
From: RDU2 Scale Lab <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected],
 [email protected], [email protected], [email protected]
Reply-To: [email protected]
User-Agent: Rufus Postman 1.0.99
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0

A post allocation check previously failed for:

   cloud: cloud23
   owner: ipinto
   ticket: 498569

has successfully passed the verification test(s)!  The owner
should receive a notification that the environment is ready
for use.

DevOps Team

 cloud23 / ipinto / 498569
  • Unsuccessful Validation looks like this:
/opt/quads/quads/tools/validate_env.py --debug
Validating cloud23
Using selector: EpollSelector
:Initializing Foreman object:
GET: /status
GET: /hosts?search=build=true
There was something wrong with your request
ICMP Host Unreachable from 10.1.38.126 for ICMP Echo sent to f12-h14-000-1029u.rdu2.scalelab.example.com (10.1.38.43)

ICMP Host Unreachable from 10.1.38.126 for ICMP Echo sent to f12-h14-000-1029u.rdu2.scalelab.example.com (10.1.38.43)

ICMP Host Unreachable from 10.1.38.126 for ICMP Echo sent to f12-h14-000-1029u.rdu2.scalelab.example.com (10.1.38.43)

ICMP Host Unreachable from 10.1.38.126 for ICMP Echo sent to f12-h14-000-1029u.rdu2.scalelab.example.com (10.1.38.43)

Skipping Past Network Validation

  • In QUADS 1.1.6+ you can skip past network validation via:
/opt/quads/tools/validate_env.py --skip-network
  • In older versions of QUADS you will want to consult the documentation for interacting with MongoDB for how to override this check.

Skipping Past Host and Systems Validation

  • In QUADS 1.1.8 you can skip past systems and host validation (Foreman) via:
/opt/quads/quads/tools/validate_env.py --skip-system

Skipping Past Network and Systems Validation per Host

  • In QUADS 1.1.8 you can skip past both systems and network checks per host via:
/opt/quads/quads/tools/validate_env.py --skip-hosts host01.example.com host02.example.com
  • Effectively, any host listed with --skip-hosts will pass it completely through validation.
  • This can be used in combination with --skip-system and --skip-network as well.

Skipping Past Foreman Validation

  • You only need to do this prior to QUADS 1.1.8, otherwise use --skip-hosts and --skip-system above.

  • If you know your systems are built you can force validate_env.py to move into the network portions of the validation by toggling the provisioned attribute in MongoDB for your cloud object.

db.cloud.update({"name": "cloud23"}, {$set:{'provisioned':true}}
  • More information on manual intervention and overrides via MongoDB can be found here

Validate Only a Specific Cloud

  • If you want to validate only a certain cloud you can do so by specifying the cloud's name with the --cloud flag.
/opt/quads/tools/validate_env.py --cloud cloud01

Mapping Internal VLAN Interfaces to Problem Hosts

You might have noticed that we configure our Foreman templates to drop 172.{16,17,18,19}.x internal VLAN interfaces which correspond to the internal, QUADS-managed multi-tenant interfaces across a set of hosts in a cloud assignment.

The first two octets here can be substituted by the first two octets of your systems public network in order to determine from validate_env.py --debug which host internal interfaces have issues or are unreachable.

validation_1

  • Above, we can run the host command to determine what these machines map to by substituting 10.1 for the first two octects:
# for host in 10.1.37.231 10.1.38.150; do host $host; done
231.37.1.10.in-addr.arpa domain name pointer e17-h26-b04-fc640.example.com.
150.38.1.10.in-addr.arpa domain name pointer e17-h26-b03-fc640.example.com.
  • Below you can see the code that maintains this mapping and assumptions:

validation_2

This mapping feeds into our VLAN network validation code

Contact QUADS Developers

Besides Github we're also on IRC via irc.libera.chat. You can click here to join in your browser.

QUADS Talks and Media

Skynet your Infrastructure with QUADS @ EuroPython 2017

quads's People

Contributors

dominikvagner avatar grafuls avatar jtaleric avatar kambiz-aghaiepour avatar quantum-anomaly avatar quantumposix avatar radez avatar sadsfae avatar sahiltikale avatar smalleni avatar vidurous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quads's Issues

Improve find-available.py by using multiprocessing library

Currently bin/find-available.py does some heavy lifting of combinatorial math to parse all machine schedules and return the first available start/end dates and machines that are available based on the # of days and # of machines and optionally the type of machines required.

It can sometimes take upwards of 15-20minutes to run. This is an RFE to investigate and implement the Python processed-based threading interface to hopefully dramatically reduce the run times.

Reset Cloud descriptions once workload is complete.

We should be resetting the cloud description metadata to something like unused or just an empty value once a workload is completed. This will make it easier for us to re-use our cloud names and save time trying to track down what's new, pending or unused.

RFE: Notification message machine list

In the allocation expiration warning notification email list the machines that are set to expire. That way the user knows exactly which machines the message is about. This is especially helpful if there are a subset of machines that are set to expire that don't constitute the entire allocation.

Expand additional IRC/email notifications

We're going to need some additional notifications in place:

  • IRC notifications when a new schedule is made via QUADS
  • IRC notifications when a new assignment begins
  • IRC notifications when an existing assignment ends
  • operator email notification when a new assignment begins
  • tenant email notification when their new assignment begins

We should look to use simple netcat to TCP/5044 for the supybot notify plugin we're already using.

--installdir should not be the QUADS state dir

We need to forcibly pass and ensure datadir to be the absolute location for the state files. This could cause a mismatch in lab state that gets read that QUADS relies on to perform commands if the wrong statedir is referenced.

RFE: Support other switches besides Juniper.

As we make further improvements to QUADS and possible have a base Networking Class that is inherited by classes specific to vendors like Juniper.py, Cisco.py as some of the other issues point out, it would be helpful to have a YAML file where we define the switch port to machine mappings that is consumed by QUADS to operate in a Lab Agnostic fashion when making switch config changes. This would make QUADS readily portable to BAGL.

Do not reprovision host when it is moved into cloud01

Cloud01 is the pool of available servers. Currently quads rebuilds those hosts when they are moved from another cloud environment. This is unnecessary since they will be rebuilt when moved into an allocated Cloud environment. This also prevents recovery if the machines are mistakenly taken out of an allocation. If they aren't rebuilt going into Cloud01, then a mistaken move to Cloud01 could be corrected by simply moving the machine back to the correct Cloud environment and nothing would be lost.

RFE: Continue breaking out quads.py

Based on a conversation I had with @kambiz-aghaiepour here are my suggestions for yet another change for quads.py.

Currently QUADs.py is a huge python class that tackles many things. I would suggest breaking out the the following, to ease further development and allow a plugin model.

schedule.py - Which can live on its own since this is the bread and butter of Quads.. This contain all methods pertaining to QUADs schedule.

hosts.py - Anything interacting with the hosts is done here.

clouds.py - Anything interacting with the clouds is done here. Clouds are made up of Host objects, I would think.

tickets.py - Class to define a ticketing system.
    |
rt.py - Inherits tickets to build the RT ticketing system plugin.

provisioner.py - Class to define provisioning systems.
     |
foreman.py - inherits provisioner to build the Foreman provisioning plugin

tools.py -  House methods that can / should be shared across all these above classes.

I also recommended getting rid of all the bash scripts so you can easily switch out hammer for some other tool to execute a like command, ie beaker.

I would also recommend moving the code base into a lib/ instead of bin/ -- You can create a bin/quads.py that imports the quads lib, imports the config and executes the main method.

RFE : Alternate color of rows

Alternate the color of rows, white and gray would be nice.

Add a :hover for when the mouse overs over a specific row.

Sometimes Foreman provisioning fails due to build status if other interfaces present.

We've seen this occur recently, probably a Foreman bug of some sort. During the lifetime of the machine's current OS puppet facts may report additional interfaces Foreman is not aware of or has control over anymore, this will cause the --build 1 flag to be unable to be set:

e.g.

(/var/log/move-and-rebuild.log)

User role has been assigned
User [cloud05] updated
==== UNSET PXE from Foreman on b10-h21-r620.example.com
Host parameter updated
Could not update the host:
  Interfaces some interfaces are invalid

The fix or workaround for this is to first remove all non-primary/provision interfaces from the host via Foreman first before toggling rebuild.

Incorrect notification goes out with zero assigned hosts

Noticed a small issue with reclaiming all environments recently and notifications went out for defined clouds with zero hosts assigned, in this case incorrectly.

Notifications about new allocations with 0 machines when in reality these allocations were ending. One notification went out for each allocation that ended, which shouldn't happen.

Date: Mon, 9 Jan 2017 05:15:43 -0000                                                                                                                                                           
From: QUADS <[email protected]>                                                                                                                                                                 
To: [email protected]                                                                                                                                                                          
Cc: [email protected], [email protected], [email protected], [email protected]                                                                                                               
Subject: New QUADS Assignment Allocated                                                                                                                                                        
Reply-To: [email protected]                                                                                                                                                                  

Greetings Citizen,

You've been allocated a new environment!  The environment is not
yet ready for use but you are being notified ahead of time that
it is being prepared.

cloud09 : 0 (Gnocchi/Telemetry)

(Details)
http://wiki.example.com/assignments/#cloud09

You can view your machine list, duration and other
details above.  Once the environment is active you
will receive an additional notification.

For additional information regarding the Scale Lab usage
please see the following documentation:

http://wiki.example.com/faq/

Here is the notification dir listing and timestamps:

-=>>ls -lah /etc/lab/report/
total 8.0K
drwxr-xr-x.  2 root root 4.0K Jan  9 05:15 .
drwxr-xr-x. 11 root root  208 Jan 11 13:35 ..
-rw-r--r--.  1 root root    0 Dec  2 18:15 -1-cloud10-
-rw-r--r--.  1 root root    0 Dec  2 18:15 -3-cloud06-
-rw-r--r--.  1 root root    0 Dec  2 18:15 -3-cloud07-
-rw-r--r--.  1 root root    0 Dec  2 18:15 -5-cloud04-
-rw-r--r--.  1 root root    0 Dec  2 18:15 -7-cloud08-
-rw-r--r--.  1 root root    0 Dec  8 00:15 cloud01-nobody-initial-
-rw-r--r--.  1 root root    0 Jan  8 00:15 cloud02-jtaleric-1-428270
-rw-r--r--.  1 root root    0 Jan  6 00:15 cloud02-jtaleric-3-428270
-rw-r--r--.  1 root root    0 Jan  4 00:15 cloud02-jtaleric-5-428270
-rw-r--r--.  1 root root    0 Dec  2 00:15 cloud02-jtaleric-7-428270
-rw-r--r--.  1 root root    0 Nov 22 16:37 cloud02-jtaleric-initial-428270
-rw-r--r--.  1 root root    0 Jan  9 05:15 cloud02-jtaleric-pre-initial-428270
-rw-r--r--.  1 root root    0 Jan  8 00:15 cloud03-akrzos-1-427008
-rw-r--r--.  1 root root    0 Jan  6 00:15 cloud03-akrzos-3-427008
-rw-r--r--.  1 root root    0 Jan  4 00:15 cloud03-akrzos-5-427008
-rw-r--r--.  1 root root    0 Jan  2 00:15 cloud03-akrzos-7-427008
-rw-r--r--.  1 root root    0 Dec  8 00:15 cloud03-akrzos-initial-427008
-rw-r--r--.  1 root root    0 Jan  9 05:15 cloud03-akrzos-pre-initial-427008
-rw-r--r--.  1 root root    0 Nov 27 00:15 cloud03-mwagner-1-423624
-rw-r--r--.  1 root root    0 Nov 18 00:00 cloud03-mwagner-3-423624
-rw-r--r--.  1 root root    0 Nov 16 00:00 cloud03-mwagner-5-423624
-rw-r--r--.  1 root root    0 Nov 14 00:00 cloud03-mwagner-7-423624
-rw-r--r--.  1 root root    0 Nov 22 15:44 cloud03-mwagner-initial-423624
-rw-r--r--.  1 root root    0 Jan  9 00:16 cloud04-atheurer-pre-7-431524
-rw-r--r--.  1 root root    0 Dec 22 01:16 cloud04-atheurer-pre-initial-431524
-rw-r--r--.  1 root root    0 Nov 23 00:15 cloud04-bengland-1-423424
-rw-r--r--.  1 root root    0 Nov 22 18:15 cloud04-bengland-3-423424
-rw-r--r--.  1 root root    0 Dec 17 00:15 cloud04-bengland-5-423424
-rw-r--r--.  1 root root    0 Dec 16 10:15 cloud04-bengland-7-423424
-rw-r--r--.  1 root root    0 Dec  2 18:15 cloud04-bengland-initial-
-rw-r--r--.  1 root root    0 Nov 22 15:45 cloud04-bengland-initial-423424
-rw-r--r--.  1 root root    0 Dec 21 20:16 cloud04-bengland-pre-7-423424
-rw-r--r--.  1 root root    0 Dec 21 20:16 cloud04-bengland-pre-initial-423424
-rw-r--r--.  1 root root    0 Dec  2 18:15 -cloud05-initial-
-rw-r--r--.  1 root root    0 Jan  8 00:15 cloud05-smalleni-1-426282
-rw-r--r--.  1 root root    0 Jan  6 00:15 cloud05-smalleni-3-426282
-rw-r--r--.  1 root root    0 Jan  4 00:15 cloud05-smalleni-5-426282
-rw-r--r--.  1 root root    0 Jan  2 00:15 cloud05-smalleni-7-426282
-rw-r--r--.  1 root root    0 Nov 27 18:15 cloud05-smalleni-initial-426282
-rw-r--r--.  1 root root    0 Jan  9 05:15 cloud05-smalleni-pre-initial-426282
-rw-r--r--.  1 root root    0 Dec  2 18:15 -cloud06-initial-
-rw-r--r--.  1 root root    0 Jan  8 00:15 cloud06-rbryant-1-426080
-rw-r--r--.  1 root root    0 Jan  6 00:15 cloud06-rbryant-3-426080
-rw-r--r--.  1 root root    0 Jan  4 00:15 cloud06-rbryant-5-426080
-rw-r--r--.  1 root root    0 Jan  2 00:15 cloud06-rbryant-7-426080
-rw-r--r--.  1 root root    0 Nov 27 18:15 cloud06-rbryant-initial-426080
-rw-r--r--.  1 root root    0 Jan  9 05:15 cloud06-rbryant-pre-initial-426080
-rw-r--r--.  1 root root    0 Oct 31 00:00 cloud07-akrzos-1-423407
-rw-r--r--.  1 root root    0 Oct 29 00:00 cloud07-akrzos-3-423407
-rw-r--r--.  1 root root    0 Oct 27 00:00 cloud07-akrzos-5-423407
-rw-r--r--.  1 root root    0 Oct 25 00:00 cloud07-akrzos-7-423407
-rw-r--r--.  1 root root    0 Dec  2 18:15 -cloud07-initial-
-rw-r--r--.  1 root root    0 Dec 21 00:15 cloud07-ssaha-1-426254
-rw-r--r--.  1 root root    0 Dec 19 00:15 cloud07-ssaha-3-426254
-rw-r--r--.  1 root root    0 Dec 17 00:15 cloud07-ssaha-5-426254
-rw-r--r--.  1 root root    0 Dec 15 00:15 cloud07-ssaha-7-426254
-rw-r--r--.  1 root root    0 Nov 23 18:15 cloud07-ssaha-initial-426254
-rw-r--r--.  1 root root    0 Jan  9 05:15 cloud07-ssaha-pre-initial-426254
-rw-r--r--.  1 root root    0 Dec  7 00:15 cloud08-afield-1-423936
-rw-r--r--.  1 root root    0 Dec  2 00:15 cloud08-afield-3-423936
-rw-r--r--.  1 root root    0 Nov 30 00:15 cloud08-afield-5-423936
-rw-r--r--.  1 root root    0 Nov 28 00:15 cloud08-afield-7-423936
-rw-r--r--.  1 root root    0 Nov 22 15:45 cloud08-afield-initial-423936
-rw-r--r--.  1 root root    0 Dec  2 18:15 -cloud08-initial-
-rw-r--r--.  1 root root    0 Dec 21 17:15 cloud08-jefbrown-1-423734
-rw-r--r--.  1 root root    0 Jan  6 00:16 cloud08-jefbrown-3-423734
-rw-r--r--.  1 root root    0 Jan  4 00:16 cloud08-jefbrown-5-423734
-rw-r--r--.  1 root root    0 Jan  2 00:16 cloud08-jefbrown-7-423734
-rw-r--r--.  1 root root    0 Dec 21 17:15 cloud08-jefbrown-initial-423734
-rw-r--r--.  1 root root    0 Jan  9 05:15 cloud08-jefbrown-pre-initial-423734
-rw-r--r--.  1 root root    0 Oct 31 00:00 cloud09-akrzos-1-423402
-rw-r--r--.  1 root root    0 Jan  8 00:16 cloud09-akrzos-1-427010
-rw-r--r--.  1 root root    0 Oct 29 00:00 cloud09-akrzos-3-423402
-rw-r--r--.  1 root root    0 Jan  6 00:16 cloud09-akrzos-3-427010
-rw-r--r--.  1 root root    0 Oct 27 00:00 cloud09-akrzos-5-423402
-rw-r--r--.  1 root root    0 Jan  4 00:16 cloud09-akrzos-5-427010
-rw-r--r--.  1 root root    0 Oct 25 00:00 cloud09-akrzos-7-423402
-rw-r--r--.  1 root root    0 Jan  2 00:16 cloud09-akrzos-7-427010
-rw-r--r--.  1 root root    0 Dec  8 00:15 cloud09-akrzos-initial-427010
-rw-r--r--.  1 root root    0 Jan  9 05:15 cloud09-akrzos-pre-initial-427010
-rw-r--r--.  1 root root    0 Jan  8 00:16 cloud10-jeder-1-423401
-rw-r--r--.  1 root root    0 Jan  6 00:16 cloud10-jeder-3-423401
-rw-r--r--.  1 root root    0 Jan  4 00:16 cloud10-jeder-5-423401
-rw-r--r--.  1 root root    0 Jan  2 00:16 cloud10-jeder-7-423401
-rw-r--r--.  1 root root    0 Nov 22 15:45 cloud10-jeder-initial-423401
-rw-r--r--.  1 root root    0 Jan  9 05:15 cloud10-jeder-pre-initial-423401

Bug in schedule id assumptions

There is currently a logic bug in lib/quads.py that makes some assumptions that the next available assignment id will always be iterative. This can be triggered when a schedule has been removed and another net-new schedule is added. This is a serious issue that can cause disruption/reprovisioning of an existing environment.

This seems to be manifested here:

https://github.com/redhat-performance/quads/blob/master/lib/libquads.py#L419

The keys need to be sorted and incremented instead. We can reproduce this and a fix is forthcoming ASAP.

Implement more precise checking on running Ansible processes

For Dell hosts and OSP/Director-deployed OpenStack hosts we run a series of per-machine type playbooks to ensure the Foreman PXE flag is removed and interfaces are setup for Director manipulation, see the nullos: true/false parameters under the templates directory.

Within this hierarchy we need better checking with the current pid-management.

The process check for quads-boot-order.sh tries to ensure that not another process is running for the child process (ansible-playbook). However, the test is to ensure that the PID for the running process is valid. This test in and of itself is not 100% reliable, as the PIDs can be recycled on the system. As such if some unrelated process is running with the old PID for a previous run stored in the PID file, quads will erroneously think there is another instance of the ansible playbook process running. The change to the pid lookup will limit the cmdline match search to ensure the current running process is also "quads-boot-order" (or at least includes it in the cmdline).

Extend Foreman views to users

We need to extend the Foreman UI and CLI views and actions (rebuild, change OS, etc). to users.
This can be accomplished via:

(one-time)

  • Create a user per cloud environment
  • Create a role per server
  • Create a filter per server role that allows view_hosts,edit_hosts,build_hosts,power_hosts,console_hosts

(Foreman workflow)
move-hosts should do the following:

On assignment:

  1. Strips all server roles for that specific cloud user
  2. Adds the requisite roles per server for that cloud

On interval:

  1. Checks that the QUADS server list matches what Foreman should have above.

Implement system-level automated validation

It would be great if QUADs could ship with a ramdisk that did the host validation (ping, etc) and nuked the previous tenant's data/partitions on the disks. Rather than laying a OS on the disk to validate things.

RFE: Graphical visualization of monthly machine assignments

It would be very beneficial to have a way to visualize the machine allocations by month. This would help with planning how to meet upcoming requests for resources as well as give visual indications about which machines or sets of machines are used most often. A different color for each quads cloud allocation with a list of machines on one axis and the days of the month on the other.

Fix issue with boot order check for Dells.

The boot order check was being terminated prematurely if any one of the hosts was still running a playbook. Also there appears to be a setting in the director deployed hosts that prevents the playbook from "resetting" the host, so a powercycle is added to ensure components of dell systems can be reconfigured.

Split out configuration elements

Currently there are some hard coded elements (example.com vs domain specific, wiki passwords, paths to external scripts, config directories, etc) that need to be moved into a unified configuration file. This would allow for easy portability from one environment to another.

Currently when we make changes internally, we then run a "sanitize" script that strips out those elements across multiple files. The simple solution would be to move the configurable elements into a sourced configuration and ensure the config is read in from any location that needs it.

Extended notification changes needed

To expand upon the email notifications we should also add the following:

(New)

  • Email notification 5 days away from when assignment will occur.

(Existing)

  • Generate more granular information on 7,5,3,1 day email notifications:
  • List the machines that are scheduled to be removed.

Add color coding for TimeRemaining when critical

RFE to add color coding (green, yellow, red) when the TimeRemaining threshold hits the following:

Green - assignment duration left > 5 days
Yellow - assignment duration left < 5 days
Red - assignment duration < 2 days

RFE: Connectivity Diagram

Could we have a diagram to show how the systems are connected? Perhaps the diagram could show the physical machines that each cloud has been allocated. This could be done dynamically similar to the dynamic wiki page.

Remove list of hosts from email

Since the email can get out of sync with what is reality (reality being the authoritative source, aka a wiki page). I recommend removing the list of hosts totally from the email, and provide a direct link to the host listing on the QUADs wiki.

Be more efficient about Foreman API calls

Clean up places where we're relying on hammer CLI calls per-host to query host parameters when we can do the work up front and query it cached in some other form or in general be more sparing about unnecessarily querying host parameters.

Example:

We can cut down on the number of needed Foreman calls substantially by removing the host list outside of the scope of the for loop here:

https://github.com/redhat-performance/quads/blob/master/bin/make-instackenv-json.sh#L51

In it's current implementation we're seeing way too many API calls in Foreman /var/log/production.log e.g.

2017-03-27 10:09:29 [app] [I]   Parameters: {"search"=>"params.nullos=false", "page"=>"1", "per_page"=>"1000", "apiv"=>"v2", :host=>{}}
2017-03-27 10:09:29 [app] [I] Authorized user admin(Admin User)
2017-03-27 10:09:30 [app] [I]   Rendered api/v2/hosts/index.json.rabl within api/v2/layouts/index_layout (768.6ms)
2017-03-27 10:09:30 [app] [I] Completed 200 OK in 998ms (Views: 743.7ms | ActiveRecord: 110.2ms
cat /var/log/foreman/production.log | grep "params.nullos=false" | wc -l
4922

Automate post-provisioning backend network validation

Currently the validation performed after a set of hosts is provisioned via quads is done manually, this needs to be automated.

Approaches:

  • Use the first machine as a test fping host for batch of new machines provisioned/moved into a new cloud assignment
  • Deploy machines in no less than sets of two for adding new machines to existing clouds.

This can be done in Foreman %post with ssh key/scp magic via a snippet to copy the results to a results page somewhere. Alternatively we can drop a one-time @reboot cronjob to make ansible perform the ping test and scp the results somewhere.

Heat map visual generation breaks when more than 10 clouds are defined.

We need to switch to using a defined variable range for the defined start and end clouds in play, this is because currently bin/simple-table-generator.py assumes a hardcoded range of 10 defined clouds in order to generate heat map visualizations against.

https://github.com/redhat-performance/quads/blob/master/bin/simple-table-generator.py#L57

Instead of changing this in the tool let's set automatically determine what this should be.

Lastly, the color spectrum list needs to be updated, currently it only supports 12 color choices:

https://github.com/redhat-performance/quads/blob/master/bin/simple-table-generator.py#L29

RFE: Tool to query upcoming changes and print them.

We need a utility to query all upcoming changes and print when they will occur and what will happen. Ideally when we refactor QUADS to take more advantage of object attributes this would be baked in but we need this now (add a healthy dash of pragmatism).

Implement full-gamut CI check for QUADS

We need tooling to implement a full gamut of CI checks against QUADS for Jenkins.
This should

  • Run all the possible quads commands
  • Record output
  • Create and manipulate system data that matches production so far as testing
  • Record and fail on any errors or functionality

sync state should not be required if using __init__

sync_state is implicit when --date option is not passed. --sync is still an option though should not be required as init calls sync so long as --date is not used. (most use cases unless querying a different time than the current time)

Break out network modification tools to be modular

There is a need for standalone tooling to do the following without having to run through the full gamut of QUADS systems/network provisioning:

Verify that the interfaces are on the correct vlan and qinq configuration on the switch side
Make necessary changes if they are incorrect
On-the-fly change back-end VLAN configuration and membership as needed easily.

visualization map - utilize temp framework while update in progress

We've got a minor bug in the heat map visualization where when it's re-generating (takes around 2hours) an empty page is displayed. We need to operate off of a temp framework and only copy the changed data back in so there aren't any periods where it displays nothing while it's updating.

Notifications: Incorrectly sent expiration notification in some circumstances.

There is currently an issue with the notifications in the following situation:

  • A large set of machines are provisioned and assigned
  • Some time later a set of machines are added to the running assignment.
  • No machines are being removed in this time frame, only additions.

QUADS looks at the current list of machines then uses comm to compare it to any net-new changes to that environment 7,5,3,1 days out. In most cases this is usually when sets of machines or all of the machines are being set to be removed in which case it lists the affected machines being slated to be removed.

In the case of the above when new machine are being added into an existing running assignment this is incorrectly flagged. The notification sent does the right thing and lists zero hosts affected, however it can be confusing for users.

Here's an example of what might get sent, note that zero hosts are listed but it shouldn't be sent if that's the case.

This is a message to alert you that in 7 days
your allocated environment:

cloud16 : 73 (Full Lab Deploy)

(Details)
http://wiki.example.com/assignments/#cloud16

will have some or all of the hosts expire.  The following
hosts will automatically be reprovisioned and returned to
the pool of available hosts.


For additional information regarding the Scale Lab usage
please see the following documentation:

http://wiki.example.com/faq/

QUADS sandbox tool needs to be updated to reflect using Python Logger Library

Since commit f114573 we need to update the sandbox creation tool to set a log location.

Otherwise we get the following errors:

Creating QUADS data structure [/tmp/quadsd2fI/quads/data]
Running quads.py --init
2017-03-14 19:41:10,927 - quads - ERROR - Log file does not exist : /opt/quads/log/quads.log
Defining example environments [cloud01, cloud02]
2017-03-14 19:41:11,023 - quads - ERROR - Log file does not exist : /opt/quads/log/quads.log
2017-03-14 19:41:11,123 - quads - ERROR - Log file does not exist : /opt/quads/log/quads.log

Automate QUADS sandbox creation

Placing an RFE here for creation of a sandbox tool. Here are the manual commands:

1) get the latest quads checkout with git (or if you already have a working directory, use that)

2) edit conf/quads.yml and set:

install_dir: /home/username/path/to/git/quads
data_dir: /home/username/path/to/git/quads/data

3) if /home/username/path/to/git/quads/data does not exist, create it

4) initialize the scheule.yaml file:

    ./bin/quads.py --init

4) define some clouds:

    ./bin/quads.py --define-cloud cloud01 --description "spare pool"
    ./bin/quads.py --define-cloud cloud02 --description "quads test cloud"

5) define some hosts:

    ./bin/quads.py --define-host host01.example.com --default-cloud cloud01
    ./bin/quads.py --define-host host02.example.com --default-cloud cloud01
    ./bin/quads.py --define-host host03.example.com --default-cloud cloud01
    ./bin/quads.py --define-host host04.example.com --default-cloud cloud01

4) sync states:

    ./bin/quads.py --sync

5) define schedules:

    ./bin/quads.py --host host01.example.com --add-schedule --schedule-cloud cloud02 --schedule-start "2017-01-01 05:00" --schedule-end "2017-12-31 05:00"
    ./bin/quads.py --host host02.example.com --add-schedule --schedule-cloud cloud02 --schedule-start "2017-01-01 05:00" --schedule-end "2017-12-31 05:00"
    ./bin/quads.py --host host03.example.com --add-schedule --schedule-cloud cloud02 --schedule-start "2017-01-01 05:00" --schedule-end "2017-12-31 05:00"
    ./bin/quads.py --host host04.example.com --add-schedule --schedule-cloud cloud02 --schedule-start "2017-01-01 05:00" --schedule-end "2017-12-31 05:00"

6) see what would happen when you move hosts (dry-run):

   ./bin/quads.py --move-hosts --dry-run

expected result:

INFO: Moving host01.example.com from cloud01 to cloud02
INFO: Moving host02.example.com from cloud01 to cloud02
INFO: Moving host03.example.com from cloud01 to cloud02
INFO: Moving host04.example.com from cloud01 to cloud02

RFE: Add pulldown menu to Request Tracker option

Once in the RT system you can search for various tags like [scale council] to see just the Scale Lab request tickets, but it would be useful to allow this view straight from the wiki menu. Having it there would make the Request Tracker menu item much more user friendly.

So have a pulldown menu with maybe 3 options.

Scale Council Tickets
Issue Tickets
All Tickets

Have user pick undercloud when generating instackenv.json

Currently, QUADS assumes that the first host in the allocation is the undercloud and generates instackenv.json based on that. It becomes cumbersome to manually edit the isntackenv.json if using some other host as undercloud. It would be great if QUADs can support any host as the undercloud.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.