Add defaults for openstack-origin-git config option
openstack-origin-git currently only supports YAML that specifies the git repositories to deploy from. This adds support for default openstack-origin-git values. The default values supported are: icehouse, kilo, liberty, mitaka, and master. For example: openstack-origin-git=master. Change-Id: I9e20d58b85d14b830e0394b8603ee018da86f004
This commit is contained in:
parent
2385ad1952
commit
5251e366b4
91
README.md
91
README.md
|
@ -23,97 +23,6 @@ This charm also supports scale out and high availability using the hacluster cha
|
||||||
juju set neutron-api vip=<VIP FOR ACCESS>
|
juju set neutron-api vip=<VIP FOR ACCESS>
|
||||||
juju add-relation neutron-hacluster neutron-api
|
juju add-relation neutron-hacluster neutron-api
|
||||||
|
|
||||||
# Deploying from source
|
|
||||||
|
|
||||||
The minimum openstack-origin-git config required to deploy from source is:
|
|
||||||
|
|
||||||
openstack-origin-git: include-file://neutron-juno.yaml
|
|
||||||
|
|
||||||
neutron-juno.yaml
|
|
||||||
repositories:
|
|
||||||
- {name: requirements,
|
|
||||||
repository: 'git://github.com/openstack/requirements',
|
|
||||||
branch: stable/juno}
|
|
||||||
- {name: neutron,
|
|
||||||
repository: 'git://github.com/openstack/neutron',
|
|
||||||
branch: stable/juno}
|
|
||||||
|
|
||||||
Note that there are only two 'name' values the charm knows about: 'requirements'
|
|
||||||
and 'neutron'. These repositories must correspond to these 'name' values.
|
|
||||||
Additionally, the requirements repository must be specified first and the
|
|
||||||
neutron repository must be specified last. All other repostories are installed
|
|
||||||
in the order in which they are specified.
|
|
||||||
|
|
||||||
The following is a full list of current tip repos (may not be up-to-date):
|
|
||||||
|
|
||||||
openstack-origin-git: include-file://neutron-master.yaml
|
|
||||||
|
|
||||||
neutron-master.yaml
|
|
||||||
repositories:
|
|
||||||
- {name: requirements,
|
|
||||||
repository: 'git://github.com/openstack/requirements',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-concurrency,
|
|
||||||
repository: 'git://github.com/openstack/oslo.concurrency',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-config,
|
|
||||||
repository: 'git://github.com/openstack/oslo.config',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-context,
|
|
||||||
repository: 'git://github.com/openstack/oslo.context',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-db,
|
|
||||||
repository: 'git://github.com/openstack/oslo.db',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-i18n,
|
|
||||||
repository: 'git://github.com/openstack/oslo.i18n',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-messaging,
|
|
||||||
repository: 'git://github.com/openstack/oslo.messaging',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-middleware,
|
|
||||||
repository': 'git://github.com/openstack/oslo.middleware',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-rootwrap',
|
|
||||||
repository: 'git://github.com/openstack/oslo.rootwrap',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-serialization,
|
|
||||||
repository: 'git://github.com/openstack/oslo.serialization',
|
|
||||||
branch: master}
|
|
||||||
- {name: oslo-utils,
|
|
||||||
repository: 'git://github.com/openstack/oslo.utils',
|
|
||||||
branch: master}
|
|
||||||
- {name: pbr,
|
|
||||||
repository: 'git://github.com/openstack-dev/pbr',
|
|
||||||
branch: master}
|
|
||||||
- {name: stevedore,
|
|
||||||
repository: 'git://github.com/openstack/stevedore',
|
|
||||||
branch: 'master'}
|
|
||||||
- {name: python-keystoneclient,
|
|
||||||
repository: 'git://github.com/openstack/python-keystoneclient',
|
|
||||||
branch: master}
|
|
||||||
- {name: python-neutronclient,
|
|
||||||
repository: 'git://github.com/openstack/python-neutronclient',
|
|
||||||
branch: master}
|
|
||||||
- {name: python-novaclient,
|
|
||||||
repository: 'git://github.com/openstack/python-novaclient',
|
|
||||||
branch: master}
|
|
||||||
- {name: keystonemiddleware,
|
|
||||||
repository: 'git://github.com/openstack/keystonemiddleware',
|
|
||||||
branch: master}
|
|
||||||
- {name: neutron-fwaas,
|
|
||||||
repository': 'git://github.com/openstack/neutron-fwaas',
|
|
||||||
branch: master}
|
|
||||||
- {name: neutron-lbaas,
|
|
||||||
repository: 'git://github.com/openstack/neutron-lbaas',
|
|
||||||
branch: master}
|
|
||||||
- {name: neutron-vpnaas,
|
|
||||||
repository: 'git://github.com/openstack/neutron-vpnaas',
|
|
||||||
branch: master}
|
|
||||||
- {name: neutron,
|
|
||||||
repository: 'git://github.com/openstack/neutron',
|
|
||||||
branch: master}
|
|
||||||
|
|
||||||
# Restrictions
|
# Restrictions
|
||||||
|
|
||||||
This charm only support deployment with OpenStack Icehouse or better.
|
This charm only support deployment with OpenStack Icehouse or better.
|
||||||
|
|
35
config.yaml
35
config.yaml
|
@ -45,14 +45,39 @@ options:
|
||||||
default:
|
default:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
Specifies a YAML-formatted dictionary listing the git
|
Specifies a default OpenStack release name, or a YAML dictionary
|
||||||
repositories and branches from which to install OpenStack and
|
listing the git repositories to install from.
|
||||||
its dependencies.
|
|
||||||
|
The default Openstack release name may be one of the following, where
|
||||||
|
the corresponding OpenStack github branch will be used:
|
||||||
|
* icehouse
|
||||||
|
* kilo
|
||||||
|
* liberty
|
||||||
|
* mitaka
|
||||||
|
* master
|
||||||
|
|
||||||
|
The YAML must minimally include requirements, neutron-fwaas,
|
||||||
|
neutron-lbaas, neutron-vpnaas, and neutron repositories, and may
|
||||||
|
also include repositories for other dependencies:
|
||||||
|
repositories:
|
||||||
|
- {name: requirements,
|
||||||
|
repository: 'git://github.com/openstack/requirements',
|
||||||
|
branch: master}
|
||||||
|
- {name: neutron-fwaas,
|
||||||
|
repository: 'git://github.com/openstack/neutron-fwaas',
|
||||||
|
branch: master}
|
||||||
|
- {name: neutron-lbaas,
|
||||||
|
repository: 'git://github.com/openstack/neutron-lbaas',
|
||||||
|
branch: master}
|
||||||
|
- {name: neutron-vpnaas,
|
||||||
|
repository: 'git://github.com/openstack/neutron-vpnaas',
|
||||||
|
branch: master}
|
||||||
|
- {name: neutron,
|
||||||
|
repository: 'git://github.com/openstack/neutron',
|
||||||
|
branch: master}
|
||||||
|
|
||||||
Note that the installed config files will be determined based on
|
Note that the installed config files will be determined based on
|
||||||
the OpenStack release of the openstack-origin option.
|
the OpenStack release of the openstack-origin option.
|
||||||
|
|
||||||
For more details see README.md.
|
|
||||||
rabbit-user:
|
rabbit-user:
|
||||||
default: neutron
|
default: neutron
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -725,14 +725,15 @@ def git_install_requested():
|
||||||
requirements_dir = None
|
requirements_dir = None
|
||||||
|
|
||||||
|
|
||||||
def git_default_repos(projects):
|
def git_default_repos(projects_yaml):
|
||||||
"""
|
"""
|
||||||
Returns default repos if a default openstack-origin-git value is specified.
|
Returns default repos if a default openstack-origin-git value is specified.
|
||||||
"""
|
"""
|
||||||
service = service_name()
|
service = service_name()
|
||||||
|
core_project = service
|
||||||
|
|
||||||
for default, branch in GIT_DEFAULT_BRANCHES.iteritems():
|
for default, branch in GIT_DEFAULT_BRANCHES.iteritems():
|
||||||
if projects == default:
|
if projects_yaml == default:
|
||||||
|
|
||||||
# add the requirements repo first
|
# add the requirements repo first
|
||||||
repo = {
|
repo = {
|
||||||
|
@ -742,34 +743,41 @@ def git_default_repos(projects):
|
||||||
}
|
}
|
||||||
repos = [repo]
|
repos = [repo]
|
||||||
|
|
||||||
# neutron and nova charms require some additional repos
|
# neutron-* and nova-* charms require some additional repos
|
||||||
if service == 'neutron':
|
if service in ['neutron-api', 'neutron-gateway',
|
||||||
for svc in ['neutron-fwaas', 'neutron-lbaas', 'neutron-vpnaas']:
|
'neutron-openvswitch']:
|
||||||
|
core_project = 'neutron'
|
||||||
|
for project in ['neutron-fwaas', 'neutron-lbaas',
|
||||||
|
'neutron-vpnaas']:
|
||||||
repo = {
|
repo = {
|
||||||
'name': svc,
|
'name': project,
|
||||||
'repository': GIT_DEFAULT_REPOS[svc],
|
'repository': GIT_DEFAULT_REPOS[project],
|
||||||
'branch': branch,
|
'branch': branch,
|
||||||
}
|
}
|
||||||
repos.append(repo)
|
repos.append(repo)
|
||||||
elif service == 'nova':
|
|
||||||
|
elif service in ['nova-cloud-controller', 'nova-compute']:
|
||||||
|
core_project = 'nova'
|
||||||
repo = {
|
repo = {
|
||||||
'name': 'neutron',
|
'name': 'neutron',
|
||||||
'repository': GIT_DEFAULT_REPOS['neutron'],
|
'repository': GIT_DEFAULT_REPOS['neutron'],
|
||||||
'branch': branch,
|
'branch': branch,
|
||||||
}
|
}
|
||||||
repos.append(repo)
|
repos.append(repo)
|
||||||
|
elif service == 'openstack-dashboard':
|
||||||
|
core_project = 'horizon'
|
||||||
|
|
||||||
# finally add the current service's repo
|
# finally add the current service's core project repo
|
||||||
repo = {
|
repo = {
|
||||||
'name': service,
|
'name': core_project,
|
||||||
'repository': GIT_DEFAULT_REPOS[service],
|
'repository': GIT_DEFAULT_REPOS[core_project],
|
||||||
'branch': branch,
|
'branch': branch,
|
||||||
}
|
}
|
||||||
repos.append(repo)
|
repos.append(repo)
|
||||||
|
|
||||||
return yaml.dump(dict(repositories=repos))
|
return yaml.dump(dict(repositories=repos))
|
||||||
|
|
||||||
return projects
|
return projects_yaml
|
||||||
|
|
||||||
|
|
||||||
def _git_yaml_load(projects_yaml):
|
def _git_yaml_load(projects_yaml):
|
||||||
|
|
|
@ -16,6 +16,7 @@ from charmhelpers.contrib.openstack.utils import (
|
||||||
get_os_codename_install_source,
|
get_os_codename_install_source,
|
||||||
git_install_requested,
|
git_install_requested,
|
||||||
git_clone_and_install,
|
git_clone_and_install,
|
||||||
|
git_default_repos,
|
||||||
git_src_dir,
|
git_src_dir,
|
||||||
git_pip_venv_dir,
|
git_pip_venv_dir,
|
||||||
git_yaml_value,
|
git_yaml_value,
|
||||||
|
@ -568,6 +569,7 @@ def git_install(projects_yaml):
|
||||||
"""Perform setup, and install git repos specified in yaml parameter."""
|
"""Perform setup, and install git repos specified in yaml parameter."""
|
||||||
if git_install_requested():
|
if git_install_requested():
|
||||||
git_pre_install()
|
git_pre_install()
|
||||||
|
projects_yaml = git_default_repos(projects_yaml)
|
||||||
git_clone_and_install(projects_yaml, core_project='neutron')
|
git_clone_and_install(projects_yaml, core_project='neutron')
|
||||||
git_post_install(projects_yaml)
|
git_post_install(projects_yaml)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue