Ported basic-test.sh to test_basic.py, and folded in
test_horizonlogin.py.
Made a testing framework for shared components.
Added test_control.py
Got rid of default .stestr.conf, as we're going to have multiple tests
running, and one conf is confusing.
Manually ordering functional tests for now, as stestr noms too much
output, and runs things in parallel, which doesn't work for our
functional tests.
Skipping compute node test for now, as it won't work until we can
connect to a control node with databases and such.
Moved very-basic-test.sh to tools/make-a-microstack.sh. It's really
more of a tool for manual testing than an automated test.
Added test-requirements and updated gitignore.
Moved auto-detection of kvm extensions to init, rather than test, as
it makes more sense there.
Change-Id: Iba7f7fe07cbb066790f802cf2a7c87c68994062c
This lays the groundwork for interactive init, as well as being able
to specify control and compute nodes.
Added preliminary config lists for control and compute nodes. Added
appropriate default snapctl config settings in install script.
Also changed "binary" questions to "boolean" questions, as that's
better wording, and it means that my docstrings are not a confusing
mix of "boolean" and "binary" when I forget which term I used.
Snuck in a fix for the "basic" testing environment -- it was missing
the Python requirements, and was therefore failing!
Change-Id: I7f95ab68f924fa4d4280703c372b807cc7c77758
Move logging output for most services to systemd.
Add a hook in snap.openstack to tell OpenStack services to wait
until we set database.ready in the snap config before starting. This
prevents spamming systemd with error messages before we run
microstack.init (See matching PR against snap.openstack, coming soon.)
Incidentally fix issue w/ the way that shell.py was running
CalledProcessError and parsing output.
Order patches part after uca-sources, to work around an issue we
discovered with apt update while those two parts are running in
parallel. (python-apt segfaults, and no fun is had by anyone.)
Remaining gaps in our logging: systemd still displays some errors
during init, which might be fixable with further ordering of snapctl
start invocations. We're also relying on MySQL and RabbitMQ log output
to know when those services are started, so we haven't moved their
output to systemd just yet.
Dropped in a fix to work w/ updated version of snap.openstack.
Change-Id: I130ed730c14ab35b8b677b9c9f573fa6fe1e8f13
We want to allow operators to override Horizon's default
settings. This involves moving local_settings.d out of the read only
snap filesystem, and into $SNAP_COMMON. This is a little bit tricky.
First, we patch settings.py and local_settings.py as we're building the
snap, to include a LOCAL_PATH in $SNAP_COMMON.
Then, we add a template with the rest of our default overrides,
and write it out to $SNAP_COMMON/horizon/local_settings.d
Finally we tweak our tests so that we can give our overrides a
spin. As a bonus, this makes test_horizonglogin.py a lot easier to run
in our multipass testing scenario!
`tox -e basic` now also runs selenium tests, as well.
Change-Id: Ic0ce18cfa1b97a93191da749095d8aa2270d5aeb
Port the python2.7 local settings overrides to the python3.6 directory
structure.
Move all local_settings.py overrides into _05_snap_tweaks.py as part
of troubleshooting some remaining problems. Everything is more
organized and functional now :-)
Added selenium tests.
Change-Id: I54923e1dc9c7ffa47c2ef6fb90ea9d224b0d2eee
Move openstack-projects part from python2 to python3.
Add cloud archive.
Update qemu and libvirt versions to those from cloud archive (they
work with python3, while the distro packages versions don't).
Switch from rocky to stein.
Fetch libvirt and qemu sources via "apt source". Gets rid of sub
version hard coding in snapcraft.
Update hard coded references in tests to rocky from stein.
Change-Id: Idb38717998a13feaaf0782e880e540f28bc452a8
Just runs `tests/basic_test.sh -m` without building the snap
first. Useful for when you want to re-run the basic_test to verify
that a sporadic issue has been fixed, without rebuilding the snap each
time.
Counterargument: you could always just run `tests/basic_test.sh -m` on
its own. I find it easier to keep one test command in my fingers,
however, rather than having to switch between "tox plus args" and
"something else plus args"
Change-Id: I5ec28864ed41a4e11726df8aee1d31b8ef097f03
Renamed the old and outdated "configure-openstack" script to "init.sh"
Updated init.sh and folded most of the configure hook into it.
Removed database installation step from install hook.
We can now install microstack without a database dump, which helps
immensely in updating. And we have a logical place to put additional
configuraiton, including some of the manual steps in DEMO.md, which
could be scripted if we gave users a chance to skip the system changes
that they wanted to skip.
Also updated README and DEMO file to match new flow. Updated test
files.
Future cleanup and features documented in Trello, but not included in
this PR, which is big enough already :-)
Change-Id: I8d926a8b463124494ddb7a4696adbe86f89db7d5
Moved openstack env variables out of snapcraft.yaml, and into a
"microtack.rc".
Made openstack-wrapper, which auto sources microstack.rc.
Key off of revised snap.openstack, which supports snapctl config
values in templates. Moved a lot of the overlay into
snap-overlay/templates, and added config values to them. Also writes
templates just once, when you run snap-openstack setup.
Change-Id: Ib0f2e3fc97f491d9ed9dfbafc61dc8e27a8a2b48
This should fix the issue where the configure hook doesn't run
properly on systems without netcat installed.
Also got rid of call to install netcat in tools/install_and_build.sh.
Doubled timeout in .zuul.yaml to deal with timeout that happened
during this test (I think that we were pushing the hour timeout as it was).
Change-Id: Ie9cd729109a871c32c12108163d22008d91155f9
Tweaked tests/basic_test.sh functional test so that it no longer
requires multpass, and can run without kvm cpu extensions being
enabled (not all machines in the game have cpu extensions.)
Added tox.ini, wrapper script for building and installation, etc.
Change-Id: I968116dd7bec412a55813c896d60cfc86c7070db
* Cruft cleanup.
Organized snapcraft.yaml better, and got rid of unecessary bits.
* Cleaned up scripts.
Moved launch.sh into snap-overlay, to be more consistent with
everything else.
Got rid of outdated and confusing configure-the-things script.
* Clarified a comment.
* Got rid of erroneous config file.
* Undeleted config file -- wasn't erroneous!
Refactor snap to work with core18.
Giving the snapcraft.yaml a base property helps tremendously with the
efficiency of the build process, and I believe that it puts us in a
better position to reliably support non Ubuntu distros going forward.
This also bases us on long supported bionic libraries, and gives us a
nice place to work from as we add Python 3 and Stein support, as well
as general polish and fixes.
These are instructions for runnning the demo that we're planning on
running at the Denver Openstack summit. It walks the user through
deploying microstack, and then deploying a functioning kubernetes
cloud on top of it.
Dropped a command to change the endpoints from localhost to 10.20.20.1
in the configure hook.
This is a temporary solution, pending automation of the database
update. (I was burning too much time getting a manual dump to work for
now.)
Updated the mysql tarball, which has the localhost -> 10.20.20.1
update.
Test for pinging Internet was failing due to not waiting long enough,
so added a proper retry strategy.
Addresses the issue where services such as a juju controller cannot
access endpoints from within an instance.
Updated all references to localhost to 10.20.20.1, and added the
address to ALLOWED_HOSTS.
Also updated version of qemu lib.
This is a little messy -- it's a bash script with some outside
dependencies, and it makes assumptions about the capabilities of the
environment that it's being run in. But it does basically work, and
provides contributors with some basic reassurance that they have built
a working snap.
Fixes lp#1812415
Prior to this fix, instances spun up by microstack could not
successfully route to and from the Internet. Setting a rule for ipv4
forwarding and iptables rules for the nat fix the issue.