1470 Commits

Author SHA1 Message Date
OTSUKA, Yuanying
c5abff2511 Enable Barbican in devstack
This patch changes to use barbican plugin for devstack.

Change-Id: I7d2620888bef3ae6bcc34c333ef3a935245195cf
Partial-Implements: blueprint barbican-support
2015-09-10 14:41:29 +09:00
Jenkins
8bb2f5f2c9 Merge "Swarm agent to get templated proxy values" 2015-09-09 22:57:59 +00:00
Jenkins
a14aadeaec Merge "Add version hashes to enforce version updates" 2015-09-09 21:03:28 +00:00
Jenkins
4f8ec28627 Merge "DB Migration does not work for SQLite backend" 2015-09-09 20:05:28 +00:00
Vilobh Meshram
2219a2d82e DB Migration does not work for SQLite backend
Update the doc to mention it clearly that DB Migration
does not work for SQLite Backend.

Change-Id: I7d2682f6b4af37fb0cc2d640b02fd598baf42625
Closes-Bug: #1487257
2015-09-09 10:25:58 -07:00
Ryan Rossiter
6b97cd8780 Add version hashes to enforce version updates
Nova uses a map of hashes for important parts of versioned objects. It
keeps a static mapping of previous objects, and generates a map of the
current objects. If these differ, a test fails, enforcing that the hash
of the object needs to be updated. Along with this, it usually means
that the version of the object itself needs to be updated because the
RPC contract of that object is now broken.

oslo_versionedobjects contains a fixture for helping generate and test
these hashes, so this fixture is used to test Magnum's object hashes.

Change-Id: I586f73570dc7b65c83b216d09d11e8dba3c63b2c
Closes-Bug: #1491855
2015-09-09 13:26:14 +00:00
Manjeet Singh Bhatia
2c9efa98bd Swarm agent to get templated proxy values
This patch will proxy values to swarm-agent
services which would other wise give error
if you are not under proxy.

Change-Id: I63a0340a6806794e6f22a761cc1510697b3011bb
Closes-Bug: #1493952
2015-09-09 07:16:36 -04:00
Jenkins
8aa164040f Merge "Add documentation for testing objects" 2015-09-09 10:38:40 +00:00
Jenkins
25ae7c7044 Merge "Conductor: Remove _update_stack_outputs from bay_conductor" 2015-09-08 14:40:04 +00:00
Jenkins
c5aecccbd4 Merge "Fix retrieving ca_cert" 2015-09-08 14:22:59 +00:00
Jenkins
deb87197fb Merge "Fix heat-mesos README" 2015-09-08 14:19:41 +00:00
Jenkins
f14b98a114 Merge "Change instructions to use get-pip" 2015-09-08 14:06:39 +00:00
Jenkins
1972605bf9 Merge "Fix typo in magnum/common/x509/config.py" 2015-09-08 13:16:08 +00:00
Ryan Rossiter
645f61ddcf Add documentation for testing objects
Documentation for the o.vo fixture for checking object versions is being
added in Ie21746f6c2bab447a187b0b7507acdcea3d88c14.

This adds more documentation for how Magnum uses o.vo, and also how the
tests work for checking the object version.

(Related change: I586f73570dc7b65c83b216d09d11e8dba3c63b2c)

Change-Id: Ic490671b9e529bc2aed4ae385cd73dcb78fed397
Related-Bug: #1491855
2015-09-08 13:01:03 +00:00
OTSUKA, Yuanying
7f64ad8427 Fix typo in magnum/common/x509/config.py
There are some typo in magnum/common/x509/config.py.
This patch fixes below.

* ALLOWD_EXTENSIONS => ALLOWED_EXTENSIONS
* DEFAULR_ALLOWED_EXTENSIONS => DEFAULT_ALLOWED_EXTENSIONS
* DEFAULR_ALLOWED_KEY_USAGE => DEFAULT_ALLOWED_KEY_USAGE

Change-Id: Iedd7ff73e5ae61b73660c91dd4772ad8a92b52d7
Closes-Bug: #1492540
2015-09-08 19:54:39 +09:00
Eli Qiao
5bf86fb3f6 Conductor: Remove _update_stack_outputs from bay_conductor
In commit 6a264b6f, we involved template_def as a member of HeatPoller,
so this helper function _update_stack_outputs will be useless since
we don't need to call get_template_definition again.

Besides, adjuest the testcases.

Closes-Bug: #1493192
Change-Id: Ie2ff8bf6f7e29092b8b11f663b70fe1cc4e93814
2015-09-08 03:19:09 +00:00
Jenkins
0e71f6d9bc Merge "Modify log message" 2015-09-08 03:00:22 +00:00
Eli Qiao
033acfb066 Fix heat-mesos README
glance use --visibility to indentify public/private images

Change-Id: If317cc3c852be68caa81b3524eb81e7774293cae
2015-09-08 10:41:05 +08:00
OTSUKA, Yuanying
e3b2c0e037 Fix retrieving ca_cert
Bay doesn't have ca_cert_uuid, so this patch fix to use ca_cert_ref.

Change-Id: I76596216e70f8b01a9c94238f0e3df7c20b66042
Closes-Bug: #1493180
2015-09-08 10:35:11 +09:00
Jenkins
375b8fd606 Merge "tox: rm all pyc before doing unit test" 2015-09-07 23:16:25 +00:00
Jenkins
c7c60d2b64 Merge "Remove retrieving external-network-id" 2015-09-07 16:23:31 +00:00
Monty Taylor
bffd59c781 Change instructions to use get-pip
If you're going to install software using pip, then it means you're
willing to use pip to install software. If you are willing to do that,
then installing the latest pip via pip is completely reasonable. The
distro pip will often be too old or broken to work properly.

Closes-Bug: #1481085
Change-Id: If161c04aac30f489162cd72a329f71ddbe5635d6
2015-09-07 17:15:28 +01:00
Hua Wang
e9ef563ce3 Modify log message
Modify log message

Change-Id: I7fd73c9b200455d2ecb7deb83b8aeedf7875d9a2
Closes-Bug: #1492743
2015-09-06 19:33:27 +08:00
Eli Qiao
d6efb3221e tox: rm all pyc before doing unit test
Delete python bytecode before every test run.

Because python creates pyc files during tox runs, certain
changes in the tree, like deletes of files, or switching
branches, can create spurious errors.

Closes-Bug: #1368661
Change-Id: I7e563875848acc7ec767f97b31fc8a95b23ee880
2015-09-06 10:38:26 +00:00
Jenkins
7ed30d1989 Merge "Change manager to master in docker-swarm" 2015-09-05 22:02:01 +00:00
Madhuri
cefc5a9ac3 Add Certificate controller for TLS support.
The Certificate controller has 2 operations:

1. POST

Generate X509 certificate using bay's CA cert.
Below is an example of Certificate POST API request using magnum command:

Example Request:

    curl -X POST -H 'Content-Type: application/json' \
        -d '{"bay_uuid": "<bay_uuid>", "csr": "<csr>"}' \
        http://localhost:9511/v1/certificates

This creates a X509 certificate signed by the given bay's CA and returns
it. No database information is stored in Magnum against it. For each POST
request, a new certificate is generated.

Example Response:

    {"bay_uuid": "<bay_uuid>", "csr": "<csr>",
     "pem": "<pem encoded certifiacte>"}

2. GET
Fetches the CA cert associated with a bay. Below is an example of CA GET
API request using magnum command:

Example Request:

    curl -X GET http://localhost:9511/v1/certificates/<bay_uuid>

This fetches stored CA cert for the given Bay, which can be used to validate
any client and node certificates signed by the Bay's CA. The value for each
is fetched from Barbican or Magnum db based on the different configuration
for storage of certificates.

Example Response:

    {"bay_uuid": "<bay_uuid>", "pem": "<pem encoded certifiacte>"}

Co-Authored-By: Andrew Melton <andrew.melton@rackspace.com>

Change-Id: I4b72cc1e1bddc7a7c7eeb0ab22d3769a666ccb2b
Partially-Implements: bp secure-kubernetes
2015-09-05 13:45:43 +00:00
OTSUKA, Yuanying
d6916e8bb1 Generate certs while creating bay
Bay needs two certificates for CA and magnum conductor to support TLS
between Kubernetes API server to Magnum. This patch generates these
certs while creating bay.

Change-Id: Ide13a0a5dbb43f2acc085283859edf6373106d7f
Partial-Implements: blueprint magnum-as-a-ca
2015-09-05 16:25:58 +09:00
OTSUKA, Yuanying
0fc4ff0002 Add a tool to manage x509 objects
Magnum should manage x509 objects,
* To generate CA key and cert for each bay
* To generate client key for magnum-conductor
* To sign a public key for kube-apiserver
* To sign a public key for end user

This patch adds these abilities to Magnum.

Change-Id: Ib5d7180a230dad635b3b570122c5af88cd1ac7a7
Partial-Implements: blueprint magnum-as-a-ca
2015-09-05 16:25:57 +09:00
OTSUKA, Yuanying
1727c1728f Add CertManager to store CA and client certificate
To implement TLS support, we should store CA and client cert for each
bay. This patch adds common library to store cert to Barbican.
Magnum uses service admin privilege to store the cert, this means that
end user can't retrieve CA cert and private key from Barbican
directly.

This patch is copied from neutron-lbaas project.
*  I435189b2637e32803a13ebd4951e61fac4ab234d

Change-Id: I519228d9749ad610db3e0c698caa1144813f9d52
Partial-Implements: blueprint magnum-as-a-ca
2015-09-05 16:25:57 +09:00
Jenkins
04691e75ce Merge "Fix keystone client usage in barbican client" 2015-09-04 15:57:10 +00:00
Jenkins
062b0c6854 Merge "Introduce unit test for genconfig" 2015-09-04 15:54:16 +00:00
OTSUKA, Yuanying
77d1e32c94 Fix keystone client usage in barbican client
In magnum.common.clients, barbican client uses
`keystone()._client` directly, but `keystone().client`
is better. Because, keystone()._client is None is it
is not loaded.

This fixes it.

Closes-Bug: #1491257
Change-Id: I3771ebef9c2a1d3756ea4ed2f964751d1c2da43f
2015-09-04 09:36:31 +09:00
Martin Falatic
d0c01ede2e Enhanced error checking in get_discovery_url
get_discovery_url should never return an empty
URL. Added check and exception for this situation.

Co-Authored-By: Vilobh Meshram <vilobhmm@yahoo-inc.com>

DocImpact
Closes-Bug: #1491178
Change-Id: I2d5b3996c0ee53f40399ca3fd0d6b987daa26f79
2015-09-03 15:14:32 -07:00
Bharath Thiruveedula
6a264b6f11 Updates the node count key for all types of bay
By default the key to get node count is "number_of_minions"
which is not true for baymodels other than kubernetes
and it raises "KeyError" so that status of bay will not
be updated.

Closes-Bug: #1489725
Change-Id: I9f6a8ebbc26f501d54ef97937329845a12002d6c
2015-09-03 12:42:00 +05:30
Jenkins
4eac3173d3 Merge "Fix the hard-coded etcd cluster size" 2015-09-03 06:34:39 +00:00
Jenkins
f087d5cb29 Merge "Fix missing sql_opts" 2015-09-03 06:27:59 +00:00
OpenStack Proposal Bot
134a5043e0 Updated from global requirements
Change-Id: Iaf0533031748d867ba1ca23e99988b317fec9bb7
2015-09-03 03:07:10 +00:00
OTSUKA, Yuanying
fe0417589d Remove retrieving external-network-id
Currently, external-network-id can accept network name,
so we can set external-network name to baymodel.
Previously change `I0d2be33723817c604c6cab704d2efcbd1e4cc79f`
already removed the same for kubernates baymodel.

This patch remove from mesos/swarm baymodel.

Change-Id: Ia9276c75932483b244efe4c8f2eef5c9684128e8
Closes-Bug: #1491273
2015-09-03 09:18:00 +09:00
OTSUKA, Yuanying
4eb503d8e1 Introduce unit test for genconfig
We don't have unit test for genconfig, so sometimes this feature
is broken because of missing options or moving options.
This patch adds checking test for config parameters.

Change-Id: I67a44ef02704f66740a6bda2b6502b6b1636a08b
Closes-Bug: #1490825
2015-09-03 09:02:36 +09:00
OTSUKA, Yuanying
8e9e893cac Fix missing sql_opts
`tox -egenconfig` doesn't work, because
`magnum.db.sqlalchemy.models.sql_opts` is moved to
`magnum.db.sql_opts`.

This fixes it.

Change-Id: Ia617ee0ceae5bff7d745a9b48bfcdf9dfc00e336
Closes-Bug: #1490817
2015-09-03 08:54:13 +09:00
Jenkins
4abd2f128b Merge "Fix jenkins failure for image not found" 2015-09-02 23:51:07 +00:00
Hongbin Lu
c6c4053d95 Fix the hard-coded etcd cluster size
In before, the etcd cluster size was hard-coded to 1, since HA mode
hadn't been implemented at that time. Now, we fix it. The etcd
cluster size is set to the number of master nodes.

Change-Id: I198ca604401bc805f31e8187f5245177761edf56
Closes-Bug: #1491602
2015-09-02 18:07:50 -04:00
Kai Qiang Wu(Kennan)
48ea311eaa Fix jenkins failure for image not found
Seems jenkins default image API version is 2, image v2 version
not support use name as image-show. I tried latest devstack, it
calls v2 API. So in jenkins jobs let's use v1 version now.

In addition, specify the mountpoint parameter on VolumeAttachment
resource. Heat used to allow missing of this parameter but it is
not the case anymore.

Change-Id: I1ae1eb20b9552444f0242a72e958c139209bf1f6
Closes-Bug: #1491314
2015-09-02 14:35:44 -04:00
Manjeet Singh Bhatia
c98c7a6eae Change manager to master in docker-swarm
This patch will replace use of manager with
master in nova instances because as we will
support more masters in future and master word
is appropriate for nova instances.

Change-Id: I543010796f0cac9bcfed8387656d801aea9dc13a
Implements: blueprint manager-to-master
2015-09-02 08:29:59 -04:00
Jenkins
97ad930147 Merge "Add roles to context" 2015-09-02 01:27:21 +00:00
Jenkins
4089b1be0b Merge "Change bay.*_cert_uuid to bay.*_cert_ref" 2015-09-01 20:06:11 +00:00
Jenkins
182b6aa520 Merge "Fix the link for Docker Remote API" 2015-09-01 09:43:02 +00:00
venkatamahesh
41d08fe000 Fix the link for Docker Remote API
The link given to Docker API getting error as it
is old version. So I removed the version extension
and also named it as "Docker Remote API"

Change-Id: If3d6ce2c74455a2d8c2c9fff51af1f5cbe330e76
Closes-Bug: #1488708
2015-09-01 13:57:57 +05:30
OTSUKA, Yuanying
7a51a250f6 Change bay.*_cert_uuid to bay.*_cert_ref
We decided to use barbican to store certs, and uuid of certs are
stored to bay. But Barbican doesn't return uuid, it returns URI. So
we should modify db table to store uri.

Change-Id: I5c6baf43b35df9a1134fce4fbc581d7642fa8e84
Closes-Bug: #1489707
Partial-Implements: blueprint magnum-as-a-ca
2015-09-01 16:16:36 +09:00
Jenkins
c084eb20a2 Merge "Fix the representation of REST" 2015-09-01 05:09:38 +00:00