75 Commits

Author SHA1 Message Date
Sean Dague
e73f88e70b tweak ps4 for readability
After staring at a bunch of logs, try to crisp up the ps4 output for
maximum readability.

This also adds PS4 to all calling scripts by having a common PS4 in
stackrc. It should make understanding when clean fails a bit more
straight forward.

Change-Id: Ia1f8dff5c1102c32c146a020a9f033c65d2c50de
2016-02-04 07:47:45 -05:00
Sean Dague
5cad4d3fe9 refactor zookeeper into a slightly more generic dlm module
This attempts to make the zookeeper installation a bit more modular
(assuming that other folks will want to add other dlms as plugins),
and addresses the service start issues with zookeeper under
ubuntu/upstart.

Zookeeper is not going to be installed by default. Services need to
ask for it with use_dlm.

Change-Id: I33525e2b83a4497a57ec95f62880e0308c88b34f
2015-11-11 14:30:12 -05:00
Davanum Srinivas
33a96ffc26 Zookeeper for DLM scenarios
In Tokyo, there was a cross project session on distributed
key locking:
https://etherpad.openstack.org/p/mitaka-cross-project-dlm

In support of the discussion there, we'll need support for
a zookeeper service in Devstack and ability to use libraries
like Tooz for DLM functionality.

In this review, we pick up some configuration files from
monasca-api and copy the lib/template to implement the
zookeeper lifecycle. Those services that need zookeeper
need to add "zookeeper" in ENABLED_SERVICES.

Change-Id: Icef26e5cdaa930a581e27d330e47706776a7f98f
2015-11-03 12:13:50 -05:00
Jenkins
f845b22a45 Merge "Remove ceilometer in favor of plugin" 2015-09-28 17:49:32 +00:00
Wei Jiangang
be65c6f88d Fix typos in stackrc and unstack.sh
Componets => Components
pluggins => plugins

Change-Id: I82634a55fd5895599099c94817af7d8d2f602859
2015-09-14 18:55:07 +08:00
Chris Dent
e9a4750fe1 Remove ceilometer in favor of plugin
The ceilometer project is moving to using a devstack plugin rather
than having ceilometer in the base devstack. This is to allow
greater control and flexibility.

Change-Id: I413ab159474b7d7231ad66d3a482201f74efe8a8
2015-09-09 16:44:29 +00:00
Jordan Pittier
23bf045c18 Check if cinder is enabled before doing anything lvm2 related
On some system Cinder is not enabled so we can't assume LVM is installed. So
do not try to `sed` /etc/lvm/lvm.conf or clean LVM VG if cinder is not enabled

Change-Id: I09b1a7bee0785e5e1bb7dc96158a654bd3f15c83
2015-06-19 14:34:59 +00:00
James E. Blair
9e220b9b2b Move trove into in-tree plugin
Once the trove code is copied into the trove repo and it is used
as a devstack-plugin, we can remove trove-specific code from
devstack.

Change-Id: I8f9f1a015edb7ec1033e2eaf0b29ab15d89384ce
Depends-On: I3506dec0e6097f9c2e9267110fdfb768faa23c85
2015-05-14 07:57:23 -07:00
Dan Smith
6cdb2e0f1a Remove the lvm.conf filter during cleanup
This avoids us leaving the filter in the global lvm config. Without cleaning
this up, we can hit some failures to run stack.sh because devices are excluded
that we need to be able to see. This resets it to what it was before when
we do a cleanup.

Also, do this before we add the line, so we don't add multiple lines on
successive runs.

Closes-bug: #1437998
Change-Id: Idbf8a06b723f79ef16a7c175ee77a8c25f813244
2015-04-23 22:12:15 +00:00
Dean Troyer
dc97cb71e8 Mostly docs cleanups
Fix documentation build errors and RST formatting

Change-Id: Id93153400c5b069dd9d772381558c7085f64c207
2015-03-28 14:35:12 -05:00
Sean Dague
6e275e170c provide an override-defaults phase
during the glusterfs integration it was seen that plugins might need
to set new defaults on projects before the project files load. Create
a new override-defaults phase for that.

Intentionally not adding to the documentation yet until we're sure
this works right in the glusterfs case.

Reported-By: Deepak C Shetty <deepakcs@redhat.com>
Change-Id: I13c961b19bdcc1a99e9a7068fe91bbaac787e948
2015-03-26 20:50:11 +05:30
Dean Troyer
5a9739a4ca Rename lib/neutron to lib/neutron-legacy
Preparing to refactor lib/neutron to support Neutron as the default
network config.  lib/neutron will be renamed internally and refined
to support a couple of specific configurations.

Change-Id: I0d3773d14c4c636a4b915734784e7241f4d15474
2015-03-25 22:22:11 -04:00
Mahito OGURA
a519f429cf Fix unstack.sh to stop stop_dstat when it is disabled.
unstack.sh always stop dstat process, however unstack.sh show 'dstat: no process
found' when dstat is disabled.
This patch stop function of stop_dstat, when dstat is disabled.

Change-Id: If9054826bed8a7fedd4f77ef4efef2c0ccd7f16e
Closes-Bug: #1435148
2015-03-23 15:19:57 +09:00
Jenkins
4a9b154f5e Merge "Fix is_keystone_enabled()" 2015-02-18 21:00:14 +00:00
Dean Troyer
5ce44cd63b Fix is_keystone_enabled()
is_keystone_enabled() was calling is_service_enabled(), which is what called
is_keystone_enabled() in the first place.  Make it work as designed and
also change calls to use the full service name.  Note that this is all
still comptible with the prior usage of 'is_service_enabled key'.

Change-Id: I9c28377ecf074b7996461d2a4ca12d88dfc4d47e
2015-02-16 10:52:18 -06:00
Jenkins
d26da45b98 Merge "add gating up/down script for devstack" 2015-02-11 20:53:44 +00:00
Sean Dague
9a413abcd4 add gating up/down script for devstack
This adds the test infrastructure for testing that unstack.sh and
clean.sh do the right thing, and actually stop what's expected. This
is designed to be used in upstream testing to make unstack and clean a
bit more certain.

It includes numerous fixes to make these pass in an errexit
environment with the gate config. The scripts still don't run under
errexit because we don't assume we've handled all possible cleanup safely.

Change-Id: I774dfb2cc934367eef2bb7ea5123197f6da7565b
2015-02-11 06:10:38 -05:00
Rob Crittenden
ebcb849634 Unconfigure the devstack CA when USE_SSL is True
Change-Id: I17cb5e5d93bfe6fc6746ee530f639e2ed42da85a
2015-02-09 22:45:22 -05:00
Sean Dague
117c6c2048 remove lib/stackforge
Now that we have a working external plugin mechanism stackforge
projects definitely don't need to be directly in devstack. These were
largely unused previously anyway.

Change-Id: I300686b2ac976d9b454404842b3f210fd7c239d9
2015-02-10 07:53:36 -05:00
Daniel Genin
d470867f08 Adds support for LVM ephemeral storage in Nova
DevStack currently lacks support for LVM ephemeral storage in Nova.
This support is important for testing of Nova's LVM backend. The
proposed change adds a default volume group, to be shared by Cinder
and Nova. It also adds a configuration option NOVA_BACKEND, which
must be LVM if it is set, that determines whether Nova should be
configured to use LVM ephemeral storage.

Change-Id: I4eb9afff3536fbcd563939f2d325efbb845081bb
2015-01-19 11:51:16 -05:00
Sean Dague
537532931d Make changes such that -o nounset runs
This makes a bunch of variable cleanups that will let -o nounset
function, for the time being we hide nounset behind another setting
variable so that it's not on by default.

Because this is bash, and things are only executed on demand, this
probably only works in the config it was run in. Expect cleaning up
all the paths to be something that takes quite a while.

This also includes a new set of unit tests around the trueorfalse
function, because my change in how it worked, didn't. Tests are good
m'kay.

Change-Id: I71a896623ea9e1f042a73dc0678ce85acf0dc87d
2015-01-15 13:06:14 -05:00
Sean Dague
2c65e71ab8 Implement devstack external plugins
This is an initial pass at plugin infrastructure for devstack which
allows specifying an external repository via:

enable_plugin <name> <giturl> [branch]

It implements the devstack specification for this at
I173dee3d57967b1d2ffd30e4868a2832aeac97ce

Change-Id: I8e4175313b3cf0b12e981122358b1288a7eb0746
2015-01-06 12:30:25 -05:00
Sean Dague
2f8e08b572 remove nova baremetal driver support
This has been deleted from the nova tree, we should purge it from
devstack, as it will not work any more.

Change-Id: I20501fec140998b91c9ddfd84b7b10168624430a
2014-12-05 08:31:16 -05:00
Joe Gordon
944b28280b Drop workaround for pip < 1.4
Now that we are on pip 1.5.6 lets drop the workaround to make pip 1.4
work. As this is a development/testing tool requiring a newer pip
shouldn't be an issue. Also stack.sh installs pip by default.

Work around introduced in https://github.com/pypa/pip/issues/709

Change-Id: I0e7aad1d21f4fce4c020ce36685bb56893c66bdc
2014-10-01 19:52:23 -07:00
Martin André
48a75c14a1 Source lib/dstat in unstack.sh
`stop_dstat` function was extracted into $TOP_DIR/lib/dstat in commit
e0b08d04ab41f9aca96997c87bd9fa13feba2536 but the new lib was not sourced in
unstack.sh.

Change-Id: I6878552d9f384fdd7882e52000b37ac6a60844c3
Closes-Bug: 1366713
2014-09-08 09:02:44 +00:00
Joe Gordon
e0b08d04ab Pull dstat logic into its own function so grenade can use it
In order to use dstat on the new side of grenade, pull dstat code into
its own lib with the function start_dstat

Change-Id: I5c908d594a6f3a90ed4b3f744002bf606841cf07
2014-08-26 17:10:52 -07:00
Stanislaw Pitucha
bd5dae0618 Do a proper tls/ca cleanup in unstack
Certificates and the index were left in the data directory after
running unstack. That would break devstack on the next run.

partial blueprint devstack-https
Change-Id: I6eb552a76fb29addf4d02254c027e473d6805df1
2014-06-30 10:52:25 +01:00
Eric Windisch
e994f5708d Remove bm_poseur, unmaintained and obsolete
The bm_poseur git repository link has been broken
for over 11 months. The virtualized/fake baremetal
environment is not working and has not worked in a
long time. Now, on the tail of enabling 'enable -o errexit',
this functionality now has a hard break.

Change-Id: I3cbd8db58c422bc5273d2433278aaa5e449ecfd9
Closes-Bug: 1285954
2014-02-28 15:21:38 -05:00
Jenkins
7719d4aca8 Merge "Begin is_service_enabled() cleanup" 2014-02-12 07:19:11 +00:00
Dean Troyer
e4fa721322 Begin is_service_enabled() cleanup
This converts the special cases in the is_service_enabled() function to call
individual functions declared by the projects.  This allows projects that
are not in the DevStack repo and called via the extras.d plugin to handle
an equivalent service alias.

* Ceilometer
* Cinder
* Glance
* Neutron
* Nova
* Swift

TODO: remove the tests from is_service_enabled() after a transition period

Patch Set 2: Rebased

Change-Id: Ic78be433f93a9dd5f46be548bdbd4c984e0da6e7
2014-02-07 10:06:21 -06:00
Dean Troyer
1023ff7c3a Move ironic to plugin
Also adds an is_ironic_enabled() function to prepare for an upcoming
change in is_service_enabled().

Change-Id: I6e6e0e8b70221e231785ab27e9b5d4836933ac4c
2014-02-04 15:51:38 -06:00
Dean Troyer
fc744f9713 Convert trove to plugin
Also adds an is_trove_enabled() function to match
https://review.openstack.org/69497 changes for is_service_enabled().

Change-Id: Ic0408ff6d9816aec8a3506931470470342a5dcd7
2014-01-27 17:16:33 -06:00
Brant Knudson
0049c0c434 Make unstack.sh more like stack.sh
unstack.sh and stack.sh both have to "configure projects", but the
code was different. This change makes it so the 2 sections of the
files are the same.

Change-Id: Ia06f8bbfbe2a6e87fb406e34e13a39bd7fa9e5af
2014-01-16 18:16:48 -06:00
Gordon Chung
5eec5b6b80 command not found errors on unstack
- add lib/ceilometer and lib/heat to source list for when stop_heat
and stop_ceilometer functions are called.
- add lib/tls source to lib/keystone for when is_ssl_enabled_service
function called.

Change-Id: Ief05766e9cfda71fb6392c8a757d04751283414e
Closes-Bug: #1269047
2014-01-14 11:23:39 -05:00
Dean Troyer
9fc8792b0a Robustify service shutdown
* Save PID when using screen in screen_it()
* Add screen_stop()
* Call out service stop_*() in unstack.sh functions so screen_stop()
  can do its thing

Closes-bug: 1183449
Change-Id: Iac84231cfda960c4197de5b6e8ba6eb19225169a
2014-01-11 11:46:19 -06:00
Dean Troyer
cdf3d76647 Add stack phases to extras.d handling
Add hooks to stack.sh, unstack.sh and clean.sh to call the extras.d
scripts at multiple points in stack.sh.  This allows these scripts to
perform installation and startup tasks at similar times as they would
if integrated into stack.sh.

extras.d/70-tempest.sh is present as an example of the structure
of these scripts.

See extras.d/README.md for more information.

Change-Id: Ic1fe522559b94d204d6c0319a2e3d23684c8d028
2013-10-15 16:13:47 -05:00
Dean Troyer
23f69d83e5 Split the creation of $STACK_USER account out of stack.sh
Automatically creating a new user account is not always the right course
of action when stack.sh is running as root.  Plus, the re-exec did not
work correctly in some cases.

* Create tools/create-stack-user.sh to set up a suitable user
  for running DevStack
* Abort stack.sh and unstack.sh if running as root and suggest creating a
  suitable user account.

Change-Id: I5d967c00c89f32e861449234ea8fe19261cd9ae3
2013-10-04 16:36:00 -05:00
Nikhil Manchanda
0cccad43aa Added Trove (Database as a Service).
- Added changes to stackrc for the Trove Repos.
- Added support to devstack for "install", "configure",
  "init", and "run"

implements blueprint:trove-devstack-integration

Change-Id: Ib3f6daad33e629f764a174b80762c808ce8588e2
2013-09-11 23:48:07 +00:00
Jenkins
630d03e77a Merge "Basic support of Ironic" 2013-09-03 16:19:06 +00:00
Dean Troyer
2aa2a89cdb Add support for Docker as Nova hypervisor
* Add basic support for hypervisor plugins in lib/nova_plugins
* Add lib/nova_plugins/hypervisor-docker to use Docker as a Nova
  hypervisor.
* Add tools/install_docker.sh to install the Docker daemon and
  registry container, download base image and import
* Configure Nova to use docker plugin
* Add docker exercise and skip unsupported ones

Nova blueprint: new-hypervisor-docker

Change-Id: I9e7065b562dce2ce853def583ab1165886612227
2013-08-28 22:36:48 -05:00
Roman Prykhodchenko
ce696b60d7 Basic support of Ironic
Ironic is an OpenStack project than brings a
separate service for baremetal provisioning.
Currently Ironic is in incubation but it needs
to have basic support in devstack to provide
automatic deployment testing.

Change-Id: Ide65a1379fa207a6c8b2c7d9a4f9c874b10fd9ba
2013-08-22 12:30:51 +03:00
zhang-hare
d98a5d0a58 enable apache2 server as front end for swift
1.install apache and wsgi module
2.config apache2 vhost and wsgi files for proxy,
account, container and object server.
3.refactor apache functions from horizon and swift
into lib/apache

Change-Id: I3a5d1e511c5dca1e6d01a1adca8fda0a43d4f632
Implements: blueprint enable-apache-frontend-for-swift
2013-07-29 11:15:21 +08:00
Ian Wienand
31dcd3e7ab Use unique build dir for pip installs
There is a bug in pip [1] where it will choose to install a package
from an existing build-dir if it exists over the version actually
requested.

Thus if a prior component has installed a later version of the
package, the unpacked code is already in /tmp/$USER-pip-build; it gets
re-installed and manifests in a confusing error along the lines of

---
 Downloading/unpacking requests>=1.1,<1.2.3
   (from -r /home/stack//python-cinderclient/requirements.txt (line 5))
   Running setup.py egg_info for package requests
   Requested requests>=1.1,<1.2.3 (from -r
   /home/stack/python-cinderclient/requirements.txt (line 5)),
    but installing version 1.2.3
...
  error: Installed distribution requests 1.2.3 conflicts with
    requirement requests>=1.1,<1.2.3
---

I believe pip 1.4 fixes this problem, but it should always be safe to
specify a unique build-directory for pip installs to avoid picking up
old versions.

We also add a cleanup_tmp function for clearing out anything that
stack.sh might leave around when un-stacking, and add a catch-all for
the pip-build dir.

[1] https://github.com/pypa/pip/issues/709

Change-Id: I7ce919cddfd6d6175ae67bd864f82e256ebc7090
2013-07-19 10:44:50 +10:00
Mark McClain
b05c876994 update for name change to Neutron
Note: Nova and Horizon are not updated until those projects have
migrated.

Change-Id: I256ef20e7caadd9c96e6dd908c5d8b69ca5c4aeb
2013-07-07 00:15:11 -04:00
JordanP
614202fc40 On unstack : clean up network namespaces created by quantum
Also removes OVS ports

Fix Bug #1156837

Change-Id: Id4178c0a12a3ada76403a57a736a9c7a908d6a4a
2013-05-22 10:00:30 +02:00
Chmouel Boudjnah
0c3a5584c6 Enable swift by default.
- Set by default SWIFT_REPLICAS to 1 since this is the most common use
  case when using it in devstack.
- If we have swift_replicas to 1 launch the object container account and
  proxy servers in foreground in screen.
- Allow any s- services if we have just 'swift' in service enabled
  instead of having to specify all s- services to enable swift. This will be
  removed in the future.
- Set object server starting at 6013 instead of 6010 to not conflict
  with remote ssh x11 forwarding.

Change-Id: I890b6953b70283bfa0927fff0cf5e92f3c08455b
2013-03-06 13:16:37 +01:00
Sean Dague
f3fd44c4be Revert "Enable swift by default."
This reverts commit 5a5cbf7274a6a50bb766ec590cf885430ed5c5d0.

This breaks on a default openstack install on Ubuntu 12.10,
revert for now until this can be cleaned up to work out of the
box.

Change-Id: I185509cc30bd28e920cdab60fc92129949bd6b0d
2013-03-04 17:52:03 -05:00
Chmouel Boudjnah
5a5cbf7274 Enable swift by default.
- Set by default SWIFT_REPLICAS to 1 since this is the most common use
  case when using it in devstack.
- If we have swift_replicas to 1 launch the object container account and
  proxy servers in foreground in screen.
- Allow any s- services if we have just 'swift' in service enabled
  instead of having to specify all s- services to enable swift. This will be
  removed in the future.

Change-Id: I496f79e14f99bd7e9f2c7deee12a4b6e935c3a5b
2013-02-22 18:50:08 +01:00
Chmouel Boudjnah
43eb0b3159 Make sure to cleanup swift on unstack/relaunch.
- Fixes bug 1049553.

Change-Id: I9fef93d25512c014dfb882adf0e169487bf877d8
2013-01-12 20:10:34 +00:00
Dean Troyer
768295e9f1 Add mechanism to automatically load additional projects
This adds an extras.d directory to contain startup scripts that
stack.sh runs automatically at the end.  Similar to local.sh
except the scripts are sourced into the stack.sh process rather
than executed as a child process.  This gives them complete
access to the stack.sh environment.

Convert Tempest to use this format as an example.

Change-Id: Ibc95e6aaecf4211da948319eb452293ae4357780
2013-01-09 19:53:45 -06:00