87 Commits

Author SHA1 Message Date
zhurong
272effcece Fix ZUN_TEMPEST_PLUGIN repo and branch name
Change-Id: I23b8b016749db9db89351752b7541513ae323cf6
2017-11-15 06:20:39 +00:00
Zuul
7a78012c20 Merge "Configure wsproxy base_url in devstack" 2017-11-01 14:27:39 +00:00
Hongbin Lu
83b7fb110e Remove the local tempest plugin
The plugin has been split into its own repository [1] in accordance
with Queens Goal "Split Tempest Plugins into Separate Repos/Projects"
[2]. This patch removes the local copy as well as the setuptools
entry point.

[1] https://github.com/openstack/zun-tempest-plugin
[2] https://governance.openstack.org/tc/goals/queens/
    split-tempest-plugins.html

Implements: blueprint zun-split-tempest-plugins
Change-Id: Ibfeb38b52c05a9f886dc7524d892842971cbd264
2017-10-26 09:13:30 +07:00
Zuul
ea3e8f42c4 Merge "Implement Cinder attach workflow" 2017-10-24 04:21:04 +00:00
Hongbin Lu
18b3b059c4 Implement Cinder attach workflow
The attach workflow is as following:
* reserve_volume in Cinder
* initialize_connection in Cinder
* connect_volume in os_brick
* attach in Cinder
If the workflow executes sucessfully, the Cinder volume
is attached to the compute host as a device. Zun will
mount the device to the filesystem in order to use it.

The detach workflow is as following:
* begin_detach in Cinder
* disconnect_volume in os_brick
* terminate_connection in Cinder
* detach in Cinder

Partial-Implements: blueprint direct-cinder-integration
Change-Id: Ib47e76d14b3dc036f903a3988bb138288cdb601e
2017-10-18 18:00:04 -04:00
Kien Nguyen
27138e817c Update keystone auth_uri and auth_url
Update keystone auth_uri and auth_url in zun.conf to connect with keystone
using /identity/v3 and /identity_admin/v3.

Closes-Bug: #1692576
Change-Id: Ie107e6ef9d3ebfee77b4782842e1ed966738c6cd
2017-10-18 09:40:04 +07:00
Hongbin Lu
111caeb218 Configure wsproxy base_url in devstack
In devstack setup, zun-ui failed to attach to the container.
This is because the base_url is not configured and the default
value doesn't allow a remote attach. This patch fixed it.

Change-Id: Ie47e424c2e1542a290419df952019363711b9fd0
2017-10-17 21:27:36 +00:00
Lance Bragstad
8e0e94ba9b Register default network policies in code
This commit uses the existing policy-in-code module to move all
default policies for networks into code. This commit also adds
helpful documetation about each API those policies protect, which
will be generated in sample policy files.

bp policy-and-docs-in-code

Co-authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: I3d5486c2b4d696c364eef1d16db403db6504da70
2017-10-10 05:32:33 +00:00
Kien Nguyen
8fa8843dbc Check glance is enabled or not
- Check glance is enabled or not before upload sandbox
image to glance.
- Remove unused function is_zun_enabled.

Change-Id: I426298816e1144c66fd13f21949afdb058bce9cb
Closes-Bug: #1650245
2017-10-05 11:17:07 +07:00
Jenkins
7c34835223 Merge "Remove SCREEN_LOGDIR from devstack setting" 2017-09-22 06:19:05 +00:00
deepakmourya
e81ff780b2 Remove SCREEN_LOGDIR from devstack setting
Screen support has been completely removed from devstack.
So we don't need anymore

[1] the change id of I8c27182f60b0f5310b3a8bf5feb02beb7ffbb26a
    the change set of  cdba1b371628aa0e8bc5b687351c5ee9b39e9bc6

Change-Id: Id0b5243746aaf519d2f7e887bdbfe9d0a9e78c2f
2017-09-21 14:32:48 +05:30
Pradeep Kumar Velusamy
08d7d18d05 Modifying devstack link in README.rst
Change-Id: Ide92883fbb7e1ab4128253d2173a8f4504b68424
2017-09-20 22:18:33 +05:30
Hongbin Lu
6dc2866167 Mova NovaDocker driver to contrib
We decided to deprecated NovaDocker driver in the team meeting [1].
Therefore, we moved the driver to the contrib folder. NovaDocker
was an experimental driver that attempts to leverage Nova to provide
networking to containers. However, as kuryr integration implemented,
this driver is not needed anymore.

[1] http://eavesdrop.openstack.org/meetings/zun/2017/
    zun.2017-07-11-03.00.log.html

Change-Id: I770fe13a004dc56ad20fe8eca545f05c4504e48e
2017-09-14 12:09:47 -04:00
Jenkins
d2eb42646f Merge "Needn't separately process start_zun_compute" 2017-09-12 10:21:33 +00:00
Feng Shengqin
e26ab1a8aa Needn't separately process start_zun_compute
Change-Id: I191b2ca1c4d33acbf64a096845496c0807c5e989
2017-09-11 16:57:18 +08:00
Feng Shengqin
488b9f6573 Fix the name of stop_zun_etcd
Change-Id: I92ab8f89c13bf43b1aaef5cb490095445d1303f4
2017-09-11 16:47:08 +08:00
Hongbin Lu
4d0a4f8b02 Make docker cluster store point to right cluster
Devstack set the docker cluster store to point to the etcd cluster
in current host. In multinode gate, each node setup an independent
etcd cluster so docker in each host uses an independent store.
This will result in an issue that resources (i.e. network) created
in one node cannot be found in another node.

This commit fix it by making all nodes use the same etcd cluster
in service host.

Partial-Implements: blueprint multi-node-ci
Change-Id: Ieeecc2ef14a1077a2ef91ee369b317f53d7ffb81
2017-09-01 10:38:13 -04:00
Kien Nguyen
9a64e23333 [Multinode gate] Fix error failed to update store
By default, kuryr-libnetwork set DOCKER_CLUSTER_STORE to localhost [1]
It will raise error failed to update store [2]

NOTE: This fix won't fix all error with multinode gate. The gate still failed
      because the error KuryrException: Another pool with same cidr exist.

[1] https://github.com/openstack/kuryr-libnetwork/blob/master/devstack/settings#L23
[2]
http://logs.openstack.org/11/494111/11/experimental/gate-tempest-dsvm-zun-multinode-docker-sql-ubuntu-xenial-nv/d2145e8/logs/screen-zun-compute.txt.gz#_Aug_20_06_16_07_462697

Change-Id: I95baae5d42af6a61ddf684673433621297f000ab
2017-08-21 09:43:32 +07:00
Kevin Zhao
51f54b8e7b Add new entrypoint 'experimental' for capsules
According to the comment in https://review.openstack.org/#/c/484602/,
introduce the new api endpoint for capsules will reduce the API burden
when changing.

Change-Id: Ia686406449fdfa3ac4947fd997d9e2a8baf8f4b6
Signed-off-by: Kevin Zhao <kevin.zhao@arm.com>
2017-08-16 18:04:43 +08:00
Hongbin Lu
7aba2d5f8a Switch from mode_wsgi to uwsgi
When the wsgi community goal was first approved, the push was to
use mod_wsgi. mod_wsgi has many issues when being used in devstack
for development or testing (see [1]). This commit will switch the
deployment of zun-api to uwsgi.

[1] https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi
    .html#uwsgi-vs-mod-wsgi

Change-Id: Iec05ccb8aceee6874e3c04280fe7596f8292e333
Closes-Bug: #1692382
2017-08-07 17:07:46 +00:00
Hongbin Lu
ffb5762344 Get python3 tempest tests job to pass
* Switch to file backend if python35 is enabled because the default
  backend is swift that hasn't migrate to py35 yet.
* Safe decode bytes string of response body.

Depends-On: Ib222bf2e84f4b06b0dc3981fc3554510658d4ef0
Partial-Implements: blueprint support-python-35
Change-Id: I2d9a95dda8ead16421186116118badfce1de7ba6
2017-08-04 18:48:02 +00:00
melissaml
bb278a4e5c Update URLs in documents according to document migration
Change-Id: I18371b565836357e027b1c618b052ea132f3ef33
2017-07-13 21:48:56 +08:00
zhurong
98654e6111 Devstack stop zun-wsproxy process when service enabled
Change-Id: I0a934f45e7a7fabac31825e33cc84a8e2ef2ddc4
2017-07-10 17:28:39 +08:00
Hongbin Lu
73ead98af1 Switch to devstack-plugin-container
Change-Id: Ib59e665dfb9a1fb69216e49ff9020e18c3ab92c3
2017-05-24 19:23:21 +00:00
Feng Shengqin
677ba36549 Change to git.openstack.org
Change-Id: Ia8a68c5ba22cdb80ae0b5bd868ff499ac25f3207
Closes-Bug: #1692586
2017-05-24 01:55:50 +00:00
Hongbin Lu
bdaf7796fa Set docker_remote_api_ip in devstack
This config is set to hostname by default, but this won't work in
multi-host setup. Therefore, we set it to host_ip instead.

Change-Id: I023bf4823513bae277ab08db62f103642b87accb
2017-05-19 15:23:53 +00:00
Yongfeng Du
3e0cce8f49 MultiHost support
For the nodes other than service host, only enable zun-compute.
q-agt and kuryr is also required to provide network connection,
which need to be specified in local.conf.

Change-Id: I78055c75ad545cf8809dae973d1180dce2ecf77f
Closes-Bug: #1691606
2017-05-18 14:41:29 +08:00
Yongfeng Du
9f0609016f Fix the zun.conf file for MultiHost env
In the MultiHost case, should use SERVICE_HOST instead of HOST_IP

Change-Id: Icf1c8de53996a4b73db057d598bffa859ad91ccd
Partial-Bug: #1691606
2017-05-18 11:42:28 +08:00
Kevin Zhao
24c37bce01 Add a new service wsproxy to Zun
Implements: blueprint stream-via-rest-api

Change-Id: I22dc9e39a2133d1cb2951f54c76edee286582ad0
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2017-05-16 07:58:41 +00:00
Feng Shengqin
416e11205d Optimize the link address
Use https instead of http to ensure the safety

Change-Id: Ib99c018d77cced1c6d3770d2a1b9d28d6491e03c
2017-05-09 10:50:20 +00:00
cooldharma06
bed9d80a4d Add docker-ce in check_docker and updated docker daemon with proxy configuration
For devstack-plugin-container plugin, existing docker-ce checks added in zun
and kuryr-libnetwork. Update - Proxy configuration changes and
docker daemon command is deprecated since 1.12, update with dockerd command

Change-Id: Ibd5ac7f933570688523ba273e0413a0d8eae1681
Related-Bug: #1684057
2017-04-26 02:51:25 -04:00
Hongbin Lu
fc6ac8d177 Avoid running multiple etcd process
If both Zun and Kuryr-libnetwork are enabled in devstack, the script
might fail since etcd will be installed and started twice. This commit
fixed it.

Change-Id: Ieffbb7a86e99a3e9a03cbfcadb2daf92d8f62cfb
2017-04-19 23:47:43 +00:00
Hongbin Lu
b4fc4e3ea1 Make ETCD's port configurable in devstack
Change-Id: I1e75f6e942cf6bd95b0604fc5944c40514d9052d
2017-04-18 18:18:17 -04:00
Jenkins
ce1089603b Merge "Document how to run tempest tests locally" 2017-04-06 14:25:42 +00:00
Hongbin Lu
d17fe49109 Document how to run tempest tests locally
* Add a dev document for how to run tempest tests locally.
* Pull the instruction of running unit tests out of quickstart
  guide and make it a standalone document.
* Fix the unit tests guide to make it work at Ubuntu 16.04.
* Add a sample local.conf as minimal to run devstack
* Add osprofiler guide to the index page.

Change-Id: I31794733c9225478f5df029279c8415a23b1caa0
2017-04-04 04:05:41 +00:00
Hongbin Lu
b48df2f5bb Enable WSGI mode in gate only
In before, zun devstack plugin enabled wsgi mode by default. This
patch proposed the reverse: disable wsgi mode by default. This fall
back to the screen mode if users haven't explicitly set
ZUN_USE_MOD_WSGI to True. However, we enable wsgi mode in gate to
satisfy the requirement of community wsgi goal [1].

The rational of this change is to ease the development process by
running zun-api at screen, which is more dev-friendly than running
it in apache2/httpd. In screen, it is easier to do dev operations
like shutdown/restart/debug.

[1] https://governance.openstack.org/tc/goals/pike/
    deploy-api-in-wsgi.html

Change-Id: I8b47a23e94de8676c415a66da2097fc69ceb8336
2017-03-31 15:22:39 +00:00
Hongbin Lu
48c57fa33f Properly tear down zun-api at wsgi mode
If wsgi mode is enabled, zun-api should be disabled in apache,
otherwise shutdown the process as before.

Change-Id: I33979a5454a3d68415fcfff01e9de6e99f8b31d6
2017-03-27 21:32:34 -05:00
Feng Shengqin
05b72e7025 Optimize the devstack setup for wsgi deployment
1. Rename zun_error.log to zun_api.log
2. Start the zun-api and create two tabs in devstack screen:
the first tab is for taling the zun_api.log, the second tab
is for tailing the zun_access.log

Change-Id: I10a75c09e7a577615c331ceb0f422375443afeee
Closes-Bug: #1674028
2017-03-21 06:36:31 +00:00
zhurong
f925296126 Fix sudo cat Permission denied error
Last commit [0], using sudo cat, this will gievs the error:
/etc/systemd/system/docker.service.d/docker.conf: Permission denied

This patch will fix this.

[0]: I2154919c394e546edac56934c8860d4177fc9603

Change-Id: I87a8b7397d2dad2d26eac9a020d5ea3b21645aa2
2017-03-07 21:58:44 +08:00
zhurong
31500cec93 Fix devstack docker install in centos
Now devstack docker install in centos will gives the error:
sed: can't read /etc/systemd/system/docker.service.d/docker.conf: No such file or directory

ref the docker install guide [0], fix this error.

[0]: https://docs.docker.com/engine/admin/#centos--red-hat-enterprise-linux--fedora

Change-Id: I2154919c394e546edac56934c8860d4177fc9603
2017-03-06 11:13:29 +08:00
Jenkins
ea5a9783b0 Merge "devstack: enable wsgi on devstack" 2017-03-01 06:11:53 +00:00
Eli Qiao
e0ab1808cd devstack: enable wsgi on devstack
Added new config which is used in devstack zun lib,
      ``ZUN_USE_MOD_WSGI``, default value is False.

Added ZUN_USE_MOD_WSGI=True in Setting file of zun gate.

Implements: blueprint deploy-zun-api-in-wsgi
Change-Id: I99fe6bf762942d306b305619199575a060ba82f5
2017-02-28 15:12:39 +08:00
Hongbin Lu
e7ea7bf7ff Let API listen to 0.0.0.0 in devstack
In dev environment, it is convient to let zun-api listen to all
addresses.

Change-Id: I0aa27222023d00109c127018cbdd4c408980ae67
2017-02-27 12:38:05 -06:00
Eli Qiao
6251630dec devstack: restore xtrace in zun nova lib
Change-Id: I196efbffbeb22b18ee07b6392373c877d9e1117b
2017-02-22 16:01:59 +08:00
Hongbin Lu
ae65dae1db Remove gate_hook.sh from /devstack folder
This script has moved to /zun/tests/contrib
https://review.openstack.org/#/c/432843/
https://review.openstack.org/#/c/432844/

Change-Id: Ide12f6e2da3b161300c93a292ae01bda3f9352b5
Depends-On: I957c5b3ecabfe634623179bb84496bc1bcb67e30
2017-02-12 23:14:38 -06:00
Kevin Zhao
7a354bf1ab Add support for zun attach/resize in server
Change-Id: I56a9ddaabd20cffc956ecd2dc202e8a661a0338d
Partially-Implements: BP support-interactive-mode
2017-02-09 16:15:20 +08:00
zhangjl
c809cc0408 Ensure the plugin of zun for devstack can work on ubuntu 14
Because of the wrong usage of sed command, we cannot deploy zun
with devstack on ubuntu 14. This patch aims to fix this problem.

Change-Id: I7a6ea3ccf3dda1429d37974e6c142b4b1d97865d
Close-Bug: #1662788
2017-02-08 07:22:40 +00:00
Hongbin Lu
eb8cebf35e Enable zun-etcd only if db type is etcd
Change-Id: Iccdae37a9c60aba92b4deb5c8c35d5ff898fb032
2017-02-04 01:48:18 +00:00
Kevin Zhao
00c79963b9 Add support for Docker Remote API
Change-Id: I581450f6294b1117bb22dfdc63c36bf0e2ccc336
Partially-Implements: BP support-interactive-mode
2017-01-19 16:59:46 +08:00
prameswar
d72dcd96bd [devstack] Copy bash_completion script during zun installation
Copy zun.bash_completion script to /etc/bash_completion.d
so that users/developers can take advantage of auto completion
of zun commands.

Closes-Bug: #1657004

Change-Id: Icb47fe4864176d4ca3699b0616f2c222eba22ae3
2017-01-18 17:51:17 +00:00