Commit Graph

36 Commits (7566f1304e69bba9678f26e54e4ea4c55f78048d)

Author SHA1 Message Date
leizhang 7566f1304e policy check for pod
add policy check for pod

Change-Id: I6f0526d0339f59f5842d4d66914e5f208f50f857
Partial-implements: blueprint policy-enforce
8 years ago
Eli Qiao fbe5b8065f Add periodic task framework
This patch adds periodic timer to conductor service.
Any new periodic tasks need to be added to magnum/service/
We add 2 default configure options to support periodic task:
    'periodic_enable', default=True
    'periodic_interval_max', default=60
These 2 options are for rpc_service.
We don't need to supervisor timers because timer itself won't have any
exception, and it is not a thread, which means can not be killed.

Partial-Implements: blueprint add-periodic-task
Co-Authored-By: ShaoHe Feng <>
Change-Id: I132d9cc89b26baf249b62b713ccd3776f0078d7d
8 years ago
Jenkins da9d3d82e5 Merge "policy check for node" 8 years ago
Yongli He 4ecd46800b policy check for node
add policy check for node.

Change-Id: I4b025cb4f47c4683d826237318afdf2c2009841a
Partial-implements: blueprint policy-enforce
8 years ago
ZhiQiang Fan 63c0e33fac remove duplicate option settings
oslo.log can extract its options via oslo.config.generator, since
we already declear it in tox.ini, it is unnecessary to define it
in magnum.opts again, otherwise it will generate oslo.log options

Change-Id: I21b76c4a65addf6fe009e27ce9ebdf7e77f259d6
Closes-Bug: #1469021
8 years ago
Jenkins d6021502d4 Merge "policy check for baymodel" 8 years ago
Yongli He 24dcc5b8fd policy check for baymodel
add policy check for baymodel.

Partial-implements: blueprint policy-enforce

Change-Id: I5f0e4b54bc33ddc3f1cd2f88bf4388894099ac59
8 years ago
Jenkins 64c33404eb Merge "Update config example" 8 years ago
Kai Qiang Wu(Kennan) 74b9dc5542 Update config example
There is something change to requirements file, so
run genconfig to produce new example file.

Closes-Bug: #1465938
Change-Id: I0883c087a34d0396df22b69e201bce1e6c0f57b9
8 years ago
Kai Qiang Wu(Kennan) 8d061755fd Fix the kubernetes opts
We missed that kubernetes opitions in opts file
it needed that to get correct genconfig file.

Closes-Bug: #1465902
Change-Id: I8fa3dbdb2641a775fc5deafb0a52e52d29f0d3b6
8 years ago
yuntongjin d057f8c442 first policy check for bay
add first policy check for bay.

Co-Authored-By: ShaoHe Feng <>
Change-Id: Ieadc95d84f0e4ecc68c95673617d154f05a15a57
Partial-implements: blueprint policy-enforce
8 years ago
yuntongjin c317bea209 introduce policy for magnum
This patch introduce oslo.policy for magnum and also add policy
rules in a policy.json file.

we can define policy rules refer to

Co-Authored-By: ShaoHe Feng <>
Change-Id: I37f8b0ba8108162e1f826780ff43c8d21f476209
Partial-implements: blueprint policy-enfore
8 years ago
Lan Qi song 17218a8011 Use oslo.log instead of oslo.incubator log module
oslo.log has graduated from oslo-incubator, magnum need use oslo.log
instead of oslo.incubator log module.

NOTE: openstack.common.log registers its options at import time, but
oslo.log needs to call register_options() explicitly.

Change-Id: I671bb020b628bd972813daf5936040b7f1c6bf7a
Closes-Bug: #1459736
8 years ago
Kai Qiang Wu(Kennan) 86cf092a68 Rename bay_k8s_heat to more general name
Since bay is not bind to k8s, it can use with swarm or other containers
cluster ways. We rename it to make it more general case.

Closes-Bug: #1459081
Change-Id: Idd7bc9497b3059ceea153a641a0c65d1f2ed50eb
8 years ago
Andrew Melton fa191a233a Make Docker client timeout configurable
To support long running Docker operations we need to increase our
timeout, but a good value for the timeout will change per deployment.
So, add it as a config option so that it can be tweaked as necessary.

Change-Id: Ie53fa5086e73111bf9f42dbf596172af8d936cf0
Closes-Bug: #1450559
8 years ago
digambar edb2875902 Remove cluster_coe from magnum conf
Change-Id: Ieb2ec147b8a6f960da9456768436d98b6c470eaa
8 years ago
digambar 88e0fa840d Remove cluster_type from conf and Update conf example for opts changes.
Closes-Bug: #1449313

Change-Id: I0841e522e8d87a6a48c83abc87676c426d7e16a2
8 years ago
Jennifer Carlucci 1d358a8be3 Add timeout parameter to bay create
Add timeout parameter to bay create
Update test cases for the timeout parameter

Change-Id: If8603fc47ba3659eba145e91bcaa30095cabd094
Closes-bug: #1433109
8 years ago
Jenkins f4b5640c54 Merge "Add Swarm TemplateDefinition" 8 years ago
Jenkins 0c29b5a47c Merge "Implement baylock in conductor for horizontal-scale" 8 years ago
Andrew Melton 6d64188d50 Add Swarm TemplateDefinition
This change will allow deployers to select either Kubernetes
or Swarm to be the CoE used in Magnum's bays. A Swarm bay uses
a subset of the BayModel parameters used for Kubernetes.
Node discovery is provided via Docker's public discovery
endpoint, but operators and users can override this with
Bay's discovery_url argument.

Implements: bp multiple-bay-templates

Change-Id: I5278e6d477298085d07673810e5d8813d21b7730
8 years ago
Kennan 1a5518fbac Update conf example file
As we added some new conf field, we need to update
conf example file to reflect the changes.

Closes-Bug: #1443948
Change-Id: Iae0507aa33c6a264c0d3b421dc1b08396e8d8b80
8 years ago
Hongbin Lu c5bd2530e8 Implement baylock in conductor for horizontal-scale
Implements a distributed bay lock to avoid race conditions when
multiple conductors are deployed. A conductor should acquire a lock
when it is about to perform an operation on a bay. The lock
acquisition will succeed if the bay is not currently locked or the
conductor that owned the lock is dead. An ActionInProgress exception
will be raised if the lock acquisition fails.

Change-Id: I055696c43e356dc6fbd03996f1dd28e3c8c41594
Partial-Implements: blueprint horizontal-scale
8 years ago
Cedric Brandily 679e31c1de Support keystone regions
This change enables keystone region support by defining the option
'region_name' in 'heat_client' section:

* magnum searchs only in region_name region for heat endpoint when
  region_name is not None,
* otherwise magnum search in all regions.

Closes-Bug: #1437049

Change-Id: Ib2895e7b56e48d6dfa8fe4680e12fc897d5cef03
8 years ago
digambar 094ddf3b47 Allow specification of ssh authorized key and token url for coreos.
1. Implements token generation mechanism for coreos.
2. Add cluster_type and discovery_token_url fields in magnum.conf.
3. Add field to bay model to specify the ssh authorized key.
   This value is passed into the kubenode-coreos.yaml
   through kubecluster-coreos.yaml.
   This key is used to login into the coreos instance.

Implements part of bp introduce-coreos

Change-Id: Id8b18a7bf016120102c8da1c3339f70564aedae4
8 years ago
Jay Lau (Guangya Liu) 60657cc21d Move folder heat-kubernetes to magnum/templates
We are now putting all templates under magnum/templates , so the
original template for k8s should also be moved here.

Change-Id: I44924911705578c1f55fa87df83d0a9a800576b5
Closes-Bug: #1425964
8 years ago
digambar de38fc4d3f Introduce a coreos for heat-kubernetes in magnum.
Below are the changes added.
    1. Added heat-templates for coreos(micro OS).
    2. Removed whitespaces.

Implements part of bp introduce-coreos
Change-Id: Id519c6b32b8bcfcc6c152e68bb988268be308ece
8 years ago
OTSUKA, Yuanying 6d02ff33e8 Implement a Heat k8s template for Ironic
Ironic instance doesn't create using "OS::Neutron::Port".
So we should modify this template to below order.

1. Create master vm (and assign fixed ip on given private network)
2. Create minion vm (and assign fixed ip on given private network)
3. Configure minion vm (with master address)
4. Configure master vm (with minion address)

This uses "SoftwareDeployment" to handle dependency.

And there is some limitations derived from ironic:

- Security group doesn't set.
- Disable cinder volume for docker storage.
- Require private network name parameter which provides baremetal network.
- Disable default user `minion` at master.

Implements: blueprint ironic-heat-template

Change-Id: Ia661c6ed08887a6a6961fb0ba5d34f2278794658
8 years ago
Kennan fadfe8a257 Fix docker client server mismatch
make docker api version configurable, which is more flexible for
end users to try on different environment

Closes-Bug: #1422297

Change-Id: I78bf55e3a14af7239cae3e175ce7b8eb1f2561b1
8 years ago
Jenkins 03769f8499 Merge "Pull in updates from larsks heat template repo" 8 years ago
digambar 108bb361af Pull in updates from larsks heat template repo
These were the commits pulled from larsks github repo(s)

ef48d0 configure flannel via systemd unit
4e1b7a Merge pull request #11 from hongbin/replacement_policy
02ea53 Set port replacement_policy to AUTO
b06de8 call daemon-reload before starting services
c265dd fix json syntax problem
88a8bd configure cinder volume for docker storage
7ae6e5 default server_image wasn't useful
809d9b updated requirements in README
6595da integrate wait-for-flanneld into docker.service.yaml
cb51ae use flanneld sysconfig for etcd url
6cf8b9 added note re: vxlan backend issues on centos
18d9c6 make portal_net address range a parameter
343bde added license
efb341 add fix for docker/docker#9468
b235dc use less confusing name for flannel json config
08d873 make vxlan support conditional (+ doc updates)
daee9e permit kube api access via services
747d06 add a "minion" default user
b1c36c refactor config using software config support
0d981d use centos atomic host
538f7a remove

Change-Id: Ibd22a2805328ef76ad3996113b10e82cc1a16a9b
Closes-Bug: 1417642
8 years ago
Davanum Srinivas 7fb0745d08 Freshen up the magnum conf file
Use "tox -e genconfig" to regenerate the config file as
a few things have changed

Change-Id: I59c24cdb8d8e43ba67893e2be1cb7abfd2b54847
8 years ago
Kennan 5608cf8603 Update the conf sample file
As we update dev guide for users, it have steps to copy conf.sample
to /etc/magnum/magnum.conf, so we need to update conf sample file.
make sure all options are listed.
This file is genereated from tox

Closes-Bug: #1413145
Change-Id: Ie847ca8a3cd96ffeac0b202a6fd9215a52d16754
8 years ago
Hongbin Lu 01be8b5ba9 Add max_limit to sample config
Change-Id: I24ab855d2eb0b14a1da3b56808eaf3f10d506ff2
9 years ago
Jay Lau (Guangya Liu) 2eb763fd23 Merge larsks/heat-kubernetes to Magnum
In 20150106 IRC meeting, we decide to add two templates to magnum
for creating bays. One for virt and the other is for ironic.

larsks/heat-kubernetes is for virt and we can merge it first.

Change-Id: I9db19c006db9c9b725a562f532448d447761542f
9 years ago
digambarpatil15 149b283a63 Added Magnum Configuration file
Change-Id: Icd41fb63918ac66fab7f64b37ed7eecb571b5adb
Implements: blueprint magnum-api-service
9 years ago