Skip to content

Add all-in-one CI testing #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 9, 2022
Merged

Add all-in-one CI testing #84

merged 13 commits into from
Aug 9, 2022

Conversation

markgoddard
Copy link
Contributor

@markgoddard markgoddard commented Jul 1, 2022

  • Add kayobe-automation submodule & configuration
  • Add kayobe to requirements.txt
  • Add an all-in-one Terraform configuration & README
  • Add a playbook to create test resources
  • Populate kayobe-config Tempest configuration for refstack
  • Add Github actions workflows to build the kayobe image, and run all-in-one tests againsts PRs

@markgoddard markgoddard self-assigned this Jul 1, 2022
@markgoddard markgoddard force-pushed the automation branch 12 times, most recently from a732baf to 813b3ec Compare July 4, 2022 08:37
This is used for Continuous Integration/Continuous Deployment (CI/CD).
This file is necessary for kayobe-automation.
kayobe-automation prefers to have kayobe installed via requirements.txt
in kayobe-config.

For now we're just installing the stackhpc/wallaby branch of the
StackHPC fork of kayobe.
@markgoddard markgoddard force-pushed the automation branch 9 times, most recently from f2e0741 to 14e7da5 Compare July 14, 2022 13:27
@markgoddard markgoddard requested a review from jovial July 21, 2022 16:15
@markgoddard
Copy link
Contributor Author

It probably needs a little more work, but wanted to get your thoughts @jovial

@markgoddard markgoddard force-pushed the automation branch 3 times, most recently from e9bca45 to 29bfd36 Compare July 23, 2022 17:54
* add a workflow to build the kayobe-automation image

  The image is published on Google packages.

  https://github.com/stackhpc/stackhpc-kayobe-config/pkgs/container/stackhpc-kayobe-config

* add a workflow to run an all-in-one test

* call both workflows for PR events
@markgoddard markgoddard changed the title WIP: All-in-one CI Add all-in-one CI Jul 25, 2022
@markgoddard markgoddard changed the title Add all-in-one CI Add all-in-one CI testing Jul 25, 2022
@markgoddard markgoddard marked this pull request as ready for review July 25, 2022 12:54
Copy link
Contributor

@jovial jovial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@markgoddard
Copy link
Contributor Author

Is there anything in here that would conflict with existing consumer configuration? Perhaps automation.conf/config.sh?

@jovial
Copy link
Contributor

jovial commented Aug 3, 2022

Is there anything in here that would conflict with existing consumer configuration? Perhaps automation.conf/config.sh?

I've been making things conditional on the kayobe environment:

  if [ "$KAYOBE_ENVIRONMENT" == "aio" ]; then
    # Seem to get servers failing to spawn with higher concurrency
    export TEMPEST_CONCURRENCY=1
  fi

so we could supply a basic configuration that could be used for client side CI and put any upstream specifics behind guards like this. Yes it would merge conflict, but at least that provides a nice way of keeping it up to date. What do you reckon? The one slight gotcha is that you need to supply KAYOBE_ENVIRONMENT instead of relying on .environment as kayobe-env will not have been loaded yet. That could possibly be resolved if we just read that file as well.

Edit: reworded slightly

@markgoddard
Copy link
Contributor Author

Is there anything in here that would conflict with existing consumer configuration? Perhaps automation.conf/config.sh?

I've been making things conditional on the kayobe environment:

  if [ "$KAYOBE_ENVIRONMENT" == "aio" ]; then
    # Seem to get servers failing to spawn with higher concurrency
    export TEMPEST_CONCURRENCY=1
  fi

so we could supply a basic configuration that could be used for client side CI and put any upstream specifics behind guards like this. Yes it would merge conflict, but at least that provides a nice way of keeping it up to date. What do you reckon? The one slight gotcha is that you need to supply KAYOBE_ENVIRONMENT instead of relying on .environment as kayobe-env will not have been loaded yet. That could possibly be resolved if we just read that file as well.

Edit: reworded slightly

I did that for the concurrency (adapted from SOS), is there anything else it needs to be done for?

@jovial
Copy link
Contributor

jovial commented Aug 3, 2022

Is there anything in here that would conflict with existing consumer configuration? Perhaps automation.conf/config.sh?

I've been making things conditional on the kayobe environment:

  if [ "$KAYOBE_ENVIRONMENT" == "aio" ]; then
    # Seem to get servers failing to spawn with higher concurrency
    export TEMPEST_CONCURRENCY=1
  fi

so we could supply a basic configuration that could be used for client side CI and put any upstream specifics behind guards like this. Yes it would merge conflict, but at least that provides a nice way of keeping it up to date. What do you reckon? The one slight gotcha is that you need to supply KAYOBE_ENVIRONMENT instead of relying on .environment as kayobe-env will not have been loaded yet. That could possibly be resolved if we just read that file as well.
Edit: reworded slightly

I did that for the concurrency (adapted from SOS), is there anything else it needs to be done for?

Don't have any good examples really, but I've started shipping some additional test lists:

KAYOBE_AUTOMATION_TEMPEST_CONF_OVERRIDES="${KAYOBE_AUTOMATION_CONFIG_PATH}/tempest/tempest.overrides.conf"

if [ ! -z ${KAYOBE_ENVIRONMENT:+x} ]; then
  KAYOBE_AUTOMATION_TEMPEST_CONF_OVERRIDES="${KAYOBE_AUTOMATION_CONFIG_PATH}/tempest/tempest-${KAYOBE_ENVIRONMENT}-${KAYOBE_AUTOMATION_TEMPEST_LOADLIST:-}.overrides.conf"

  # Check if loadlist specific overrides exist, if not fallback to environment overrides.
  if [ ! -e "${KAYOBE_AUTOMATION_TEMPEST_CONF_OVERRIDES}" ]; then
      KAYOBE_AUTOMATION_TEMPEST_CONF_OVERRIDES="${KAYOBE_AUTOMATION_CONFIG_PATH}/tempest/tempest-${KAYOBE_ENVIRONMENT}.overrides.conf"
  fi
fi

Trying to establish a convention for where to place tempest overrides. It basically does first found on:

  • overrides for specific test list using a specific environment
  • overrides for specific environment
  • shared overrides

Trying to go for convention over configuration here, so that people don't start doing it in multiple different ways.

Maybe that shouldn't be in the config file, but i started there whilst experimenting.

Copy link
Contributor

@jovial jovial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New changes look good to me.

@markgoddard markgoddard merged commit f3e22f1 into stackhpc/wallaby Aug 9, 2022
@markgoddard markgoddard deleted the automation branch August 9, 2022 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants