diff options
| author | Michal Jastrzebski <michal.jastrzebski@intel.com> | 2015-12-10 12:54:05 -0600 |
|---|---|---|
| committer | Michal Jastrzebski <michal.jastrzebski@intel.com> | 2015-12-11 11:02:46 -0600 |
| commit | 3f2a4f2c0684f88ec39748c756552991d8ebf29b (patch) | |
| tree | 3a03a4509b36fbab697562858fe5fc22b81ad28a | |
| parent | a02bcdcacc593d709f7a25b729d931f6f8708dc1 (diff) | |
| download | kolla-3f2a4f2c0684f88ec39748c756552991d8ebf29b.tar.gz kolla-3f2a4f2c0684f88ec39748c756552991d8ebf29b.zip | |
Record version on container build
This changes default behaviour of build.py to instad of putting latest
tag on it, it puts current kolla version as found in setup.cfg
Change-Id: I4d6e9a0159c6a5598abd58072594df4204427308
Partially-Implements: blueprint upgrade-nova
Partially-Implements: blueprint record-version
| -rw-r--r-- | ansible/group_vars/all.yml | 2 | ||||
| -rw-r--r-- | etc/kolla/globals.yml | 2 | ||||
| -rwxr-xr-x | kolla/cmd/build.py | 10 |
3 files changed, 11 insertions, 3 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 431de1dc6..3c5e41e0f 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -114,7 +114,7 @@ magnum_api_port: "9511" #################### # Openstack options #################### -openstack_release: "latest" +openstack_release: "1.0.0" openstack_logging_verbose: "True" openstack_logging_debug: "False" diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index a59508df6..62feb5ddb 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -75,7 +75,7 @@ neutron_external_interface: "eth1" # OpenStack options #################### # This option is used to specify the tag to use when pulling the Docker images -#openstack_release: "latest" +#openstack_release: "1.0.0" # Use these options to set the various log levels across all OpenStack projects #openstack_logging_verbose: "True" diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index 216d9d48b..1944ee978 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -227,6 +227,14 @@ class WorkerThread(Thread): LOG.info('{}:Built'.format(image['name'])) +def get_kolla_version(): + local_conf_path = os.path.join(find_base_dir(), "setup.cfg") + config = six.moves.configparser.RawConfigParser() + config.read(local_conf_path) + version = config.get("metadata", "version") + return version + + def find_os_type(): return platform.linux_distribution() @@ -267,7 +275,7 @@ def merge_args_and_config(settings_from_config_file): defaults = { "namespace": "kollaglue", - "tag": "latest", + "tag": get_kolla_version(), "base": "centos", "base_tag": "latest", "install_type": "binary", |
